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

fixed

上级 a9af58af
......@@ -15,7 +15,7 @@
@change="selectGroup"
placeholder="请选择">
<el-option
v-for="(item, index) in groupList"
v-for="(item, index) in realGroup"
:key="index"
:label="item.labelName"
:value="item.labelId">
......@@ -23,7 +23,10 @@
</el-select>
</el-form-item>
<el-form-item label="随访计划:" prop="planId">
<el-select v-model="planChangeData.planId" size="small">
<el-select
v-model="planChangeData.planId"
@change="selectPlan"
size="small">
<el-option
v-for="(item,index) in planOption"
:key="index"
......@@ -90,6 +93,8 @@
{ required: true, message: '请选择随访计划', trigger: 'change' },
],
},
realGroup: [],
selectPlanName: ''
}
},
mounted() {
......@@ -119,6 +124,10 @@
_this.selectedGroup.push(pushItem)
})
},
selectPlan(val) {
const arr = this.planOption.filter((item=>{return item.id == val}));
this.selectPlan = arr[0].name
},
clickClose() {
this.$emit('closeChangePlan',false);
},
......@@ -126,13 +135,14 @@
const _this = this
this.$refs['planChangeData'].validate(valid => {
if (valid) {
const { planPatientsId, planId, patientId, startDate } = this.planChangeData;
const { planPatientsId, planId, patientId, startDate, planIdOld } = this.planChangeData;
changePlan({
planPatientsId,
planId,
patientId,
yLabelList: this.selectedGroup,
startDate
startDate,
oldPlanId: parseInt(planIdOld)
}).then((data) => {
if(data.code == '000000') {
this.$message({
......@@ -145,7 +155,7 @@
status: this.planChangeData.status
});
} else if(this.$route.name == 'residentDetail') {
this.$router.push({path: '/followup/plan-manage/resident-detail', query: {patientId: patientId, planId: planId}})
this.$router.push({path: '/followup/plan-manage/resident-detail', query: {patientId: patientId, planId: planId}});
this.getResidentDetail({
planId,
patientId
......@@ -153,6 +163,11 @@
}
this.clickClose()
} else if(data.code == '200005') {
this.$message({
message: `${this.planChangeData.patientName}用户已经在${this.selectPlanName}计划中。`,
type: 'success'
});
} else {
this.$message({
message: `${data.message}`,
......@@ -186,6 +201,9 @@
}
_this.selectedGroup.push(pushItem)
})
},
groupList(val) {
this.realGroup = val.filter((item=>{return item.labelName!=='未分组'}))
}
}
}
......
......@@ -18,7 +18,7 @@
size="small">
<el-form-item>
<el-select v-model="searchData.sex" @change="changeSex">
<el-select v-model="searchData.sex" @change="changeSex" >
<el-option
v-for="(item,index) in sexOptions"
:key="index"
......@@ -28,7 +28,7 @@
</el-select>
</el-form-item>
<el-form-item>
<el-select v-model="searchData.ageRange" @change="changeAge">
<el-select v-model="searchData.ageRange" @change="changeAge" >
<el-option
v-for="(item,index) in ageOptions"
:key="index"
......@@ -38,7 +38,7 @@
</el-select>
</el-form-item>
<el-form-item>
<el-select v-model="searchData.diseaseId" @change="changeDisease">
<el-select v-model="searchData.diseaseId" @change="changeDisease" >
<el-option
v-for="(item,index) in diseaseOptions"
:key="index"
......@@ -48,7 +48,7 @@
</el-select>
</el-form-item>
<el-form-item>
<el-select v-model="searchData.labelId" @change="changeLabel">
<el-select v-model="searchData.labelId" @change="changeLabel" >
<el-option
v-for="(item,index) in labelOptions"
:key="index"
......@@ -58,7 +58,7 @@
</el-select>
</el-form-item>
<el-form-item style="width:160px;">
<el-input v-model="searchData.searchCondition" placeholder="请输入姓名或手机号">
<el-input v-model="searchData.searchCondition" placeholder="请输入姓名或手机号" >
<i slot="prefix" class="el-input__icon el-icon-search" @click="searchHandler" style="cursor: pointer"></i>
</el-input>
</el-form-item>
......@@ -362,7 +362,8 @@
this.getPatientsList()
},
changeSex(val){
this.sex = val
this.sex = val;
this.paginationSet.pageNum = 1;
this.getPatientsList()
},
changeAge(val){
......@@ -372,23 +373,27 @@
this.age = val;
this.ageBegin = this.ageDate(val).ageBegin;
this.ageEnd = this.ageDate(val).ageEnd;
this.paginationSet.pageNum = 1;
this.getPatientsList()
},
changeDisease(val){
this.diseaseId = val
this.diseaseId = val;
this.paginationSet.pageNum = 1;
this.getPatientsList()
},
changeLabel(val){
this.labelId = val
this.labelId = val;
this.paginationSet.pageNum = 1;
this.getPatientsList()
},
searchHandler() {
const searchCondition = this.searchData.searchCondition
this.searchCondition = searchCondition
const searchCondition = this.searchData.searchCondition;
this.searchCondition = searchCondition;
this.paginationSet.pageNum = 1;
this.getPatientsList()
},
ageDate(val){
var ageObj;
let ageObj;
if(!val){
ageObj = {
ageBegin:'',
......@@ -400,7 +405,7 @@
ageEnd: 200
}
}else {
var ageItem = val.split('-');
let ageItem = val.split('-');
ageObj = {
ageBegin:ageItem[0],
ageEnd:ageItem[1]
......
......@@ -166,6 +166,7 @@
yLabelList: this.residentDetail.labelIdList||[],
// startDate: this.residentDetail.fPlanDto.timeStr,
planIdOld: this.residentDetail.fPlanDto.id,
patientName: this.residentDetail.patientName,
}
this.showChangePlan = true;
},
......
......@@ -309,7 +309,8 @@
this.getResidentList({
...this.searchData,
status: this.status,
planId: this.$route.query.planId
planId: this.$route.query.planId,
pageNum: 1
})
},
resetSearchData(formName) {
......@@ -324,6 +325,7 @@
// startDate: row.time,
status: this.status,
planIdOld: this.$route.query.planId,
patientName: row.patientName,
}
this.showChangePlan = true;
},
......@@ -446,9 +448,11 @@
},
selectResidentList(val) {
const _this = this
val.forEach(function (item,index) {
_this.initialPatientIdList.push(item.patientId)
});
if(val) {
val.forEach(function (item,index) {
_this.initialPatientIdList.push(item.patientId)
});
}
},
},
beforeRouteEnter(to, from, next) {
......
Markdown 格式
0% or
您添加了 0 到此讨论。请谨慎行事。
先完成此消息的编辑!
想要评论请 注册