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

计划修改

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