|
@@ -61,11 +61,13 @@ import useVW from '@/hooks/useVW'
|
|
import type { ExtractApiParams, ExtractApiResponse } from '@/api/api'
|
|
import type { ExtractApiParams, ExtractApiResponse } from '@/api/api'
|
|
import type { FormGroup, EpFormItem, EpFormRules, EpTableColumn } from 'global-type'
|
|
import type { FormGroup, EpFormItem, EpFormRules, EpTableColumn } from 'global-type'
|
|
|
|
|
|
|
|
+const { subjectList, mainQuestionList, dataModel, onOptionInit, changeModelValue } = useOptions(['subject', 'question'])
|
|
|
|
+
|
|
const markerIds = ref()
|
|
const markerIds = ref()
|
|
|
|
|
|
const model = reactive<ExtractApiParams<'handOutForceCheck'>>({
|
|
const model = reactive<ExtractApiParams<'handOutForceCheck'>>({
|
|
- subjectCode: '',
|
|
|
|
- mainNumber: void 0,
|
|
|
|
|
|
+ subjectCode: dataModel.subject || '',
|
|
|
|
+ mainNumber: dataModel.question,
|
|
markerIds: [],
|
|
markerIds: [],
|
|
forceGroupNumber: void 0,
|
|
forceGroupNumber: void 0,
|
|
})
|
|
})
|
|
@@ -87,8 +89,6 @@ watch(forceCheckGroupList, () => {
|
|
}
|
|
}
|
|
})
|
|
})
|
|
|
|
|
|
-const { subjectList, mainQuestionList, dataModel, onOptionInit, changeModelValue } = useOptions(['subject', 'question'])
|
|
|
|
-
|
|
|
|
watch(dataModel, () => {
|
|
watch(dataModel, () => {
|
|
model.subjectCode = dataModel.subject || ''
|
|
model.subjectCode = dataModel.subject || ''
|
|
model.mainNumber = dataModel.question
|
|
model.mainNumber = dataModel.question
|
|
@@ -152,10 +152,6 @@ const items = computed<EpFormItem[]>(() => {
|
|
]
|
|
]
|
|
})
|
|
})
|
|
|
|
|
|
-onOptionInit((data) => {
|
|
|
|
- getMarkerTree({ subjectCode: data?.subject || '', mainNumber: data?.question, name: '' })
|
|
|
|
-})
|
|
|
|
-
|
|
|
|
type MarkerItem = ExtractArrayValue<ExtractArrayValue<ExtractApiResponse<'getMarkerTree'>>['markers']>
|
|
type MarkerItem = ExtractArrayValue<ExtractArrayValue<ExtractApiResponse<'getMarkerTree'>>['markers']>
|
|
|
|
|
|
function isMarker(x: any): x is MarkerItem {
|
|
function isMarker(x: any): x is MarkerItem {
|
|
@@ -221,6 +217,11 @@ const onSearch = async () => {
|
|
console.error(error)
|
|
console.error(error)
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
+
|
|
|
|
+onOptionInit((data) => {
|
|
|
|
+ getMarkerTree({ subjectCode: data?.subject || '', mainNumber: data?.question, name: '' })
|
|
|
|
+ onSearch()
|
|
|
|
+})
|
|
</script>
|
|
</script>
|
|
|
|
|
|
<style scoped lang="scss">
|
|
<style scoped lang="scss">
|