No Description

zhangjie d926b8ef33 feat: 特殊标记横线,圆圈,文字 2 weeks ago
cypress e182383394 feat: 添加成绩复核未计分标记 2 years ago
docs 18afc27bfd 提示正评 、试评 3 years ago
public aa4f7ea674 feat: 新需求 1 month ago
src d926b8ef33 feat: 特殊标记横线,圆圈,文字 2 weeks ago
vetur a78627bd68 add vetur typing config 4 years ago
.editorconfig 138feb0f59 small improvement 3 years ago
.env.development 9e748e4b6a feat: 开发模式调整法 1 month ago
.eslintrc.js 35ff802dcc bug fix 2 years ago
.gitignore 187eb176a8 feat: compnents 1 month ago
.npmrc e182383394 feat: 添加成绩复核未计分标记 2 years ago
README.md 283bf808c8 feat: 调试 1 month ago
cypress.config.ts df7cf6ff5f 优化cypress网络代理 2 years ago
index.html d3151030e4 fix 构建时版本号的显示 3 years ago
package-lock.json 7b38ec999b 东北大学需求 6 months ago
package.json 27e431fd4a feat: build md 1 month ago
pnpm-lock.yaml d67927842f feat: 开发调整 1 month ago
postcss.config.js 34efdf9593 add tailwindcss 4 years ago
prebuild.mjs 347f739b7d feat: 构建时不需要devLoginParams.ts文件 2 years ago
prettier.config.js 81ef5d9d3f 一次失败的eslint配置,主要由$ref阻碍了成功 3 years ago
tailwind.config.js 6c63a33aa1 update tailwindcss 3 years ago
tsconfig.json e848b5a7e4 关于双评的需求 2 years ago
vetur.config.js fa7315cafe vetur auto import vue components 4 years ago
vite.config.ts 9e748e4b6a feat: 开发模式调整法 1 month ago

README.md

Vue 3 + Typescript + Vite

This template should help get you started developing with Vue 3 and Typescript in Vite.

Recommended IDE Setup

VSCode + Vetur. Make sure to enable vetur.experimental.templateInterpolationService in settings!

If Using <script setup>

<script setup> is a feature that is currently in RFC stage. To get proper IDE support for the syntax, use Volar instead of Vetur (and disable Vetur).

Type Support For .vue Imports in TS

Since TypeScript cannot handle type information for .vue imports, they are shimmed to be a generic Vue component type by default. In most cases this is fine if you don't really care about component prop types outside of templates. However, if you wish to get actual prop types in .vue imports (for example to get props validation when using manual h(...) calls), you can use the following:

If Using Volar

Run Volar: Switch TS Plugin on/off from VSCode command palette.

核心组件复用

主要分为:CommonMarkBody.vue 前端切片渲染的组件,凡是评卷任务类型的都可以复用它来渲染(包含轨迹)。
src/features/student/studentInspect/MarkBody.vue 整卷渲染的组件,凡是不用前端切分的试卷都可以复用它来渲染(包含轨迹)。

Reactivity 关联 CommonMarkBody.vue MarkBoardTrack.vue MarkBoardMouse.vue MarkBoardKeyBoard.vue MarkHistory.vue

以上组件的 reactivity 比较复杂,总结如下:

  1. currentTask 切换后,所有组件都得跟着变
  2. 轨迹模式下,
    1. 分数轨迹发生变化,MarkBoardTrack.vue 改变 store.removeScoreTracks ,CommonMarkBody.vue 监听 store.removeScoreTracks 改变 sliceImagesWithTrackList 的 trackList
    2. 特殊标记轨迹发生变化,SpecialTagModal.vue 改变 store.currentMarkResult.specialTagList ,CommonMarkBody.vue 监听 store.currentMarkResult.specialTagList 改变 sliceImagesWithTrackList 的 tagList
  3. 分数之间的关系,(理想设计)
    1. 来源: question.score 和 track.score, history.task.markerScore 评卷时不参与给分板的计算和显示
    2. 初始收集: markResult.scoreList markResult.trackList.score markResult.markerScore 要区分 0 分和 null
    3. 轨迹改变:track.score 动态计算 scoreList,再显示到给分板上(单题和总分自动计算),只有轨迹改变才去计算 scoreList 对应的题的分数,这样可以尽可能长时间的显示旧分数
    4. 普通改变:scoreList[index]的值
    5. 回评时普通模式评分的记录在轨迹模式下如何保持?先将 task 中的 question.score 转移到 markResult.scoreList,如果 trackList 有变化,则更新对应 scoreList,不然则保持原样。
  4. 优化
    1. markResult 放到 task 里面? 回评清理它的 markResult . DONE!
    2. 使用 pinia . DONE!

watch 的层次(列出有外部影响的状态):

  1. Top component watch currentTask 1.1 body watch special: track 1.1 openSide
  2. header watch setting / status
  3. history watch open , change currentTask
  4. body watch trackList, computed score? emit 'trackListChange'('add', questionIndex, trackList)/('removeLast', questionIndex)/('removeAll',questionIndex)
  5. markboard watch currentQuestion, normal mode -> change scoreList[index]

本地开发配置

  • 启动本项目:

    # 安装依赖
    npm install
    # 启动
    npm start
    
  • 配置 nginx:

    # 云阅卷开发
    server {
    listen       8071;
    server_name  localhost;
    # 管理端
    location / {
    proxy_pass  http://192.168.10.83:8004;
    }
    
    # 阅卷端
    location /web/ {
    proxy_pass  http://localhost:9000;
    }
    
    # 接口/附件等
    location ~ ^/(api|admin|login|mark|slice)/ {
    proxy_pass  http://192.168.10.83:8004;
    }
    }
    
    
  • 使用管理端账号登录调试。

说明: 管理端和阅卷端虽然独立启动,但他们的接口地址是一样的。 单独访问阅卷端,使用的接口是阅卷端配置的接口地址。访问 8071 地址,接口则是 nginx 配置的地址。注意两者的区别。