|
@@ -66,6 +66,15 @@ const useStatisticsFilter = () => {
|
|
|
})
|
|
|
}
|
|
|
})
|
|
|
+ // watch(
|
|
|
+ // () => model.markingGroupNumber,
|
|
|
+ // () => {
|
|
|
+ // console.log('model.markingGroupNumber:', model.markingGroupNumber)
|
|
|
+ // if (Array.isArray(model.markingGroupNumber) && model.markingGroupNumber.includes(undefined)) {
|
|
|
+ // model.markingGroupNumber = [void 0]
|
|
|
+ // }
|
|
|
+ // }
|
|
|
+ // )
|
|
|
watch(
|
|
|
() => [model.subjectCode, model.questionMainNumber, model.markingGroupNumber],
|
|
|
() => {
|
|
@@ -119,6 +128,30 @@ const useStatisticsFilter = () => {
|
|
|
const TwoRowSpan4 = defineColumn(_, 'row-2', { span: 4 })
|
|
|
const TwoRowSpan2 = defineColumn(_, 'row-2', { span: 1.3 })
|
|
|
|
|
|
+ const customGroupChange = (v: any) => {
|
|
|
+ if (groupListWithAll.value.find((item: any) => item.value == undefined)) {
|
|
|
+ if (model.markingGroupNumber.includes(undefined)) {
|
|
|
+ model.markingGroupNumber = [void 0]
|
|
|
+ changeModelValue('group')(model.markingGroupNumber)
|
|
|
+ } else {
|
|
|
+ changeModelValue('group')(v)
|
|
|
+ }
|
|
|
+ } else {
|
|
|
+ changeModelValue('group')(v)
|
|
|
+ }
|
|
|
+ }
|
|
|
+ const transGroupOptions = computed(() => {
|
|
|
+ return (model.markingGroupNumber || []).includes(undefined)
|
|
|
+ ? (groupListWithAll.value || []).map((item: any) => {
|
|
|
+ item.value != undefined && (item.disabled = true)
|
|
|
+ return item
|
|
|
+ })
|
|
|
+ : groupListWithAll.value.map((item: any) => {
|
|
|
+ item.disabled = false
|
|
|
+ return item
|
|
|
+ })
|
|
|
+ })
|
|
|
+
|
|
|
const items = computed<EpFormItem[]>(() => [
|
|
|
OneRowSpan4({
|
|
|
labelWidth: '52px',
|
|
@@ -148,8 +181,8 @@ const useStatisticsFilter = () => {
|
|
|
label: '小组',
|
|
|
slotType: 'select',
|
|
|
slot: {
|
|
|
- options: groupListWithAll.value,
|
|
|
- onChange: changeModelValue('group'),
|
|
|
+ options: transGroupOptions.value,
|
|
|
+ onChange: customGroupChange,
|
|
|
multiple: true,
|
|
|
},
|
|
|
}),
|