|
@@ -38,7 +38,7 @@
|
|
<template v-slot="{ row }">
|
|
<template v-slot="{ row }">
|
|
<el-row>
|
|
<el-row>
|
|
<el-col v-for="(i, index) in row.list" :key="index" :span="6">
|
|
<el-col v-for="(i, index) in row.list" :key="index" :span="6">
|
|
- <el-checkbox :label="i.id">
|
|
|
|
|
|
+ <el-checkbox :label="i.id" :disabled="checkSelect(i)">
|
|
<el-link :type="i.gender.includes('男') ? 'primary' : 'success'">{{ i.name }}({{ i.gender }})</el-link>
|
|
<el-link :type="i.gender.includes('男') ? 'primary' : 'success'">{{ i.name }}({{ i.gender }})</el-link>
|
|
</el-checkbox>
|
|
</el-checkbox>
|
|
</el-col>
|
|
</el-col>
|
|
@@ -222,6 +222,14 @@ export default {
|
|
const r = this.ostuList.filter(f => f.gender.includes(gender));
|
|
const r = this.ostuList.filter(f => f.gender.includes(gender));
|
|
return r.length;
|
|
return r.length;
|
|
},
|
|
},
|
|
|
|
+ // 性别多选过滤
|
|
|
|
+ checkSelect(i) {
|
|
|
|
+ if (this.stuList.length > 0) {
|
|
|
|
+ const h = _.head(this.stuList);
|
|
|
|
+ const stu = this.ostuList.find(f => f._id === h);
|
|
|
|
+ if (stu) return !i.gender.includes(stu.gender);
|
|
|
|
+ } else return false;
|
|
|
|
+ },
|
|
},
|
|
},
|
|
watch: {
|
|
watch: {
|
|
defaultOption: {
|
|
defaultOption: {
|