提交 b8ca5d3d 编写于 作者: tao.wu's avatar tao.wu

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
......@@ -6,7 +6,6 @@ import {getPlanList,
getGroupList,
getResidentDetail,
getBasicData,
changePlan,
getFormOptions,
getFollowupTemplate,
createFollowPlan} from '../../utils/followup/followapis'
......@@ -47,10 +46,9 @@ export default {
state.residentList = payload
},
GET_GROUP_LIST(state, payload) {
state.groupList = payload.labelDtoList
state.groupList = payload
},
GET_RESIDENT_DETAIL(state, payload) {
console.log('居民信息', payload)
state.residentDetail = payload
state.timeNodeList = payload.fPlanDto.fPlanTimeReqList
},
......@@ -208,13 +206,13 @@ export default {
context.commit('GET_PLAN_OPTION', data);
});
},
changePlan(context, payload) {
/*async changePlan(context, payload) {
changePlan({
...payload
}).then(({data}) => {
// context.commit('GET_PLAN_OPTION', data);
return data
});
},
},*/
getTimeNodeList(context, payload){
context.commit('SET_TIME_NODE_LIST', payload);
},
......
......@@ -117,6 +117,15 @@ export const changePlan = (data) => {
description: '变更计划',
})
};
export const finishPlan = (data) => {
return fetch({
headers,
url: getFollowUpSC(`/followup/planPatient/status`),
method: 'put',
data: data,
description: '变更计划',
})
};
export const deletePlan = (planId) => {
return fetch({
headers,
......
......@@ -9,7 +9,11 @@
center>
<el-form :model="planChangeData" label-width="110px">
<el-form-item label="分组:">
<el-select v-model="planChangeData.group" size="small">
<el-select
v-model="planChangeData.yLabelList"
multiple
@change="selectGroup"
placeholder="请选择">
<el-option
v-for="item in groupList"
:key="item.labelId"
......@@ -29,7 +33,7 @@
</el-select>
</el-form-item>
<el-form-item label="随访开始时间:">
<el-select v-model="planChangeData.startTime" size="small">
<el-select v-model="planChangeData.startDate" size="small">
<el-option
v-for="item in nodeTimeList"
:key="item.id"
......@@ -41,14 +45,15 @@
</el-form>
<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="changePlan" size="small" plain>确 定</el-button>
<el-button class="button-white" @click="changePlans" size="small" plain>确 定</el-button>
</span>
</el-dialog>
</div>
</template>
<script>
import { mapState, mapActions} from 'vuex'
import { mapState, mapActions} from 'vuex';
import { changePlan } from '../../../../utils/followup/followapis'
export default {
name: "change-plan",
props: {
......@@ -79,12 +84,13 @@
},
data() {
return {
showChangePlan: true
showChangePlan: true,
selectedGroup: []
}
},
mounted() {
this.getPlanOptions();
this.getNodeTimeList();
this.getNodeTimeList(this.$route.query.planId);
// 获取随访时间列表
},
computed: {
......@@ -95,16 +101,57 @@
})
},
methods: {
...mapActions('planManage', ['getPlanOptions', 'getNodeTimeList', 'changePlan']),
...mapActions('planManage', ['getPlanOptions', 'getNodeTimeList']),
selectGroup(val) {
const _this = this
_this.selectedGroup = []
val.forEach(function (item, index) {
let nodeItem = _this.groupList.filter(function(item1){
return item1.labelId == item;
});
let pushItem = {
labelId: nodeItem[0].labelId,
label: nodeItem[0].labelName,
}
_this.selectedGroup.push(pushItem)
})
console.log('this.selectedGroup',_this.selectedGroup)
},
clickClose() {
this.$emit('closeChangePlan',false);
},
changePlan() {
this.clickClose()
/* this.changePlan(this.planChangeData).then(({data}) => {
async changePlans() {
// this.clickClose()
const { planPatientsId, planId, patientId, startDate } = this.planChangeData
// params.yLabelList = this.selectedGroup
// console.log('变更数据',params)
changePlan({
planPatientsId,
planId,
patientId,
yLabelList: this.selectedGroup,
startDate
}).then((data) => {
if(data.code == '000000') {
this.$message({
message: '变更计划成功!',
type: 'success'
});
this.clickClose()
});*/
} else {
this.$message({
message: `${data.message}`,
type: 'error'
});
}
}).then(() => {
this.$message({
message: `${data.message}`,
type: 'error'
});
});
},
},
watch: {
planChangeData(val) {
......@@ -114,7 +161,7 @@
}
</script>
<style lang="scss" scoped>
<style scoped>
.el-select {
width: 100%;
}
......
......@@ -28,13 +28,14 @@
</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>
<el-button class="button-white" @click="finishFollowUp" size="small" plain>确 定</el-button>
</span>
</el-dialog>
</div>
</template>
<script>
import { finishPlan } from '../../../../utils/followup/followapis'
export default {
name: "finish-followup",
props: {
......@@ -66,6 +67,32 @@
clickClose() {
this.$emit('closeFinishFollowup',false)
},
finishFollowUp() {
const { changeCode, planId, patientIdList } = this.finishData;
finishPlan({
changeCode,
planId,
patientIdList,
}).then((data) => {
if(data.code == '000000') {
this.$message({
message: '操作成功!',
type: 'success'
});
this.clickClose()
} else {
this.$message({
message: `${data.message}`,
type: 'error'
});
}
}).then(() => {
this.$message({
message: `${data.message}`,
type: 'error'
});
});
}
}
}
</script>
......
......@@ -11,7 +11,8 @@
<div class="title"><p>基本信息</p></div>
<div class="h-btn">
<el-button class="button-white" plain size="small" @click="changePlan">计划变更</el-button>
<el-button class="button-white" plain size="small" @click="finishFollowup">结束随访</el-button>
<el-button v-if="status==1" class="button-white" plain size="small" @click="finishFollowup">结束随访</el-button>
<el-button v-if="status==2" class="button-white" plain size="small" @click="finishFollowup">恢复随访</el-button>
</div>
</div>
<div class="base-info">
......@@ -130,6 +131,7 @@
planChangeData: {}, //变更信息
finishData: {}, //结束信息
planDetails: {}, //计划详情
status: null
}
},
created() {
......@@ -156,9 +158,11 @@
...mapActions('planManage', ['getResidentDetail', 'getNodeTimeContent', 'getGroupList']),
changePlan() {
this.planChangeData = {
group: this.residentDetail.labelName,
planId: this.residentDetail.fPlanPatientDatilDtoList.planId,
startTime: this.residentDetail.fPlanPatientDatilDtoList.time
planPatientsId: this.residentDetail.fPlanDto.planPatientsId,
planId: this.residentDetail.fPlanDto.id,
patientId: this.residentDetail.patientId,
yLabelList: this.residentDetail.labelIdList,
startDate: this.residentDetail.fPlanDto.timeStr
}
this.showChangePlan = true;
},
......@@ -166,8 +170,13 @@
this.showChangePlan = isShow
},
finishFollowup() {
let patientIdList = [];
patientIdList.push(this.residentDetail.patientId)
this.finishData = {
patientName: this.residentDetail.fPlanPatientDatilDtoList.nickName,
changeCode: this.status,
planId: this.residentDetail.fPlanDto.id,
patientName: this.residentDetail.patientName,
patientIdList: patientIdList,
}
this.showFinishFollowup = true;
},
......@@ -185,6 +194,7 @@
},
residentDetail(val) {
this.planDetails = val.fPlanDto
this.status = val.fPlanDto.status
}
}
}
......
......@@ -252,8 +252,13 @@
patientName: row.patientName,
};
} else {
let patientIdList = [];
patientIdList.push(row.patientId)
this.finishData = {
patientName: row.patientName,
changeCode: row.status,
patientIdList: patientIdList,
patientName: row.patientName,
};
}
......
......@@ -60,7 +60,7 @@
<span :class="scope.row.status == 1 ? 'status-span': ''">{{ scope.row.status | statusFileter }}</span>
</template>
</el-table-column>
<el-table-column label="操作" fixed="right" align="center" min-width="240">
<el-table-column label="操作" fixed="right" align="center" min-width="300">
<template slot-scope="scope">
<el-button class="btn-right-class" type="text" @click="editRow(scope.row)">随访录入</el-button>|
<el-button class="btn-right-class" type="text" @click="changeStatusRow(scope.row)"> 变更随访状态</el-button>|
......
......@@ -226,7 +226,7 @@
...this.setSearchData()
})
},
handleCurrentChangePre(pageNum) {
handleCurrentChangePre(pageNo) {
this.getReservationList({
pageNo,
status: this.status,
......@@ -247,14 +247,14 @@
this.dialogDetailShow = true;
},
setSearchData() {
const { planName, mobilePhone, timeStatus, nickname } = this.searchData;
const { planName, mobilePhone, timeStatus, nickName } = this.searchData;
let para = {}
if(this.searchData.planTimes) {
para = {
planName,
mobilePhone,
timeStatus,
nickname,
nickName,
beginTime: this.searchData.planTimes[0],
endTime: this.searchData.planTimes[1],
status: this.status
......@@ -264,7 +264,7 @@
planName,
mobilePhone,
timeStatus,
nickname,
nickName,
status: this.status
}
}
......
Markdown 格式
0% or
您添加了 0 到此讨论。请谨慎行事。
先完成此消息的编辑!
想要评论请 注册