刘洋 1 year ago
parent
commit
9291fc1d3e
2 changed files with 7 additions and 7 deletions
  1. 3 1
      src/hooks/useOptions.ts
  2. 4 6
      src/modules/admin-data/export/index.vue

+ 3 - 1
src/hooks/useOptions.ts

@@ -264,7 +264,9 @@ const useOptions = (
           changeModelValue('question')(userInfo.value?.mainNumber)
         }
         if (
-          (userInfo.value?.role === 'EXPERT' || userInfo.value?.role === 'SECTION_LEADER') &&
+          (userInfo.value?.role === 'EXPERT' ||
+            userInfo.value?.role === 'SECTION_LEADER' ||
+            userInfo.value?.role === 'ADMIN') &&
           !userInfo.value?.mainNumber
         ) {
           if (mainQuestionList.value.length) {

+ 4 - 6
src/modules/admin-data/export/index.vue

@@ -56,7 +56,8 @@ const model = reactive<ExtractMultipleApiParams<'getCetScoreList'>>({
   subjectCode: dataModel.subject || '',
 })
 const modalVisible = ref(false)
-const exportFileType = ref('TXT')
+// const exportFileType = ref('TXT')
+const exportFileType = ref('DBF')
 const { formRef, elFormRef, defineColumn, _ } = useForm()
 
 watch(dataModel, () => {
@@ -114,11 +115,8 @@ const onExport = async () => {
   try {
     const valid = await elFormRef?.value?.validate()
     if (valid) {
-      // try {
-      //   await exportCetScoreList(model)
-      //   ElMessage.success('操作成功,后台导出中,您可以稍后去“任务信息报告”页面进行查询')
-      // } catch (err) {}
-      modalVisible.value = true
+      // modalVisible.value = true
+      sureExport()
     }
   } catch (error) {
     console.error(error)