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

fixed

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