|
@@ -518,8 +518,11 @@ export default {
|
|
form: {},
|
|
form: {},
|
|
// 表单校验
|
|
// 表单校验
|
|
rules: {
|
|
rules: {
|
|
- peopleId: [
|
|
|
|
- { required: true, message: "单位名称不能为空", trigger: "blur" },
|
|
|
|
|
|
+ deptId: [
|
|
|
|
+ { required: true, message: "单位名称不能为空", trigger: "change" },
|
|
|
|
+ ],
|
|
|
|
+ startTime: [
|
|
|
|
+ { required: true, message: "时间不能为空", trigger: "change" },
|
|
],
|
|
],
|
|
},
|
|
},
|
|
//下拉s
|
|
//下拉s
|
|
@@ -676,9 +679,10 @@ export default {
|
|
this.ChongZhi();
|
|
this.ChongZhi();
|
|
this.form.unitId = data.id;
|
|
this.form.unitId = data.id;
|
|
this.form.unitName = data.label;
|
|
this.form.unitName = data.label;
|
|
|
|
+ console.log(data);
|
|
this.ZhuChiRen(this.form.unitId);
|
|
this.ZhuChiRen(this.form.unitId);
|
|
this.tomList.forEach((item, i) => {
|
|
this.tomList.forEach((item, i) => {
|
|
- this.tomList[i].unitId1 = data.label;
|
|
|
|
|
|
+ this.tomList[i].unitId1 = this.form.unitName;
|
|
});
|
|
});
|
|
if (
|
|
if (
|
|
this.form.unitId != null &&
|
|
this.form.unitId != null &&
|
|
@@ -866,13 +870,14 @@ export default {
|
|
});
|
|
});
|
|
} else {
|
|
} else {
|
|
this.form.bdglWeekworkRegisterList = this.tomList;
|
|
this.form.bdglWeekworkRegisterList = this.tomList;
|
|
- console.log(this.code);
|
|
|
|
if (this.code != 200) {
|
|
if (this.code != 200) {
|
|
- addBdglweekwork(this.form).then((response) => {
|
|
|
|
- this.$modal.msgSuccess("新增成功");
|
|
|
|
- this.open = false;
|
|
|
|
- this.getList();
|
|
|
|
- });
|
|
|
|
|
|
+ if (this.form.unitId) {
|
|
|
|
+ addBdglweekwork(this.form).then((response) => {
|
|
|
|
+ this.$modal.msgSuccess("新增成功");
|
|
|
|
+ this.open = false;
|
|
|
|
+ this.getList();
|
|
|
|
+ });
|
|
|
|
+ }
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|