|
|
@@ -2,84 +2,45 @@
|
|
|
<div class="student-question-table">
|
|
|
<back-title>
|
|
|
我的题库
|
|
|
- <c-tag theme="green">学生</c-tag>
|
|
|
+ <c-button :left="12" icon="assignment" :theme="getListFunction === getCompletedQuestions ? 'green' : 'normal'"
|
|
|
+ @click="getListFunction = getCompletedQuestions">已完成
|
|
|
+ </c-button>
|
|
|
+ <c-button :left="12" icon="bookmarks" :theme="getListFunction === getRatedQuestions ? 'green' : 'normal'"
|
|
|
+ @click="getListFunction = getRatedQuestions">已收藏
|
|
|
+ </c-button>
|
|
|
+ <c-button :left="12" icon="stars" :theme="getListFunction === getCollectedQuestions ? 'green' : 'normal'"
|
|
|
+ @click="getListFunction = getCollectedQuestions">已评价
|
|
|
+ </c-button>
|
|
|
</back-title>
|
|
|
- <div class="questions-router-card">
|
|
|
- <div class="actions">
|
|
|
- <router-link :to="{ name: 'student-question-table-completed' }">
|
|
|
- <icon-button no-bold theme="blue">assignment</icon-button>
|
|
|
- </router-link>
|
|
|
- <router-link :to="{ name: 'student-question-table-marked' }">
|
|
|
- <icon-button no-bold theme="blue">bookmarks</icon-button>
|
|
|
- </router-link>
|
|
|
- <router-link :to="{ name: 'student-question-table-rated' }">
|
|
|
- <icon-button no-bold theme="blue">stars</icon-button>
|
|
|
- </router-link>
|
|
|
- </div>
|
|
|
- <div class="views">
|
|
|
- <router-view></router-view>
|
|
|
- </div>
|
|
|
- </div>
|
|
|
+ <question-table :get-list-function="getListFunction"></question-table>
|
|
|
</div>
|
|
|
</template>
|
|
|
|
|
|
<script>
|
|
|
import BackTitle from '@/components/Basic/BackTitle'
|
|
|
-import CTag from '@/components/Basic/CTag'
|
|
|
-import IconButton from '@/components/Basic/IconButton'
|
|
|
+import QuestionTable from '@/views/quiz/components/QuestionTable'
|
|
|
+import { getCompletedQuestions, getRatedQuestions, getCollectedQuestions } from '@/server/question'
|
|
|
+import CButton from '@/components/Basic/CButton'
|
|
|
|
|
|
export default {
|
|
|
- components: { IconButton, CTag, BackTitle }
|
|
|
+ components: { CButton, QuestionTable, BackTitle },
|
|
|
+ data () {
|
|
|
+ return {
|
|
|
+ getCompletedQuestions,
|
|
|
+ getRatedQuestions,
|
|
|
+ getCollectedQuestions,
|
|
|
+
|
|
|
+ getListFunction: getCompletedQuestions
|
|
|
+ }
|
|
|
+ }
|
|
|
}
|
|
|
</script>
|
|
|
|
|
|
<style lang="scss" scoped>
|
|
|
.student-question-table {
|
|
|
- background-color: #f8f8f8;
|
|
|
- box-shadow: 0 0 0 1000px #f8f8f8;
|
|
|
margin: 0 auto;
|
|
|
max-width: 1000px;
|
|
|
padding: 32px 24px 32px 24px;
|
|
|
}
|
|
|
|
|
|
-@media (min-width: 500px) {
|
|
|
- .questions-router-card {
|
|
|
- direction: rtl;
|
|
|
- height: calc(100vh - 192px);
|
|
|
- border-radius: 16px;
|
|
|
- background-color: white;
|
|
|
- box-shadow: 3px 6px 6px rgba(0, 0, 0, .03);
|
|
|
-
|
|
|
- display: flex;
|
|
|
-
|
|
|
- .actions {
|
|
|
- direction: ltr;
|
|
|
- display: flex;
|
|
|
- flex-direction: column;
|
|
|
- justify-content: space-around;
|
|
|
- align-items: center;
|
|
|
- width: 60px;
|
|
|
- background-color: #e0efff;
|
|
|
- border-radius: 0 16px 16px 0;
|
|
|
- }
|
|
|
-
|
|
|
- .views {
|
|
|
- direction: ltr;
|
|
|
- flex: 1;
|
|
|
- padding: 16px 24px;
|
|
|
- overflow: auto;
|
|
|
- }
|
|
|
- }
|
|
|
-}
|
|
|
-
|
|
|
-@media (max-width: 500px) {
|
|
|
- .actions {
|
|
|
- display: flex;
|
|
|
- justify-content: space-evenly;
|
|
|
- align-items: center;
|
|
|
- transform: translateY(-16px);
|
|
|
- background-color: #e0efff;
|
|
|
- border-radius: 16px;
|
|
|
- }
|
|
|
-}
|
|
|
</style>
|