From 2a4a6e492476de79f5586e306e72917bb674150a Mon Sep 17 00:00:00 2001 From: caoqianming Date: Mon, 3 Jun 2024 14:08:26 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20questioncat=20=E9=A1=B5=E9=9D=A2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/api/model/edu.js | 173 +++++++++++++++++++++++ src/views/edu/question.vue | 275 ++++++++++++++++++++++++++++++++++++- 2 files changed, 444 insertions(+), 4 deletions(-) create mode 100644 src/api/model/edu.js diff --git a/src/api/model/edu.js b/src/api/model/edu.js new file mode 100644 index 00000000..2cfa7efa --- /dev/null +++ b/src/api/model/edu.js @@ -0,0 +1,173 @@ +import config from "@/config" +import http from "@/utils/request" + +export default { + questioncat: { + list: { + name: "列表", + req: async function(data){ + return await http.get( + `${config.API_URL}/edu/questioncat/`, + data + ); + } + }, + item: { + name: "获取详情", + req: async function(id){ + return await http.get( + `${config.API_URL}/edu/questioncat/${id}/` + ); + } + }, + update: { + name: "更新", + req: async function(id, data){ + return await http.put( + `${config.API_URL}/edu/questioncat/${id}/`, + data); + } + }, + create: { + name: "创建", + req: async function(data){ + return await http.post( + `${config.API_URL}/edu/questioncat/`, + data); + } + }, + delete: { + name: "删除", + req: async function(id){ + return await http.delete( + `${config.API_URL}/edu/questioncat/${id}/`); + } + }, + }, + question: { + list: { + name: "列表", + req: async function(data){ + return await http.get( + `${config.API_URL}/edu/question/`, + data + ); + } + }, + item: { + name: "获取详情", + req: async function(id){ + return await http.get( + `${config.API_URL}/edu/question/${id}/` + ); + } + }, + update: { + name: "更新", + req: async function(id, data){ + return await http.put( + `${config.API_URL}/edu/question/${id}/`, + data); + } + }, + create: { + name: "创建", + req: async function(data){ + return await http.post( + `${config.API_URL}/edu/question/`, + data); + } + }, + delete: { + name: "删除", + req: async function(id){ + return await http.delete( + `${config.API_URL}/edu/question/${id}/`); + } + }, + }, + paper: { + list: { + name: "列表", + req: async function(data){ + return await http.get( + `${config.API_URL}/edu/paper/`, + data + ); + } + }, + item: { + name: "获取详情", + req: async function(id){ + return await http.get( + `${config.API_URL}/edu/paper/${id}/` + ); + } + }, + update: { + name: "更新", + req: async function(id, data){ + return await http.put( + `${config.API_URL}/edu/paper/${id}/`, + data); + } + }, + create: { + name: "创建", + req: async function(data){ + return await http.post( + `${config.API_URL}/edu/paper/`, + data); + } + }, + delete: { + name: "删除", + req: async function(id){ + return await http.delete( + `${config.API_URL}/edu/paper/${id}/`); + } + }, + }, + exam: { + list: { + name: "列表", + req: async function(data){ + return await http.get( + `${config.API_URL}/edu/exam/`, + data + ); + } + }, + item: { + name: "获取详情", + req: async function(id){ + return await http.get( + `${config.API_URL}/edu/exam/${id}/` + ); + } + }, + update: { + name: "更新", + req: async function(id, data){ + return await http.put( + `${config.API_URL}/edu/exam/${id}/`, + data); + } + }, + create: { + name: "创建", + req: async function(data){ + return await http.post( + `${config.API_URL}/edu/exam/`, + data); + } + }, + delete: { + name: "删除", + req: async function(id){ + return await http.delete( + `${config.API_URL}/edu/exam/${id}/`); + } + }, + } +} \ No newline at end of file diff --git a/src/views/edu/question.vue b/src/views/edu/question.vue index 74cc76ac..8d30f934 100644 --- a/src/views/edu/question.vue +++ b/src/views/edu/question.vue @@ -1,5 +1,272 @@ \ No newline at end of file + + + + +
+ +
+
+ 题库分类 +
+
+ + + + + + + + +
+
+ + + +
+ +
+
+ + +
+
+ + + + + + + + + + + + +
+
+ + + + + + + + + + + + + + +
+ +