From 3de2ddb094b2f0e71a520e817a5d49b0e7cd8d69 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=99=BD=E4=BA=86=E4=B8=AA=E7=99=BD?= <543593352@qq.com> Date: Fri, 20 Dec 2024 11:13:37 +0800 Subject: [PATCH 1/4] =?UTF-8?q?=E4=BD=9C=E4=B8=9A=E8=AE=BE=E8=AE=A1?= =?UTF-8?q?=EF=BC=9A=E6=96=B0=E5=A2=9E=20=E7=A7=91=E5=AD=A6=E5=AE=9E?= =?UTF-8?q?=E9=AA=8C=E4=BD=9C=E4=B8=9A=E7=B1=BB=E5=9E=8B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/renderer/index.html | 2 +- src/renderer/src/hooks/useClassTask.js | 10 +- src/renderer/src/utils/phetData.json | 734 ++++++++++++++++++ .../newClassTaskAssign/Right/index.vue | 1 + .../components/experimentList.vue | 52 ++ .../components/selectClass.vue | 162 ++++ .../experimentQuestion/index.vue | 115 +++ .../classTask/newClassTaskAssign/index.vue | 56 +- 8 files changed, 1129 insertions(+), 3 deletions(-) create mode 100644 src/renderer/src/utils/phetData.json create mode 100644 src/renderer/src/views/classTask/newClassTaskAssign/experimentQuestion/components/experimentList.vue create mode 100644 src/renderer/src/views/classTask/newClassTaskAssign/experimentQuestion/components/selectClass.vue create mode 100644 src/renderer/src/views/classTask/newClassTaskAssign/experimentQuestion/index.vue diff --git a/src/renderer/index.html b/src/renderer/index.html index 8bb269e..6e072ed 100644 --- a/src/renderer/index.html +++ b/src/renderer/index.html @@ -8,7 +8,7 @@ http-equiv="Content-Security-Policy" content="default-src 'self'; script-src 'self'; style-src 'self' 'unsafe-inline'; img-src 'self' data:" /> --> - + diff --git a/src/renderer/src/hooks/useClassTask.js b/src/renderer/src/hooks/useClassTask.js index cf960da..7e58c45 100644 --- a/src/renderer/src/hooks/useClassTask.js +++ b/src/renderer/src/hooks/useClassTask.js @@ -32,7 +32,7 @@ export const editListItem = (row, courseObj) => { worktype: '', // 设计中的作业类型 quizlist: [], // 设计中的试题列表 chooseWorkLists: [],// 设计中的框架梳理list - fileHomeworkList: [],// 设计中的常规作业list + fileHomeworkList: [],//TODO 暂时共用这个字段(新增了 科学实验) 设计中的常规作业list whiteboardObj: '',// 设计中的课堂展示对象 question: '', // 设计中的[课堂展示]的问题 }; @@ -112,6 +112,14 @@ export const editListItem = (row, courseObj) => { return resolve(classtaskObj); } } + else if (row.worktype == '科学实验') { + if(isJson(row.workcodes)){ + classtaskObj.fileHomeworkList = JSON.parse(row.workcodes); + // + // console.log('科学实验', classtaskObj); + return resolve(classtaskObj); + } + } } }); } diff --git a/src/renderer/src/utils/phetData.json b/src/renderer/src/utils/phetData.json new file mode 100644 index 0000000..a1dd0b3 --- /dev/null +++ b/src/renderer/src/utils/phetData.json @@ -0,0 +1,734 @@ +{ + "title": "实验", + "data": { + "primary":[ + { + "label": "数量比较", + "fileurl": "https://phet.colorado.edu/sims/html/number-compare/latest/number-compare_zh_CN.html", + "subject": "math" + }, + { + "label": "数字游戏", + "fileurl": "https://phet.colorado.edu/sims/html/number-play/latest/number-play_zh_CN.html", + "subject": "math" + }, + { + "label": "数轴:距离", + "fileurl": "https://phet.colorado.edu/sims/html/number-line-distance/latest/number-line-distance_zh_CN.html", + "subject": "math" + }, + { + "label": "比率和比例", + "fileurl": "https://phet.colorado.edu/sims/html/ratio-and-proportion/latest/ratio-and-proportion_zh_CN.html", + "subject": "math" + }, + { + "label": "数轴:运算", + "fileurl": "https://phet.colorado.edu/sims/html/number-line-operations/latest/number-line-operations_zh_CN.html", + "subject": "math" + }, + { + "label": "数轴:整数", + "fileurl": "https://phet.colorado.edu/sims/html/number-line-integers/latest/number-line-integers_zh_CN.html", + "subject": "math" + }, + { + "label": "向量的和:等式", + "fileurl": "https://phet.colorado.edu/sims/html/vector-addition-equations/latest/vector-addition-equations_zh_CN.html", + "subject": "math" + }, + { + "label": "向量相加", + "fileurl": "https://phet.colorado.edu/sims/html/vector-addition/latest/vector-addition_zh_CN.html", + "subject": "math" + }, + { + "label": "曲线拟合", + "fileurl": "https://phet.colorado.edu/sims/html/curve-fitting/latest/curve-fitting_zh_CN.html", + "subject": "math" + }, + { + "label": "分数:带分数", + "fileurl": "https://phet.colorado.edu/sims/html/fractions-mixed-numbers/latest/fractions-mixed-numbers_zh_CN.html", + "subject": "math" + }, + { + "label": "分数:入门", + "fileurl": "https://phet.colorado.edu/sims/html/fractions-intro/latest/fractions-intro_zh_CN.html", + "subject": "math" + }, + { + "label": "构建一个分数", + "fileurl": "https://phet.colorado.edu/sims/html/build-a-fraction/latest/build-a-fraction_zh_CN.html", + "subject": "math" + }, + { + "label": "分数:等式", + "fileurl": "https://phet.colorado.edu/sims/html/fractions-equality/latest/fractions-equality_zh_CN.html", + "subject": "math" + }, + + + { + "label": "单位价格", + "fileurl": "https://phet.colorado.edu/sims/html/unit-rates/latest/unit-rates_zh_CN.html", + "subject": "math" + }, + { + "label": "获得一个10", + "fileurl": "https://phet.colorado.edu/sims/html/make-a-ten/latest/make-a-ten_zh_CN.html", + "subject": "math" + }, + { + "label": "木棒的计算问题", + "fileurl": "https://www.netpad.net.cn/resource_web/course/?pack_id=6dc2ab05-cb06-4716-92ca-e00fb89ad1e6#/20808", + "subject": "math" + }, + + + { + "label": "几何光学", + "fileurl": "https://phet.colorado.edu/sims/html/geometric-optics/latest/geometric-optics_zh_CN.html", + "subject": "physics" + }, + { + "label": "密度", + "fileurl": "https://phet.colorado.edu/sims/html/density/latest/density_zh_CN.html", + "subject": "physics" + }, + { + "label": "能量滑板竞技场: 基础", + "fileurl": "https://phet.colorado.edu/sims/html/energy-skate-park-basics/latest/energy-skate-park-basics_zh_CN.html", + "subject": "physics" + }, + { + "label": "法拉第定律", + "fileurl": "https://phet.colorado.edu/sims/html/faradays-law/latest/faradays-law_zh_CN.html", + "subject": "physics" + }, + { + "label": "绳波", + "fileurl": "https://phet.colorado.edu/sims/html/wave-on-a-string/latest/wave-on-a-string_zh_CN.html", + "subject": "physics" + }, + { + "label": "光的混合", + "fileurl": "https://phet.colorado.edu/sims/html/color-vision/latest/color-vision_zh_CN.html", + "subject": "physics" + }, + { + "label": "平衡探究实验", + "fileurl": "https://phet.colorado.edu/sims/html/balancing-act/latest/balancing-act_zh_CN.html", + "subject": "physics" + }, + { + "label": "受到压力", + "fileurl": "https://phet.colorado.edu/sims/html/under-pressure/latest/under-pressure_zh_CN.html", + "subject": "physics" + }, + { + "label": "摩擦力", + "fileurl": "https://phet.colorado.edu/sims/html/friction/latest/friction_zh_CN.html", + "subject": "physics" + }, + { + "label": "力和运动:基础", + "fileurl": "https://phet.colorado.edu/sims/html/forces-and-motion-basics/latest/forces-and-motion-basics_zh_CN.html", + "subject": "physics" + }, + { + "label": "静电电压", + "fileurl": "https://phet.colorado.edu/sims/html/john-travoltage/latest/john-travoltage_zh_CN.html", + "subject": "physics" + }, + { + "label": "万有引力实验", + "fileurl": "https://phet.colorado.edu/sims/html/gravity-force-lab/latest/gravity-force-lab_zh_CN.html", + "subject": "physics" + }, + { + "label": "气球和静电(摩擦起电)", + "fileurl": "https://phet.colorado.edu/sims/html/balloons-and-static-electricity/latest/balloons-and-static-electricity_zh_CN.html", + "subject": "physics" + }, + + + + + { + "label": "密度", + "fileurl": "https://phet.colorado.edu/sims/html/density/latest/density_zh_CN.html", + "subject": "biology" + }, + { + "label": "基因表达基础", + "fileurl": "https://phet.colorado.edu/sims/html/gene-expression-essentials/latest/gene-expression-essentials_zh_CN.html", + "subject": "biology" + }, + + + + { + "label": "密度", + "fileurl": "https://phet.colorado.edu/sims/html/density/latest/density_zh_CN.html", + "subject": "sciences" + }, + + { + "label": "PH值", + "fileurl": "https://phet.colorado.edu/sims/html/ph-scale/latest/ph-scale_zh_CN.html", + "subject": "sciences" + }, + + + { + "label": "密度", + "fileurl": "https://phet.colorado.edu/sims/html/density/latest/density_zh_CN.html", + "subject": "chemistry" + }, + { + "label": "创造一个分子", + "fileurl": "https://phet.colorado.edu/sims/html/build-a-molecule/latest/build-a-molecule_zh_CN.html", + "subject": "chemistry" + }, + { + "label": "扩散", + "fileurl": "https://phet.colorado.edu/sims/html/diffusion/latest/diffusion_zh_CN.html", + "subject": "chemistry" + } + ], + "junior": [ + { + "label": "二项分布弹珠台几率", + "fileurl": "https://phet.colorado.edu/sims/html/plinko-probability/latest/plinko-probability_zh_CN.html", + "subject": "math" + }, + { + "label": "建立方程", + "fileurl": "https://phet.colorado.edu/sims/html/function-builder/latest/function-builder_zh_CN.html", + "subject": "math" + }, + { + "label": "三角函数之旅", + "fileurl": "https://phet.colorado.edu/sims/html/trig-tour/latest/trig-tour_zh_CN.html", + "subject": "math" + }, + { + "label": "四则运算", + "fileurl": "https://phet.colorado.edu/sims/html/arithmetic/latest/arithmetic_zh_CN.html", + "subject": "math" + }, + { + "label": "二次函数图像", + "fileurl": "https://phet.colorado.edu/sims/html/graphing-quadratics/latest/graphing-quadratics_zh_CN.html", + "subject": "math" + }, + { + "label": "质量和弹簧", + "fileurl": "https://phet.colorado.edu/sims/html/masses-and-springs/latest/masses-and-springs_zh_CN.html", + "subject": "math" + }, + { + "label": "等式探索:两个变量", + "fileurl": "https://phet.colorado.edu/sims/html/equality-explorer-two-variables/latest/equality-explorer-two-variables_zh_CN.html", + "subject": "math" + }, + { + "label": "等式探索:基础", + "fileurl": "https://phet.colorado.edu/sims/html/equality-explorer-basics/latest/equality-explorer-basics_zh_CN.html", + "subject": "math" + }, + { + "label": "等式探索", + "fileurl": "https://phet.colorado.edu/sims/html/equality-explorer/latest/equality-explorer_zh_CN.html", + "subject": "math" + }, + { + "label": "面积模型代数", + "fileurl": "https://phet.colorado.edu/sims/html/area-model-algebra/latest/area-model-algebra_zh_CN.html", + "subject": "math" + }, + { + "label": "面积模型:小数", + "fileurl": "https://phet.colorado.edu/sims/html/area-model-decimals/latest/area-model-decimals_zh_CN.html", + "subject": "math" + }, + { + "label": "面积模型乘法", + "fileurl": "https://phet.colorado.edu/sims/html/area-model-multiplication/latest/area-model-multiplication_zh_CN.html", + "subject": "math" + }, + { + "label": "面积模型入门", + "fileurl": "https://phet.colorado.edu/sims/html/area-model-introduction/latest/area-model-introduction_zh_CN.html", + "subject": "math" + }, + { + "label": "钟摆实验", + "fileurl": "https://phet.colorado.edu/sims/html/pendulum-lab/latest/pendulum-lab_zh_CN.html", + "subject": "math" + }, + { + "label": "斜抛运动", + "fileurl": "https://phet.colorado.edu/sims/html/projectile-motion/latest/projectile-motion_zh_CN.html", + "subject": "math" + }, + { + "label": "表达式变换", + "fileurl": "https://phet.colorado.edu/sims/html/expression-exchange/latest/expression-exchange_zh_CN.html", + "subject": "math" + }, + + { + "label": "电路建设工具包:交流", + "fileurl": "https://phet.colorado.edu/sims/html/circuit-construction-kit-ac/latest/circuit-construction-kit-ac_zh_CN.html", + "subject": "physics" + }, + { + "label": "交流虚拟实验室", + "fileurl": "https://phet.colorado.edu/sims/html/circuit-construction-kit-ac-virtual-lab/latest/circuit-construction-kit-ac-virtual-lab_zh_CN.html", + "subject": "physics" + }, + { + "label": "碰撞实验室", + "fileurl": "https://phet.colorado.edu/sims/html/collision-lab/latest/collision-lab_zh_CN.html", + "subject": "physics" + }, + { + "label": "能量滑板竞技场", + "fileurl": "https://phet.colorado.edu/sims/html/energy-skate-park/latest/energy-skate-park_zh_CN.html", + "subject": "physics" + }, + { + "label": "向量相加", + "fileurl": "https://phet.colorado.edu/sims/html/vector-addition/latest/vector-addition_zh_CN.html", + "subject": "physics" + }, + { + "label": "曲线拟合", + "fileurl": "https://phet.colorado.edu/sims/html/curve-fitting/latest/curve-fitting_zh_CN.html", + "subject": "physics" + }, + { + "label": "引力实验室:基础", + "fileurl": "https://phet.colorado.edu/sims/html/gravity-force-lab-basics/latest/gravity-force-lab-basics_zh_CN.html", + "subject": "physics" + }, + { + "label": "波动入门", + "fileurl": "https://phet.colorado.edu/sims/html/waves-intro/latest/waves-intro_zh_CN.html", + "subject": "physics" + }, + { + "label": "扩散", + "fileurl": "https://phet.colorado.edu/sims/html/diffusion/latest/diffusion_zh_CN.html", + "subject": "physics" + }, + { + "label": "气体基础", + "fileurl": "https://phet.colorado.edu/sims/html/gases-intro/latest/gases-intro_zh_CN.html", + "subject": "physics" + }, + { + "label": "气体性质", + "fileurl": "https://phet.colorado.edu/sims/html/gas-properties/latest/gas-properties_zh_CN.html", + "subject": "physics" + }, + { + "label": "质量与弹簧:基础", + "fileurl": "https://phet.colorado.edu/sims/html/masses-and-springs-basics/latest/masses-and-springs-basics_zh_CN.html", + "subject": "physics" + }, + { + "label": "黑体辐射", + "fileurl": "https://phet.colorado.edu/sims/html/blackbody-spectrum/latest/blackbody-spectrum_zh_CN.html", + "subject": "physics" + }, + { + "label": "能量的形式和转换", + "fileurl": "https://phet.colorado.edu/sims/html/energy-forms-and-changes/latest/energy-forms-and-changes_zh_CN.html", + "subject": "physics" + }, + { + "label": "波的干涉", + "fileurl": "https://phet.colorado.edu/sims/html/wave-interference/latest/wave-interference_zh_CN.html", + "subject": "physics" + }, + { + "label": "库仑定律", + "fileurl": "https://phet.colorado.edu/sims/html/coulombs-law/latest/coulombs-law_zh_CN.html", + "subject": "physics" + }, + { + "label": "质量和弹簧", + "fileurl": "https://phet.colorado.edu/sims/html/masses-and-springs/latest/masses-and-springs_zh_CN.html", + "subject": "physics" + }, + { + "label": "电容器实验:基础", + "fileurl": "https://phet.colorado.edu/sims/html/capacitor-lab-basics/latest/capacitor-lab-basics_zh_CN.html", + "subject": "physics" + }, + { + "label": "电路组建实验:直流虚拟实验室", + "fileurl": "https://phet.colorado.edu/sims/html/circuit-construction-kit-dc-virtual-lab/latest/circuit-construction-kit-dc-virtual-lab_zh_CN.html", + "subject": "physics" + }, + { + "label": "电路组建实验:直流", + "fileurl": "https://phet.colorado.edu/sims/html/circuit-construction-kit-dc/latest/circuit-construction-kit-dc_zh_CN.html", + "subject": "physics" + }, + { + "label": "钟摆实验", + "fileurl": "https://phet.colorado.edu/sims/html/pendulum-lab/latest/pendulum-lab_zh_CN.html", + "subject": "physics" + }, + { + "label": "斜抛运动", + "fileurl": "https://phet.colorado.edu/sims/html/projectile-motion/latest/projectile-motion_zh_CN.html", + "subject": "physics" + }, + { + "label": "物质状态:基础", + "fileurl": "https://phet.colorado.edu/sims/html/states-of-matter-basics/latest/states-of-matter-basics_zh_CN.html", + "subject": "physics" + }, + { + "label": "物质状态", + "fileurl": "https://phet.colorado.edu/sims/html/states-of-matter/latest/states-of-matter_zh_CN.html", + "subject": "physics" + }, + { + "label": "重力和轨道", + "fileurl": "https://phet.colorado.edu/sims/html/gravity-and-orbits/latest/gravity-and-orbits_zh_CN.html", + "subject": "physics" + }, + + { + "label": "分子与光", + "fileurl": "https://phet.colorado.edu/sims/html/molecules-and-light/latest/molecules-and-light_zh_CN.html", + "subject": "physics" + }, + + { + "label": "PH值", + "fileurl": "https://phet.colorado.edu/sims/html/ph-scale/latest/ph-scale_zh_CN.html", + "subject": "biology" + }, + { + "label": "光的混合", + "fileurl": "https://phet.colorado.edu/sims/html/color-vision/latest/color-vision_zh_CN.html", + "subject": "biology" + }, + { + "label": "自然选择", + "fileurl": "https://phet.colorado.edu/sims/html/natural-selection/latest/natural-selection_zh_CN.html", + "subject": "biology" + }, + + { + "label": "受到压力", + "fileurl": "https://phet.colorado.edu/sims/html/under-pressure/latest/under-pressure_zh_CN.html", + "subject": "sciences" + }, + { + "label": "万有引力实验", + "fileurl": "https://phet.colorado.edu/sims/html/gravity-force-lab/latest/gravity-force-lab_zh_CN.html", + "subject": "sciences" + }, + { + "label": "气球和静电(摩擦起电)", + "fileurl": "https://phet.colorado.edu/sims/html/balloons-and-static-electricity/latest/balloons-and-static-electricity_zh_CN.html", + "subject": "sciences" + }, + + { + "label": "气体基础", + "fileurl": "https://phet.colorado.edu/sims/html/gases-intro/latest/gases-intro_zh_CN.html", + "subject": "chemistry" + }, + { + "label": "气体性质", + "fileurl": "https://phet.colorado.edu/sims/html/gas-properties/latest/gas-properties_zh_CN.html", + "subject": "chemistry" + }, + { + "label": "黑体辐射", + "fileurl": "https://phet.colorado.edu/sims/html/blackbody-spectrum/latest/blackbody-spectrum_zh_CN.html", + "subject": "chemistry" + }, + { + "label": "能量的形式和转换", + "fileurl": "https://phet.colorado.edu/sims/html/energy-forms-and-changes/latest/energy-forms-and-changes_zh_CN.html", + "subject": "chemistry" + }, + { + "label": "库仑定律", + "fileurl": "https://phet.colorado.edu/sims/html/coulombs-law/latest/coulombs-law_zh_CN.html", + "subject": "chemistry" + }, + { + "label": "分子极性", + "fileurl": "https://phet.colorado.edu/sims/html/molecule-polarity/latest/molecule-polarity_zh_CN.html", + "subject": "chemistry" + }, + { + "label": "物质状态:基础", + "fileurl": "https://phet.colorado.edu/sims/html/states-of-matter-basics/latest/states-of-matter-basics_zh_CN.html", + "subject": "chemistry" + }, + { + "label": "物质状态", + "fileurl": "https://phet.colorado.edu/sims/html/states-of-matter/latest/states-of-matter_zh_CN.html", + "subject": "chemistry" + }, + { + "label": "原子的相互作用", + "fileurl": "https://phet.colorado.edu/sims/html/atomic-interactions/latest/atomic-interactions_zh_CN.html", + "subject": "chemistry" + }, + { + "label": "卢瑟福散射", + "fileurl": "https://phet.colorado.edu/sims/html/rutherford-scattering/latest/rutherford-scattering_zh_CN.html", + "subject": "chemistry" + }, + { + "label": "原子的相互作用", + "fileurl": "https://phet.colorado.edu/sims/html/atomic-interactions/latest/atomic-interactions_zh_CN.html", + "subject": "chemistry" + } + ], + "senior": [ + + { + "label": "一次线性函数的拟合", + "fileurl": "https://phet.colorado.edu/sims/html/least-squares-regression/latest/least-squares-regression_zh_CN.html", + "subject": "math" + }, + { + "label": "区域建造者", + "fileurl": "https://phet.colorado.edu/sims/html/area-builder/latest/area-builder_zh_CN.html", + "subject": "math" + }, + { + "label": "绳波", + "fileurl": "https://phet.colorado.edu/sims/html/wave-on-a-string/latest/wave-on-a-string_zh_CN.html", + "subject": "math" + }, + { + "label": "直线图形", + "fileurl": "https://phet.colorado.edu/sims/html/graphing-lines/latest/graphing-lines_zh_CN.html", + "subject": "math" + }, + { + "label": "分数配对", + "fileurl": "https://phet.colorado.edu/sims/html/fraction-matcher/latest/fraction-matcher_zh_CN.html", + "subject": "math" + }, + { + "label": "平衡探究实验", + "fileurl": "https://phet.colorado.edu/sims/html/balancing-act/latest/balancing-act_zh_CN.html", + "subject": "math" + }, + { + "label": "绘图:斜率与截距", + "fileurl": "https://phet.colorado.edu/sims/html/graphing-slope-intercept/latest/graphing-slope-intercept_zh_CN.html", + "subject": "math" + }, + { + "label": "函数构造器:基础", + "fileurl": "https://phet.colorado.edu/sims/html/function-builder-basics/latest/function-builder-basics_zh_CN.html", + "subject": "math" + }, + { + "label": "比例游乐场", + "fileurl": "https://phet.colorado.edu/sims/html/proportion-playground/latest/proportion-playground_zh_CN.html", + "subject": "math" + }, + + { + "label": "二项分布弹珠台几率", + "fileurl": "https://phet.colorado.edu/sims/html/plinko-probability/latest/plinko-probability_zh_CN.html", + "subject": "physics" + }, + { + "label": "原子的相互作用", + "fileurl": "https://phet.colorado.edu/sims/html/atomic-interactions/latest/atomic-interactions_zh_CN.html", + "subject": "physics" + }, + { + "label": "电荷与电场", + "fileurl": "https://phet.colorado.edu/sims/html/charges-and-fields/latest/charges-and-fields_zh_CN.html", + "subject": "physics" + }, + { + "label": "卢瑟福散射", + "fileurl": "https://phet.colorado.edu/sims/html/rutherford-scattering/latest/rutherford-scattering_zh_CN.html", + "subject": "physics" + }, + { + "label": "光的折射", + "fileurl": "https://phet.colorado.edu/sims/html/bending-light/latest/bending-light_zh_CN.html", + "subject": "physics" + }, + { + "label": "胡克定律", + "fileurl": "https://phet.colorado.edu/sims/html/hookes-law/latest/hookes-law_zh_CN.html", + "subject": "physics" + }, + { + "label": "部分电路欧姆定律", + "fileurl": "https://phet.colorado.edu/sims/html/ohms-law/latest/ohms-law_zh_CN.html", + "subject": "physics" + }, + { + "label": "电线的电阻", + "fileurl": "https://phet.colorado.edu/sims/html/resistance-in-a-wire/latest/resistance-in-a-wire_zh_CN.html", + "subject": "physics" + }, + { + "label": "原子模型", + "fileurl": "https://phet.colorado.edu/sims/html/build-an-atom/latest/build-an-atom_zh_CN.html", + "subject": "physics" + }, + + { + "label": "分子极性", + "fileurl": "https://phet.colorado.edu/sims/html/molecule-polarity/latest/molecule-polarity_zh_CN.html", + "subject": "biology" + }, + { + "label": "神经元", + "fileurl": "https://phet.colorado.edu/sims/html/neuron/latest/neuron_zh_CN.html", + "subject": "biology" + }, + + { + "label": "引力实验室:基础", + "fileurl": "https://phet.colorado.edu/sims/html/gravity-force-lab-basics/latest/gravity-force-lab-basics_zh_CN.html", + "subject": "sciences" + }, + { + "label": "波动入门", + "fileurl": "https://phet.colorado.edu/sims/html/waves-intro/latest/waves-intro_zh_CN.html", + "subject": "sciences" + }, + { + "label": "扩散", + "fileurl": "https://phet.colorado.edu/sims/html/diffusion/latest/diffusion_zh_CN.html", + "subject": "sciences" + }, + { + "label": "气体基础", + "fileurl": "https://phet.colorado.edu/sims/html/gases-intro/latest/gases-intro_zh_CN.html", + "subject": "sciences" + }, + { + "label": "气体性质", + "fileurl": "https://phet.colorado.edu/sims/html/gas-properties/latest/gas-properties_zh_CN.html", + "subject": "sciences" + }, + { + "label": "分子与光", + "fileurl": "https://phet.colorado.edu/sims/html/molecules-and-light/latest/molecules-and-light_zh_CN.html", + "subject": "sciences" + }, + { + "label": "绳波", + "fileurl": "https://phet.colorado.edu/sims/html/wave-on-a-string/latest/wave-on-a-string_zh_CN.html", + "subject": "sciences" + }, + { + "label": "黑体辐射", + "fileurl": "https://phet.colorado.edu/sims/html/blackbody-spectrum/latest/blackbody-spectrum_zh_CN.html", + "subject": "sciences" + }, + { + "label": "波的干涉", + "fileurl": "https://phet.colorado.edu/sims/html/wave-interference/latest/wave-interference_zh_CN.html", + "subject": "sciences" + }, + { + "label": "重力和轨道", + "fileurl": "https://phet.colorado.edu/sims/html/gravity-and-orbits/latest/gravity-and-orbits_zh_CN.html", + "subject": "sciences" + }, + + { + "label": "同位素和原子的质量", + "fileurl": "https://phet.colorado.edu/sims/html/isotopes-and-atomic-mass/latest/isotopes-and-atomic-mass_zh_CN.html", + "subject": "chemistry" + }, + { + "label": "分子与光", + "fileurl": "https://phet.colorado.edu/sims/html/molecules-and-light/latest/molecules-and-light_zh_CN.html", + "subject": "chemistry" + }, + { + "label": "分子形状", + "fileurl": "https://phet.colorado.edu/sims/html/molecule-shapes/latest/molecule-shapes_zh_CN.html", + "subject": "chemistry" + }, + { + "label": "分子形状:基础", + "fileurl": "https://phet.colorado.edu/sims/html/molecule-shapes-basics/latest/molecule-shapes-basics_zh_CN.html", + "subject": "chemistry" + }, + { + "label": "反应物,生成物及未反应物", + "fileurl": "https://phet.colorado.edu/sims/html/reactants-products-and-leftovers/latest/reactants-products-and-leftovers_zh_CN.html", + "subject": "chemistry" + }, + { + "label": "pH值:基础", + "fileurl": "https://phet.colorado.edu/sims/html/ph-scale-basics/latest/ph-scale-basics_zh_CN.html", + "subject": "chemistry" + }, + { + "label": "绳波", + "fileurl": "https://phet.colorado.edu/sims/html/wave-on-a-string/latest/wave-on-a-string_zh_CN.html", + "subject": "chemistry" + }, + { + "label": "PH值", + "fileurl": "https://phet.colorado.edu/sims/html/ph-scale/latest/ph-scale_zh_CN.html", + "subject": "chemistry" + }, + { + "label": "配平化学方程式", + "fileurl": "https://phet.colorado.edu/sims/html/balancing-chemical-equations/latest/balancing-chemical-equations_zh_CN.html", + "subject": "chemistry" + }, + { + "label": "酸碱溶度", + "fileurl": "https://phet.colorado.edu/sims/html/acid-base-solutions/latest/acid-base-solutions_zh_CN.html", + "subject": "chemistry" + }, + { + "label": "浓度", + "fileurl": "https://phet.colorado.edu/sims/html/concentration/latest/concentration_zh_CN.html", + "subject": "chemistry" + }, + { + "label": "气球和静电(摩擦起电)", + "fileurl": "https://phet.colorado.edu/sims/html/balloons-and-static-electricity/latest/balloons-and-static-electricity_zh_CN.html", + "subject": "chemistry" + }, + { + "label": "比尔定律实验", + "fileurl": "https://phet.colorado.edu/sims/html/beers-law-lab/latest/beers-law-lab_zh_CN.html", + "subject": "chemistry" + },{ + "label": "摩尔浓度", + "fileurl": "https://phet.colorado.edu/sims/html/molarity/latest/molarity_zh_CN.html", + "subject": "chemistry" + }, + { + "label": "原子模型", + "fileurl": "https://phet.colorado.edu/sims/html/build-an-atom/latest/build-an-atom_zh_CN.html", + "subject": "chemistry" + } + ] + } +} \ No newline at end of file diff --git a/src/renderer/src/views/classTask/newClassTaskAssign/Right/index.vue b/src/renderer/src/views/classTask/newClassTaskAssign/Right/index.vue index b911c6c..4089a6c 100644 --- a/src/renderer/src/views/classTask/newClassTaskAssign/Right/index.vue +++ b/src/renderer/src/views/classTask/newClassTaskAssign/Right/index.vue @@ -37,6 +37,7 @@ const items = shallowRef([ { title: '常规作业', description: '推送pdf、视频、音频、图片,学生可以拍照上传。', icon: '#icon-zhaoxiangji',type:'danger' }, { title: 'AI设计作业', description: '通过AI助手,根据课标、教材、考试等分析结果,智能创建作业。', icon: '#icon-jiqiren_o',type:'danger' }, { title: '习题上传', description: '自己上传个人题库。', icon: '#icon-shangchuan',type:'danger' }, + { title: '科学实验', description: '学生完成虚拟仿真实验,并提交实验结果。', icon: '#icon-shangchuan',type:'danger' }, ]); const handleClick = (item) => { diff --git a/src/renderer/src/views/classTask/newClassTaskAssign/experimentQuestion/components/experimentList.vue b/src/renderer/src/views/classTask/newClassTaskAssign/experimentQuestion/components/experimentList.vue new file mode 100644 index 0000000..8c0505f --- /dev/null +++ b/src/renderer/src/views/classTask/newClassTaskAssign/experimentQuestion/components/experimentList.vue @@ -0,0 +1,52 @@ + + + + + diff --git a/src/renderer/src/views/classTask/newClassTaskAssign/experimentQuestion/components/selectClass.vue b/src/renderer/src/views/classTask/newClassTaskAssign/experimentQuestion/components/selectClass.vue new file mode 100644 index 0000000..87ce096 --- /dev/null +++ b/src/renderer/src/views/classTask/newClassTaskAssign/experimentQuestion/components/selectClass.vue @@ -0,0 +1,162 @@ + + + + + + \ No newline at end of file diff --git a/src/renderer/src/views/classTask/newClassTaskAssign/experimentQuestion/index.vue b/src/renderer/src/views/classTask/newClassTaskAssign/experimentQuestion/index.vue new file mode 100644 index 0000000..d8dcf57 --- /dev/null +++ b/src/renderer/src/views/classTask/newClassTaskAssign/experimentQuestion/index.vue @@ -0,0 +1,115 @@ + + + \ No newline at end of file diff --git a/src/renderer/src/views/classTask/newClassTaskAssign/index.vue b/src/renderer/src/views/classTask/newClassTaskAssign/index.vue index cf07db2..b90b07e 100644 --- a/src/renderer/src/views/classTask/newClassTaskAssign/index.vue +++ b/src/renderer/src/views/classTask/newClassTaskAssign/index.vue @@ -77,6 +77,11 @@ +
+
+ +
+
@@ -140,6 +145,7 @@ import { editListItem } from '@/hooks/useClassTask' import MyQuestion from '@/views/classTask/newClassTaskAssign/myQuestion/index.vue' import SchoolQuestion from '@/views/classTask/newClassTaskAssign/schoolQuestion/index.vue' import SearchQuestion from '@/views/classTask/newClassTaskAssign/searchQuestion/index.vue' +import ExperimentQuestion from "@/views/classTask/newClassTaskAssign/experimentQuestion/index.vue"; import whiteboard from '@/components/whiteboard/whiteboard.vue' import FileUpload from "@/components/FileUpload/index.vue"; import Right from './Right/index.vue' @@ -258,6 +264,16 @@ watch(() => props.currentCourse, (newVal, oldVal) => { } console.log(newVal,'newval'); },{deep:true}) + +// ------------科学实验 +const getExpObj = (obj)=>{ + // obj:{ + // fileurl: "https://phet.colorado.edu/sims/html/number-compare/latest/number-compare_zh_CN.html" + // label: "数量比较" + // subject: "math" + // } + classWorkForm.fileHomeworkList = [obj]; +} //---------作业设计--- const handleItemClick = (itemName) => { console.log('itemName', itemName); @@ -582,6 +598,32 @@ const handleClassWorkFormQuizRemove = (index) =>{ fileLoading.value = false } } + else if(classWorkForm.worktype === "科学实验"){ + if (classWorkForm.fileHomeworkList.length == 0) return ElMessage({ type: 'warning', message: '请选择科学实验的课程!'}); + cform.workcodes = JSON.stringify(classWorkForm.fileHomeworkList); + cform.entpcourseworklist = JSON.stringify([{'id':-3, 'score': '10'}]); + try { + console.log(cform,'科学实验') + addClassworkReturnId(cform).then((res) => { + ElMessage({ type: 'success', message: '作业设计成功!'}); + // 重置提交表单 + classWorkForm.worktype = "常规作业"; + classWorkForm.uniquekey = ''; // props.propsformobj.uniquekey, // 作业唯一标识 作业名称 + classWorkForm.title = ""; + classWorkForm.quizlist = [], // 作业习题列表内容 + + // 情况选择的资源缓存 + classWorkForm.chooseWorkLists = []; // 框架梳理list + classWorkForm.whiteboardObj = ''; // ? // 清空白板 + classWorkForm.fileHomeworkList = []; // 常规作业list + classWorkForm.id = res + // emits('getData',classWorkForm) + // TODO 科学实验 待完善 + }) + } finally{ + // + } + } else { // 正常新任务 var ll = []; @@ -667,7 +709,10 @@ const editWork = async (cform) =>{ }else{ if (classWorkForm.fileHomeworkList.length == 0) return ElMessage({ type: 'warning', message: '请上传常规作业附件!'}); } - }else { + }else if( classWorkForm.worktype == '科学实验') { + if (classWorkForm.fileHomeworkList.length == 0) return ElMessage({ type: 'warning', message: '请选择科学实验科目!'}); + } + else { if (classWorkForm.chooseWorkLists.length == 0) { // 框架梳理 ElMessage.error('请先添加作业资源!'); @@ -759,6 +804,10 @@ const editWork = async (cform) =>{ // 1.更新作业任务下的课堂展示内容 (这里未做校验, 直接将当前文件对象更新过去) cform.workcodes = JSON.stringify(classWorkForm.fileHomeworkList); } + else if (classWorkForm.worktype=='科学实验') { //TODO 注意,fileHomeworkList字段与常规作业共用 + // 1.更新作业任务下的课堂展示内容 (这里未做校验, 直接将当前文件对象更新过去) + cform.workcodes = JSON.stringify(classWorkForm.fileHomeworkList); + } // 3.更新作业任务本身 let res = await updateClasswork(cform); @@ -865,6 +914,11 @@ const editWork = async (cform) =>{ padding: 20px; box-sizing: border-box; } + + .experiment-homework{ + padding: 15px; + height: 100%; + } } .page-right { overflow: hidden; -- 2.44.0.windows.1 From 622a71253f97bf3baee788e25d0aceea30279f7a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=99=BD=E4=BA=86=E4=B8=AA=E7=99=BD?= <543593352@qq.com> Date: Fri, 20 Dec 2024 15:23:34 +0800 Subject: [PATCH 2/4] =?UTF-8?q?=E4=BD=9C=E4=B8=9A=E8=AE=BE=E8=AE=A1?= =?UTF-8?q?=EF=BC=9A=E7=A7=91=E5=AD=A6=E5=AE=9E=E9=AA=8C?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/renderer/src/hooks/useClassTask.js | 2 + src/renderer/src/store/modules/classTask.js | 5 + .../components/experimentList.vue | 6 +- .../components/selectClass.vue | 114 +++++++++++------- .../experimentQuestion/index.vue | 38 +++--- 5 files changed, 94 insertions(+), 71 deletions(-) diff --git a/src/renderer/src/hooks/useClassTask.js b/src/renderer/src/hooks/useClassTask.js index 7e58c45..72fe882 100644 --- a/src/renderer/src/hooks/useClassTask.js +++ b/src/renderer/src/hooks/useClassTask.js @@ -117,6 +117,8 @@ export const editListItem = (row, courseObj) => { classtaskObj.fileHomeworkList = JSON.parse(row.workcodes); // // console.log('科学实验', classtaskObj); + // 更新默认的科学实验( 学段 学科 以及实验科目) + console.log('科学实验', classtaskObj); return resolve(classtaskObj); } } diff --git a/src/renderer/src/store/modules/classTask.js b/src/renderer/src/store/modules/classTask.js index 05a9491..e93be20 100644 --- a/src/renderer/src/store/modules/classTask.js +++ b/src/renderer/src/store/modules/classTask.js @@ -5,6 +5,11 @@ import { JYApiListCT, JYApiListOriginYear, JYApiListSO} from "@/utils/examQuesti const useClassTaskStore = defineStore('classTask',{ state: () => ({ + experimentObj:{ + edustage: '小学', // 教育阶段 + edusubject: '', // 学科 + experimentList: [], // 实验科目列表 + }, isOpenQuestUploadView: false, // 是否打开习题上传的页面 classListIds: [], entpCourseWorkTypeList: [ diff --git a/src/renderer/src/views/classTask/newClassTaskAssign/experimentQuestion/components/experimentList.vue b/src/renderer/src/views/classTask/newClassTaskAssign/experimentQuestion/components/experimentList.vue index 8c0505f..9755859 100644 --- a/src/renderer/src/views/classTask/newClassTaskAssign/experimentQuestion/components/experimentList.vue +++ b/src/renderer/src/views/classTask/newClassTaskAssign/experimentQuestion/components/experimentList.vue @@ -8,7 +8,7 @@ @change="onSelectOption" > { const onSelectOption = (option) => { console.log(option,'选择的实验课-------') - emit('selectItem', props.list.filter(item => item.label === option)[0]) + emit('selectItem', classTaskStore.experimentList.filter(item => item.label === option)[0]) } diff --git a/src/renderer/src/views/classTask/newClassTaskAssign/experimentQuestion/components/selectClass.vue b/src/renderer/src/views/classTask/newClassTaskAssign/experimentQuestion/components/selectClass.vue index 87ce096..e539610 100644 --- a/src/renderer/src/views/classTask/newClassTaskAssign/experimentQuestion/components/selectClass.vue +++ b/src/renderer/src/views/classTask/newClassTaskAssign/experimentQuestion/components/selectClass.vue @@ -3,7 +3,7 @@
- {{ userStore.edustage }} + {{ useClassTaskStore().experimentObj.edustage }} @@ -20,14 +20,14 @@
- {{ userStore.edusubject }} + {{ useClassTaskStore().experimentObj.edusubject }}