|
@@ -23,7 +23,7 @@
|
|
|
|
|
|
<script setup lang="ts" name="QualitySelfCheck">
|
|
|
/** 自查一致性分析 */
|
|
|
-import { reactive, ref, computed } from 'vue'
|
|
|
+import { reactive, watch, computed } from 'vue'
|
|
|
import { ElButton, ElCard } from 'element-plus'
|
|
|
import { omit } from 'lodash-es'
|
|
|
import BaseForm from '@/components/element/BaseForm.vue'
|
|
@@ -45,11 +45,17 @@ const model = reactive<FormModel & { time: string }>({
|
|
|
markingGroupNumber: void 0,
|
|
|
})
|
|
|
|
|
|
-const { subjectList, mainQuestionList, groupList, changeModelValue } = useOptions(
|
|
|
- ['subject', 'question', 'group'],
|
|
|
- void 0,
|
|
|
- false
|
|
|
-)
|
|
|
+const { subjectList, mainQuestionList, groupList, dataModel, onOptionInit, changeModelValue } = useOptions([
|
|
|
+ 'subject',
|
|
|
+ 'question',
|
|
|
+ 'group',
|
|
|
+])
|
|
|
+
|
|
|
+watch(dataModel, () => {
|
|
|
+ model.subjectCode = dataModel.subject || ''
|
|
|
+ model.questionMainNumber = dataModel.question
|
|
|
+ model.markingGroupNumber = dataModel.group
|
|
|
+})
|
|
|
|
|
|
const { defineColumn, _ } = useForm()
|
|
|
|
|
@@ -104,7 +110,7 @@ function onSearch() {
|
|
|
selfCheckAnalysis({ ...omit(model, 'time'), startTime: model.time[0], endTime: model.time[1] })
|
|
|
}
|
|
|
|
|
|
-onSearch()
|
|
|
+onOptionInit(onSearch)
|
|
|
</script>
|
|
|
|
|
|
<style scoped lang="scss">
|