|
@@ -56,7 +56,7 @@
|
|
|
<script setup lang="ts" name="ExpertExpert">
|
|
|
/** 专家卷浏览-专家挑选卷 */
|
|
|
import { reactive, ref, computed, watch, nextTick } from 'vue'
|
|
|
-import { ElButton } from 'element-plus'
|
|
|
+import { ElButton, ElMessage } from 'element-plus'
|
|
|
import { ROLE_OPTION } from '@/constants/dicts'
|
|
|
import { useSetImgBg } from '@/hooks/useSetImgBg'
|
|
|
import useFetch from '@/hooks/useFetch'
|
|
@@ -113,6 +113,8 @@ const onDelete = async () => {
|
|
|
if (currentExpertPaper.value) {
|
|
|
await useFetch('deletePaper').fetch({ id: currentExpertPaper.value.id })
|
|
|
await onSearch()
|
|
|
+ } else {
|
|
|
+ ElMessage.warning('未选择试卷')
|
|
|
}
|
|
|
} catch (error) {
|
|
|
console.error(error)
|
|
@@ -174,11 +176,15 @@ watch(dataModel, () => {
|
|
|
|
|
|
const { fetch: getForceCheckGroupList, result: forceCheckGroup } = useFetch('getForceCheckGroupList')
|
|
|
|
|
|
-watch(dataModel, () => {
|
|
|
- if (dataModel.subject && dataModel.question) {
|
|
|
- getForceCheckGroupList({ subjectCode: dataModel.subject, mainNumber: dataModel.question })
|
|
|
- }
|
|
|
-})
|
|
|
+watch(
|
|
|
+ dataModel,
|
|
|
+ () => {
|
|
|
+ if (dataModel.subject && dataModel.question) {
|
|
|
+ getForceCheckGroupList({ subjectCode: dataModel.subject, mainNumber: dataModel.question })
|
|
|
+ }
|
|
|
+ },
|
|
|
+ { immediate: true }
|
|
|
+)
|
|
|
|
|
|
const { defineColumn, _ } = useForm()
|
|
|
|
|
@@ -265,9 +271,10 @@ const onSearch = async () => {
|
|
|
|
|
|
const { fetch: updateMarkScore } = useFetch('updateMarkScore')
|
|
|
|
|
|
-const onSubmit = () => {
|
|
|
+const onSubmit = async () => {
|
|
|
if (currentExpertPaper.value) {
|
|
|
- updateMarkScore({ id: currentExpertPaper.value.id, scores: modelScore.value })
|
|
|
+ await updateMarkScore({ id: currentExpertPaper.value.id, scores: modelScore.value })
|
|
|
+ await onSearch()
|
|
|
}
|
|
|
}
|
|
|
|