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

fixed

上级 ca519148
...@@ -6,7 +6,6 @@ import {getPlanList, ...@@ -6,7 +6,6 @@ import {getPlanList,
getGroupList, getGroupList,
getResidentDetail, getResidentDetail,
getBasicData, getBasicData,
changePlan,
getFormOptions, getFormOptions,
getFollowupTemplate, getFollowupTemplate,
createFollowPlan} from '../../utils/followup/followapis' createFollowPlan} from '../../utils/followup/followapis'
...@@ -47,10 +46,9 @@ export default { ...@@ -47,10 +46,9 @@ export default {
state.residentList = payload state.residentList = payload
}, },
GET_GROUP_LIST(state, payload) { GET_GROUP_LIST(state, payload) {
state.groupList = payload.labelDtoList state.groupList = payload
}, },
GET_RESIDENT_DETAIL(state, payload) { GET_RESIDENT_DETAIL(state, payload) {
console.log('居民信息', payload)
state.residentDetail = payload state.residentDetail = payload
state.timeNodeList = payload.fPlanDto.fPlanTimeReqList state.timeNodeList = payload.fPlanDto.fPlanTimeReqList
}, },
...@@ -208,13 +206,13 @@ export default { ...@@ -208,13 +206,13 @@ export default {
context.commit('GET_PLAN_OPTION', data); context.commit('GET_PLAN_OPTION', data);
}); });
}, },
changePlan(context, payload) { /*async changePlan(context, payload) {
changePlan({ changePlan({
...payload
}).then(({data}) => { }).then(({data}) => {
// context.commit('GET_PLAN_OPTION', data); return data
}); });
}, },*/
getTimeNodeList(context, payload){ getTimeNodeList(context, payload){
context.commit('SET_TIME_NODE_LIST', payload); context.commit('SET_TIME_NODE_LIST', payload);
}, },
......
...@@ -9,7 +9,11 @@ ...@@ -9,7 +9,11 @@
center> center>
<el-form :model="planChangeData" label-width="110px"> <el-form :model="planChangeData" label-width="110px">
<el-form-item label="分组:"> <el-form-item label="分组:">
<el-select v-model="planChangeData.group" size="small"> <el-select
v-model="planChangeData.yLabelList"
multiple
@change="selectGroup"
placeholder="请选择">
<el-option <el-option
v-for="item in groupList" v-for="item in groupList"
:key="item.labelId" :key="item.labelId"
...@@ -29,7 +33,7 @@ ...@@ -29,7 +33,7 @@
</el-select> </el-select>
</el-form-item> </el-form-item>
<el-form-item label="随访开始时间:"> <el-form-item label="随访开始时间:">
<el-select v-model="planChangeData.startTime" size="small"> <el-select v-model="planChangeData.startDate" size="small">
<el-option <el-option
v-for="item in nodeTimeList" v-for="item in nodeTimeList"
:key="item.id" :key="item.id"
...@@ -41,14 +45,15 @@ ...@@ -41,14 +45,15 @@
</el-form> </el-form>
<span slot="footer" class="dialog-footer"> <span slot="footer" class="dialog-footer">
<el-button class="button-green" @click="clickClose" size="small" type="primary">取 消</el-button> <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> </span>
</el-dialog> </el-dialog>
</div> </div>
</template> </template>
<script> <script>
import { mapState, mapActions} from 'vuex' import { mapState, mapActions} from 'vuex';
import { changePlan } from '../../../../utils/followup/followapis'
export default { export default {
name: "change-plan", name: "change-plan",
props: { props: {
...@@ -79,12 +84,13 @@ ...@@ -79,12 +84,13 @@
}, },
data() { data() {
return { return {
showChangePlan: true showChangePlan: true,
selectedGroup: []
} }
}, },
mounted() { mounted() {
this.getPlanOptions(); this.getPlanOptions();
this.getNodeTimeList(); this.getNodeTimeList(this.$route.query.planId);
// 获取随访时间列表 // 获取随访时间列表
}, },
computed: { computed: {
...@@ -95,16 +101,57 @@ ...@@ -95,16 +101,57 @@
}) })
}, },
methods: { 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() { clickClose() {
this.$emit('closeChangePlan',false); this.$emit('closeChangePlan',false);
}, },
changePlan() { async changePlans() {
this.clickClose() // this.clickClose()
/* this.changePlan(this.planChangeData).then(({data}) => { const { planPatientsId, planId, patientId, startDate } = this.planChangeData
this.clickClose() // 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: { watch: {
planChangeData(val) { planChangeData(val) {
...@@ -114,7 +161,7 @@ ...@@ -114,7 +161,7 @@
} }
</script> </script>
<style lang="scss" scoped> <style scoped>
.el-select { .el-select {
width: 100%; width: 100%;
} }
......
...@@ -156,9 +156,11 @@ ...@@ -156,9 +156,11 @@
...mapActions('planManage', ['getResidentDetail', 'getNodeTimeContent', 'getGroupList']), ...mapActions('planManage', ['getResidentDetail', 'getNodeTimeContent', 'getGroupList']),
changePlan() { changePlan() {
this.planChangeData = { this.planChangeData = {
group: this.residentDetail.labelName, planPatientsId: this.residentDetail.fPlanDto.planPatientsId,
planId: this.residentDetail.fPlanPatientDatilDtoList.planId, planId: this.residentDetail.fPlanDto.id,
startTime: this.residentDetail.fPlanPatientDatilDtoList.time patientId: this.residentDetail.patientId,
yLabelList: this.residentDetail.labelIdList,
startDate: this.residentDetail.fPlanDto.timeStr
} }
this.showChangePlan = true; this.showChangePlan = true;
}, },
...@@ -167,7 +169,9 @@ ...@@ -167,7 +169,9 @@
}, },
finishFollowup() { finishFollowup() {
this.finishData = { this.finishData = {
patientName: this.residentDetail.fPlanPatientDatilDtoList.nickName, patientName: this.residentDetail.patientName,
changeCode: this.status,
patientIdList: this.residentDetail.patientId,
} }
this.showFinishFollowup = true; this.showFinishFollowup = true;
}, },
......
Markdown 格式
0% or
您添加了 0 到此讨论。请谨慎行事。
先完成此消息的编辑!
想要评论请 注册