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