提交 0097fbcf 编写于 作者: 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
...@@ -185,6 +185,32 @@ export const getEnteringInfo = (patientId, fuPlanPatientTimesId) => { ...@@ -185,6 +185,32 @@ export const getEnteringInfo = (patientId, fuPlanPatientTimesId) => {
},) },)
} }
//新增随访计划
export const createFollowPlan = (data) => {
return fetch({
headers,
url: getFollowUpSC(`/followup/plans`),
method: 'post',
data: data,
description: '新增随访计划',
},)
}
//获取新建计划居民列表
export const getPlanPatientsList = (data) =>{
data = data || {}
return fetch({
headers:{
sysCode: 9
},
url: getFollowUpSC(`/healths/patients/infolist`),
method: 'post',
data: data,
description: '获取新建计划居民列表',
},)
}
/*常量*/ /*常量*/
export const getBasicData = (params) => { export const getBasicData = (params) => {
......
...@@ -66,7 +66,7 @@ ...@@ -66,7 +66,7 @@
align="center"> align="center">
</el-table-column> </el-table-column>
<el-table-column <el-table-column
prop="name" prop="nickname"
label="姓名" label="姓名"
align="center"> align="center">
</el-table-column> </el-table-column>
...@@ -122,6 +122,7 @@ ...@@ -122,6 +122,7 @@
<script> <script>
import {getPlanPatientsList} from '@/utils/followup/followapis'
export default { export default {
components: {}, components: {},
name: "select-patient", name: "select-patient",
...@@ -129,14 +130,17 @@ ...@@ -129,14 +130,17 @@
return { return {
showSelectPatient: true, showSelectPatient: true,
selectedPatients: [], selectedPatients: [],
patientsData: [{ patientIdList: [],
name: '买了', patientsData: [
sex: '女', // {
age: 30, // name: '买了',
mobilePhone: '13298073647', // sex: '女',
diseaseId: '高血压', // age: 30,
labelId: '高危筛查项目-非高危' // mobilePhone: '13298073647',
}], // diseaseId: '高血压',
// labelId: '高危筛查项目-非高危'
// }
],
searchData: { searchData: {
sex: 'all', sex: 'all',
ageRange: '0', ageRange: '0',
...@@ -214,6 +218,18 @@ ...@@ -214,6 +218,18 @@
// } // }
// } // }
}, },
watch: {
isShowSelectPatient(val){
if(val){
getPlanPatientsList({
"pageSize":15,
"pageNo":1
}).then(res=>{
this.patientsData = res.data.patientList
})
}
}
},
mounted() { mounted() {
// if(this.planId) { // if(this.planId) {
// //
...@@ -233,7 +249,11 @@ ...@@ -233,7 +249,11 @@
handleSizeChangePre() {}, handleSizeChangePre() {},
handleCurrentChangePre() {}, handleCurrentChangePre() {},
sureClick() { sureClick() {
this.$emit('sureSelectPatient',false,this.selectedPatients)
this.selectedPatients.forEach((item)=>{
this.patientIdList.push(item.patientId)
})
this.$emit('sureSelectPatient',false,this.patientIdList)
}, },
} }
} }
......
...@@ -3,8 +3,8 @@ ...@@ -3,8 +3,8 @@
<el-form :ref="timeForm.formRef" :model="timeForm" :rules="timeFormRules" label-suffix=":" label-width="140px" :inline-message="true" size="small"> <el-form :ref="timeForm.formRef" :model="timeForm" :rules="timeFormRules" label-suffix=":" label-width="140px" :inline-message="true" size="small">
<el-form-item label="本次随访时间" required> <el-form-item label="本次随访时间" required>
<div style="display: flex;"> <div style="display: flex;">
<el-form-item prop="followupTime"> <el-form-item prop="timeNo">
<el-select v-model="timeForm.followupTime" placeholder="请选择"> <el-select v-model="timeForm.timeNo" placeholder="请选择">
<el-option <el-option
v-for="item in indexOptions" v-for="item in indexOptions"
:key="item.value" :key="item.value"
...@@ -13,20 +13,20 @@ ...@@ -13,20 +13,20 @@
</el-option> </el-option>
</el-select> </el-select>
</el-form-item> </el-form-item>
<el-form-item prop="followupMark" class="ml20"> <el-form-item prop="timeUnit" class="ml20">
<el-select v-model="timeForm.followupMark" placeholder="请选择" :disabled="timeForm.isDisabled"> <el-select v-model="timeForm.timeUnit" placeholder="请选择" :disabled="timeForm.isDisabled">
<el-option <el-option
v-for="item in markOptions" v-for="item in markOptions"
:key="item.value" :key="item.no"
:label="item.label" :label="item.value"
:value="item.label"> :value="item.no">
</el-option> </el-option>
</el-select> </el-select>
</el-form-item> </el-form-item>
</div> </div>
</el-form-item> </el-form-item>
<el-form-item label="随访方式" prop="followupWay"> <el-form-item label="随访方式" prop="type">
<el-radio-group v-model="timeForm.followupWay" size="small"> <el-radio-group v-model="timeForm.type" size="small">
<el-radio :label="1">门诊随访</el-radio> <el-radio :label="1">门诊随访</el-radio>
<el-radio :label="2">上门随访</el-radio> <el-radio :label="2">上门随访</el-radio>
<el-radio :label="3">电话随访</el-radio> <el-radio :label="3">电话随访</el-radio>
...@@ -34,7 +34,7 @@ ...@@ -34,7 +34,7 @@
</el-form-item> </el-form-item>
<el-form-item label="提醒医生预约居民"> <el-form-item label="提醒医生预约居民">
<el-select <el-select
v-model="timeForm.remindTime" v-model="timeForm.remindList[0].startDays"
multiple multiple
:multiple-limit=3 :multiple-limit=3
placeholder="请选择"> placeholder="请选择">
...@@ -48,7 +48,7 @@ ...@@ -48,7 +48,7 @@
</el-form-item> </el-form-item>
<el-form-item label="推送患教"> <el-form-item label="推送患教">
<div style="display: flex"> <div style="display: flex">
<el-select v-model="timeForm.pushTime" placeholder="选择推送时间" clearable> <el-select v-model="timeForm.pushContentList[0].startDays" placeholder="选择推送时间" clearable>
<el-option <el-option
v-for="item in pushTimeOptions" v-for="item in pushTimeOptions"
:key="item.value" :key="item.value"
...@@ -70,7 +70,7 @@ ...@@ -70,7 +70,7 @@
</div> </div>
<el-form-item label="随访登记表"> <el-form-item label="随访登记表">
<el-select <el-select
v-model="timeForm.followupForm" v-model="timeForm.followupList[0].resourceId"
multiple multiple
:multiple-limit=2 :multiple-limit=2
placeholder="请选择"> placeholder="请选择">
...@@ -90,16 +90,17 @@ ...@@ -90,16 +90,17 @@
import _ from 'lodash'; import _ from 'lodash';
import SelectCartoon from '@/views/followup/plan-manage/dialog/select-cartoon'; import SelectCartoon from '@/views/followup/plan-manage/dialog/select-cartoon';
const timeFormInit = {
formRef: '', // const timeFormInit = {
followupTime: '', // formRef: '',
followupMark: '', // followupTime: '',
followupWay: '', // followupMark: '',
pushTime: '', // followupWay: '',
remindTime: [], // pushTime: '',
followupForm: [], // remindTime: [],
hasSelected: '', // followupForm: [],
}; // hasSelected: '',
// };
export default { export default {
components: { components: {
...@@ -122,22 +123,7 @@ ...@@ -122,22 +123,7 @@
label: '3' label: '3'
}, },
], ],
markOptions: [
{
value: '0',
label: '天'
}, {
value: '1',
label: '周'
},
{
value: '2',
label: '月'
}, {
value: '3',
label: '年'
}
],
remindOptions: [ remindOptions: [
{ {
value: '0', value: '0',
...@@ -178,9 +164,9 @@ ...@@ -178,9 +164,9 @@
}, },
], ],
timeFormRules: { timeFormRules: {
followupTime: [{ required: true, message: '请添加随访时间', trigger: 'change' }], timeNo: [{ required: true, message: '请添加随访时间', trigger: 'change' }],
followupMark: [{ required: true, message: '请添加随访时间', trigger: 'change' }], timeUnit: [{ required: true, message: '请添加随访时间', trigger: 'change' }],
followupWay: [{ required: true, message: '请选择随访方式', trigger: 'change' }], type: [{ required: true, message: '请选择随访方式', trigger: 'change' }],
}, },
} }
}, },
...@@ -189,6 +175,7 @@ ...@@ -189,6 +175,7 @@
type: Object, type: Object,
}, },
valBegin: Boolean, valBegin: Boolean,
markOptions:Array
}, },
watch: { watch: {
valBegin(val){ valBegin(val){
...@@ -201,6 +188,9 @@ ...@@ -201,6 +188,9 @@
}); });
} }
} }
},
created(){
}, },
methods: { methods: {
getNowTime() { getNowTime() {
......
...@@ -5,19 +5,40 @@ ...@@ -5,19 +5,40 @@
<div class="time-line-scroll"> <div class="time-line-scroll">
<el-radio-group v-model="activeTab" @change="changeTab" size="small"> <el-radio-group v-model="activeTab" @change="changeTab" size="small">
<el-radio-button v-if="setTimeNodeList.length > 0" :key="item.formRef" v-for="(item, index) in setTimeNodeList1" :label="index">开始后{{item.followupTime + item.followupMark}} <i class="el-icon-circle-close-outline" @click="deleteTimeNode(item, index)"></i></el-radio-button> <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> v-if="setTimeNodeList.length > 0"
:key="item.formRef"
v-for="(item, index) in setTimeNodeList1"
:label="index">开始后{{item.timeNo + item.timeUnitStr}}
<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>
</el-radio-group> </el-radio-group>
</div> </div>
<div class="form-div" v-if="activeTab != 'setNewRef'"> <div class="form-div" v-if="activeTab != 'setNewRef'">
<div :key="timeFormHas.formRef" v-for="(timeFormHas, index) in setTimeNodeList1" :label="index"> <div :key="timeFormHas.formRef" v-for="(timeFormHas, index) in setTimeNodeList1" :label="index">
<set-time-form v-if="index == activeTab" :timeForm="timeFormHas" :valBegin="valBegin" @checkValid="checkValid" /> <set-time-form
v-if="index == activeTab"
:timeForm="timeFormHas"
:valBegin="valBegin"
:markOptions="markOptions"
@checkValid="checkValid"
/>
</div> </div>
</div> </div>
<div class="form-div" v-if="activeTab == 'setNewRef'"> <div class="form-div" v-if="activeTab == 'setNewRef'">
<set-time-form :timeForm="timeForm" :valBegin="valBegin" @checkValid="checkValid" /> <set-time-form
:timeForm="timeForm"
:valBegin="valBegin"
@checkValid="checkValid"
:markOptions="markOptions"
/>
</div> </div>
</div> </div>
...@@ -29,15 +50,37 @@ ...@@ -29,15 +50,37 @@
import _ from 'lodash'; import _ from 'lodash';
import SelectCartoon from '@/views/followup/plan-manage/dialog/select-cartoon'; import SelectCartoon from '@/views/followup/plan-manage/dialog/select-cartoon';
import SetTimeForm from '@/views/followup/plan-manage/dialog/set-time-form'; import SetTimeForm from '@/views/followup/plan-manage/dialog/set-time-form';
import {getBasicData} from '@/utils/followup/followapis'
import { mapState } from 'vuex' import { mapState } from 'vuex'
const timeFormInit = { const timeFormInit = {
formRef: '', formRef: '',
followupTime: '', type: '',//随访方式
followupMark: '', timeNo: '',//随访时间
followupWay: '', timeUnit: '',//随访时间单位
pushTime: '', remindList: [ //提醒医生预约提前天数
remindTime: [], {
followupForm: [], startDays:''
}
],
pushContentList: [
{
resourceId: "",//漫画id
startDays: ""//推送患教提前天数
}
],
followupList: [//随访量表id
{
resourceId: "",//随访量表id
}
],
// followupTime: '',
// followupMark: '',
// followupWay: '',
// pushTime: '',
// remindTime: [],
// followupForm: [],
hasSelected: '', hasSelected: '',
isDisabled: false, isDisabled: false,
...@@ -72,20 +115,6 @@ ...@@ -72,20 +115,6 @@
}, },
], ],
markOptions: [ markOptions: [
{
value: '0',
label: '天'
}, {
value: '1',
label: '周'
},
{
value: '2',
label: '月'
}, {
value: '3',
label: '年'
}
], ],
remindOptions: [ remindOptions: [
{ {
...@@ -127,9 +156,9 @@ ...@@ -127,9 +156,9 @@
}, },
], ],
timeFormRules: { timeFormRules: {
followupTime: [{ required: true, message: '请添加随访时间', trigger: 'change' }], timeNo: [{ required: true, message: '请添加随访时间', trigger: 'change' }],
followupMark: [{ required: true, message: '请添加随访时间', trigger: 'change' }], timeUnit: [{ required: true, message: '请添加随访时间', trigger: 'change' }],
followupWay: [{ required: true, message: '请选择随访方式', trigger: 'change' }], type: [{ required: true, message: '请选择随访方式', trigger: 'change' }],
}, },
} }
}, },
...@@ -141,13 +170,13 @@ ...@@ -141,13 +170,13 @@
// setTimeNodeList: state => state.setTimeNodeList, // setTimeNodeList: state => state.setTimeNodeList,
// }), // }),
setTimeNodeList1(){ setTimeNodeList1(){
return this.sortKey(this.setTimeNodeList,'followupTime') return this.sortKey(this.setTimeNodeList,'timeNo')
}, },
followupMarkOne() { followupMarkOne() {
if(this.setTimeNodeList.length == 0) { if(this.setTimeNodeList.length == 0) {
return; return;
}else { }else {
return this.setTimeNodeList1[0].followupMark; return this.setTimeNodeList1[0].timeUnit;
} }
}, },
}, },
...@@ -157,8 +186,15 @@ ...@@ -157,8 +186,15 @@
this.timeForm.formRef = this.getNowTime(); this.timeForm.formRef = this.getNowTime();
if(this.setTimeNodeList.length>0) { if(this.setTimeNodeList.length>0) {
this.timeForm.isDisabled = true; this.timeForm.isDisabled = true;
this.timeForm.followupMark = this.setTimeNodeList[0].followupMark; this.timeForm.timeUnit = this.setTimeNodeList[0].timeUnit;
} }
// 随访时间节点单位
getBasicData({
numList: 'P017'
}).then(res=>{
console.log(res)
this.markOptions = res.data['P017']
})
}, },
watch: { watch: {
valBegin(val){ valBegin(val){
...@@ -167,20 +203,25 @@ ...@@ -167,20 +203,25 @@
timeForm(newVal, oldVal) { timeForm(newVal, oldVal) {
if(this.setTimeNodeList.length>0) { if(this.setTimeNodeList.length>0) {
this.timeForm.isDisabled = true; this.timeForm.isDisabled = true;
this.timeForm.followupMark = this.setTimeNodeList[0].followupMark; this.timeForm.timeUnit = this.setTimeNodeList[0].timeUnit;
} }
}, },
setTimeNodeList1(newVal, oldVal) { setTimeNodeList1(newVal, oldVal) {
this.setTimeNodeList1.map(item=>{ this.setTimeNodeList1.map(item=>{
item.isDisabled = true; item.isDisabled = true;
item.followupMark = this.setTimeNodeList1[0].followupMark item.timeUnit = this.setTimeNodeList1[0].timeUnit
this.markOptions.forEach((ob)=>{
if(item.timeUnit==ob.no){
item.timeUnitStr = ob.value
}
})
}); });
this.setTimeNodeList1[0].isDisabled = false; this.setTimeNodeList1[0].isDisabled = false;
}, },
followupMarkOne(newVal, oldVal){ followupMarkOne(newVal, oldVal){
if(newVal != oldVal){ if(newVal != oldVal){
this.setTimeNodeList1.map(item=>{ this.setTimeNodeList1.map(item=>{
item.followupMark = this.setTimeNodeList1[0].followupMark item.timeUnit = this.setTimeNodeList1[0].timeUnit
}); });
} }
} }
...@@ -223,6 +264,7 @@ ...@@ -223,6 +264,7 @@
this.timeForm.hasSelected = ''; this.timeForm.hasSelected = '';
}, },
changeTab(val){ changeTab(val){
console.log(val)
this.activeTab = val; this.activeTab = val;
if(val == 'setNewRef') { if(val == 'setNewRef') {
this.timeForm = _.cloneDeep(timeFormInit); this.timeForm = _.cloneDeep(timeFormInit);
......
...@@ -37,9 +37,9 @@ ...@@ -37,9 +37,9 @@
<p class="err-tips" v-if="noChoice">请添加随访居民</p> <p class="err-tips" v-if="noChoice">请添加随访居民</p>
</div> </div>
</el-form-item> </el-form-item>
<el-form-item label="随访模板" prop="followupTemplate"> <el-form-item label="随访模板" prop="resourceId">
<el-select <el-select
v-model="baseInfo.followupTemplate" v-model="baseInfo.resourceId"
placeholder="请选择随访模板" placeholder="请选择随访模板"
clearable> clearable>
<el-option <el-option
...@@ -51,9 +51,9 @@ ...@@ -51,9 +51,9 @@
</el-select> </el-select>
</el-form-item> </el-form-item>
<p class="tips">随访计划创建成功后,模板不可更换,请谨慎选择。</p> <p class="tips">随访计划创建成功后,模板不可更换,请谨慎选择。</p>
<el-form-item label="随访开始时间" prop="startTime"> <el-form-item label="随访开始时间" prop="time">
<el-date-picker <el-date-picker
v-model="baseInfo.startTime" v-model="baseInfo.time"
type="date" type="date"
placeholder="请选择随访开始时间" placeholder="请选择随访开始时间"
clearable clearable
...@@ -62,14 +62,14 @@ ...@@ -62,14 +62,14 @@
</el-form-item> </el-form-item>
<el-form-item label="备注"> <el-form-item label="备注">
<el-select <el-select
v-model="baseInfo.followupKind" v-model="baseInfo.remarksStatus"
placeholder="请选择随访种类" placeholder="请选择随访种类"
clearable> clearable>
<el-option <el-option
v-for="item in kindOptions" v-for="item in kindOptions"
:key="item.value" :key="item.no"
:label="item.label" :label="item.value"
:value="item.value"> :value="item.no">
</el-option> </el-option>
</el-select> </el-select>
</el-form-item> </el-form-item>
...@@ -91,6 +91,7 @@ ...@@ -91,6 +91,7 @@
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 {createFollowPlan,getBasicData} from '@/utils/followup/followapis'
import { mapState, mapActions } from 'vuex' import { mapState, mapActions } from 'vuex'
export default { export default {
...@@ -113,10 +114,16 @@ ...@@ -113,10 +114,16 @@
noChoice: false, noChoice: false,
baseInfo: { baseInfo: {
name: '', name: '',//随访计划名称
followupTemplate: '', patientIdList: [],//随访居民列表
startTime: '', resourceId:'',//随访模板ID
followupKind: '', time:'',//随访开始时间
remarksStatus: '',
fPlanTimeReqList: [],//时间节点列表
// followupTemplate: '',
// startTime: '',
// followupKind: '',
hasSelectedNum: 0, hasSelectedNum: 0,
}, },
isShowSelectPatient: false, isShowSelectPatient: false,
...@@ -135,23 +142,30 @@ ...@@ -135,23 +142,30 @@
} }
], ],
kindOptions: [ kindOptions: [
{ // {
value: '0', // value: '0',
label: '上门随访' // label: '上门随访'
}, { // }, {
value: '1', // value: '1',
label: '术后随访' // label: '术后随访'
} // }
], ],
rules: { rules: {
name: [{ required: true, message: '请输入随访计划名称', trigger: 'blur' }], name: [{ required: true, message: '请输入随访计划名称', trigger: 'blur' }],
hasSelectedNum: [{ required: true, message: '请添加随访居民', trigger: 'change' }], hasSelectedNum: [{ required: true, message: '请添加随访居民', trigger: 'change' }],
followupTemplate: [{ required: true, message: '请选择随访模板', trigger: 'change' }], resourceId: [{ required: true, message: '请选择随访模板', trigger: 'change' }],
startTime: [{ required: true, message: '请选择随访开始时间', trigger: 'change' }], time: [{ required: true, message: '请选择随访开始时间', trigger: 'change' }],
}, },
} }
}, },
created() { created() {
// 获取备注
getBasicData({
numList: 'P211'
}).then(res=>{
console.log(res)
this.kindOptions = res.data['P211']
})
}, },
mounted() { mounted() {
//清理store中存的数据setTimeNodeList //清理store中存的数据setTimeNodeList
...@@ -183,6 +197,7 @@ ...@@ -183,6 +197,7 @@
let getArguments = arguments[0]; let getArguments = arguments[0];
this.isShowSelectPatient = getArguments[0]; this.isShowSelectPatient = getArguments[0];
this.hasSelectedList = getArguments[1]; this.hasSelectedList = getArguments[1];
this.baseInfo.patientIdList = getArguments[1];
this.baseInfo.hasSelectedNum = getArguments[1].length; this.baseInfo.hasSelectedNum = getArguments[1].length;
}, },
continueAdd(val) { continueAdd(val) {
...@@ -224,8 +239,11 @@ ...@@ -224,8 +239,11 @@
this.activeTab = 'first'; this.activeTab = 'first';
}, },
saveEdit() { saveEdit() {
this.baseInfo.fPlanTimeReqList = this.setTimeNodeList
console.log(this.baseInfo)
createFollowPlan(this.baseInfo)
// console.log('保存setTimeNodeList1',this.$refs.getTimeNodeList.setTimeNodeList1) // console.log('保存setTimeNodeList1',this.$refs.getTimeNodeList.setTimeNodeList1)
// console.log('store中的setTimeNodeList数据为=>',JSON.stringify(this.setTimeNodeList))
// console.log('保存timeForm',this.$refs.getTimeNodeList.timeForm) // console.log('保存timeForm',this.$refs.getTimeNodeList.timeForm)
// 各种校验通过后,提交编辑内容,toast提示 // 各种校验通过后,提交编辑内容,toast提示
......
Markdown 格式
0% or
您添加了 0 到此讨论。请谨慎行事。
先完成此消息的编辑!
想要评论请 注册