diff --git a/school/src/main/resources/template/js/announcement/announcementList.js b/school/src/main/resources/template/js/announcement/announcementList.js index 280c05ce48ef1653ebc7c293018a8cc403f59533..8aaf24b217ad79b664ef43092239fac93928a619 100644 --- a/school/src/main/resources/template/js/announcement/announcementList.js +++ b/school/src/main/resources/template/js/announcement/announcementList.js @@ -23,7 +23,7 @@ layui.config({ table.render({ id: 'messageTable', elem: '#messageTable', - method: 'get', + method: 'post', url: sysMainMation.schoolBasePath + 'queryAnnouncementAllList', where: getTableParams(), even: false, @@ -46,7 +46,7 @@ layui.config({ ]], done: function(json) { matchingLanguage(); - initTableSearchUtil.initAdvancedSearch(this, json.searchFilter, form, "请输入名称", function () { + initTableSearchUtil.initAdvancedSearch(this, json.searchFilter, form, "暂不支持搜索", function () { table.reloadData("messageTable", {page: {curr: 1}, where: getTableParams()}); }); } diff --git a/school/src/main/resources/template/js/homework/correct.js b/school/src/main/resources/template/js/homework/correct.js index 2973fd7f153ad5bbfa2aea2e91f3931426a9cbbb..82419373cc310f981214545b9009e89d277d7a9e 100644 --- a/school/src/main/resources/template/js/homework/correct.js +++ b/school/src/main/resources/template/js/homework/correct.js @@ -1,32 +1,68 @@ - -// 以下两个参数开启团队权限时有值 -var objectId = '', objectKey = ''; -// 根据以下两个参数判断:工作流的判断是否要根据serviceClassName的判断 -var serviceClassName; - layui.config({ base: basePath, version: skyeyeVersion }).extend({ window: 'js/winui.window' -}).define(['window', 'table', 'jquery', 'winui', 'form', 'tagEditor', 'laydate'], function (exports) { +}).define(['window', 'jquery', 'winui', 'form'], function (exports) { winui.renderColor(); var index = parent.layer.getFrameIndex(window.name); - var $ = layui.$; + var $ = layui.$, + textool = layui.textool, + form = layui.form; var id = GetUrlParam("id"); + var assignmentId = GetUrlParam("assignmentId"); + var fullMarks - AjaxPostUtil.request({ - url: sysMainMation.schoolBasePath + "queryAssignmentSubById", - params: {id: id}, - type: 'json', + showGrid({ + id: "showForm", + url: sysMainMation.schoolBasePath + "queryAssignmentById", + params: {id: assignmentId}, method: 'GET', - callback: function (json) { - let data = json.bean; - dsFormUtil.initEditPageForStatic('content', 'FP2024071300013', data, { - savePreParams: function (params) { - } - }); + pagination: false, + template: $("#beanTemplate").html(), + ajaxSendAfter: function (json) { + fullMarks = json.bean.fullMarks; + matchingLanguage(); + form.render(); + } + }); + + if (!isNull(id)) { + AjaxPostUtil.request({url: sysMainMation.schoolBasePath + "queryAssignmentSubById", params: {id: id}, type: 'json', method: 'GET', callback: function (json) { + $("#score").val(json.bean.score); + $("#comment").val(json.bean.comment); + matchingLanguage(); + form.render(); + }}); + } + + form.on('submit(formAddBean)', function (data) { + if($("#score").val()>fullMarks ){ + winui.window.msg('请输入正确评分', {icon: 2, time: 2000}); + console.log(fullMarks) + console.log($("#score").val()) + return false; } + if (winui.verifyForm(data.elem)) { + let params = { + id: id, + score: $("#score").val(), + comment: $("#comment").val(), + } + AjaxPostUtil.request({ + url: sysMainMation.schoolBasePath + "readOverAssignmentSubById", + params: params, + type: 'json', + method: 'POST', + callback: function (json) { + parent.layer.close(index); + parent.refreshCode = '0'; + }}); + } + return false; }); + $("body").on("click", "#cancle", function() { + parent.layer.close(index); + }); }); \ No newline at end of file diff --git a/school/src/main/resources/template/js/homework/hasSubmit.js b/school/src/main/resources/template/js/homework/hasSubmit.js index db3fd0a2c8c10088c97931c39a55013576ee5e02..c1ce0bc739de1f8136cf761a4f699f6a16d0ea1f 100644 --- a/school/src/main/resources/template/js/homework/hasSubmit.js +++ b/school/src/main/resources/template/js/homework/hasSubmit.js @@ -24,13 +24,13 @@ layui.config({ cols: [[ { title: systemLanguage["com.skyeye.serialNumber"][languageType], type: 'numbers' }, { field: 'name', title: '姓名', align: 'left', width: 150, templet: function(d) { - return getNotUndefinedVal(d.createMation?.name); + return getNotUndefinedVal(d.createMation?.name); }}, { field: 'accountNumber', title: '学号', align: 'left', width: 180, templet: function(d) { - return getNotUndefinedVal(d.createMation?.accountNumber); + return getNotUndefinedVal(d.createMation?.accountNumber); }}, { field: 'content', title: '内容', align: 'left', width: 180, templet: function (d) { - return '' + d.content + ''; + return '' + d.content + ''; }}, { field: 'state', title: '状态', align: 'left',width: 150, templet: function(d) { var str = ''; @@ -77,7 +77,7 @@ layui.config({ //批改 function correct(data) { parent.parent._openNewWindows({ - url: '../../tpl/homework/correct.html?id=' + data.id, + url: '../../tpl/homework/correct.html?id=' + data.id+ '&assignmentId=' + assignmentId, title: '作业批改', pageId: "homeworkCorrect", area: ['90vw', '90vh'], diff --git a/school/src/main/resources/template/js/material/write.js b/school/src/main/resources/template/js/material/write.js index ba280fcbf4302ebb3164d6ae3aa136fd6c3be417..abaa7e93724dd3662992fc6977c4a770b288d7b3 100644 --- a/school/src/main/resources/template/js/material/write.js +++ b/school/src/main/resources/template/js/material/write.js @@ -32,7 +32,7 @@ layui.config({ url: sysMainMation.schoolBasePath + "queryDatumById", params: {id: id}, type: 'json', - method: 'GET', + method: 'POST', callback: function (json) { let data = json.bean; dsFormUtil.initEditPageForStatic('content', 'FP2024072000002', data, { diff --git a/school/src/main/resources/template/js/topic/details.js b/school/src/main/resources/template/js/topic/details.js index 306d9b374fc0e1b741985171bd2521184247b96c..5b1b15dbbdb41c5ef717fca36b74df4de2319645 100644 --- a/school/src/main/resources/template/js/topic/details.js +++ b/school/src/main/resources/template/js/topic/details.js @@ -62,7 +62,7 @@ layui.config({ function del(data, obj) { layer.confirm(systemLanguage["com.skyeye.deleteOperationMsg"][languageType], {icon: 3, title: systemLanguage["com.skyeye.deleteOperation"][languageType]}, function (index) { layer.close(index); - AjaxPostUtil.request({url: sysMainMation.schoolBasePath + "deleteTopicById", params: {id: data.id}, type: 'json', method: 'DELETE', callback: function (json) { + AjaxPostUtil.request({url: sysMainMation.schoolBasePath + "deleteTopicCommentById", params: {id: data.id}, type: 'json', method: 'DELETE', callback: function (json) { winui.window.msg(systemLanguage["com.skyeye.deleteOperationSuccessMsg"][languageType], {icon: 1, time: 2000}); loadTable(); }}); diff --git a/school/src/main/resources/template/tpl/homework/correct.html b/school/src/main/resources/template/tpl/homework/correct.html index 5667eb6a3e3dd4890c2313a0600bb86010106e79..e254d79fd4146df2864564b887d0d4ec388026e6 100644 --- a/school/src/main/resources/template/tpl/homework/correct.html +++ b/school/src/main/resources/template/tpl/homework/correct.html @@ -9,16 +9,42 @@
-
-
-
- - -
-
+
+ +