diff --git a/src/views/BatchSub/BatchSub.vue b/src/views/BatchSub/BatchSub.vue index f5457db..31a1ff6 100644 --- a/src/views/BatchSub/BatchSub.vue +++ b/src/views/BatchSub/BatchSub.vue @@ -179,18 +179,18 @@ :edit-render="{}" > @@ -669,7 +669,16 @@ export default { form[key] = row[key]; } + let arr = [] + + this.selectedRow.school_details.map(item=>{ + arr.push(item.id) + }) + form.school = arr + console.log("form",form) + // return this.loading = true; + await save(form, false); await this.getList(); this.loading = false; diff --git a/src/views/BatchSub/components/AddBatchSub.vue b/src/views/BatchSub/components/AddBatchSub.vue index b2e03b9..2f8e12d 100644 --- a/src/views/BatchSub/components/AddBatchSub.vue +++ b/src/views/BatchSub/components/AddBatchSub.vue @@ -68,11 +68,11 @@ - + @focus="$refs['SchoolPicker'].setDefaultValue(form.school_details), isShowSchoolPicker = true"> @@ -143,7 +143,7 @@ - + @@ -182,6 +182,7 @@ export default { sort: "", show_school_obey: "", show_specialty_obey: "", + school_details:[] }, rules: { name: [ @@ -238,7 +239,6 @@ export default { return []; } }, - uploadBefore(file) { if (file.size > uploadSize) { this.$message({ @@ -300,6 +300,11 @@ export default { if (valid) { this.loading = true; try { + let arr =[] + this.form.school_details.map(i=>{ + arr.push(i.id) + }) + this.form.school = arr await save(this.form); this.$message.success("新增成功"); this.$emit("refresh"); diff --git a/src/views/BatchSub/components/SchoolPicker.vue b/src/views/BatchSub/components/SchoolPicker.vue index ac05566..36594f1 100644 --- a/src/views/BatchSub/components/SchoolPicker.vue +++ b/src/views/BatchSub/components/SchoolPicker.vue @@ -316,6 +316,7 @@ export default { if ($table) { console.log(this.uniqueArr($table.getCheckboxReserveRecords(true), $table.getCheckboxRecords(true), this.defaultValue).map(i => ({ id: i.id, code: i.code, name: i.name }))) this.$emit('confirm', this.uniqueArr($table.getCheckboxReserveRecords(true), $table.getCheckboxRecords(true), this.defaultValue).map(i => ({ id: i.id, code: i.code, name: i.name }))) + this.setDefaultValue() this.$refs['table']?.clearCheckboxReserve() this.$refs['table']?.clearCheckboxRow() diff --git a/src/views/School/School.vue b/src/views/School/School.vue index 4396ae1..95bf88c 100644 --- a/src/views/School/School.vue +++ b/src/views/School/School.vue @@ -136,10 +136,25 @@ + - +