提交 43a14983 编写于 作者: Yuanzhao.dai's avatar Yuanzhao.dai

计划修改

上级 94f2e118
...@@ -89,9 +89,7 @@ export default { ...@@ -89,9 +89,7 @@ export default {
}); });
}, },
getNodeTimeContent(context, payload) { getNodeTimeContent(context, payload) {
getNodeTimeContent({}, { getNodeTimeContent(payload).then(({data}) => {
urlSuffix:payload
}).then(({data}) => {
context.commit('GET_NODE_CONTENT', data); context.commit('GET_NODE_CONTENT', data);
}); });
}, },
......
...@@ -60,7 +60,7 @@ export const getPlanDetail = (planId) => { ...@@ -60,7 +60,7 @@ export const getPlanDetail = (planId) => {
export const getNodeTimeList = (planId) => { export const getNodeTimeList = (planId) => {
return fetch({ return fetch({
headers, headers,
url: getFollowUpSC(`/followup/plans/times/line/${planId}`), url: getFollowUpSC(`/followup/plan/${planId}/time`),
method: 'get', method: 'get',
description: '获取随访时间节点列表', description: '获取随访时间节点列表',
}) })
...@@ -169,7 +169,6 @@ export const changeEnteringStatus = (data) => { ...@@ -169,7 +169,6 @@ export const changeEnteringStatus = (data) => {
export const getEnteringInfo = (patientId, fuPlanPatientTimesId) => { export const getEnteringInfo = (patientId, fuPlanPatientTimesId) => {
return fetch({ return fetch({
headers, headers,
url: getFollowUpSC(`followup/entering/${patientId}/fuInfo/${fuPlanPatientTimesId}`),
method: 'get', method: 'get',
params: 'params', params: 'params',
description: '随访单条信息查看', description: '随访单条信息查看',
......
...@@ -110,7 +110,7 @@ ...@@ -110,7 +110,7 @@
}, },
mounted() { mounted() {
this.getPlanDetail(this.$route.query.planId); //获取居民详情 this.getPlanDetail(this.$route.query.planId); //获取计划详情
this.getNodeTimeList(this.$route.query.planId); // 获取随访时间列表 this.getNodeTimeList(this.$route.query.planId); // 获取随访时间列表
}, },
computed: { computed: {
...@@ -130,7 +130,7 @@ ...@@ -130,7 +130,7 @@
this.$router.push({path: '/followup/plan-manage/resident-list', query: {planId:'1'}}) this.$router.push({path: '/followup/plan-manage/resident-list', query: {planId:'1'}})
}, },
changePlan() { changePlan() {
this.$router.push({path: '/followup/plan-manage/plan-modify', query: {planId:'1'}})
}, },
closeFollowTime(isShow) { closeFollowTime(isShow) {
this.showFollowTime = isShow this.showFollowTime = isShow
......
...@@ -16,19 +16,19 @@ ...@@ -16,19 +16,19 @@
<el-button class="button-green" type="primary" @click="cancelEdit" >保 存</el-button> <el-button class="button-green" type="primary" @click="cancelEdit" >保 存</el-button>
</div> </div>
</div> </div>
<el-form ref="baseInfo" :model="modifyInfo" :rules="rules" label-suffix=":" label-width="140px"> <el-form ref="baseInfo" :model="planDetail" :rules="rules" label-suffix=":" label-width="140px">
<el-form-item label="随访计划名称" prop="name"> <el-form-item label="随访计划名称" prop="name">
<el-input v-model="modifyInfo.name" maxlength="20" style="width: 30%" clearable></el-input> <el-input v-model="planDetail.name" maxlength="20" style="width: 30%" clearable></el-input>
</el-form-item> </el-form-item>
<el-form-item label="随访居民" required> <el-form-item label="随访居民" required>
<div class="select-patients"> <div class="select-patients">
<el-button plain icon="el-icon-plus" @click="selectPatientHandler">{{modifyInfo.hasSelectedNum ? '继续添加' : '选择居民'}}</el-button><br> <el-button plain icon="el-icon-plus" @click="selectPatientHandler">{{planDetail.num ? '继续添加' : '选择居民'}}</el-button><br>
<el-button type="text" class="mt10" @click="seeSelectedHandler" v-if="modifyInfo.hasSelectedNum">已选{{modifyInfo.hasSelectedNum}}<i class="el-icon-arrow-right"></i></el-button> <el-button type="text" class="mt10" @click="seeSelectedHandler" v-if="planDetail.num">已选{{planDetail.num}}<i class="el-icon-arrow-right"></i></el-button>
</div> </div>
</el-form-item> </el-form-item>
<el-form-item label="随访模板" prop="followupTemplate"> <el-form-item label="随访模板" prop="resourceName">
<el-select <el-select
v-model="modifyInfo.followupTemplate" v-model="planDetail.followupTemplate"
placeholder="请选择随访模板" placeholder="请选择随访模板"
clearable> clearable>
<el-option <el-option
...@@ -38,14 +38,13 @@ ...@@ -38,14 +38,13 @@
:value="item.value"> :value="item.value">
</el-option> </el-option>
</el-select> </el-select>
<p class="tips">随访计划创建成功后,模板不可更换,请谨慎选择。</p>
</el-form-item> </el-form-item>
<el-form-item label="随访开始时间" prop="startTime"> <el-form-item label="随访开始时间" prop="timeStr">
2018-01-01 <el-button class="btn-text" type="text" @click="goToFollowTime">查看全部></el-button> {{planDetail.timeStr}} <el-button class="btn-text" type="text" @click="goToFollowTime">查看全部></el-button>
</el-form-item> </el-form-item>
<el-form-item label="备注"> <el-form-item label="备注">
<el-select <el-select
v-model="modifyInfo.followupKind" v-model="planDetail.remarksStatus"
placeholder="请选择随访种类" placeholder="请选择随访种类"
clearable> clearable>
<el-option <el-option
...@@ -66,6 +65,8 @@ ...@@ -66,6 +65,8 @@
@closeSelectPatient="closeSelectPatient" @closeSelectPatient="closeSelectPatient"
@sureSelectPatient="sureSelectPatient(arguments)"> @sureSelectPatient="sureSelectPatient(arguments)">
</select-patient> </select-patient>
<follow-time :showThisPage="showFollowTime" :nodeTimeList="nodeTimeList" @closeFollowTime="closeFollowTime"></follow-time>
</div> </div>
</template> </template>
...@@ -74,6 +75,10 @@ ...@@ -74,6 +75,10 @@
import SelectPatient from '@/views/followup/plan-manage/dialog/select-patient'; import SelectPatient from '@/views/followup/plan-manage/dialog/select-patient';
import HasSelectedPatient from '@/views/followup/plan-manage/dialog/has-selected-patient'; import HasSelectedPatient from '@/views/followup/plan-manage/dialog/has-selected-patient';
import SetTimeNode from '@/views/followup/plan-manage/dialog/set-time-node'; import SetTimeNode from '@/views/followup/plan-manage/dialog/set-time-node';
import FollowTime from '@/views/followup/plan-manage/dialog/follow-time';
import { mapState, mapActions } from 'vuex'
export default { export default {
name: "plan-modify", name: "plan-modify",
components: { components: {
...@@ -81,6 +86,7 @@ ...@@ -81,6 +86,7 @@
SelectPatient, SelectPatient,
HasSelectedPatient, HasSelectedPatient,
SetTimeNode, SetTimeNode,
FollowTime
}, },
data() { data() {
return { return {
...@@ -89,7 +95,6 @@ ...@@ -89,7 +95,6 @@
curmbSecond: '计划管理', curmbSecond: '计划管理',
curmbThird: '修改随访计划', curmbThird: '修改随访计划',
jumPathThird: '/followUp/plan-manage', jumPathThird: '/followUp/plan-manage',
modifyInfo: {},
rules: { rules: {
name: [{ required: true, message: '请输入随访计划名称', trigger: 'blur' }], name: [{ required: true, message: '请输入随访计划名称', trigger: 'blur' }],
followupTemplate: [{ required: true, message: '请选择随访模板', trigger: 'change' }], followupTemplate: [{ required: true, message: '请选择随访模板', trigger: 'change' }],
...@@ -109,24 +114,39 @@ ...@@ -109,24 +114,39 @@
], ],
kindOptions: [ kindOptions: [
{ {
value: '0', value: 0,
label: '上门随访' label: '上门随访'
}, { }, {
value: '1', value: 1,
label: '术后随访' label: '术后随访'
} }
], ],
isShowSelectPatient: false, //显示居民选择框 isShowSelectPatient: false, //显示居民选择框
hasSelectedList: [], //已选居民 hasSelectedList: [], //已选居民
showFollowTime: false, //是否展示全部时间
} }
}, },
mounted() {
this.getPlanDetail(this.$route.query.planId); //获取计划详情
this.getNodeTimeList(this.$route.query.planId); // 获取随访时间列表
},
computed: {
...mapState('planManage', {
planDetail: state => state.planDetail,
nodeTimeList: state => state.nodeTimeList
})
},
methods: { methods: {
...mapActions('planManage', ['getPlanDetail', 'getNodeTimeList']),
selectPatientHandler() { selectPatientHandler() {
this.isShowSelectPatient = true; this.isShowSelectPatient = true;
}, },
closeSelectPatient(val) { closeSelectPatient(val) {
this.isShowSelectPatient = val; this.isShowSelectPatient = val;
}, },
seeSelectedHandler() {
this.isShowSelectedDialog = true;
},
sureSelectPatient() { sureSelectPatient() {
let getArguments = arguments[0]; let getArguments = arguments[0];
this.isShowSelectPatient = getArguments[0]; this.isShowSelectPatient = getArguments[0];
...@@ -134,20 +154,23 @@ ...@@ -134,20 +154,23 @@
this.modifyInfo.hasSelectedNum = getArguments[1].length; this.modifyInfo.hasSelectedNum = getArguments[1].length;
}, },
cancelEdit() { cancelEdit() {
this.$confirm('是否放弃本次创建,放弃后数据不能被保存', '', { this.$confirm('是否放弃本次修改,放弃后数据不能被保存', '', {
confirmButtonText: '继续创建', confirmButtonText: '继续修改',
cancelButtonText: '确定放弃', cancelButtonText: '确定放弃',
type: 'warning' type: 'warning'
}).then(() => { }).then(() => {
// 关闭弹层,继续创建 // 关闭弹层,继续创建
}).catch(() => { }).catch(() => {
// 确定放弃,跳出当前编辑页面 // 确定放弃,跳出当前编辑页面
this.$router.push({path: '/followup/plan-manage/plan-list'}) this.$router.back(-1)
}); });
}, },
goToFollowTime() { goToFollowTime() {
this.showFollowTime = true
} },
closeFollowTime(isShow) {
this.showFollowTime = isShow
},
}, },
} }
</script> </script>
......
...@@ -82,6 +82,7 @@ ...@@ -82,6 +82,7 @@
align="center"> align="center">
</el-table-column> </el-table-column>
<el-table-column <el-table-column
width="160"
prop="time" prop="time"
label="随访开始时间" label="随访开始时间"
align="center"> align="center">
...@@ -92,6 +93,7 @@ ...@@ -92,6 +93,7 @@
align="center"> align="center">
</el-table-column> </el-table-column>
<el-table-column <el-table-column
width="190"
fixed="right" fixed="right"
label="操作" label="操作"
align="center"> align="center">
......
Markdown 格式
0% or
您添加了 0 到此讨论。请谨慎行事。
先完成此消息的编辑!
想要评论请 注册