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

fixed

上级 462c6f17
...@@ -11,12 +11,13 @@ ...@@ -11,12 +11,13 @@
<el-form <el-form
:model="addPatientData" :model="addPatientData"
:rules="rules" :rules="rules"
ref="addPatientData"
label-width="100px"> label-width="100px">
<el-form-item label="已选居民:"> <el-form-item label="已选居民:">
{{addPatientData.patientNames}} {{addPatientData.patientNames}}
</el-form-item> </el-form-item>
<el-form-item label="随访开始时间:" prop="finishReason"> <el-form-item label="随访开始时间:" prop="joinTime">
<el-select v-model="addPatientData.joinTime" size="small"> <el-select v-model="addPatientData.joinTime" size="small" clearable>
<el-option <el-option
v-for="(item, index) in followStartTimeList" v-for="(item, index) in followStartTimeList"
:key="item+index" :key="item+index"
...@@ -59,16 +60,14 @@ ...@@ -59,16 +60,14 @@
return { return {
showAddPatientTime: true, showAddPatientTime: true,
rules: { rules: {
finishReason: [ joinTime: [
{ required: true, message: '请输入结束原因', trigger: 'blur' }, { required: true, message: '请选择随访开始时间', trigger: 'change' },
{ min: 1, max: 30, message: '长度在30个字符内', trigger: 'blur' }
], ],
} }
} }
}, },
mounted() { mounted() {
this.getFollowStartTimeList(this.$route.query.planId); this.getFollowStartTimeList(this.$route.query.planId);// 获取随访时间列表
// 获取随访时间列表
}, },
computed: { computed: {
...mapState('planManage', { ...mapState('planManage', {
...@@ -81,35 +80,42 @@ ...@@ -81,35 +80,42 @@
this.$emit('closeAddPatientTime',false) this.$emit('closeAddPatientTime',false)
}, },
addPatient() { addPatient() {
const { id, patientIdList, joinTime } = this.addPatientData; this.$refs['addPatientData'].validate(valid => {
createFollowPlan({ if (valid) {
id, const { id, patientIdList, joinTime } = this.addPatientData;
addPatients: true, createFollowPlan({
patientIdList, id,
joinTime addPatients: true,
}).then((data) => { patientIdList,
if(data.code == '000000') { joinTime
this.$message({ }).then((data) => {
message: '添加成功!', if(data.code == '000000') {
type: 'success' this.$message({
message: '添加成功!',
type: 'success'
});
this.getResidentList({
planId: this.addPatientData.id,
status: this.addPatientData.status
})
this.clickClose()
} else {
this.$message({
message: `${data.message}`,
type: 'error'
});
}
}).catch((err) => {
this.$message({
message: `${err.message}`,
type: 'error'
});
}); });
this.getResidentList({
planId: this.addPatientData.id,
status: this.addPatientData.status
})
this.clickClose()
} else { } else {
this.$message({ return false;
message: `${data.message}`,
type: 'error'
});
} }
}).then((err) => {
this.$message({
message: `${err.message}`,
type: 'error'
});
}); });
} }
} }
} }
......
...@@ -99,7 +99,7 @@ ...@@ -99,7 +99,7 @@
}) })
}, },
methods: { methods: {
...mapActions('planManage', ['getPlanOptions']), ...mapActions('planManage', ['getPlanOptions','getResidentList']),
selectGroup(val) { selectGroup(val) {
const _this = this const _this = this
_this.selectedGroup = [] _this.selectedGroup = []
...@@ -134,7 +134,10 @@ ...@@ -134,7 +134,10 @@
message: '变更计划成功!', message: '变更计划成功!',
type: 'success' type: 'success'
}); });
this.getResidentList({
planId,
status: this.planChangeData.status
})
this.clickClose() this.clickClose()
} else { } else {
this.$message({ this.$message({
...@@ -142,9 +145,9 @@ ...@@ -142,9 +145,9 @@
type: 'error' type: 'error'
}); });
} }
}).then(() => { }).catch((err) => {
this.$message({ this.$message({
message: `${data.message}`, message: `${err.message}`,
type: 'error' type: 'error'
}); });
}); });
......
...@@ -57,7 +57,7 @@ ...@@ -57,7 +57,7 @@
showFinishFollowup: true, showFinishFollowup: true,
rules: { rules: {
finishReason: [ finishReason: [
{ required: true, message: '请输入结束原因', trigger: 'blur' }, { required: true, message: '请输入原因', trigger: 'blur' },
{ min: 1, max: 30, message: '长度在30个字符内', trigger: 'blur' } { min: 1, max: 30, message: '长度在30个字符内', trigger: 'blur' }
], ],
}, },
...@@ -86,9 +86,9 @@ ...@@ -86,9 +86,9 @@
type: 'error' type: 'error'
}); });
} }
}).then(() => { }).catch((err) => {
this.$message({ this.$message({
message: `${data.message}`, message: `${err.message}`,
type: 'error' type: 'error'
}); });
}); });
......
...@@ -59,7 +59,7 @@ ...@@ -59,7 +59,7 @@
</div> </div>
<div class="content-div"> <div class="content-div">
<div class="c-title">随访状态:</div> <div class="c-title">随访状态:</div>
<div class="c-content">{{planDetails.statusName}}</div> <div class="c-content">{{planDetails.statusStr}}</div>
</div> </div>
</div> </div>
</div> </div>
......
...@@ -27,14 +27,15 @@ ...@@ -27,14 +27,15 @@
</el-option> </el-option>
</el-select> </el-select>
</el-form-item> </el-form-item>
<el-form-item label="随访开始时间:" prop="startDate" size="small" clearable> <el-form-item label="随访开始时间:" prop="startDate" size="small">
<el-date-picker <el-select v-model="searchData.startDate" size="small" clearable>
v-model="searchData.startDate" <el-option
type="datetime" v-for="(item, index) in followStartTimeList"
format="yyyy-MM-dd hh:mm:ss" :key="item+index"
value-format="yyyy-MM-dd hh:mm:ss" :label="item"
placeholder="选择随访开始时间"> :value="item">
</el-date-picker> </el-option>
</el-select>
</el-form-item> </el-form-item>
</el-form> </el-form>
</div> </div>
...@@ -194,16 +195,18 @@ ...@@ -194,16 +195,18 @@
}); });
this.getPlanStatusOption() this.getPlanStatusOption()
this.getGroupList(); //获取分组列表 this.getGroupList(); //获取分组列表
this.getFollowStartTimeList(this.$route.query.planId);// 获取随访时间列表
}, },
computed: { computed: {
...mapState('planManage',{ ...mapState('planManage',{
residentList: state => state.residentList, residentList: state => state.residentList,
groupList: state => state.groupList, groupList: state => state.groupList,
planStatusOption: state => state.planStatusOption planStatusOption: state => state.planStatusOption,
followStartTimeList: state => state.followStartTimeList,
}) })
}, },
methods: { methods: {
...mapActions('planManage', ['getResidentList', 'getGroupList', 'getPlanStatusOption']), ...mapActions('planManage', ['getResidentList', 'getGroupList', 'getPlanStatusOption', 'getFollowStartTimeList']),
handleSizeChangePre(pageSize) { handleSizeChangePre(pageSize) {
this.getResidentList({ this.getResidentList({
pageSize, pageSize,
...@@ -240,7 +243,8 @@ ...@@ -240,7 +243,8 @@
planId: this.$route.query.planId, planId: this.$route.query.planId,
patientId: row.patientId, patientId: row.patientId,
yLabelList: row.labelIdList||[], yLabelList: row.labelIdList||[],
startDate: row.time startDate: row.time,
status: this.status
} }
this.showChangePlan = true; this.showChangePlan = true;
}, },
...@@ -338,9 +342,12 @@ ...@@ -338,9 +342,12 @@
}, },
residentList(val) { residentList(val) {
const _this = this const _this = this
val.fPlanPatientInfoDtoList.forEach(function (item,index) { if(val.fPlanPatientInfoDtoList) {
_this.initialPatientIdList.push(item.patientId) val.fPlanPatientInfoDtoList.forEach(function (item,index) {
}) _this.initialPatientIdList.push(item.patientId)
})
}
} }
} }
} }
......
Markdown 格式
0% or
您添加了 0 到此讨论。请谨慎行事。
先完成此消息的编辑!
想要评论请 注册