|
@@ -168,6 +168,12 @@ export default defineComponent({
|
|
|
const index = state.checkboxIds.findIndex((id: any) => id === item.id);
|
|
|
if (index !== -1) {
|
|
|
state.checkboxIds.splice(index, 1);
|
|
|
+ const sIndex = state.selectStudents.findIndex(
|
|
|
+ (select: any) => select.id === item.id
|
|
|
+ );
|
|
|
+ if (sIndex !== -1) {
|
|
|
+ state.selectStudents.splice(sIndex, 1);
|
|
|
+ }
|
|
|
onCheckStudents();
|
|
|
}
|
|
|
};
|
|
@@ -256,6 +262,7 @@ export default defineComponent({
|
|
|
state.checkboxIds = ids;
|
|
|
} else {
|
|
|
state.checkboxIds = [];
|
|
|
+ state.selectStudents = [];
|
|
|
state.indeterminate = false;
|
|
|
}
|
|
|
onCheckStudents();
|
|
@@ -284,7 +291,10 @@ export default defineComponent({
|
|
|
<NSpin show={state.loading} class={styles.loadingSection}>
|
|
|
<NCheckboxGroup
|
|
|
v-model:value={state.checkboxIds}
|
|
|
- onUpdate:value={onCheckStudents}>
|
|
|
+ onUpdate:value={() => {
|
|
|
+ state.selectStudents = [];
|
|
|
+ onCheckStudents();
|
|
|
+ }}>
|
|
|
{state.tableList.map((item: any) => (
|
|
|
<NCheckbox value={item.id} class={[styles.studentItem]}>
|
|
|
<div class={styles.studentInfo}>
|