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

store fixed&预约列表

上级 b7e7c029
import planManage from './planManage' import planManage from './planManage'
import reservationManage from './reservationManage'
const followModules = { const followModules = {
planManage planManage,
reservationManage
} }
export default followModules export default followModules
import followApi from '../../../utils/followup/followapis'
export default {
namespaced: true,
state: {
reservationList: { //居民列表
pageNum: 1, //当前页码
pageSize: 10, //每页数据大小
total: null, //总数
},
},
mutations: {
GET_RESERVATION_LIST(state, payload) {
state.reservationList = payload
},
},
actions: {
getReservationList(context, payload) {
const { pageSize, pageNum } = context.state.reservationList;
followApi.getReservationList({
pageSize,
pageNum,
...payload
}).then(({data}) => {
context.commit('GET_RESERVATION_LIST', data);
});
}
},
}
...@@ -21,13 +21,23 @@ const planManageApi = [ ...@@ -21,13 +21,23 @@ const planManageApi = [
name: 'getGroupList', name: 'getGroupList',
description: '获取分组列表', description: '获取分组列表',
}, },
] ];
/*预约管理API*/
const reservationManageApi = [
{
url: '/followup/appointmentPatient/',
method: 'get',
params: 'params',
name: 'getReservationList',
description: '获取预约列表',
},
]
const api = {}; const api = {};
const apis = [...planManageApi]; const apis = [...planManageApi, ...reservationManageApi];
apis.forEach(item => api[item.name] = (params = {}, extraConfig = {}) => { apis.forEach(item => api[item.name] = (params = {}, extraConfig = {}) => {
const config = { const config = {
......
...@@ -155,12 +155,14 @@ ...@@ -155,12 +155,14 @@
handleSizeChangePre(pageSize) { handleSizeChangePre(pageSize) {
this.getResidentList({ this.getResidentList({
pageSize, pageSize,
...this.searchData,
status: this.status status: this.status
}) })
}, },
handleCurrentChangePre(pageNum) { handleCurrentChangePre(pageNum) {
this.getResidentList({ this.getResidentList({
pageNum, pageNum,
...this.searchData,
status: this.status status: this.status
}) })
}, },
......
...@@ -8,30 +8,32 @@ ...@@ -8,30 +8,32 @@
<p class="page-title">预约管理</p> <p class="page-title">预约管理</p>
<div class="search-div"> <div class="search-div">
<div class="search-input"> <div class="search-input">
<el-form :model="searchData" :inline="true" :label-width="labelWidth"> <el-form :model="searchData" ref="searchData" :inline="true" :label-width="labelWidth">
<el-form-item label="随访计划名称:"> <el-form-item label="随访计划名称:" prop="planName">
<el-input v-model="searchData.residentName" placeholder="请输入随访计划名称"></el-input> <el-input v-model="searchData.planName" placeholder="请输入随访计划名称"></el-input>
</el-form-item> </el-form-item>
<el-form-item label="姓名:"> <el-form-item label="姓名:" prop="nickName">
<el-input v-model="searchData.residentName" placeholder="请输入姓名"></el-input> <el-input v-model="searchData.nickName" placeholder="请输入姓名"></el-input>
</el-form-item> </el-form-item>
<el-form-item label="手机号:"> <el-form-item label="手机号:" prop="mobilePhone">
<el-input v-model="searchData.phoneNumber" placeholder="请输入手机号"></el-input> <el-input v-model="searchData.mobilePhone" placeholder="请输入手机号"></el-input>
</el-form-item> </el-form-item>
<el-form-item label="随访计划时间:"> <el-form-item label="随访时间范围:" prop="planTimes">
<el-select v-model="searchData.startTime"> <el-date-picker
<el-option v-model="searchData.planTimes"
v-for="item in groupOption" type="daterange"
:key="item.value" range-separator="至"
:label="item.label" start-placeholder="开始日期"
:value="item.value"> end-placeholder="结束日期"
</el-option> format="yyyy-MM-dd"
</el-select> value-format="yyyy-MM-dd"
style="width: 380px;">
</el-date-picker>
</el-form-item> </el-form-item>
<el-form-item label="居民预约状态:"> <el-form-item label="居民预约状态:" prop="timeStatus">
<el-select v-model="searchData.startTime"> <el-select v-model="searchData.timeStatus">
<el-option <el-option
v-for="item in groupOption" v-for="item in statusOptions"
:key="item.value" :key="item.value"
:label="item.label" :label="item.label"
:value="item.value"> :value="item.value">
...@@ -41,21 +43,21 @@ ...@@ -41,21 +43,21 @@
</el-form> </el-form>
</div> </div>
<div class="search-btn"> <div class="search-btn">
<el-button class="button-green" type="primary">查询</el-button> <el-button class="button-green" type="primary" @click="searchReservationList">查询</el-button>
<el-button class="button-white" plain>重置</el-button> <el-button class="button-white" plain @click="resetSearchData('searchData')">重置</el-button>
</div> </div>
</div> </div>
<div class="reservation-table table-content"> <div class="reservation-table table-content">
<el-radio-group v-model="tableType"> <el-radio-group v-model="status">
<el-radio-button label="0">全部(200)</el-radio-button> <el-radio-button label="0">全部({{reservationList.total}})</el-radio-button>
<el-radio-button label="1">未发送(200)</el-radio-button> <el-radio-button label="1">未发送({{reservationList.notCount}})</el-radio-button>
<el-radio-button label="2">待确认(100)</el-radio-button> <el-radio-button label="2">待确认({{reservationList.handCount}})</el-radio-button>
<el-radio-button label="1">已接受(200)</el-radio-button> <el-radio-button label="3">已接受({{reservationList.yesCount}})</el-radio-button>
<el-radio-button label="2">已拒绝(100)</el-radio-button> <el-radio-button label="4">已拒绝({{reservationList.refuseCount }})</el-radio-button>
</el-radio-group> </el-radio-group>
<el-button class="button-green" type="primary">发送预约</el-button> <el-button class="button-green" type="primary">发送预约</el-button>
<el-table <el-table
:data="reservationData" :data="reservationList.fPlanAppointmentDtoList"
center center
style="width: 100%;margin-top: 20px;"> style="width: 100%;margin-top: 20px;">
<el-table-column <el-table-column
...@@ -63,30 +65,30 @@ ...@@ -63,30 +65,30 @@
align="center"> align="center">
</el-table-column> </el-table-column>
<el-table-column <el-table-column
prop="patientName" prop="nickName"
label="姓名" label="姓名"
align="center"> align="center">
<template slot-scope="scope"> <template slot-scope="scope">
<el-button type="text" @click="goPatientDetail(scope.row.patientId)" >{{scope.row.patientName}}</el-button> <el-button type="text" @click="goPatientDetail(scope.row.planId, scope.row.nickId)" >{{scope.row.nickName}}</el-button>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column <el-table-column
prop="sexName" prop="mobilePhone"
label="手机" label="手机"
align="center"> align="center">
</el-table-column> </el-table-column>
<el-table-column <el-table-column
prop="mobilePhone" prop="planName"
label="随访计划名称" label="随访计划名称"
align="center"> align="center">
</el-table-column> </el-table-column>
<el-table-column <el-table-column
prop="time" prop="planTime"
label="随访计划时间" label="随访计划时间"
align="center"> align="center">
</el-table-column> </el-table-column>
<el-table-column <el-table-column
prop="time" prop="appointmentTime"
label="随访预约时间" label="随访预约时间"
align="center"> align="center">
</el-table-column> </el-table-column>
...@@ -102,14 +104,14 @@ ...@@ -102,14 +104,14 @@
</el-table> </el-table>
<el-pagination <el-pagination
background background
v-if="reservationData.length" v-if="reservationList.fPlanAppointmentDtoList"
@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="pageNum" :current-page="reservationList.pageNum"
:page-sizes="[100, 200, 300, 400]" :page-sizes="[10, 20, 50, 100]"
:page-size="pageSize" :page-size="reservationList.pageSize"
:total="total"> :total="reservationList.total">
</el-pagination> </el-pagination>
</div> </div>
</div> </div>
...@@ -119,6 +121,9 @@ ...@@ -119,6 +121,9 @@
<script> <script>
import api from '../../../utils/followup/followapis'; import api from '../../../utils/followup/followapis';
import BreadCrumb from '@/components/breadcrumb' import BreadCrumb from '@/components/breadcrumb'
import { mapState, mapActions } from 'vuex'
export default { export default {
name: "reservation-list", name: "reservation-list",
components: { components: {
...@@ -132,43 +137,95 @@ ...@@ -132,43 +137,95 @@
/*面包屑配置*/ /*面包屑配置*/
labelWidth: '96px', //标题长度 labelWidth: '96px', //标题长度
searchData: {}, //查询数据 searchData: {}, //查询数据
groupOption: [{ // 分组选项 status: 0, //列表筛选条件
value: '全部', statusOptions: [
label: '全部'
}],
tableType: 0, //列表筛选条件
reservationData: [
{ {
"patientId": "居民ID", value: 1,
"patientName": "居民姓名", label: '未完成'
"sex": "性别", },
"sexName": "性别名字", {
"time": "随访开始时间", value: 2,
"labelId": "分组ID", label: '已完成'
"labelName": "分组名字" },
{
value: 3,
label: '已过期'
} }
], //居民列表 ], //居民预约状态
pageNum: 1,
pageSize: 15,
total: 100,
} }
}, },
created() { created() {
console.log('api',api)
},
mounted() {
this.getReservationList()
},
computed: {
...mapState('reservationManage',{
reservationList: state => state.reservationList,
})
}, },
mounted() {},
methods: { methods: {
handleSizeChangePre() { ...mapActions('reservationManage', ['getReservationList']),
handleSizeChangePre(pageSize) {
this.getReservationList({
pageSize,
status: this.status,
...this.setSearchData()
})
}, },
handleCurrentChangePre() { handleCurrentChangePre(pageNum) {
this.getReservationList({
pageNum,
status: this.status,
...this.setSearchData()
})
},
searchReservationList() { //查询预约列表
this.getReservationList({
...this.setSearchData(),
status: this.status,
})
}, },
goPatientDetail(patientId) { //居民详情页 resetSearchData(formName) {
this.$refs[formName].resetFields();
},
goPatientDetail(patientId) { //预约详情页
alert(1+patientId) alert(1+patientId)
this.$router.push('/followup/plan-manage/resident-detail') this.$router.push('/followup/plan-manage/resident-detail')
},
setSearchData() {
const { planName, mobilePhone, timeStatus, nickName } = this.searchData;
let para = {}
if(this.searchData.planTimes) {
para = {
planName,
mobilePhone,
timeStatus,
nickName,
planFromTime: this.searchData.planTimes[0],
planToTime: this.searchData.planTimes[1],
status: this.status
}
} else {
para = {
planName,
mobilePhone,
timeStatus,
nickName,
status: this.status
}
}
return para;
}
},
watch: {
status(val) {
this.getReservationList({
status: val,
...this.setSearchData()
})
} }
} }
} }
......
Markdown 格式
0% or
您添加了 0 到此讨论。请谨慎行事。
先完成此消息的编辑!
想要评论请 注册