|
@@ -85,7 +85,7 @@ const model = reactive<any>({
|
|
subjectCode: dataModel.subject || '',
|
|
subjectCode: dataModel.subject || '',
|
|
//todo
|
|
//todo
|
|
questionMainNumber: null,
|
|
questionMainNumber: null,
|
|
- // hasGroupLeaderScore: [],
|
|
|
|
|
|
+ hasGroupLeaderScore: [],
|
|
})
|
|
})
|
|
watch(
|
|
watch(
|
|
dataModel,
|
|
dataModel,
|
|
@@ -120,17 +120,17 @@ const items = computed<EpFormItem[]>(() => [
|
|
rowKey: 'row-1',
|
|
rowKey: 'row-1',
|
|
colProp: { span: 5 },
|
|
colProp: { span: 5 },
|
|
},
|
|
},
|
|
- // {
|
|
|
|
- // prop: 'hasGroupLeaderScore',
|
|
|
|
- // label: '',
|
|
|
|
- // slotType: 'checkbox',
|
|
|
|
- // labelWidth: '20px',
|
|
|
|
- // slot: {
|
|
|
|
- // options: [{ label: 'true', slotLabel: '包含组长给分' }],
|
|
|
|
- // },
|
|
|
|
- // rowKey: 'row-1',
|
|
|
|
- // colProp: { span: 3 },
|
|
|
|
- // },
|
|
|
|
|
|
+ {
|
|
|
|
+ prop: 'hasGroupLeaderScore',
|
|
|
|
+ label: '',
|
|
|
|
+ slotType: 'checkbox',
|
|
|
|
+ labelWidth: '20px',
|
|
|
|
+ slot: {
|
|
|
|
+ options: [{ label: 'true', slotLabel: '包含组长给分' }],
|
|
|
|
+ },
|
|
|
|
+ rowKey: 'row-1',
|
|
|
|
+ colProp: { span: 3 },
|
|
|
|
+ },
|
|
{
|
|
{
|
|
rowKey: 'row-1',
|
|
rowKey: 'row-1',
|
|
slotName: 'button',
|
|
slotName: 'button',
|
|
@@ -230,7 +230,9 @@ watch(
|
|
// { immediate: true }
|
|
// { immediate: true }
|
|
// )
|
|
// )
|
|
function onSearch() {
|
|
function onSearch() {
|
|
- getMarkProgress(model)
|
|
|
|
|
|
+ currentMainQuestion.value = undefined
|
|
|
|
+ groupProgressResult.value = []
|
|
|
|
+ getMarkProgress({ ...model, hasGroupLeaderScore: !model.hasGroupLeaderScore.length ? false : true })
|
|
}
|
|
}
|
|
onOptionInit(onSearch)
|
|
onOptionInit(onSearch)
|
|
const currentMainQuestion = ref<TotalProgress>()
|
|
const currentMainQuestion = ref<TotalProgress>()
|
|
@@ -240,7 +242,7 @@ const currentMainName = computed(() => {
|
|
})
|
|
})
|
|
|
|
|
|
const onCurrentChange = (row: TotalProgress) => {
|
|
const onCurrentChange = (row: TotalProgress) => {
|
|
- if (row.questionMainNumber !== 0) {
|
|
|
|
|
|
+ if (!!row && row.questionMainNumber !== 0) {
|
|
currentMainQuestion.value = row
|
|
currentMainQuestion.value = row
|
|
}
|
|
}
|
|
}
|
|
}
|
|
@@ -389,7 +391,7 @@ const { fetch: getMarkProgressByGroup, result: groupProgressResult } = useFetch(
|
|
|
|
|
|
/** 将汇总行放到数组最后 */
|
|
/** 将汇总行放到数组最后 */
|
|
const groupProgressData = computed(() => {
|
|
const groupProgressData = computed(() => {
|
|
- if (!groupProgressResult?.value) return []
|
|
|
|
|
|
+ if (!groupProgressResult?.value || !groupProgressResult?.value.length) return []
|
|
const arr = groupProgressResult.value.slice(0)
|
|
const arr = groupProgressResult.value.slice(0)
|
|
const totalIndex = arr.findIndex((v) => v.markingGroupNumber === 0)
|
|
const totalIndex = arr.findIndex((v) => v.markingGroupNumber === 0)
|
|
const [total] = arr.splice(totalIndex, 1)
|
|
const [total] = arr.splice(totalIndex, 1)
|
|
@@ -401,7 +403,11 @@ watch(
|
|
currentMainQuestion,
|
|
currentMainQuestion,
|
|
(v) => {
|
|
(v) => {
|
|
v?.questionMainNumber &&
|
|
v?.questionMainNumber &&
|
|
- getMarkProgressByGroup({ subjectCode: model.subjectCode, questionMainNumber: v.questionMainNumber })
|
|
|
|
|
|
+ getMarkProgressByGroup({
|
|
|
|
+ subjectCode: model.subjectCode,
|
|
|
|
+ questionMainNumber: v.questionMainNumber,
|
|
|
|
+ hasGroupLeaderScore: !model.hasGroupLeaderScore.length ? false : true,
|
|
|
|
+ })
|
|
},
|
|
},
|
|
{ immediate: true }
|
|
{ immediate: true }
|
|
)
|
|
)
|