diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LR_Desktop/Controllers/PsychologyReplyInfoController.cs b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LR_Desktop/Controllers/PsychologyReplyInfoController.cs index 408abae4a..334aa7d33 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LR_Desktop/Controllers/PsychologyReplyInfoController.cs +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LR_Desktop/Controllers/PsychologyReplyInfoController.cs @@ -72,6 +72,15 @@ namespace Learun.Application.Web.Areas.LR_Desktop.Controllers return View(); } /// + /// 学工处心理老师 + /// + /// + [HttpGet] + public ActionResult Index4() + { + return View(); + } + /// /// 心理总站负责人 /// /// diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LR_Desktop/Views/PsychologyReplyInfo/Index4.cshtml b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LR_Desktop/Views/PsychologyReplyInfo/Index4.cshtml new file mode 100644 index 000000000..894fcf9b9 --- /dev/null +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LR_Desktop/Views/PsychologyReplyInfo/Index4.cshtml @@ -0,0 +1,70 @@ +@{ + ViewBag.Title = "心理咨询回复(分院心理辅导站负责人)"; + Layout = "~/Views/Shared/_Index.cshtml"; +} +
+
+
+
+
+
+
+
+
+
+
+
+
学号
+ +
+
+
姓名
+ +
+
+
系部
+
+
+
+
专业
+
+
+
+
班级
+
+
+
+
身份证号
+ +
+
+
回复人
+
+
+
+
回复内容
+ +
+ +
+
+
+
+
+
+ +
+ +
+
+
+
+
+
+@Html.AppendJsFile("/Areas/LR_Desktop/Views/PsychologyReplyInfo/Index4.js") diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LR_Desktop/Views/PsychologyReplyInfo/Index4.js b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LR_Desktop/Views/PsychologyReplyInfo/Index4.js new file mode 100644 index 000000000..f55df2b7f --- /dev/null +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LR_Desktop/Views/PsychologyReplyInfo/Index4.js @@ -0,0 +1,243 @@ +/* * 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架(http://www.learun.cn) + * Copyright (c) 2013-2020 力软信息技术(苏州)有限公司 + * 创建人:超级管理员 + * 日 期:2023-03-06 12:21 + * 描 述:心理咨询回复(学工处心理老师) + */ +var refreshGirdData; +var bootstrap = function ($, learun) { + "use strict"; + var startTime; + var endTime; + var page = { + init: function () { + page.initGird(); + page.bind(); + }, + bind: function () { + // 时间搜索框 + $('#datesearch').lrdate({ + dfdata: [ + { name: '今天', begin: function () { return learun.getDate('yyyy-MM-dd 00:00:00') }, end: function () { return learun.getDate('yyyy-MM-dd 23:59:59') } }, + { name: '近7天', begin: function () { return learun.getDate('yyyy-MM-dd 00:00:00', 'd', -6) }, end: function () { return learun.getDate('yyyy-MM-dd 23:59:59') } }, + { name: '近1个月', begin: function () { return learun.getDate('yyyy-MM-dd 00:00:00', 'm', -1) }, end: function () { return learun.getDate('yyyy-MM-dd 23:59:59') } }, + { name: '近3个月', begin: function () { return learun.getDate('yyyy-MM-dd 00:00:00', 'm', -3) }, end: function () { return learun.getDate('yyyy-MM-dd 23:59:59') } } + ], + // 月 + mShow: false, + premShow: false, + // 季度 + jShow: false, + prejShow: false, + // 年 + ysShow: false, + yxShow: false, + preyShow: false, + yShow: false, + // 默认 + dfvalue: '1', + selectfn: function (begin, end) { + startTime = begin; + endTime = end; + page.search(); + } + }); + $('#multiple_condition_query').lrMultipleQuery(function (queryJson) { + page.search(queryJson); + }, 220, 400); + $('#DeptNo').lrDataSourceSelect({ code: 'CdDeptInfo', value: 'deptno', text: 'deptname' }); + $('#MajorNo').lrDataSourceSelect({ code: 'CdMajorInfo', value: 'majorno', text: 'majorname' }); + $('#ClassNo').lrDataSourceSelect({ code: 'bjsj', value: 'classno', text: 'classname' }); + $('#ReplyUser').lrDataSourceSelect({ code: 'TeacherInfo', value: 'f_account', text: 'f_realname' }); + // 刷新 + $('#lr_refresh').on('click', function () { + location.reload(); + }); + // 新增 + $('#lr_add').on('click', function () { + learun.layerForm({ + id: 'form', + title: '新增', + url: top.$.rootUrl + '/LR_Desktop/PsychologyReplyInfo/Form', + width: 800, + height: 700, + callBack: function (id) { + return top[id].acceptClick(refreshGirdData); + } + }); + }); + // 查看 + $('#lr_view').on('click', function () { + var PsychologyInfoId = $('#gridtable').jfGridValue('PsychologyInfoId'); + if (learun.checkrow(PsychologyInfoId)) { + learun.layerForm({ + id: 'formview', + title: '查看', + url: top.$.rootUrl + '/LR_Desktop/PsychologyReplyInfo/FormView?PsychologyInfoId=' + PsychologyInfoId + '&type=' + 4, + width: 800, + height: 700, + btn: null, + callBack: function (id) { + return top[id].acceptClick(refreshGirdData); + } + }); + } + }); + + // 编辑 + $('#lr_edit').on('click', function () { + var keyValue = $('#gridtable').jfGridValue('Id'); + //主表Id + var PsychologyInfoId = $('#gridtable').jfGridValue('PsychologyInfoId'); + var State = $('#gridtable').jfGridValue('State'); + + if (State == 7) { + learun.alert.warning('该记录已归档!'); + return false; + } + if (State != 4) { + learun.alert.warning('当前由其他老师审核!'); + return false; + } + if (learun.checkrow(PsychologyInfoId)) { + learun.layerForm({ + id: 'form', + title: '回复', + url: top.$.rootUrl + '/LR_Desktop/PsychologyReplyInfo/Form?keyValue=' + keyValue, + width: 800, + height: 700, + callBack: function (id) { + return top[id].acceptClick(refreshGirdData); + } + }); + + + } + }); + // 删除 + $('#lr_delete').on('click', function () { + var keyValue = $('#gridtable').jfGridValue('Id'); + if (learun.checkrow(keyValue)) { + learun.layerConfirm('是否确认删除该项!', function (res) { + if (res) { + learun.deleteForm(top.$.rootUrl + '/LR_Desktop/PsychologyReplyInfo/DeleteForm', { keyValue: keyValue }, function () { + refreshGirdData(); + }); + } + }); + } + }); + // 打印 + $('#lr_print').on('click', function () { + $('#gridtable').jqprintTable(); + }); + }, + // 初始化列表 + initGird: function () { + $('#gridtable').jfGrid({ + url: top.$.rootUrl + '/LR_Desktop/PsychologyReplyInfo/GetPageList', + headData: [ + { label: "学号", name: "StuNo", width: 100, align: "left" }, + { label: "学生姓名", name: "StuName", width: 100, align: "left" }, + { label: "提交日期", name: "SubmitTime", width: 150, align: "left" }, + { + label: "系", name: "DeptNo", width: 100, align: "left", + formatterAsync: function (callback, value, row, op, $cell) { + learun.clientdata.getAsync('custmerData', { + url: '/LR_SystemModule/DataSource/GetDataTable?code=' + 'CdDeptInfo', + key: value, + keyId: 'deptno', + callback: function (_data) { + callback(_data['deptname']); + } + }); + } + }, + { + label: "专业", name: "MajorNo", width: 100, align: "left", + formatterAsync: function (callback, value, row, op, $cell) { + learun.clientdata.getAsync('custmerData', { + url: '/LR_SystemModule/DataSource/GetDataTable?code=' + 'CdMajorInfo', + key: value, + keyId: 'majorno', + callback: function (_data) { + callback(_data['majorname']); + } + }); + } + }, + { + label: "班级", name: "ClassNo", width: 100, align: "left", + formatterAsync: function (callback, value, row, op, $cell) { + learun.clientdata.getAsync('custmerData', { + url: '/LR_SystemModule/DataSource/GetDataTable?code=' + 'bjsj', + key: value, + keyId: 'classno', + callback: function (_data) { + callback(_data['classname']); + } + }); + } + }, + { label: "身份证号", name: "IdentityCardNo", width: 100, align: "left" }, + { + label: "是否单亲", name: "IsSingle", width: 100, align: "left", + formatter: function (value, row) { + if (value == true) { + return '是'; + } + else if (value == false) { + return '否'; + } + } + }, + { label: "咨询内容", name: "Concent", width: 100, align: "left" }, + { + label: "最终回复人", name: "ReplyUser", width: 100, align: "left", + formatterAsync: function (callback, value, row, op, $cell) { + learun.clientdata.getAsync('custmerData', { + url: '/LR_SystemModule/DataSource/GetDataTable?code=' + 'TeacherInfo', + key: value, + keyId: 'f_account', + callback: function (_data) { + callback(_data['f_realname']); + } + }); + } + }, + + { label: "回复内容", name: "ReplyContent", width: 100, align: "left" }, + { label: "回复日期", name: "ReplyTime", width: 150, align: "left" }, + { + label: "状态", name: "State", width: 100, align: "left", + formatter: function (cellvalue) { + if (cellvalue == 4) { + return "待回复"; + } else if (cellvalue == 7) { + return "已归档"; + //return "未发布"; + } else { + return "其他老师审核"; + } + } + }, + ], + mainId: 'Id', + isPage: true, + sidx: 'SubmitTime', + sord: 'ASC' + }); + //page.search(); + }, + search: function (param) { + param = param || {}; + param.StartTime = startTime; + param.EndTime = endTime; + $('#gridtable').jfGridSet('reload', { queryJson: JSON.stringify(param), type: 4 }); + } + }; + refreshGirdData = function () { + $('#gridtable').jfGridSet('reload'); + }; + page.init(); +} diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/PersonnelManagement/Views/TimeTable/IndexInEducation.cshtml b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/PersonnelManagement/Views/TimeTable/IndexInEducation.cshtml index 3b82817c5..9ad72d93a 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/PersonnelManagement/Views/TimeTable/IndexInEducation.cshtml +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/PersonnelManagement/Views/TimeTable/IndexInEducation.cshtml @@ -62,12 +62,12 @@ border-right: 1px solid #333; } - .perWeek li { - width: 12.5%; - float: left; - border-left: 1px solid #333; - height: 100%; - } + .perWeek li { + width: 12.5%; + float: left; + border-left: 1px solid #333; + height: 100%; + } .perFestivalsBox { border-left: 1px solid #333; @@ -76,29 +76,28 @@ text-align: center; } - .perFestivalsBox table { - display: block; - width: 100%; - text-align: center; - } - - .perFestivalsBox td { - border-left: 1px solid #333; - border-top: 1px solid #333; - padding: 1px; - width: 12.5%; - font-size: 12px; - } - - .perFestivalsBox td div { - min-height: 16px; - line-height: 16px; - } - - .perFestivalsBox td:first-child, .perWeek li:first-child { - border-left: 0; - } - + .perFestivalsBox table { + display: block; + width: 100%; + text-align: center; + } + + .perFestivalsBox td { + border-left: 1px solid #333; + border-top: 1px solid #333; + padding: 1px; + width: 12.5%; + font-size: 12px; + } + + .perFestivalsBox td div { + min-height: 16px; + line-height: 16px; + } + + .perFestivalsBox td:first-child, .perWeek li:first-child { + border-left: 0; + } \n\n", + body: "_body_" + } + }; + var options = { + maxWidth: 624 + }; + // Clone selected element before manipulating it + var markup = $(this).clone(); + + // Remove hidden elements from the output + markup.each(function() { + var self = $(this); + if (self.is(':hidden')) + self.remove(); + }); + + // Embed all images using Data URLs + var images = Array(); + var img = markup.find('img'); + for (var i = 0; i < img.length; i++) { + // Calculate dimensions of output image + var w = Math.min(img[i].width, options.maxWidth); + var h = img[i].height * (w / img[i].width); + // Create canvas for converting image to data URL + var canvas = document.createElement("CANVAS"); + canvas.width = w; + canvas.height = h; + // Draw image to canvas + var context = canvas.getContext('2d'); + context.drawImage(img[i], 0, 0, w, h); + // Get data URL encoding of image + var uri = canvas.toDataURL("image/png"); + $(img[i]).attr("src", img[i].src); + img[i].width = w; + img[i].height = h; + // Save encoded image to array + images[i] = { + type: uri.substring(uri.indexOf(":") + 1, uri.indexOf(";")), + encoding: uri.substring(uri.indexOf(";") + 1, uri.indexOf(",")), + location: $(img[i]).attr("src"), + data: uri.substring(uri.indexOf(",") + 1) + }; + } + + // Prepare bottom of mhtml file with image data + var mhtmlBottom = "\n"; + for (var i = 0; i < images.length; i++) { + mhtmlBottom += "--NEXT.ITEM-BOUNDARY\n"; + mhtmlBottom += "Content-Location: " + images[i].location + "\n"; + mhtmlBottom += "Content-Type: " + images[i].type + "\n"; + mhtmlBottom += "Content-Transfer-Encoding: " + images[i].encoding + "\n\n"; + mhtmlBottom += images[i].data + "\n\n"; + } + mhtmlBottom += "--NEXT.ITEM-BOUNDARY--"; + + //TODO: load css from included stylesheet + var styles = ""; + + // Aggregate parts of the file together + var fileContent = static.mhtml.top.replace("_html_", static.mhtml.head.replace("_styles_", styles) + static.mhtml.body.replace("_body_", markup.html())) + mhtmlBottom; + + // Create a Blob with the file contents + var blob = new Blob([fileContent], { + type: "application/msword;charset=utf-8" + }); + saveAs(blob, fileName + ".doc"); + }; + })(jQuery); +} else { + if (typeof jQuery === "undefined") { + console.error("jQuery Word Export: missing dependency (jQuery)"); + } + if (typeof saveAs === "undefined") { + console.error("jQuery Word Export: missing dependency (FileSaver.js)"); + } +} diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Learun.Application.Web.csproj b/Learun.Framework.Ultimate V7/Learun.Application.Web/Learun.Application.Web.csproj index 7fb8465f2..8bd822289 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Learun.Application.Web.csproj +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Learun.Application.Web.csproj @@ -1512,6 +1512,7 @@ + @@ -8086,6 +8087,7 @@ + diff --git a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/LR_Desktop/PsychologyReplyInfo/PsychologyReplyInfoService.cs b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/LR_Desktop/PsychologyReplyInfo/PsychologyReplyInfoService.cs index ff2b752ca..f4a5b9fe6 100644 --- a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/LR_Desktop/PsychologyReplyInfo/PsychologyReplyInfoService.cs +++ b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/LR_Desktop/PsychologyReplyInfo/PsychologyReplyInfoService.cs @@ -138,7 +138,7 @@ where a.Id='{keyValue}'"; strSql.Append("SELECT "); strSql.Append(@" info.StuNo,info.createtime as SubmitTime,info.Concent -,t.ReplyUser,t.ReplyContent,t.ReplyTime,case when a.ReplyType is null then t.ReplyType else a.ReplyType end as ReplyType,t.url,info.[state],info.id as PsychologyInfoId ,info.url as StuUrl +,t.ReplyUser,t.ReplyContent,t.ReplyTime,a.ReplyType,t.url,info.[state],info.id as PsychologyInfoId ,info.url as StuUrl FROM PsychologyInfo info "); strSql.Append(@" join StuInfoBasic s on info.StuNo=s.StuNo left join (select * from PsychologyReplyInfo where ReplyType=2 )t on t.PsychologyInfoid=info.id @@ -188,7 +188,7 @@ where a.Id='{keyValue}'"; } /// - /// 班级辅导员审核 + /// 班级辅导员审核、分院心理辅导站负责人审核、学工处心理老师审核 /// /// 主键 /// 实体 @@ -240,8 +240,27 @@ where a.Id='{keyValue}'"; if (entity.ReplyType == "2")//回复 { - //修改状态 - entity.State = 7; + var sql = $@"INSERT INTO [dbo].[PsychologyReplyInfo] + ([Id] + ,[PsychologyInfoId] + ,[State] + ,[ReplyContent] + ,[ReplyType] + ,[Url] + ,[ReplyUser] + ,[ReplyTime] + ,[CreateTime]) + VALUES + (newid() + ,'{psychologyInfoId}' + ,'7' + ,NULL + ,NULL + ,NULL + ,NULL + ,NULL + ,getdate())"; + db.ExecuteBySql(sql); //修改主表state var updSql = $" update PsychologyInfo set [state]='7' where Id='{psychologyInfoId}'"; db.ExecuteBySql(updSql);