Ver código fonte

试题列表接口更换

刘洋 1 ano atrás
pai
commit
51799fd1a4
2 arquivos alterados com 26 adições e 3 exclusões
  1. 23 1
      src/components/ImportFileDialog.vue
  2. 3 2
      src/modules/question/api.js

+ 23 - 1
src/components/ImportFileDialog.vue

@@ -3,12 +3,22 @@
     custom-class="import-file-dialog"
     :visible.sync="modalIsShow"
     :title="dialogTitle"
-    width="520px"
+    width="480px"
     :modal="true"
     append-to-body
     @open="visibleChange"
     @close="dialogClose"
   >
+    <div class="tpl-download">
+      <span>模板下载:</span>
+      <svg-btn
+        name="daoru"
+        color="#6D5FF6"
+        hoverBgColor="#fff"
+        @click="exportFile"
+        >下载</svg-btn
+      >
+    </div>
     <el-upload
       ref="UploadComp"
       drag
@@ -304,7 +314,19 @@ export default {
 .import-file-dialog {
   .el-dialog__body {
     background-color: #f0f0f0;
+    padding-top: 15px;
     padding-bottom: 10px;
+    .tpl-download {
+      display: flex;
+      align-items: center;
+      margin-bottom: 15px;
+    }
+    .el-upload.el-upload--text {
+      width: 100%;
+      .el-upload-dragger {
+        width: 100%;
+      }
+    }
   }
 }
 </style>

+ 3 - 2
src/modules/question/api.js

@@ -55,8 +55,9 @@ export function questionDetailApi(id, type = "question") {
   }
 }
 export function classifyQuestionPageListApi(data) {
-  const url = `${QUESTION_API}/question/classify/find_current_classify_question_page`;
-  return $httpWithMsg.post(url, {}, { params: data });
+  // const url = `${QUESTION_API}/question/classify/find_current_classify_question_page`;
+  const url = `${QUESTION_API}/question/page`;
+  return $httpWithMsg.get(url, { params: data });
 }
 export function deleteQuestionApi(questionIdList) {
   return $httpWithMsg.post(