From 6d3ae0aa9556064fbe7bc253fd7781847e3d44b8 Mon Sep 17 00:00:00 2001 From: zhl Date: Tue, 18 May 2021 10:24:15 +0800 Subject: [PATCH] =?UTF-8?q?=E5=A2=9E=E5=8A=A0=E5=BA=97=E9=93=BA=E8=87=AA?= =?UTF-8?q?=E5=AE=9A=E4=B9=89=E6=8C=91=E6=88=98=E6=B4=BB=E5=8A=A8=E7=9A=84?= =?UTF-8?q?=E5=AF=BC=E5=85=A5=E5=AF=BC=E5=87=BA=E5=8A=9F=E8=83=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- package.json | 2 +- src/api/exam.ts | 16 +- src/views/exam/components/PuzzleList.vue | 696 +++++++++++++++++++++++ src/views/exam/edit.vue | 67 ++- src/views/exam/list.vue | 11 + src/views/shop/list.vue | 6 +- yarn.lock | 8 +- 7 files changed, 785 insertions(+), 21 deletions(-) create mode 100644 src/views/exam/components/PuzzleList.vue diff --git a/package.json b/package.json index 7c99d46..7efc620 100644 --- a/package.json +++ b/package.json @@ -33,7 +33,7 @@ "vue-svgicon": "^3.2.9", "vuex": "^3.5.1", "vuex-module-decorators": "^1.0.1", - "xlsx": "^0.16.8" + "xlsx": "^0.17.0" }, "devDependencies": { "@types/clipboard": "^2.0.1", diff --git a/src/api/exam.ts b/src/api/exam.ts index 4e3c691..afd8c51 100644 --- a/src/api/exam.ts +++ b/src/api/exam.ts @@ -1,6 +1,15 @@ import request from '@/utils/request' import { IRewardData } from '@/api/activity' +export interface IExamQuerstion { + _id?: string + question: string + a1: string + a2?: string + a3?: string + a4?: string +} + export interface IExamData { _id?: string shop: string @@ -12,7 +21,9 @@ export interface IExamData { beginTime: number endTime: number active: number + source: number rewardInfo: IRewardData[] + questions: IExamQuerstion[] } export const defaultExamData: IExamData = { @@ -24,8 +35,9 @@ export const defaultExamData: IExamData = { qcount: 0, qtypes: [], shop: '', - rewardInfo: [] - + source: 0, + rewardInfo: [], + questions: [] } export const getExams = (params: any) => diff --git a/src/views/exam/components/PuzzleList.vue b/src/views/exam/components/PuzzleList.vue new file mode 100644 index 0000000..9639f02 --- /dev/null +++ b/src/views/exam/components/PuzzleList.vue @@ -0,0 +1,696 @@ + + + diff --git a/src/views/exam/edit.vue b/src/views/exam/edit.vue index b809049..fe205ef 100644 --- a/src/views/exam/edit.vue +++ b/src/views/exam/edit.vue @@ -103,8 +103,23 @@ required /> + + + 系统题库 + 自定义题库 + + + + + + - - 添加 - +
+ + 添加 + +
diff --git a/src/views/exam/list.vue b/src/views/exam/list.vue index 7e8f2c4..9ec4036 100644 --- a/src/views/exam/list.vue +++ b/src/views/exam/list.vue @@ -81,6 +81,13 @@ > + + + diff --git a/src/views/shop/list.vue b/src/views/shop/list.vue index f6d5f00..6ef75c4 100644 --- a/src/views/shop/list.vue +++ b/src/views/shop/list.vue @@ -11,9 +11,9 @@ placeholder="所有" class="w100" > - 所有 - 已审核 - 未审核 + 所有 + 已审核 + 未审核 diff --git a/yarn.lock b/yarn.lock index 7e8aec0..95c9592 100644 --- a/yarn.lock +++ b/yarn.lock @@ -13043,10 +13043,10 @@ ws@^7.0.0, ws@^7.4.4: resolved "https://registry.yarnpkg.com/ws/-/ws-7.4.5.tgz#a484dd851e9beb6fdb420027e3885e8ce48986c1" integrity sha512-xzyu3hFvomRfXKH8vOFMU3OguG6oOvhXMo3xsGy3xWExqaM2dxBbVxuD99O7m3ZUFMvvscsZDqxfgMaRr/Nr1g== -xlsx@^0.16.8: - version "0.16.9" - resolved "https://registry.yarnpkg.com/xlsx/-/xlsx-0.16.9.tgz#dacd5bb46bda6dd3743940c9c3dc1e2171826256" - integrity sha512-gxi1I3EasYvgCX1vN9pGyq920Ron4NO8PNfhuoA3Hpq6Y8f0ECXiy4OLrK4QZBnj1jx3QD+8Fq5YZ/3mPZ5iXw== +xlsx@^0.17.0: + version "0.17.0" + resolved "https://registry.yarnpkg.com/xlsx/-/xlsx-0.17.0.tgz#028176a0140967dcee1817d221678461e47481c8" + integrity sha512-bZ36FSACiAyjoldey1+7it50PMlDp1pcAJrZKcVZHzKd8BC/z6TQ/QAN8onuqcepifqSznR6uKnjPhaGt6ig9A== dependencies: adler-32 "~1.2.0" cfb "^1.1.4"