|
@@ -51,13 +51,13 @@
|
|
|
</el-col>
|
|
</el-col>
|
|
|
|
|
|
|
|
<el-col :span="12">
|
|
<el-col :span="12">
|
|
|
- <el-form-item prop="absenceList" label="参与人员">
|
|
|
|
|
|
|
+ <el-form-item prop="absenceList" prop="absenceList" label="参与人员">
|
|
|
<k-select :multiple="true" v-model="formData.absenceList" url="/user/find/all"
|
|
<k-select :multiple="true" v-model="formData.absenceList" url="/user/find/all"
|
|
|
:params="{ orgId: formData.orgId }" placeholder="请选择缺席人员" @select="absenceUserSelectChanged"></k-select>
|
|
:params="{ orgId: formData.orgId }" placeholder="请选择缺席人员" @select="absenceUserSelectChanged"></k-select>
|
|
|
</el-form-item>
|
|
</el-form-item>
|
|
|
</el-col>
|
|
</el-col>
|
|
|
<el-col :span="12">
|
|
<el-col :span="12">
|
|
|
- <el-form-item v-if="formData.id" label="缺席人员">
|
|
|
|
|
|
|
+ <el-form-item v-if="formData.id" prop="absentList" label="缺席人员">
|
|
|
<k-select :multiple="true" v-model="formData.absentList" url="/user/find/all"
|
|
<k-select :multiple="true" v-model="formData.absentList" url="/user/find/all"
|
|
|
:params="{ orgId: formData.orgId }" @select="absentUserSelectChanged" placeholder="请选择缺席人员">
|
|
:params="{ orgId: formData.orgId }" @select="absentUserSelectChanged" placeholder="请选择缺席人员">
|
|
|
</k-select>
|
|
</k-select>
|
|
@@ -175,7 +175,7 @@ export default {
|
|
|
}
|
|
}
|
|
|
this.formData = response.data;
|
|
this.formData = response.data;
|
|
|
});
|
|
});
|
|
|
- console.log("getEduTask", this.formData);
|
|
|
|
|
|
|
+ console.log("getDrillTask", this.formData);
|
|
|
},
|
|
},
|
|
|
async show(id, other = {}) {
|
|
async show(id, other = {}) {
|
|
|
this.id = id;
|
|
this.id = id;
|
|
@@ -188,12 +188,12 @@ export default {
|
|
|
},
|
|
},
|
|
|
absentUserSelectChanged(list) {
|
|
absentUserSelectChanged(list) {
|
|
|
// 将类型为2的数据删除
|
|
// 将类型为2的数据删除
|
|
|
- if (this.formData.taskUserList) {
|
|
|
|
|
- this.formData.taskUserList = this.formData.taskUserList.filter(
|
|
|
|
|
|
|
+ if (this.formData.absentList) {
|
|
|
|
|
+ this.formData.absentList = this.formData.absentList.filter(
|
|
|
(x) => x.type == 1
|
|
(x) => x.type == 1
|
|
|
);
|
|
);
|
|
|
} else {
|
|
} else {
|
|
|
- this.formData.taskUserList = [];
|
|
|
|
|
|
|
+ this.formData.absentList = [];
|
|
|
}
|
|
}
|
|
|
let tempList = list.map((x) => {
|
|
let tempList = list.map((x) => {
|
|
|
return {
|
|
return {
|
|
@@ -203,17 +203,17 @@ export default {
|
|
|
};
|
|
};
|
|
|
});
|
|
});
|
|
|
if (!tempList) return;
|
|
if (!tempList) return;
|
|
|
- this.formData.taskUserList = this.formData.taskUserList.concat(tempList);
|
|
|
|
|
- console.log("absentUserSelectChanged", list, this.formData.taskUserList);
|
|
|
|
|
|
|
+ this.formData.absentList = this.formData.absentList.concat(tempList);
|
|
|
|
|
+ console.log("absentUserSelectChanged", list, this.formData.absentList);
|
|
|
},
|
|
},
|
|
|
absenceUserSelectChanged(list) {
|
|
absenceUserSelectChanged(list) {
|
|
|
// 将类型为1的数据删除
|
|
// 将类型为1的数据删除
|
|
|
- if (this.formData.taskUserList) {
|
|
|
|
|
- this.formData.taskUserList = this.formData.taskUserList.filter(
|
|
|
|
|
|
|
+ if (this.formData.absenceList) {
|
|
|
|
|
+ this.formData.absenceList = this.formData.absenceList.filter(
|
|
|
(x) => x.type == 2
|
|
(x) => x.type == 2
|
|
|
);
|
|
);
|
|
|
} else {
|
|
} else {
|
|
|
- this.formData.taskUserList = [];
|
|
|
|
|
|
|
+ this.formData.absenceList = [];
|
|
|
}
|
|
}
|
|
|
let tempList = list.map((x) => {
|
|
let tempList = list.map((x) => {
|
|
|
return {
|
|
return {
|
|
@@ -223,8 +223,8 @@ export default {
|
|
|
};
|
|
};
|
|
|
});
|
|
});
|
|
|
if (!tempList) return;
|
|
if (!tempList) return;
|
|
|
- this.formData.taskUserList = this.formData.taskUserList.concat(tempList);
|
|
|
|
|
- console.log("absenceUserSelectChanged", list, this.formData.taskUserList);
|
|
|
|
|
|
|
+ this.formData.absenceList = this.formData.absenceList.concat(tempList);
|
|
|
|
|
+ console.log("absenceUserSelectChanged", list, this.formData.absenceList);
|
|
|
},
|
|
},
|
|
|
// 事件
|
|
// 事件
|
|
|
onHide() {
|
|
onHide() {
|