diff --git a/package.json b/package.json index ecf3b97..ada67fe 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "aix-win", - "version": "2.5.0", + "version": "2.1.21", "description": "", "main": "./out/main/index.js", "author": "上海交大重庆人工智能研究院", diff --git a/src/main/index.js b/src/main/index.js index f874b6b..639d237 100644 --- a/src/main/index.js +++ b/src/main/index.js @@ -137,7 +137,7 @@ function createMainWindow() { // mainWindow.setAlwaysOnTop(true, "screen-saver") // 将窗口设置为顶层窗口 // mainWindow.setVisibleOnAllWorkspaces(true) // 如果窗口在所有工作区都可见 - mainWindow.maximize(); + // mainWindow.maximize(); // 第三步: 开启remote服务 remote.enable(mainWindow.webContents) } diff --git a/src/renderer/src/App.vue b/src/renderer/src/App.vue index 1c467ca..0f33ba6 100644 --- a/src/renderer/src/App.vue +++ b/src/renderer/src/App.vue @@ -18,6 +18,6 @@ const size = ref('default') text-align: center; color: #2c3e50; width: 100%; - height: 100vh; + /* height: 100vh; */ } diff --git a/src/renderer/src/assets/iconfont/iconfont.css b/src/renderer/src/assets/iconfont/iconfont.css index 75ba33d..41c9feb 100644 --- a/src/renderer/src/assets/iconfont/iconfont.css +++ b/src/renderer/src/assets/iconfont/iconfont.css @@ -1,9 +1,9 @@ @font-face { font-family: "iconfont"; /* Project id 2794390 */ - src: url('iconfont.woff2?t=1728543886557') format('woff2'), - url('iconfont.woff?t=1728543886557') format('woff'), - url('iconfont.ttf?t=1728543886557') format('truetype'), - url('iconfont.svg?t=1728543886557#iconfont') format('svg'); + src: url('iconfont.woff2?t=1729838168701') format('woff2'), + url('iconfont.woff?t=1729838168701') format('woff'), + url('iconfont.ttf?t=1729838168701') format('truetype'), + url('iconfont.svg?t=1729838168701#iconfont') format('svg'); } .iconfont { @@ -14,6 +14,22 @@ -moz-osx-font-smoothing: grayscale; } +.icon-banji2:before { + content: "\e6c0"; +} + +.icon-set:before { + content: "\e691"; +} + +.icon-shouye:before { + content: "\e637"; +} + +.icon-gongzuotai:before { + content: "\e690"; +} + .icon-A1:before { content: "\e635"; } diff --git a/src/renderer/src/assets/iconfont/iconfont.js b/src/renderer/src/assets/iconfont/iconfont.js index e5c0dbb..42462b7 100644 --- a/src/renderer/src/assets/iconfont/iconfont.js +++ b/src/renderer/src/assets/iconfont/iconfont.js @@ -1 +1 @@ -window._iconfont_svg_string_2794390='',(c=>{var h=(l=(l=document.getElementsByTagName("script"))[l.length-1]).getAttribute("data-injectcss"),l=l.getAttribute("data-disable-injectsvg");if(!l){var a,t,i,z,p,v=function(h,l){l.parentNode.insertBefore(h,l)};if(h&&!c.__iconfont__svg__cssinject__){c.__iconfont__svg__cssinject__=!0;try{document.write("")}catch(h){console&&console.log(h)}}a=function(){var h,l=document.createElement("div");l.innerHTML=c._iconfont_svg_string_2794390,(l=l.getElementsByTagName("svg")[0])&&(l.setAttribute("aria-hidden","true"),l.style.position="absolute",l.style.width=0,l.style.height=0,l.style.overflow="hidden",l=l,(h=document.body).firstChild?v(l,h.firstChild):h.appendChild(l))},document.addEventListener?~["complete","loaded","interactive"].indexOf(document.readyState)?setTimeout(a,0):(t=function(){document.removeEventListener("DOMContentLoaded",t,!1),a()},document.addEventListener("DOMContentLoaded",t,!1)):document.attachEvent&&(i=a,z=c.document,p=!1,d(),z.onreadystatechange=function(){"complete"==z.readyState&&(z.onreadystatechange=null,M())})}function M(){p||(p=!0,i())}function d(){try{z.documentElement.doScroll("left")}catch(h){return void setTimeout(d,50)}M()}})(window); \ No newline at end of file +window._iconfont_svg_string_2794390='',(c=>{var h=(l=(l=document.getElementsByTagName("script"))[l.length-1]).getAttribute("data-injectcss"),l=l.getAttribute("data-disable-injectsvg");if(!l){var a,t,i,z,p,v=function(h,l){l.parentNode.insertBefore(h,l)};if(h&&!c.__iconfont__svg__cssinject__){c.__iconfont__svg__cssinject__=!0;try{document.write("")}catch(h){console&&console.log(h)}}a=function(){var h,l=document.createElement("div");l.innerHTML=c._iconfont_svg_string_2794390,(l=l.getElementsByTagName("svg")[0])&&(l.setAttribute("aria-hidden","true"),l.style.position="absolute",l.style.width=0,l.style.height=0,l.style.overflow="hidden",l=l,(h=document.body).firstChild?v(l,h.firstChild):h.appendChild(l))},document.addEventListener?~["complete","loaded","interactive"].indexOf(document.readyState)?setTimeout(a,0):(t=function(){document.removeEventListener("DOMContentLoaded",t,!1),a()},document.addEventListener("DOMContentLoaded",t,!1)):document.attachEvent&&(i=a,z=c.document,p=!1,d(),z.onreadystatechange=function(){"complete"==z.readyState&&(z.onreadystatechange=null,M())})}function M(){p||(p=!0,i())}function d(){try{z.documentElement.doScroll("left")}catch(h){return void setTimeout(d,50)}M()}})(window); \ No newline at end of file diff --git a/src/renderer/src/assets/iconfont/iconfont.json b/src/renderer/src/assets/iconfont/iconfont.json index de96ea7..c70d801 100644 --- a/src/renderer/src/assets/iconfont/iconfont.json +++ b/src/renderer/src/assets/iconfont/iconfont.json @@ -5,6 +5,34 @@ "css_prefix_text": "icon-", "description": "", "glyphs": [ + { + "icon_id": "1017928", + "name": "班级", + "font_class": "banji2", + "unicode": "e6c0", + "unicode_decimal": 59072 + }, + { + "icon_id": "376364", + "name": "设置", + "font_class": "set", + "unicode": "e691", + "unicode_decimal": 59025 + }, + { + "icon_id": "5835474", + "name": "首页", + "font_class": "shouye", + "unicode": "e637", + "unicode_decimal": 58935 + }, + { + "icon_id": "19108133", + "name": "工作台", + "font_class": "gongzuotai", + "unicode": "e690", + "unicode_decimal": 59024 + }, { "icon_id": "11657531", "name": "A", diff --git a/src/renderer/src/assets/iconfont/iconfont.svg b/src/renderer/src/assets/iconfont/iconfont.svg index 105c931..1bef20d 100644 --- a/src/renderer/src/assets/iconfont/iconfont.svg +++ b/src/renderer/src/assets/iconfont/iconfont.svg @@ -14,6 +14,14 @@ /> + + + + + + + + diff --git a/src/renderer/src/assets/iconfont/iconfont.ttf b/src/renderer/src/assets/iconfont/iconfont.ttf index efbbc57..3af4099 100644 Binary files a/src/renderer/src/assets/iconfont/iconfont.ttf and b/src/renderer/src/assets/iconfont/iconfont.ttf differ diff --git a/src/renderer/src/assets/iconfont/iconfont.woff b/src/renderer/src/assets/iconfont/iconfont.woff index 8fd280e..c4dd721 100644 Binary files a/src/renderer/src/assets/iconfont/iconfont.woff and b/src/renderer/src/assets/iconfont/iconfont.woff differ diff --git a/src/renderer/src/assets/iconfont/iconfont.woff2 b/src/renderer/src/assets/iconfont/iconfont.woff2 index f0667a9..7adbcf8 100644 Binary files a/src/renderer/src/assets/iconfont/iconfont.woff2 and b/src/renderer/src/assets/iconfont/iconfont.woff2 differ diff --git a/src/renderer/src/components/set-homework/index.vue b/src/renderer/src/components/set-homework/index.vue index 08b92a8..b890ff3 100644 --- a/src/renderer/src/components/set-homework/index.vue +++ b/src/renderer/src/components/set-homework/index.vue @@ -244,7 +244,8 @@ const onSubmit = (formEl) => { entpcourseworklist: '[' + props.rows[i].entpcourseworklist + ']', needMsgNotifine: 'false', msgkey: 'newclasswork', - title: '作业任务', + //title: '作业任务', + title: props.rows[i].title, msgcontent: '', teachername: userInfo.nickName, unixstamp: new Date().getTime(), @@ -254,6 +255,7 @@ const onSubmit = (formEl) => { ary.push(obj) } } + console.log('ary->', ary) setLoading.value = true saveByClassWorkArray({ classworkarray: JSON.stringify(ary) diff --git a/src/renderer/src/layout/components/Aside.vue b/src/renderer/src/layout/components/Aside.vue new file mode 100644 index 0000000..89772d0 --- /dev/null +++ b/src/renderer/src/layout/components/Aside.vue @@ -0,0 +1,210 @@ + + + + + + \ No newline at end of file diff --git a/src/renderer/src/layout/components/Header.vue b/src/renderer/src/layout/components/Header.vue index a01a158..4b738bc 100644 --- a/src/renderer/src/layout/components/Header.vue +++ b/src/renderer/src/layout/components/Header.vue @@ -1,5 +1,11 @@ diff --git a/src/renderer/src/views/classTask/container/classOverview.vue b/src/renderer/src/views/classTask/container/classOverview.vue index e3d51b7..8ce866b 100644 --- a/src/renderer/src/views/classTask/container/classOverview.vue +++ b/src/renderer/src/views/classTask/container/classOverview.vue @@ -75,12 +75,12 @@ let studentList = ref([]) // 学生数据 // 初始-数据处理 const initData = () => { - console.log('xxx', props) // window.test = activeCourse studentList.value = props.activeData.studentList || [] const activeWorkFeedList = props.activeData.workFeedList || [] const quizlist = props.activeData.quizlist || [] - const timeArr = groupByField(props.activeData.workFeedList,'entpcourseworkid') + console.log(quizlist,'quizlist'); + // 习题特殊处理 let data = quizlist.map(o => { // 解析题选项 @@ -90,14 +90,9 @@ const initData = () => { let rightIds = [] // 正确学生 let hasAnswers= [] // 答过题的学生 let timeAnalyse = [] // 平均时长和编号 + // let subjectCourese = [] // 题目编号 const quizFeedList = activeWorkFeedList.filter(f => f.entpcourseworkid == o.id) // 做该题的列表 - // 获取所有的做题时间 - timeArr.forEach((item,index) => { - const arr = item.reduce((acc, cur) => { - return acc + (cur.timelength ? Number(cur.timelength) : 0); - },0) - timeAnalyse.push(arr) - }) + let children = [] const allStudents = []; if (o.worktype == '单选题') { // '单选题','多选题' @@ -108,6 +103,11 @@ const initData = () => { // 改选项的学生id const studentIds = quizFeedList.filter(f => f.feedcontent==v&&f.finishtimelength!='0').map(f => f.studentid)||[]; accSum += studentIds.length; + // 该到题的用时时间 + timeAnalyse = quizFeedList.reduce((acc, cur) => { + return acc + (cur.timelength ? Number(cur.timelength) : 0); + },0) + if (isOk) { activeIds.push(...studentIds) } @@ -122,7 +122,7 @@ const initData = () => { const res = isSame((f.feedcontent||'').split(','), workanswer); return f.entpcourseworkid == o.id && f.finishtimelength!='0' && res; }); - + const list = workdesc.includes('#&') ? workdesc.split('#&') : isJson(workdesc)?JSON.parse(workdesc):[]; children = list.map((v,i) => { const isOne = o.worktype == '单选题' @@ -135,6 +135,10 @@ const initData = () => { if (studentIds.length>0) { allStudents.push(...studentIds); } + // 该到题的用时时间 + timeAnalyse = quizFeedList.reduce((acc, cur) => { + return acc + (cur.timelength ? Number(cur.timelength) : 0); + },0) if(isOk) { activeIds=[...new Set(activeIds.concat(studentIds))] // 多选去重 } @@ -153,6 +157,10 @@ const initData = () => { activeIds=[...new Set(activeIds.concat(studentIds))] // 多选去重 hasAnswers=[...new Set(hasAnswers.concat(studentIds))] accSum = activeIds.length + // 该到题的用时时间 + timeAnalyse = quizFeedList.reduce((acc, cur) => { + return acc + (cur.timelength ? Number(cur.timelength) : 0); + },0) return { def, code, txt, isOk:true, studentIds } }) } else if (o.worktype == '判断题') { // 判断题 @@ -194,6 +202,10 @@ const initData = () => { accSum += studentIds.length; if(isOk) activeIds.push(...studentIds) hasAnswers.push(...studentIds) + // 该到题的用时时间 + timeAnalyse = quizFeedList.reduce((acc, cur) => { + return acc + (cur.timelength ? Number(cur.timelength) : 0); + },0) return { def: v, code: v, isOk, studentIds } }) } else { // 论述题 @@ -203,6 +215,10 @@ const initData = () => { activeIds=[...new Set(activeIds.concat(studentIds))] // 多选去重 hasAnswers=[...new Set(hasAnswers.concat(studentIds))] accSum = activeIds.length + // 该到题的用时时间 + timeAnalyse = quizFeedList.reduce((acc, cur) => { + return acc + (cur.timelength ? Number(cur.timelength) : 0); + },0) children = [{ def, code, isOk:true, studentIds }] } @@ -222,7 +238,7 @@ const initData = () => { } // def: 原始题数据 type 类型 active: 选中 points: 得分率, accSum 题解答人数 - return { def: o, id: o.id, type: o.worktype, active: [], points, accSum, rightSum, children,hasAnswers,timeAnalyse } + return { def: o, id: o.id, type: o.worktype, active: [], points, accSum, rightSum, children,hasAnswers,timeAnalyse,score:o.score } }) if (data.length === 0) return useOverview.getAllData([...data]) diff --git a/src/renderer/src/views/classTask/container/classOverview/distribution/echarts.vue b/src/renderer/src/views/classTask/container/classOverview/distribution/echarts.vue index ed70dfa..f19b912 100644 --- a/src/renderer/src/views/classTask/container/classOverview/distribution/echarts.vue +++ b/src/renderer/src/views/classTask/container/classOverview/distribution/echarts.vue @@ -24,6 +24,7 @@ const dataList = ref([ // 答过题的学生才进行统计 const hasStudents = ref([]) + // 根据数据生成不同的颜色 function getColor(name) { const colorMap = { @@ -104,7 +105,18 @@ const showEcharts = () => { } //执行 watch(() => useOverview.tableList, () => { - hasStudents.value = useOverview.tableList.filter(item => useOverview.allData[0].hasAnswers.includes(item.studentid)).map(item => item); + // 判断是不是客观题 + const subType = useOverview.allData.map(item => item.type) + const objectiveQuestion = ['单选题','多选题','判断题'] + if( !subType.every(item => objectiveQuestion.includes(item)) ){ + hasStudents.value = useOverview.tableList.filter(item => { + if(item.rating > 0 && useOverview.allData[0].hasAnswers.includes(item.studentid)){ + return item + } + }) + }else{ + hasStudents.value = useOverview.tableList.filter(item => useOverview.allData[0].hasAnswers.includes(item.studentid)).map(item => item); + } showEcharts(); nextTick(() => { initChart(); diff --git a/src/renderer/src/views/classTask/container/classOverview/distribution/stuList.vue b/src/renderer/src/views/classTask/container/classOverview/distribution/stuList.vue index 29d1425..9f73ac9 100644 --- a/src/renderer/src/views/classTask/container/classOverview/distribution/stuList.vue +++ b/src/renderer/src/views/classTask/container/classOverview/distribution/stuList.vue @@ -4,7 +4,7 @@