|
@@ -156,21 +156,16 @@ export default {
|
|
});
|
|
});
|
|
},
|
|
},
|
|
onSubmit() {
|
|
onSubmit() {
|
|
- this.form.hospitalRelationVOList.forEach((item, index) => {
|
|
|
|
- if (item.name == '' && item.code == '') {
|
|
|
|
- this.form.hospitalRelationVOList.splice(index, 1);
|
|
|
|
- this.$refs.form.clearValidate();
|
|
|
|
- }
|
|
|
|
- item.errorOther = false;
|
|
|
|
- item.errorCurrent = false;
|
|
|
|
- });
|
|
|
|
- this.$nextTick(() => {
|
|
|
|
- this.$refs.form.validate(valid => {
|
|
|
|
|
|
+ this.$refs.form.validate(valid => {
|
|
if (valid) {
|
|
if (valid) {
|
|
this.saveDisable = true;
|
|
this.saveDisable = true;
|
|
let params = {
|
|
let params = {
|
|
hospitalRelationVOList: this.form.hospitalRelationVOList
|
|
hospitalRelationVOList: this.form.hospitalRelationVOList
|
|
};
|
|
};
|
|
|
|
+ this.form.hospitalRelationVOList.forEach((item, index) => {
|
|
|
|
+ item.errorOther = false;
|
|
|
|
+ item.errorCurrent = false;
|
|
|
|
+ });
|
|
api.saveHospitalRelation(params).then(res => {
|
|
api.saveHospitalRelation(params).then(res => {
|
|
if (res.data.code === '0') {
|
|
if (res.data.code === '0') {
|
|
this.$message({
|
|
this.$message({
|
|
@@ -206,8 +201,6 @@ export default {
|
|
});
|
|
});
|
|
}
|
|
}
|
|
});
|
|
});
|
|
- });
|
|
|
|
-
|
|
|
|
},
|
|
},
|
|
getIndex(data, list) {
|
|
getIndex(data, list) {
|
|
let arr2Map = {};
|
|
let arr2Map = {};
|
|
@@ -369,7 +362,7 @@ export default {
|
|
height: 32px;
|
|
height: 32px;
|
|
margin-bottom: 18px;
|
|
margin-bottom: 18px;
|
|
}
|
|
}
|
|
- /deep/ .is-error .el-form-item__error{
|
|
|
|
|
|
+ /deep/ .is-error .el-form-item__error {
|
|
top: 34px;
|
|
top: 34px;
|
|
}
|
|
}
|
|
.operation {
|
|
.operation {
|