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

fixed

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