# LeeCpp **Repository Path**: taibailee_admin/lee-cpp ## Basic Information - **Project Name**: LeeCpp - **Description**: GESP+CSP - **Primary Language**: C++ - **License**: GPL-3.0 - **Default Branch**: master - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 0 - **Forks**: 0 - **Created**: 2024-11-25 - **Last Updated**: 2025-09-25 ## Categories & Tags **Categories**: Uncategorized **Tags**: None ## README # LeeCpp #### 介绍 GESP+CSP #### 软件架构 软件架构说明 #### 安装教程 1. xxxx 2. xxxx 3. xxxx #### 使用说明 1. xxxx 2. xxxx 3. xxxx #### 参与贡献 1. Fork 本仓库 2. 新建 Feat_xxx 分支 3. 提交代码 4. 新建 Pull Request #### 特技 1. 使用 Readme\_XXX.md 来支持不同的语言,例如 Readme\_en.md, Readme\_zh.md 2. Gitee 官方博客 [blog.gitee.com](https://blog.gitee.com) 3. 你可以 [https://gitee.com/explore](https://gitee.com/explore) 这个地址来了解 Gitee 上的优秀开源项目 4. [GVP](https://gitee.com/gvp) 全称是 Gitee 最有价值开源项目,是综合评定出的优秀开源项目 5. Gitee 官方提供的使用手册 [https://gitee.com/help](https://gitee.com/help) 6. Gitee 封面人物是一档用来展示 Gitee 会员风采的栏目 [https://gitee.com/gitee-stars/](https://gitee.com/gitee-stars/) --- #### 数据模型 --- ```javascript // 试卷相关状态 const exams = ref([]); const filteredExams = ref([]); const showGenerateDialog = ref(false); const newExamName = ref(''); const selectedQuestionCount = ref(20); // 当前试卷 const currentExam = ref(null); const currentQuestionIndex = ref(0); const selectedOption = ref(null); const showExplanation = ref(false); const examSubmitted = ref(false); // 计时器相关 const totalTime = ref(0); const currentQuestionTime = ref(0); const currentQuestionStart = ref(0); const totalTimer = ref(null); const questionTimer = ref(null); // 计算属性 currentQuestion; //当前问题 currentQuestionOptions //当前问题的选项数组 ``` ```python # 试题模型 class question(BaseModel): id: int #试题编号 text: str #试题名称 option1: str = '' #试题选项1 option2: str = '' #试题选项2 option3: str = '' #试题选项3 option4: str = '' #试题选项4 option5: str = '' #试题选项5 answer: int #试题正确答案 explanation: str = '' #试题解析 unfamiliarity: float = 1.0 # 试题的生疏度,默认1.0 tag: str = '' #试题标签,默认为空字符串 ``` ```python #试卷模型 class exam(BaseModel): id: int #试卷编号 name: str #考试卷名称 tag: str = '' #考试卷标签(类型) questions: str = '' #考题编号数组json spent: int = 0 #试卷答题时间 correct: float = 0.0 #正确率 submitted: bool = False #是否提交 answer_at: str = '0001-01-01 00:00:00' #试卷开始时间 answer_by: str = '' #答题者 created_at: str #试卷创建时间 created_by: str = '0001-01-01 00:00:00' #试卷创建者 ``` ```python class exam_question(BaseModel): id: int #组卷编号 qid: int #题目编号 eid: int #试卷编号 user_answer: int =-1 #题目答案 ``` ```python #试卷试题模型 class questions(question): # qid: int #题目编号 eid: int #试卷编号 user_answer: int =-1 #题目答案 ``` --- #### 答题模式处理逻辑 - 进入答题模式后,用户将当前试卷对象中的user_answer都重置为-1 - 题目只显示用户当前选择项,选择完成后存入user_answer - 题目不显示正确答案选项 - --------------------------------------------------------------------- ### 数据模型 --------------------------------------------------------------------- ##### 1.当前Exam模型 + **currentExam**: Object (Ref) - answer-at: "2025/6/12 12:34:56" - answer_by:"lichao" 市 - correct:5 - created_at:"2025/6/12 12:34:56" - created_by: "lichao" - id:1 - name:"测试卷1" - questionTimes: Array[5] - questions: Array[9] ***questions数组*** - spent:10 - submitted: true - tag:"KEY单词2" --------------------------------------------------------------------- ##### 2.Questio模型 > 前通过currentQuestionIndex计算得到的 + **currentQuestion**: Object (Computed) - id:6 - text:"Vue3 中Fragment 组件的用途是什么?" - options: Array[5] - answer: 1 - explanation:"Fragment 允许组件有多个根节点" - unfamiliarity: 1 - tag: "vue,fastapi" - eid:1 - user_answer: 3 --------------------------------------------------------------------- ##### 3.当前Questio索引 + **currentQuestionIndex**: 5 (Ref) --------------------------------------------------------------------- ##### 5.当前Questio问题答题时间 + **currentQuestionTime**:0 (Ref) --------------------------------------------------------------------- ##### 6.当前视图 + **currentView**: "exam" (Ref) --------------------------------------------------------------------- ##### 7.当前试卷结果 + **examResult**: Reactive - correctCount: 1 - correctRate: 0.111 - totalQuestions: 9 - totalTime: 10 --------------------------------------------------------------------- ##### 8.当前试卷的状态 > 是否提交,或者在答题状态 + **examSubmitted**: true(Ref) --------------------------------------------------------------------- ##### 9.所有试卷数组 + **exams**: Array[16] (Ref) --------------------------------------------------------------------- ##### 10.当前试卷是否答题正确 >> 通过question中的answer和user_answer计算得到 + **isCurrentQuestionCorrect**: false (Computed) --------------------------------------------------------------------- ##### 11.创建试卷的名称 + **newExamName**: "" (Ref) --------------------------------------------------------------------- ##### 12.用户选择选项 + **selected0ption**: 3 (Ref) --------------------------------------------------------------------- ##### 13.试卷组卷对话框中选择的试题数量 + **selectedQuestionCount**: 20 (Ref) --------------------------------------------------------------------- ##### 14.是否展开答案解析 + **showExplanation**: true (Ref) --------------------------------------------------------------------- ##### 15.是否显示组卷对话框 + **showGenerateDialog**: false (Ref) --------------------------------------------------------------------- ##### 16.试卷答题总时间 + **totalTime**: 10 (Ref) --------------------------------------------------------------------- ##### 17.用户信息 + **user**: Reactive - loggedIn: true - name:"李希媛"" ---------------------------------------------------------------------