@@ -0,0 +1,247 @@ | |||||
using System; | |||||
using Learun.Util; | |||||
using System.Data; | |||||
using Learun.Application.TwoDevelopment.Ask; | |||||
using System.Web.Mvc; | |||||
using System.Collections.Generic; | |||||
using Learun.Application.TwoDevelopment.EducationalAdministration; | |||||
namespace Learun.Application.Web.Areas.Ask.Controllers | |||||
{ | |||||
/// <summary> | |||||
/// 版 本 Learun-ADMS-Ultimate V7.0.0 数字化智慧校园 | |||||
/// Copyright (c) 2013-2018 北京泉江科技有限公司 | |||||
/// 创 建:超级管理员 | |||||
/// 日 期:2019-04-23 15:50 | |||||
/// 描 述:教师问卷管理 | |||||
/// </summary> | |||||
public class Ask_MainOfTeacherController : MvcControllerBase | |||||
{ | |||||
private Ask_MainOfTeacherIBLL ask_MainOfTeacherIBLL = new Ask_MainOfTeacherBLL(); | |||||
#region 视图功能 | |||||
/// <summary> | |||||
/// 主页面 | |||||
/// <summary> | |||||
/// <returns></returns> | |||||
[HttpGet] | |||||
public ActionResult Index() | |||||
{ | |||||
return View(); | |||||
} | |||||
[HttpGet] | |||||
public ActionResult AnswerIndex() | |||||
{ | |||||
return View(); | |||||
} | |||||
[HttpGet] | |||||
public ActionResult TeacherIndex() | |||||
{ | |||||
var logininfo = LoginUserInfo.Get(); | |||||
ViewBag.EmpNo = logininfo.account; | |||||
ViewBag.EmpName = logininfo.realName; | |||||
return View(); | |||||
} | |||||
[HttpGet] | |||||
public ActionResult AnswerQuery() | |||||
{ | |||||
return View(); | |||||
} | |||||
[HttpGet] | |||||
public ActionResult Paper(string VID) | |||||
{ | |||||
ViewBag.EmpNo = LoginUserInfo.Get().account; | |||||
ViewBag.EmpName = LoginUserInfo.Get().realName; | |||||
if (!string.IsNullOrEmpty(VID)) | |||||
{ | |||||
var Ask_MainOfTeacher = ask_MainOfTeacherIBLL.GetAsk_MainOfTeacherEntityAndQuestions(VID); | |||||
return View(Ask_MainOfTeacher); | |||||
} | |||||
else | |||||
{ | |||||
return View(); | |||||
} | |||||
} | |||||
[HttpGet] | |||||
public ActionResult PaperAdminView(string VID) | |||||
{ | |||||
ViewBag.EmpNo = LoginUserInfo.Get().account; | |||||
ViewBag.EmpName = LoginUserInfo.Get().realName; | |||||
if (!string.IsNullOrEmpty(VID)) | |||||
{ | |||||
var Ask_MainOfTeacher = ask_MainOfTeacherIBLL.GetAsk_MainOfTeacherEntityAndQuestions(VID); | |||||
return View(Ask_MainOfTeacher); | |||||
} | |||||
else | |||||
{ | |||||
return View(); | |||||
} | |||||
} | |||||
[HttpGet] | |||||
public ActionResult PaperView(string VID,string EmpNo) | |||||
{ | |||||
if (!string.IsNullOrEmpty(VID)) | |||||
{ | |||||
var Ask_MainOfTeacher = ask_MainOfTeacherIBLL.GetAsk_MainOfTeacherEntityAndQuestionsResult(VID, EmpNo); | |||||
return View(Ask_MainOfTeacher); | |||||
} | |||||
else | |||||
{ | |||||
return View(); | |||||
} | |||||
} | |||||
/// <summary> | |||||
/// 表单页 | |||||
/// <summary> | |||||
/// <returns></returns> | |||||
[HttpGet] | |||||
public ActionResult Form() | |||||
{ | |||||
ViewBag.VSerial = "Table_" + CommonHelper.CreateNo(); | |||||
return View(); | |||||
} | |||||
#endregion | |||||
#region 获取数据 | |||||
/// <summary> | |||||
/// 获取页面显示列表数据 | |||||
/// <summary> | |||||
/// <param name="queryJson">查询参数</param> | |||||
/// <returns></returns> | |||||
[HttpGet] | |||||
[AjaxOnly] | |||||
public ActionResult GetPageList(string pagination, string queryJson) | |||||
{ | |||||
Pagination paginationobj = pagination.ToObject<Pagination>(); | |||||
var data = ask_MainOfTeacherIBLL.GetPageList(paginationobj, queryJson); | |||||
var jsonData = new | |||||
{ | |||||
rows = data, | |||||
total = paginationobj.total, | |||||
page = paginationobj.page, | |||||
records = paginationobj.records | |||||
}; | |||||
return Success(jsonData); | |||||
} | |||||
[HttpGet] | |||||
[AjaxOnly] | |||||
public ActionResult GetTeacherPageList(string pagination, string queryJson) | |||||
{ | |||||
Pagination paginationobj = pagination.ToObject<Pagination>(); | |||||
var data = ask_MainOfTeacherIBLL.GetTeacherPageList(paginationobj, queryJson); | |||||
var jsonData = new | |||||
{ | |||||
rows = data, | |||||
total = paginationobj.total, | |||||
page = paginationobj.page, | |||||
records = paginationobj.records | |||||
}; | |||||
return Success(jsonData); | |||||
} | |||||
[HttpGet] | |||||
[AjaxOnly] | |||||
public ActionResult GetAnswerPageList(string pagination, string queryJson) | |||||
{ | |||||
Pagination paginationobj = pagination.ToObject<Pagination>(); | |||||
var data = ask_MainOfTeacherIBLL.GetTeacherPageList(paginationobj, queryJson); | |||||
var jsonData = new | |||||
{ | |||||
rows = data, | |||||
total = paginationobj.total, | |||||
page = paginationobj.page, | |||||
records = paginationobj.records | |||||
}; | |||||
return Success(jsonData); | |||||
} | |||||
/// <summary> | |||||
/// 获取表单数据 | |||||
/// <summary> | |||||
/// <returns></returns> | |||||
[HttpGet] | |||||
[AjaxOnly] | |||||
public ActionResult GetFormData(string keyValue) | |||||
{ | |||||
var Ask_MainOfTeacherData = ask_MainOfTeacherIBLL.GetAsk_MainOfTeacherEntity(keyValue); | |||||
var jsonData = new | |||||
{ | |||||
Ask_MainOfTeacher = Ask_MainOfTeacherData, | |||||
}; | |||||
return Success(jsonData); | |||||
} | |||||
#endregion | |||||
#region 提交数据 | |||||
/// <summary> | |||||
/// 删除实体数据 | |||||
/// <param name="keyValue">主键</param> | |||||
/// <summary> | |||||
/// <returns></returns> | |||||
[HttpPost] | |||||
[AjaxOnly] | |||||
public ActionResult DeleteForm(string keyValue) | |||||
{ | |||||
ask_MainOfTeacherIBLL.DeleteEntity(keyValue); | |||||
return Success("删除成功!"); | |||||
} | |||||
[HttpPost] | |||||
[AjaxOnly] | |||||
public ActionResult SubmitForm(string keyValue) | |||||
{ | |||||
ask_MainOfTeacherIBLL.ChangeFormStatus(keyValue, true); | |||||
return Success("操作成功!"); | |||||
} | |||||
[HttpPost] | |||||
[AjaxOnly] | |||||
public ActionResult UnSubmitForm(string keyValue) | |||||
{ | |||||
ask_MainOfTeacherIBLL.ChangeFormStatus(keyValue, false); | |||||
return Success("操作成功!"); | |||||
} | |||||
/// <summary> | |||||
/// 保存实体数据(新增、修改) | |||||
/// <param name="keyValue">主键</param> | |||||
/// <summary> | |||||
/// <returns></returns> | |||||
[HttpPost] | |||||
[ValidateAntiForgeryToken] | |||||
[AjaxOnly] | |||||
public ActionResult SaveForm(string keyValue, string strEntity) | |||||
{ | |||||
var userinfo = LoginUserInfo.Get(); | |||||
Ask_MainOfTeacherEntity entity = strEntity.ToObject<Ask_MainOfTeacherEntity>(); | |||||
entity.UID = userinfo.userId; | |||||
entity.UName = userinfo.realName; | |||||
entity.VCreateTime = DateTime.Now; | |||||
entity.Status = false; | |||||
entity.SPVNum = 0; | |||||
entity.SPNum = 0; | |||||
entity.SClick = 0; | |||||
ask_MainOfTeacherIBLL.SaveEntity(keyValue, entity); | |||||
return Success("保存成功!"); | |||||
} | |||||
[HttpPost] | |||||
[ValidateAntiForgeryToken] | |||||
[AjaxOnly] | |||||
[ValidateInput(false)] | |||||
public ActionResult TeacherSubmitForm(string answerlist,string VID) | |||||
{ | |||||
var userinfo = LoginUserInfo.Get(); | |||||
List<Ask_QuestionResultEntity> entity = answerlist.ToObject<List<Ask_QuestionResultEntity>>(); | |||||
ask_MainOfTeacherIBLL.SaveAsk_QuestionResultEntity(entity, VID,userinfo.account,userinfo.realName, userinfo.iPAddress); | |||||
return Success("保存成功!"); | |||||
} | |||||
#endregion | |||||
} | |||||
} |
@@ -0,0 +1,38 @@ | |||||
@{ | |||||
ViewBag.Title = "教师问卷管理"; | |||||
Layout = "~/Views/Shared/_Index.cshtml"; | |||||
} | |||||
<div class="lr-layout "> | |||||
<div class="lr-layout-center"> | |||||
<div class="lr-layout-wrap lr-layout-wrap-notitle "> | |||||
<div class="lr-layout-tool"> | |||||
<div class="lr-layout-tool-left"> | |||||
<div class="lr-layout-tool-item"> | |||||
<div id="multiple_condition_query"> | |||||
<div class="lr-query-formcontent"> | |||||
<div class="col-xs-12 lr-form-item"> | |||||
<div class="lr-form-item-title">姓名</div> | |||||
<input id="EmpName" type="text" class="form-control" /> | |||||
</div> | |||||
<div class="col-xs-12 lr-form-item"> | |||||
<div class="lr-form-item-title">编号</div> | |||||
<input id="EmpNo" type="text" class="form-control" /> | |||||
</div> | |||||
</div> | |||||
</div> | |||||
</div> | |||||
</div> | |||||
<div class="lr-layout-tool-right"> | |||||
<div class=" btn-group btn-group-sm"> | |||||
<a id="lr_refresh" class="btn btn-default"><i class="fa fa-refresh"></i></a> | |||||
</div> | |||||
<div class=" btn-group btn-group-sm" learun-authorize="yes"> | |||||
<a id="lr_view" class="btn btn-default"><i class="fa fa-building-o"></i> 查看答卷</a> | |||||
</div> | |||||
</div> | |||||
</div> | |||||
<div class="lr-layout-body" id="gridtable"></div> | |||||
</div> | |||||
</div> | |||||
</div> | |||||
@Html.AppendJsFile("/Areas/Ask/Views/Ask_MainOfTeacher/AnswerIndex.js") |
@@ -0,0 +1,88 @@ | |||||
/* * 版 本 Learun-ADMS-Ultimate V7.0.0 数字化智慧校园(http://www.learun.cn) | |||||
* Copyright (c) 2013-2018 北京泉江科技有限公司 | |||||
* 创建人:超级管理员 | |||||
* 日 期:2019-04-23 15:50 | |||||
* 描 述:教师问卷管理 | |||||
*/ | |||||
var refreshGirdData; | |||||
var VID = request("VID"); | |||||
var bootstrap = function ($, learun) { | |||||
"use strict"; | |||||
var page = { | |||||
init: function () { | |||||
page.initGird(); | |||||
page.bind(); | |||||
}, | |||||
bind: function () { | |||||
$('#multiple_condition_query').lrMultipleQuery(function (queryJson) { | |||||
page.search(queryJson); | |||||
}, 220, 400); | |||||
// 刷新 | |||||
$('#lr_refresh').on('click', function () { | |||||
location.reload(); | |||||
}); | |||||
// 答题情况 | |||||
$('#lr_view').on('click', function () { | |||||
var keyValue = $('#gridtable').jfGridValue('VID'); | |||||
var EmpNo = $('#gridtable').jfGridValue('EmpNo'); | |||||
if (learun.checkrow(keyValue)) { | |||||
var Status = $('#gridtable').jfGridValue('IsAnswer'); | |||||
if (Status === false || Status === 'false') { | |||||
learun.alert.warning("当前项目未交卷!"); | |||||
return; | |||||
} | |||||
learun.frameTab.open({ F_ModuleId: 'paper' + keyValue, F_Icon: 'fa fa-window-maximize', F_FullName: '量表考核答卷', F_UrlAddress: '/Ask/Ask_MainOfTeacher/PaperView?VID=' + keyValue + '&EmpNo=' + EmpNo }); | |||||
} | |||||
}); | |||||
}, | |||||
// 初始化列表 | |||||
initGird: function () { | |||||
$('#gridtable').lrAuthorizeJfGrid({ | |||||
url: top.$.rootUrl + '/Ask/Ask_MainOfTeacher/GetAnswerPageList', | |||||
headData: [ | |||||
{ label: "姓名", name: "EmpName", width: 80, align: "left" }, | |||||
{ label: "编号", name: "EmpNo", width: 80, align: "left" }, | |||||
{ | |||||
label: "性别", name: "GenderNo", width: 80, align: "left", | |||||
formatter: function (cellvalue) { | |||||
return cellvalue.toLowerCase() === true || cellvalue.toLowerCase() == "true" ? "男" : "女"; | |||||
} | |||||
}, | |||||
{ | |||||
label: "考核部门", name: "DepartmentId", width: 150, align: "left", formatterAsync: function (callback, value, row, op, $cell) { | |||||
learun.clientdata.getAsync('custmerData', { | |||||
url: '/LR_SystemModule/DataSource/GetDataTable?code=' + 'classdata', | |||||
key: value, | |||||
keyId: 'id', | |||||
callback: function (_data) { | |||||
callback(_data['name']); | |||||
} | |||||
}); | |||||
} | |||||
}, | |||||
{ | |||||
label: "是否交卷", name: "IsAnswer", width: 80, align: "left", formatter: function (cellvalue) { | |||||
return cellvalue === true ? "<i class=\"fa fa-toggle-on\"></i>" : "<i class=\"fa fa-toggle-off\"></i>"; | |||||
} | |||||
}, | |||||
{ label: "得分", name: "TotalScore", width: 80, align: "left" } | |||||
], | |||||
mainId: 'EmpNo', | |||||
isPage: true, | |||||
sidx: 'TotalScore', | |||||
sord: 'DESC' | |||||
}); | |||||
page.search(); | |||||
}, | |||||
search: function (param) { | |||||
param = param || {}; | |||||
param.VID = VID; | |||||
param.Manager = true; | |||||
$('#gridtable').jfGridSet('reload', { queryJson: JSON.stringify(param) }); | |||||
} | |||||
}; | |||||
refreshGirdData = function () { | |||||
page.search(); | |||||
}; | |||||
page.init(); | |||||
} |
@@ -0,0 +1,46 @@ | |||||
@{ | |||||
ViewBag.Title = "教师问卷管理"; | |||||
Layout = "~/Views/Shared/_Index.cshtml"; | |||||
} | |||||
<div class="lr-layout "> | |||||
<div class="lr-layout-center"> | |||||
<div class="lr-layout-wrap lr-layout-wrap-notitle "> | |||||
<div class="lr-layout-tool"> | |||||
<div class="lr-layout-tool-left"> | |||||
<div class="lr-layout-tool-item"> | |||||
<div id="multiple_condition_query"> | |||||
<div class="lr-query-formcontent"> | |||||
<div class="col-xs-12 lr-form-item"> | |||||
<div class="lr-form-item-title">标题</div> | |||||
<input id="VTitle" type="text" class="form-control" /> | |||||
</div> | |||||
<div class="col-xs-12 lr-form-item"> | |||||
<div class="lr-form-item-title">问卷编号</div> | |||||
<input id="VSerial" type="text" class="form-control" /> | |||||
</div> | |||||
</div> | |||||
</div> | |||||
</div> | |||||
</div> | |||||
<div class="lr-layout-tool-right"> | |||||
<div class=" btn-group btn-group-sm"> | |||||
<a id="lr_refresh" class="btn btn-default"><i class="fa fa-refresh"></i></a> | |||||
</div> | |||||
<div class=" btn-group btn-group-sm" learun-authorize="yes"> | |||||
<a id="lr_add" class="btn btn-default"><i class="fa fa-plus"></i> 录入</a> | |||||
<a id="lr_edit" class="btn btn-default"><i class="fa fa-pencil-square-o"></i> 修改</a> | |||||
<a id="lr_delete" class="btn btn-default"><i class="fa fa-trash-o"></i> 删除</a> | |||||
<a id="lr_question" class="btn btn-default"><i class="fa fa-navicon"></i> 管理问题</a> | |||||
<a id="lr_answer" class="btn btn-default"><i class="fa fa-building-o"></i> 答题情况</a> | |||||
</div> | |||||
<div class=" btn-group btn-group-sm" learun-authorize="yes"> | |||||
<a id="lr_submit" class="btn btn-default"><i class="fa fa-lock"></i> 审核</a> | |||||
<a id="lr_unsubmit" class="btn btn-default"><i class="fa fa-unlock"></i> 去审核</a> | |||||
</div> | |||||
</div> | |||||
</div> | |||||
<div class="lr-layout-body" id="gridtable"></div> | |||||
</div> | |||||
</div> | |||||
</div> | |||||
@Html.AppendJsFile("/Areas/Ask/Views/Ask_MainOfTeacher/AnswerQuery.js") |
@@ -0,0 +1,217 @@ | |||||
/* * 版 本 Learun-ADMS-Ultimate V7.0.0 数字化智慧校园(http://www.learun.cn) | |||||
* Copyright (c) 2013-2018 北京泉江科技有限公司 | |||||
* 创建人:超级管理员 | |||||
* 日 期:2019-04-23 15:50 | |||||
* 描 述:教师问卷管理 | |||||
*/ | |||||
var refreshGirdData; | |||||
var ATId; | |||||
var bootstrap = function ($, learun) { | |||||
"use strict"; | |||||
var page = { | |||||
init: function () { | |||||
page.inittree(); | |||||
page.initGird(); | |||||
page.bind(); | |||||
}, | |||||
bind: function () { | |||||
$('#multiple_condition_query').lrMultipleQuery(function (queryJson) { | |||||
page.search(queryJson); | |||||
}, 220, 400); | |||||
// 刷新 | |||||
$('#lr_refresh').on('click', function () { | |||||
location.reload(); | |||||
}); | |||||
// 新增 | |||||
$('#lr_add').on('click', function () { | |||||
if (!ATId) { | |||||
learun.alert.warning('请选择分类!'); | |||||
return false; | |||||
} | |||||
learun.layerForm({ | |||||
id: 'form', | |||||
title: '新增', | |||||
url: top.$.rootUrl + '/Ask/Ask_MainOfTeacher/Form?ATId=' + ATId, | |||||
width: 780, | |||||
height: 560, | |||||
callBack: function (id) { | |||||
return top[id].acceptClick(refreshGirdData); | |||||
} | |||||
}); | |||||
}); | |||||
// 编辑 | |||||
$('#lr_edit').on('click', function () { | |||||
var keyValue = $('#gridtable').jfGridValue('VID'); | |||||
if (learun.checkrow(keyValue)) { | |||||
var Status = $('#gridtable').jfGridValue('Status'); | |||||
if (Status === true || Status == 'true') { | |||||
learun.alert.warning("当前项目已审核不能修改!"); | |||||
return; | |||||
} | |||||
learun.layerForm({ | |||||
id: 'form', | |||||
title: '编辑', | |||||
url: top.$.rootUrl + '/Ask/Ask_MainOfTeacher/Form?keyValue=' + keyValue, | |||||
width: 780, | |||||
height: 560, | |||||
callBack: function (id) { | |||||
return top[id].acceptClick(refreshGirdData); | |||||
} | |||||
}); | |||||
} | |||||
}); | |||||
// 删除 | |||||
$('#lr_delete').on('click', function () { | |||||
var keyValue = $('#gridtable').jfGridValue('VID'); | |||||
if (learun.checkrow(keyValue)) { | |||||
var Status = $('#gridtable').jfGridValue('Status'); | |||||
if (Status === true || Status == 'true') { | |||||
learun.alert.warning("当前项目已审核不能删除!"); | |||||
return; | |||||
} | |||||
learun.layerConfirm('是否确认删除该项!', function (res) { | |||||
if (res) { | |||||
learun.deleteForm(top.$.rootUrl + '/Ask/Ask_MainOfTeacher/DeleteForm', { keyValue: keyValue }, function () { | |||||
refreshGirdData(); | |||||
}); | |||||
} | |||||
}); | |||||
} | |||||
}); | |||||
// 管理问题 | |||||
$('#lr_question').on('click', function () { | |||||
var keyValue = $('#gridtable').jfGridValue('VID'); | |||||
if (learun.checkrow(keyValue)) { | |||||
var Status = $('#gridtable').jfGridValue('Status'); | |||||
if (Status === true || Status == 'true') { | |||||
learun.alert.warning("当前项目已审核不能修改!"); | |||||
return; | |||||
} | |||||
learun.layerForm({ | |||||
id: 'formquestion', | |||||
title: '管理问题', | |||||
url: top.$.rootUrl + '/Ask/Ask_Question/Index?VID=' + keyValue, | |||||
width: 980, | |||||
height: 760, | |||||
btn:null | |||||
}); | |||||
} | |||||
}); | |||||
// 答题情况 | |||||
$('#lr_answer').on('click', function () { | |||||
var keyValue = $('#gridtable').jfGridValue('VID'); | |||||
if (learun.checkrow(keyValue)) { | |||||
learun.layerForm({ | |||||
id: 'formanswer', | |||||
title: '答题情况', | |||||
url: top.$.rootUrl + '/Ask/Ask_MainOfTeacher/AnswerIndex?VID=' + keyValue, | |||||
width: 980, | |||||
height: 760, | |||||
btn:null | |||||
}); | |||||
} | |||||
}); | |||||
// 审核 | |||||
$('#lr_submit').on('click', function () { | |||||
var keyValue = $('#gridtable').jfGridValue('VID'); | |||||
if (learun.checkrow(keyValue)) { | |||||
var Status = $('#gridtable').jfGridValue('Status'); | |||||
if (Status === true || Status == 'true') { | |||||
learun.alert.warning("当前项目已审核!"); | |||||
return; | |||||
} | |||||
learun.layerConfirm('是否确认审核该项!', function (res) { | |||||
if (res) { | |||||
learun.postForm(top.$.rootUrl + '/Ask/Ask_MainOfTeacher/SubmitForm', { keyValue: keyValue }, function () { | |||||
refreshGirdData(); | |||||
}); | |||||
} | |||||
}); | |||||
} | |||||
}); | |||||
// 去审核 | |||||
$('#lr_unsubmit').on('click', function () { | |||||
var keyValue = $('#gridtable').jfGridValue('VID'); | |||||
if (learun.checkrow(keyValue)) { | |||||
var Status = $('#gridtable').jfGridValue('Status'); | |||||
if (Status !== true && Status !== 'true') { | |||||
learun.alert.warning("当前项目已去审核!"); | |||||
return; | |||||
} | |||||
learun.layerConfirm('是否确认去审核该项!', function (res) { | |||||
if (res) { | |||||
learun.postForm(top.$.rootUrl + '/Ask/Ask_MainOfTeacher/UnSubmitForm', { keyValue: keyValue }, function () { | |||||
refreshGirdData(); | |||||
}); | |||||
} | |||||
}); | |||||
} | |||||
}); | |||||
}, | |||||
inittree: function () { | |||||
$('#companyTree').lrtree({ | |||||
url: top.$.rootUrl + '/Ask/Ask_Type/GetAllTree', | |||||
nodeClick: page.treeNodeClick | |||||
}); | |||||
}, | |||||
treeNodeClick: function (item) { | |||||
ATId = item.id; | |||||
$('#titleinfo').text(item.text); | |||||
page.search(); | |||||
}, | |||||
// 初始化列表 | |||||
initGird: function () { | |||||
$('#gridtable').lrAuthorizeJfGrid({ | |||||
url: top.$.rootUrl + '/Ask/Ask_MainOfTeacher/GetPageList', | |||||
headData: [ | |||||
{ label: "问卷编号", name: "VSerial", width: 180, align: "left" }, | |||||
{ label: "标题", name: "VTitle", width: 200, align: "left" }, | |||||
{ | |||||
label: "类别", name: "ATId", width: 100, align: "left", | |||||
formatterAsync: function (callback, value, row, op, $cell) { | |||||
learun.clientdata.getAsync('custmerData', { | |||||
url: '/LR_SystemModule/DataSource/GetDataTable?code=' + 'Ask_Type', | |||||
key: value, | |||||
keyId: 'atid', | |||||
callback: function (_data) { | |||||
callback(_data['atname']); | |||||
} | |||||
}); | |||||
} | |||||
}, | |||||
{ label: "开始时间", name: "VStartTime", width: 100, align: "left" }, | |||||
{ label: "结束时间", name: "VStopTime", width: 100, align: "left" }, | |||||
{ label: "考核部门", name: "DepartmentIdsName", width: 150, align: "left" }, | |||||
{ label: "考核人数", name: "SPVNum", width: 80, align: "left" }, | |||||
{ label: "填写人数", name: "SPNum", width: 80, align: "left" }, | |||||
{ label: "点击热度", name: "SClick", width: 80, align: "left" }, | |||||
{ label: "排序", name: "VOrder", width: 80, align: "left" }, | |||||
{ | |||||
label: "是否匿名", name: "VHide", width: 100, align: "left", | |||||
formatter: function (cellvalue) { | |||||
return cellvalue == true ? "<i class=\"fa fa-toggle-on\"></i>" : "<i class=\"fa fa-toggle-off\"></i>"; | |||||
} | |||||
}, | |||||
{ | |||||
label: "审核标志", name: "Status", width: 100, align: "left", formatter: function (cellvalue) { | |||||
return cellvalue == true ? "<i class=\"fa fa-toggle-on\"></i>" : "<i class=\"fa fa-toggle-off\"></i>"; | |||||
} | |||||
} | |||||
], | |||||
mainId: 'VID', | |||||
isPage: true, | |||||
sidx:'VOrder' | |||||
}); | |||||
page.search(); | |||||
}, | |||||
search: function (param) { | |||||
param = param || {}; | |||||
param.ATId = ATId; | |||||
$('#gridtable').jfGridSet('reload', { queryJson: JSON.stringify(param) }); | |||||
} | |||||
}; | |||||
refreshGirdData = function () { | |||||
page.search(); | |||||
}; | |||||
page.init(); | |||||
} |
@@ -0,0 +1,48 @@ | |||||
@{ | |||||
ViewBag.Title = "教师问卷管理"; | |||||
Layout = "~/Views/Shared/_Form.cshtml"; | |||||
} | |||||
<script type="text/javascript"> | |||||
var NewVSerial = "@ViewBag.VSerial"; | |||||
</script> | |||||
<div class="lr-form-wrap"> | |||||
<div class="col-xs-12 lr-form-item" data-table="Ask_MainOfTeacher" > | |||||
<div class="lr-form-item-title">问卷编号</div> | |||||
<input id="VSerial" type="text" class="form-control" readonly="readonly" /> | |||||
</div> | |||||
<div class="col-xs-12 lr-form-item" data-table="Ask_MainOfTeacher" > | |||||
<div class="lr-form-item-title">标题<font face="宋体">*</font></div> | |||||
<input id="VTitle" type="text" class="form-control" isvalid="yes" checkexpession="NotNull" /> | |||||
</div> | |||||
<div class="col-xs-6 lr-form-item" data-table="Ask_MainOfTeacher"> | |||||
<div class="lr-form-item-title">类别<font face="宋体">*</font></div> | |||||
<div id="ATId" isvalid="yes" checkexpession="NotNull"></div> | |||||
<input id="ATName" type="hidden" /> | |||||
</div> | |||||
<div class="col-xs-6 lr-form-item" data-table="Ask_MainOfTeacher" > | |||||
<div class="lr-form-item-title">排序<font face="宋体">*</font></div> | |||||
<input id="VOrder" type="text" class="form-control" isvalid="yes" checkexpession="Num" /> | |||||
</div> | |||||
<div class="col-xs-6 lr-form-item" data-table="Ask_MainOfTeacher" > | |||||
<div class="lr-form-item-title">开始时间<font face="宋体">*</font></div> | |||||
<input id="VStartTime" type="text" class="form-control lr-input-wdatepicker" onfocus="WdatePicker({ maxDate:'#F{$dp.$D(\'VStopTime\')}',dateFmt:'yyyy-MM-dd',onpicked: function () { $('#VStartTime').trigger('change'); } })" isvalid="yes" checkexpession="NotNull" /> | |||||
</div> | |||||
<div class="col-xs-6 lr-form-item" data-table="Ask_MainOfTeacher" > | |||||
<div class="lr-form-item-title">结束时间<font face="宋体">*</font></div> | |||||
<input id="VStopTime" type="text" class="form-control lr-input-wdatepicker" onfocus="WdatePicker({ minDate:'#F{$dp.$D(\'VStartTime\')}',dateFmt:'yyyy-MM-dd',onpicked: function () { $('#VStopTime').trigger('change'); } })" isvalid="yes" checkexpession="NotNull" /> | |||||
</div> | |||||
<div class="col-xs-6 lr-form-item" data-table="Ask_MainOfTeacher"> | |||||
<div class="lr-form-item-title">考核部门</div> | |||||
<div id="DepartmentIds"></div> | |||||
<input id="DepartmentIdsName" type="hidden" /> | |||||
</div> | |||||
<div class="col-xs-6 lr-form-item" data-table="Ask_MainOfTeacher" > | |||||
<div class="lr-form-item-title">是否匿名<font face="宋体">*</font></div> | |||||
<div id="VHide" isvalid="yes" checkexpession="NotNull" ></div> | |||||
</div> | |||||
<div class="col-xs-12 lr-form-item" data-table="Ask_MainOfTeacher" > | |||||
<div class="lr-form-item-title">备注说明</div> | |||||
<textarea id="VContent" class="form-control" style="height:150px;" ></textarea> | |||||
</div> | |||||
</div> | |||||
@Html.AppendJsFile("/Areas/Ask/Views/Ask_MainOfTeacher/Form.js") |
@@ -0,0 +1,73 @@ | |||||
/* * 版 本 Learun-ADMS-Ultimate V7.0.0 数字化智慧校园(http://www.learun.cn) | |||||
* Copyright (c) 2013-2018 北京泉江科技有限公司 | |||||
* 创建人:超级管理员 | |||||
* 日 期:2019-04-23 15:50 | |||||
* 描 述:教师问卷管理 | |||||
*/ | |||||
var acceptClick; | |||||
var keyValue = request('keyValue'); | |||||
var pATId = request("ATId"); | |||||
var bootstrap = function ($, learun) { | |||||
"use strict"; | |||||
var page = { | |||||
init: function () { | |||||
$('.lr-form-wrap').lrscroll(); | |||||
page.bind(); | |||||
page.initData(); | |||||
}, | |||||
bind: function () { | |||||
$('#ATId').lrselect({ | |||||
type: 'tree', | |||||
// 展开最大高度 | |||||
maxHeight: 200, | |||||
// 是否允许搜索 | |||||
allowSearch: true, | |||||
// 访问数据接口地址 | |||||
url: top.$.rootUrl + '/Ask/Ask_Type/GetAllTree', | |||||
select: function(item) { | |||||
if (item != null && item != undefined) { | |||||
$("#ATName").val(item.text); | |||||
} | |||||
} | |||||
}); | |||||
if (!!pATId) { | |||||
$('#ATId').lrselectSet(pATId); | |||||
} | |||||
$('#DepartmentIds').lrDepartmentSelect({ type: 'treemultiple' }); | |||||
$('#VHide').lrDataItemSelect({ code: 'YesOrNoBit' }); | |||||
}, | |||||
initData: function () { | |||||
if (!!keyValue) { | |||||
$.lrSetForm(top.$.rootUrl + '/Ask/Ask_MainOfTeacher/GetFormData?keyValue=' + keyValue, | |||||
function (data) { | |||||
for (var id in data) { | |||||
if (!!data[id].length && data[id].length > 0) { | |||||
$('#' + id).jfGridSet('refreshdata', data[id]); | |||||
} else { | |||||
$('[data-table="' + id + '"]').lrSetFormData(data[id]); | |||||
} | |||||
} | |||||
}); | |||||
} else { | |||||
$("#VSerial").val(NewVSerial); | |||||
} | |||||
} | |||||
}; | |||||
// 保存数据 | |||||
acceptClick = function (callBack) { | |||||
if (!$('body').lrValidform()) { | |||||
return false; | |||||
} | |||||
$("#DepartmentIdsName").val($("#DepartmentIds").find(".lr-select-placeholder").text()); | |||||
var postData = { | |||||
strEntity: JSON.stringify($('body').lrGetFormData()) | |||||
}; | |||||
$.lrSaveForm(top.$.rootUrl + '/Ask/Ask_MainOfTeacher/SaveForm?keyValue=' + keyValue, postData, function (res) { | |||||
// 保存成功后才回调 | |||||
if (!!callBack) { | |||||
callBack(); | |||||
} | |||||
}); | |||||
}; | |||||
page.init(); | |||||
} |
@@ -0,0 +1,57 @@ | |||||
@{ | |||||
ViewBag.Title = "教师问卷管理"; | |||||
Layout = "~/Views/Shared/_Index.cshtml"; | |||||
} | |||||
<div class="lr-layout lr-layout-left-center" id="lr_layout"> | |||||
<div class="lr-layout-left"> | |||||
<div class="lr-layout-wrap"> | |||||
<div class="lr-layout-title lrlt ">分类</div> | |||||
<div id="companyTree" class="lr-layout-body"></div> | |||||
</div> | |||||
</div> | |||||
<div class="lr-layout-center"> | |||||
<div class="lr-layout-wrap"> | |||||
<div class="lr-layout-title"> | |||||
<span id="titleinfo" class="lrlt">未选择分类</span> - <span class="lrlt">分类信息</span> | |||||
</div> | |||||
<div class="lr-layout-tool"> | |||||
<div class="lr-layout-tool-left"> | |||||
<div class="lr-layout-tool-item"> | |||||
<div id="multiple_condition_query"> | |||||
<div class="lr-query-formcontent"> | |||||
<div class="col-xs-12 lr-form-item"> | |||||
<div class="lr-form-item-title">标题</div> | |||||
<input id="VTitle" type="text" class="form-control" /> | |||||
</div> | |||||
<div class="col-xs-12 lr-form-item"> | |||||
<div class="lr-form-item-title">问卷编号</div> | |||||
<input id="VSerial" type="text" class="form-control" /> | |||||
</div> | |||||
</div> | |||||
</div> | |||||
</div> | |||||
</div> | |||||
<div class="lr-layout-tool-right"> | |||||
<div class=" btn-group btn-group-sm"> | |||||
<a id="lr_refresh" class="btn btn-default"><i class="fa fa-refresh"></i></a> | |||||
</div> | |||||
<div class=" btn-group btn-group-sm" learun-authorize="yes"> | |||||
<a id="lr_add" class="btn btn-default"><i class="fa fa-plus"></i> 录入</a> | |||||
<a id="lr_edit" class="btn btn-default"><i class="fa fa-pencil-square-o"></i> 修改</a> | |||||
<a id="lr_delete" class="btn btn-default"><i class="fa fa-trash-o"></i> 删除</a> | |||||
<a id="lr_question" class="btn btn-default"><i class="fa fa-navicon"></i> 管理问题</a> | |||||
<a id="lr_answer" class="btn btn-default"><i class="fa fa-building-o"></i> 答题情况</a> | |||||
<a id="lr_analysis" class="btn btn-default"><i class="fa fa-building-o"></i> 结果分析</a> | |||||
<a id="lr_view" class="btn btn-default"><i class="fa fa-pencil-square-o"></i> 查看问卷</a> | |||||
</div> | |||||
<div class=" btn-group btn-group-sm" learun-authorize="yes"> | |||||
<a id="lr_submit" class="btn btn-default"><i class="fa fa-lock"></i> 审核</a> | |||||
<a id="lr_unsubmit" class="btn btn-default"><i class="fa fa-unlock"></i> 去审核</a> | |||||
</div> | |||||
</div> | |||||
</div> | |||||
<div class="lr-layout-body" id="gridtable"></div> | |||||
</div> | |||||
</div> | |||||
</div> | |||||
@Html.AppendJsFile("/Areas/Ask/Views/Ask_MainOfTeacher/Index.js") |
@@ -0,0 +1,237 @@ | |||||
/* * 版 本 Learun-ADMS-Ultimate V7.0.0 数字化智慧校园(http://www.learun.cn) | |||||
* Copyright (c) 2013-2018 北京泉江科技有限公司 | |||||
* 创建人:超级管理员 | |||||
* 日 期:2019-04-23 15:50 | |||||
* 描 述:教师问卷管理 | |||||
*/ | |||||
var refreshGirdData; | |||||
var ATId; | |||||
var bootstrap = function ($, learun) { | |||||
"use strict"; | |||||
var page = { | |||||
init: function () { | |||||
page.inittree(); | |||||
page.initGird(); | |||||
page.bind(); | |||||
}, | |||||
bind: function () { | |||||
$('#multiple_condition_query').lrMultipleQuery(function (queryJson) { | |||||
page.search(queryJson); | |||||
}, 220, 400); | |||||
// 刷新 | |||||
$('#lr_refresh').on('click', function () { | |||||
location.reload(); | |||||
}); | |||||
// 新增 | |||||
$('#lr_add').on('click', function () { | |||||
if (!ATId) { | |||||
learun.alert.warning('请选择分类!'); | |||||
return false; | |||||
} | |||||
learun.layerForm({ | |||||
id: 'form', | |||||
title: '新增', | |||||
url: top.$.rootUrl + '/Ask/Ask_MainOfTeacher/Form?ATId=' + ATId, | |||||
width: 780, | |||||
height: 560, | |||||
callBack: function (id) { | |||||
return top[id].acceptClick(refreshGirdData); | |||||
} | |||||
}); | |||||
}); | |||||
// 编辑 | |||||
$('#lr_edit').on('click', function () { | |||||
var keyValue = $('#gridtable').jfGridValue('VID'); | |||||
if (learun.checkrow(keyValue)) { | |||||
var Status = $('#gridtable').jfGridValue('Status'); | |||||
if (Status === true || Status == 'true') { | |||||
learun.alert.warning("当前项目已审核不能修改!"); | |||||
return; | |||||
} | |||||
learun.layerForm({ | |||||
id: 'form', | |||||
title: '编辑', | |||||
url: top.$.rootUrl + '/Ask/Ask_MainOfTeacher/Form?keyValue=' + keyValue, | |||||
width: 780, | |||||
height: 560, | |||||
callBack: function (id) { | |||||
return top[id].acceptClick(refreshGirdData); | |||||
} | |||||
}); | |||||
} | |||||
}); | |||||
// 删除 | |||||
$('#lr_delete').on('click', function () { | |||||
var keyValue = $('#gridtable').jfGridValue('VID'); | |||||
if (learun.checkrow(keyValue)) { | |||||
var Status = $('#gridtable').jfGridValue('Status'); | |||||
if (Status === true || Status == 'true') { | |||||
learun.alert.warning("当前项目已审核不能删除!"); | |||||
return; | |||||
} | |||||
learun.layerConfirm('是否确认删除该项!', function (res) { | |||||
if (res) { | |||||
learun.deleteForm(top.$.rootUrl + '/Ask/Ask_MainOfTeacher/DeleteForm', { keyValue: keyValue }, function () { | |||||
refreshGirdData(); | |||||
}); | |||||
} | |||||
}); | |||||
} | |||||
}); | |||||
// 管理问题 | |||||
$('#lr_question').on('click', function () { | |||||
var keyValue = $('#gridtable').jfGridValue('VID'); | |||||
if (learun.checkrow(keyValue)) { | |||||
var Status = $('#gridtable').jfGridValue('Status'); | |||||
if (Status === true || Status == 'true') { | |||||
learun.alert.warning("当前项目已审核不能修改!"); | |||||
return; | |||||
} | |||||
learun.layerForm({ | |||||
id: 'formquestion', | |||||
title: '管理问题', | |||||
url: top.$.rootUrl + '/Ask/Ask_Question/Index?VID=' + keyValue, | |||||
width: 980, | |||||
height: 760, | |||||
btn: null | |||||
}); | |||||
} | |||||
}); | |||||
// 结果分析 | |||||
$('#lr_analysis').on('click', function () { | |||||
var keyValue = $('#gridtable').jfGridValue('VID'); | |||||
if (learun.checkrow(keyValue)) { | |||||
learun.layerForm({ | |||||
id: 'formanalysis', | |||||
title: '结果分析', | |||||
url: top.$.rootUrl + '/Ask/Ask_Question/AnalysisIndex?VID=' + keyValue, | |||||
width: 1000, | |||||
height: 760, | |||||
btn: null | |||||
}); | |||||
} | |||||
}); | |||||
// 答题情况 | |||||
$('#lr_answer').on('click', function () { | |||||
var keyValue = $('#gridtable').jfGridValue('VID'); | |||||
if (learun.checkrow(keyValue)) { | |||||
learun.layerForm({ | |||||
id: 'formanswer', | |||||
title: '答题情况', | |||||
url: top.$.rootUrl + '/Ask/Ask_MainOfTeacher/AnswerIndex?VID=' + keyValue, | |||||
width: 980, | |||||
height: 760, | |||||
btn: null | |||||
}); | |||||
} | |||||
}); | |||||
$('#lr_view').on('click', function () { | |||||
var keyValue = $('#gridtable').jfGridValue('VID'); | |||||
if (learun.checkrow(keyValue)) { | |||||
top.learun.frameTab.open({ F_ModuleId: 'paper' + keyValue, F_Icon: 'fa fa-window-maximize', F_FullName: '量表考核答卷', F_UrlAddress: '/Ask/Ask_MainOfTeacher/PaperAdminView?VID=' + keyValue }); | |||||
} | |||||
}); | |||||
// 审核 | |||||
$('#lr_submit').on('click', function () { | |||||
var keyValue = $('#gridtable').jfGridValue('VID'); | |||||
if (learun.checkrow(keyValue)) { | |||||
var Status = $('#gridtable').jfGridValue('Status'); | |||||
if (Status === true || Status == 'true') { | |||||
learun.alert.warning("当前项目已审核!"); | |||||
return; | |||||
} | |||||
learun.layerConfirm('是否确认审核该项!', function (res) { | |||||
if (res) { | |||||
learun.postForm(top.$.rootUrl + '/Ask/Ask_MainOfTeacher/SubmitForm', { keyValue: keyValue }, function () { | |||||
refreshGirdData(); | |||||
}); | |||||
} | |||||
}); | |||||
} | |||||
}); | |||||
// 去审核 | |||||
$('#lr_unsubmit').on('click', function () { | |||||
var keyValue = $('#gridtable').jfGridValue('VID'); | |||||
if (learun.checkrow(keyValue)) { | |||||
var Status = $('#gridtable').jfGridValue('Status'); | |||||
if (Status !== true && Status !== 'true') { | |||||
learun.alert.warning("当前项目已去审核!"); | |||||
return; | |||||
} | |||||
learun.layerConfirm('是否确认去审核该项!', function (res) { | |||||
if (res) { | |||||
learun.postForm(top.$.rootUrl + '/Ask/Ask_MainOfTeacher/UnSubmitForm', { keyValue: keyValue }, function () { | |||||
refreshGirdData(); | |||||
}); | |||||
} | |||||
}); | |||||
} | |||||
}); | |||||
}, | |||||
inittree: function () { | |||||
$('#companyTree').lrtree({ | |||||
url: top.$.rootUrl + '/Ask/Ask_Type/GetAllTree', | |||||
nodeClick: page.treeNodeClick | |||||
}); | |||||
}, | |||||
treeNodeClick: function (item) { | |||||
ATId = item.id; | |||||
$('#titleinfo').text(item.text); | |||||
page.search(); | |||||
}, | |||||
// 初始化列表 | |||||
initGird: function () { | |||||
$('#gridtable').lrAuthorizeJfGrid({ | |||||
url: top.$.rootUrl + '/Ask/Ask_MainOfTeacher/GetPageList', | |||||
headData: [ | |||||
{ label: "问卷编号", name: "VSerial", width: 180, align: "left" }, | |||||
{ label: "标题", name: "VTitle", width: 200, align: "left" }, | |||||
{ | |||||
label: "类别", name: "ATId", width: 100, align: "left", | |||||
formatterAsync: function (callback, value, row, op, $cell) { | |||||
learun.clientdata.getAsync('custmerData', { | |||||
url: '/LR_SystemModule/DataSource/GetDataTable?code=' + 'Ask_Type', | |||||
key: value, | |||||
keyId: 'atid', | |||||
callback: function (_data) { | |||||
callback(_data['atname']); | |||||
} | |||||
}); | |||||
} | |||||
}, | |||||
{ label: "开始时间", name: "VStartTime", width: 100, align: "left" }, | |||||
{ label: "结束时间", name: "VStopTime", width: 100, align: "left" }, | |||||
{ label: "考核部门", name: "DepartmentIdsName", width: 150, align: "left" }, | |||||
{ label: "考核人数", name: "SPVNum", width: 80, align: "left" }, | |||||
{ label: "填写人数", name: "SPNum", width: 80, align: "left" }, | |||||
{ label: "点击热度", name: "SClick", width: 80, align: "left" }, | |||||
{ label: "排序", name: "VOrder", width: 80, align: "left" }, | |||||
{ | |||||
label: "是否匿名", name: "VHide", width: 100, align: "left", | |||||
formatter: function (cellvalue) { | |||||
return cellvalue == true ? "<i class=\"fa fa-toggle-on\"></i>" : "<i class=\"fa fa-toggle-off\"></i>"; | |||||
} | |||||
}, | |||||
{ | |||||
label: "审核标志", name: "Status", width: 100, align: "left", formatter: function (cellvalue) { | |||||
return cellvalue == true ? "<i class=\"fa fa-toggle-on\"></i>" : "<i class=\"fa fa-toggle-off\"></i>"; | |||||
} | |||||
} | |||||
], | |||||
mainId: 'VID', | |||||
isPage: true, | |||||
sidx: 'VOrder' | |||||
}); | |||||
page.search(); | |||||
}, | |||||
search: function (param) { | |||||
param = param || {}; | |||||
param.ATId = ATId; | |||||
$('#gridtable').jfGridSet('reload', { queryJson: JSON.stringify(param) }); | |||||
} | |||||
}; | |||||
refreshGirdData = function () { | |||||
page.search(); | |||||
}; | |||||
page.init(); | |||||
} |
@@ -0,0 +1,66 @@ | |||||
@{ | |||||
ViewBag.Title = "教师问卷管理"; | |||||
Layout = "~/Views/Shared/_Index.cshtml"; | |||||
} | |||||
@model Learun.Application.TwoDevelopment.Ask.Ask_MainOfTeacherEntity | |||||
<link href="~/Content/paper/css/common.css" rel="stylesheet" /> | |||||
<link href="~/Content/paper/dist/demo.css" rel="stylesheet" /> | |||||
<link href="~/Content/paper/css/index.css" rel="stylesheet" /> | |||||
<script src="~/Content/paper/dist/jquery.validator.min.js?local=zh-CN"></script> | |||||
<script type="text/javascript"> | |||||
$.lrToken = $('@Html.AntiForgeryToken()').val(); | |||||
</script> | |||||
<div class="warpper" style="background-color: #FFFFFF;"> | |||||
<!-- / index_sec1 --> | |||||
<div class="index_sec index_sec1"> | |||||
<input id="EmpNo" type="hidden" value="@ViewBag.EmpNo" /> | |||||
<input id="EmpName" type="hidden" value="@ViewBag.EmpName" /> | |||||
<div class="inSecTitle">@Model.VTitle</div> | |||||
<div class="inSecTime">@(Model.VStartTime.HasValue ? Model.VStartTime.Value.ToShortDateString() : "")~@(Model.VStopTime.HasValue ? Model.VStopTime.Value.ToShortDateString() : "")</div> | |||||
<div class="index_box"> | |||||
<form id="AskPaper"> | |||||
@foreach (var question in Model.Ask_Questions) | |||||
{ | |||||
<div class="signSec2Box"> | |||||
<div class="shenInput form-item"> | |||||
<div class="shenInputBox"> | |||||
<div class="signTxt">@question.QTitle @Html.Raw((question.QMust == true ? "<font style=\"color: red\">*</font>" : "")) @(question.QType == 2 && (question.QMin.HasValue) ? "最少选择" + question.QMin.Value + "项" : "") @(question.QType == 2 && (question.QMax.HasValue) ? "最多选择" + question.QMax.Value + "项" : "")</div> | |||||
<div class="inputRadioRow"> | |||||
@foreach (var questionitem in question.Ask_QuestionItems) | |||||
{ | |||||
<div class="inputRadioCol4"> | |||||
<i class="@(question.QType == 1 ? "inputRadio" : "inputCheck")" hasinput="@(questionitem.QShowText == true ? "yes" : "")"><input id="@questionitem.IID" qid="@question.QID" hasinput="@(questionitem.QShowText == true ? "yes" : "")" @(question.QMust == true ? "data-rule=" + (question.QTypeString == "input" ? "\"required;\"" : "\"checked;\"") + (question.QMin.HasValue ? "checked(" + question.QMin.Value + "~);" : "") + (question.QMax.HasValue ? "checked(~" + question.QMax.Value + ");" : "") : "") name="@question.QSerial" type="@question.QTypeString" class="xuanze" /></i> <span>@questionitem.ITitle</span> | |||||
</div> | |||||
} | |||||
</div> | |||||
</div> | |||||
</div> | |||||
@if (question.Ask_QuestionItems.Count(m => m.QShowText == true) > 0) | |||||
{ | |||||
<div class="shenInput form-item shenInput3"> | |||||
<span>@question.Ask_QuestionItems.FirstOrDefault(m => m.QShowText == true).ITitle</span> | |||||
<div class="shenInputBox shenInputBox1"> | |||||
<input id="@(question.Ask_QuestionItems.FirstOrDefault(m => m.QShowText == true).IID)Other" qid="@question.QID" type="text" name="@(question.QSerial)Other" class="inputTxt" data-rule="required(#@(question.Ask_QuestionItems.FirstOrDefault(m => m.QShowText == true).IID):checked)" /> | |||||
</div> | |||||
</div> | |||||
} | |||||
</div> | |||||
} | |||||
<div class="shenBtnBox"> | |||||
<div class="signTxt">本人声明在此报名表中填写的所有信息、 及提供与本表相关的一切资料均真实、准确</div> | |||||
<div class="shenRow"> | |||||
<div class="shenCol6"> | |||||
<div class="shenBtn">提 交</div> | |||||
</div> | |||||
</div> | |||||
</div> | |||||
</form> | |||||
</div> | |||||
</div> | |||||
<!-- / index_sec1 --> | |||||
</div> | |||||
@Html.AppendJsFile("/Areas/Ask/Views/Ask_MainOfTeacher/Paper.js") |
@@ -0,0 +1,77 @@ | |||||
/* * 版 本 Learun-ADMS-Ultimate V7.0.0 数字化智慧校园(http://www.learun.cn) | |||||
* Copyright (c) 2013-2018 北京泉江科技有限公司 | |||||
* 创建人:超级管理员 | |||||
* 日 期:2019-04-23 15:50 | |||||
* 描 述:教师问卷管理 | |||||
*/ | |||||
var refreshGirdData; | |||||
var VID = request("VID"); | |||||
var bootstrap = function ($, learun) { | |||||
"use strict"; | |||||
var page = { | |||||
init: function () { | |||||
$('.warpper').lrscroll(); | |||||
page.bind(); | |||||
}, | |||||
bind: function () { | |||||
$('.shenBtn').click(function () { | |||||
$('#AskPaper').trigger("validate"); | |||||
}); | |||||
//单选框 | |||||
$('.shenInputBox').on('click', | |||||
'.inputRadio', | |||||
function () { | |||||
if (!$(this).hasClass('active')) { | |||||
$(this).addClass('active').parents('.shenInputBox').find('.inputRadio').not($(this)) | |||||
.removeClass('active'); | |||||
judgeRideo($(this)); | |||||
} | |||||
}); | |||||
//多选框 | |||||
$('.inputCheck').click(function () { | |||||
if ($(this).hasClass('active')) { | |||||
$(this).removeClass('active'); | |||||
} else { | |||||
$(this).addClass('active'); | |||||
} | |||||
judgeRideo($(this)); | |||||
}); | |||||
//是否为其他选项判断 | |||||
function judgeRideo(obj) { | |||||
var parents = obj.parents('.signSec2Box'); | |||||
var inputs = parents.find('.shenInput3'); | |||||
if (parents.find("i[hasinput='yes']").hasClass('active')) { | |||||
inputs.css({ display: 'block' }); | |||||
} else { | |||||
inputs.css({ display: 'none' }); | |||||
} | |||||
} | |||||
$('#AskPaper').validator({ | |||||
timely: 2, | |||||
theme: 'yellow_right_effect', | |||||
valid: function (form) { | |||||
learun.layerConfirm('是否确认提交答案?', function (res) { | |||||
var answerlist = new Array(); | |||||
var strStuNo = $("#EmpNo").val(); | |||||
var strStuName = $("#EmpName").val(); | |||||
$(form).find("input.xuanze:checked").each(function (index, element) { | |||||
var itemvalue = { QID: $(this).attr("qid"), IID: $(this).attr("id"), UText: "", UID: strStuNo, UName:strStuName}; | |||||
if ($(this).attr("hasinput")=="yes") { | |||||
itemvalue.UText = $("#" + $(this).attr("id") + "Other").val(); | |||||
} | |||||
answerlist.push(itemvalue); | |||||
}); | |||||
if (res) { | |||||
learun.postForm(top.$.rootUrl + '/Ask/Ask_MainOfTeacher/TeacherSubmitForm', { answerlist: JSON.stringify(answerlist), VID: VID, "__RequestVerificationToken": $.lrToken }, function () { | |||||
learun.frameTab.parentIframe().refreshGirdData(); | |||||
learun.frameTab.close("paper" + VID); | |||||
}); | |||||
} | |||||
}); | |||||
} | |||||
}); | |||||
} | |||||
}; | |||||
page.init(); | |||||
} |
@@ -0,0 +1,57 @@ | |||||
@{ | |||||
ViewBag.Title = "教师问卷管理"; | |||||
Layout = "~/Views/Shared/_Index.cshtml"; | |||||
} | |||||
@model Learun.Application.TwoDevelopment.Ask.Ask_MainOfTeacherEntity | |||||
<link href="~/Content/paper/css/common.css" rel="stylesheet" /> | |||||
<link href="~/Content/paper/dist/demo.css" rel="stylesheet" /> | |||||
<link href="~/Content/paper/css/index.css" rel="stylesheet" /> | |||||
<script src="~/Content/paper/dist/jquery.validator.min.js?local=zh-CN"></script> | |||||
<script type="text/javascript"> | |||||
$.lrToken = $('@Html.AntiForgeryToken()').val(); | |||||
</script> | |||||
<div class="warpper" style="background-color: #FFFFFF;"> | |||||
<!-- / index_sec1 --> | |||||
<div class="index_sec index_sec1"> | |||||
<input id="EmpNo" type="hidden" value="@ViewBag.EmpNo" /> | |||||
<input id="EmpName" type="hidden" value="@ViewBag.EmpName" /> | |||||
<div class="inSecTitle">@Model.VTitle</div> | |||||
<div class="inSecTime">@(Model.VStartTime.HasValue ? Model.VStartTime.Value.ToShortDateString() : "")~@(Model.VStopTime.HasValue ? Model.VStopTime.Value.ToShortDateString() : "")</div> | |||||
<div class="index_box"> | |||||
<form id="AskPaper"> | |||||
@foreach (var question in Model.Ask_Questions) | |||||
{ | |||||
<div class="signSec2Box"> | |||||
<div class="shenInput form-item"> | |||||
<div class="shenInputBox"> | |||||
<div class="signTxt">@question.QTitle @Html.Raw((question.QMust == true ? "<font style=\"color: red\">*</font>" : "")) @(question.QType == 2 && (question.QMin.HasValue) ? "最少选择" + question.QMin.Value + "项" : "") @(question.QType == 2 && (question.QMax.HasValue) ? "最多选择" + question.QMax.Value + "项" : "")</div> | |||||
<div class="inputRadioRow"> | |||||
@foreach (var questionitem in question.Ask_QuestionItems) | |||||
{ | |||||
<div class="inputRadioCol4"> | |||||
<i class="@(question.QType == 1 ? "inputRadio" : "inputCheck")" hasinput="@(questionitem.QShowText == true ? "yes" : "")"><input id="@questionitem.IID" qid="@question.QID" hasinput="@(questionitem.QShowText == true ? "yes" : "")" @(question.QMust == true ? "data-rule=" + (question.QTypeString == "input" ? "\"required;\"" : "\"checked;\"") + (question.QMin.HasValue ? "checked(" + question.QMin.Value + "~);" : "") + (question.QMax.HasValue ? "checked(~" + question.QMax.Value + ");" : "") : "") name="@question.QSerial" type="@question.QTypeString" class="xuanze" /></i> <span>@questionitem.ITitle</span> | |||||
</div> | |||||
} | |||||
</div> | |||||
</div> | |||||
</div> | |||||
@if (question.Ask_QuestionItems.Count(m => m.QShowText == true) > 0) | |||||
{ | |||||
<div class="shenInput form-item shenInput3"> | |||||
<span>@question.Ask_QuestionItems.FirstOrDefault(m => m.QShowText == true).ITitle</span> | |||||
<div class="shenInputBox shenInputBox1"> | |||||
<input id="@(question.Ask_QuestionItems.FirstOrDefault(m => m.QShowText == true).IID)Other" qid="@question.QID" type="text" name="@(question.QSerial)Other" class="inputTxt" data-rule="required(#@(question.Ask_QuestionItems.FirstOrDefault(m => m.QShowText == true).IID):checked)" /> | |||||
</div> | |||||
</div> | |||||
} | |||||
</div> | |||||
} | |||||
</form> | |||||
</div> | |||||
</div> | |||||
<!-- / index_sec1 --> | |||||
</div> | |||||
@Html.AppendJsFile("/Areas/Ask/Views/Ask_MainOfTeacher/PaperAdminView.js") |
@@ -0,0 +1,77 @@ | |||||
/* * 版 本 Learun-ADMS-Ultimate V7.0.0 数字化智慧校园(http://www.learun.cn) | |||||
* Copyright (c) 2013-2018 北京泉江科技有限公司 | |||||
* 创建人:超级管理员 | |||||
* 日 期:2019-04-23 15:50 | |||||
* 描 述:教师问卷管理 | |||||
*/ | |||||
var refreshGirdData; | |||||
var VID = request("VID"); | |||||
var bootstrap = function ($, learun) { | |||||
"use strict"; | |||||
var page = { | |||||
init: function () { | |||||
$('.warpper').lrscroll(); | |||||
page.bind(); | |||||
}, | |||||
bind: function () { | |||||
$('.shenBtn').click(function () { | |||||
$('#AskPaper').trigger("validate"); | |||||
}); | |||||
//单选框 | |||||
$('.shenInputBox').on('click', | |||||
'.inputRadio', | |||||
function () { | |||||
if (!$(this).hasClass('active')) { | |||||
$(this).addClass('active').parents('.shenInputBox').find('.inputRadio').not($(this)) | |||||
.removeClass('active'); | |||||
judgeRideo($(this)); | |||||
} | |||||
}); | |||||
//多选框 | |||||
$('.inputCheck').click(function () { | |||||
if ($(this).hasClass('active')) { | |||||
$(this).removeClass('active'); | |||||
} else { | |||||
$(this).addClass('active'); | |||||
} | |||||
judgeRideo($(this)); | |||||
}); | |||||
//是否为其他选项判断 | |||||
function judgeRideo(obj) { | |||||
var parents = obj.parents('.signSec2Box'); | |||||
var inputs = parents.find('.shenInput3'); | |||||
if (parents.find("i[hasinput='yes']").hasClass('active')) { | |||||
inputs.css({ display: 'block' }); | |||||
} else { | |||||
inputs.css({ display: 'none' }); | |||||
} | |||||
} | |||||
$('#AskPaper').validator({ | |||||
timely: 2, | |||||
theme: 'yellow_right_effect', | |||||
valid: function (form) { | |||||
learun.layerConfirm('是否确认提交答案?', function (res) { | |||||
var answerlist = new Array(); | |||||
var strStuNo = $("#EmpNo").val(); | |||||
var strStuName = $("#EmpName").val(); | |||||
$(form).find("input.xuanze:checked").each(function (index, element) { | |||||
var itemvalue = { QID: $(this).attr("qid"), IID: $(this).attr("id"), UText: "", UID: strStuNo, UName:strStuName}; | |||||
if ($(this).attr("hasinput")=="yes") { | |||||
itemvalue.UText = $("#" + $(this).attr("id") + "Other").val(); | |||||
} | |||||
answerlist.push(itemvalue); | |||||
}); | |||||
if (res) { | |||||
learun.postForm(top.$.rootUrl + '/Ask/Ask_MainOfTeacher/TeacherSubmitForm', { answerlist: JSON.stringify(answerlist), VID: VID, "__RequestVerificationToken": $.lrToken }, function () { | |||||
learun.frameTab.parentIframe().refreshGirdData(); | |||||
learun.frameTab.close("paper" + VID); | |||||
}); | |||||
} | |||||
}); | |||||
} | |||||
}); | |||||
} | |||||
}; | |||||
page.init(); | |||||
} |
@@ -0,0 +1,56 @@ | |||||
@{ | |||||
ViewBag.Title = "教师问卷管理"; | |||||
Layout = "~/Views/Shared/_Index.cshtml"; | |||||
} | |||||
@model Learun.Application.TwoDevelopment.Ask.Ask_MainOfTeacherEntity | |||||
<link href="~/Content/paper/css/common.css" rel="stylesheet" /> | |||||
<link href="~/Content/paper/dist/demo.css" rel="stylesheet" /> | |||||
<link href="~/Content/paper/css/index.css" rel="stylesheet" /> | |||||
<script src="~/Content/paper/dist/jquery.validator.min.js?local=zh-CN"></script> | |||||
<script type="text/javascript"> | |||||
$.lrToken = $('@Html.AntiForgeryToken()').val(); | |||||
</script> | |||||
<div class="warpper" style="background-color: #FFFFFF;"> | |||||
<!-- / index_sec1 --> | |||||
<div class="index_sec index_sec1"> | |||||
<div class="inSecTitle">@Model.VTitle</div> | |||||
<div class="inSecTime">@(Model.VStartTime.HasValue ? Model.VStartTime.Value.ToShortDateString() : "")~@(Model.VStopTime.HasValue ? Model.VStopTime.Value.ToShortDateString() : "")</div> | |||||
<div class="index_box"> | |||||
<form id="AskPaper"> | |||||
@foreach (var question in Model.Ask_Questions) | |||||
{ | |||||
<div class="signSec2Box"> | |||||
<div class="shenInput form-item"> | |||||
<div class="shenInputBox"> | |||||
<div class="signTxt">@question.QTitle @Html.Raw((question.QMust == true ? "<font style=\"color: red\">*</font>" : "")) @(question.QType == 2 && (question.QMin.HasValue) ? "最少选择" + question.QMin.Value + "项" : "") @(question.QType == 2 && (question.QMax.HasValue) ? "最多选择" + question.QMax.Value + "项" : "")</div> | |||||
<div class="inputRadioRow"> | |||||
@foreach (var questionitem in question.Ask_QuestionItems) | |||||
{ | |||||
<div class="inputRadioCol4"> | |||||
<i class="@(question.QType == 1 ? "inputRadio" : "inputCheck")" hasinput="@(questionitem.QShowText == true ? "yes" : "")"><input id="@questionitem.IID" qid="@question.QID" hasinput="@(questionitem.QShowText == true ? "yes" : "")" @(question.QMust == true ? "data-rule=" + (question.QTypeString == "input" ? "\"required;\"" : "\"checked;\"") + (question.QMin.HasValue ? "checked(" + question.QMin.Value + "~);" : "") + (question.QMax.HasValue ? "checked(~" + question.QMax.Value + ");" : "") : "") name="@question.QSerial" type="@question.QTypeString" class="xuanze" @(questionitem.IsChecked?"checked=\"checked\"":"") /></i> <span>@questionitem.ITitle</span> | |||||
</div> | |||||
} | |||||
</div> | |||||
</div> | |||||
</div> | |||||
@if (question.Ask_QuestionItems.Count(m => m.QShowText == true) > 0) | |||||
{ | |||||
<div class="shenInput form-item shenInput3"> | |||||
<span>@question.Ask_QuestionItems.FirstOrDefault(m => m.QShowText == true).ITitle</span> | |||||
<div class="shenInputBox shenInputBox1"> | |||||
<input id="@(question.Ask_QuestionItems.FirstOrDefault(m => m.QShowText == true).IID)Other" qid="@question.QID" type="text" name="@(question.QSerial)Other" class="inputTxt" data-rule="required(#@(question.Ask_QuestionItems.FirstOrDefault(m => m.QShowText == true).IID):checked)" value="@(question.Ask_QuestionItems.FirstOrDefault(m => m.QShowText == true&&!string.IsNullOrEmpty(m.UText))!=null?question.Ask_QuestionItems.FirstOrDefault(m => m.QShowText == true&&!string.IsNullOrEmpty(m.UText)).UText:"")" /> | |||||
</div> | |||||
</div> | |||||
} | |||||
</div> | |||||
} | |||||
</form> | |||||
</div> | |||||
</div> | |||||
<!-- / index_sec1 --> | |||||
</div> | |||||
@Html.AppendJsFile("/Areas/Ask/Views/Ask_MainOfTeacher/PaperView.js") |
@@ -0,0 +1,55 @@ | |||||
/* * 版 本 Learun-ADMS-Ultimate V7.0.0 数字化智慧校园(http://www.learun.cn) | |||||
* Copyright (c) 2013-2018 北京泉江科技有限公司 | |||||
* 创建人:超级管理员 | |||||
* 日 期:2019-04-23 15:50 | |||||
* 描 述:教师问卷管理 | |||||
*/ | |||||
var refreshGirdData; | |||||
var VID = request("VID"); | |||||
var bootstrap = function ($, learun) { | |||||
"use strict"; | |||||
var page = { | |||||
init: function () { | |||||
$('.warpper').lrscroll(); | |||||
page.bind(); | |||||
}, | |||||
bind: function () { | |||||
//单选框 | |||||
$('.shenInputBox').on('click', | |||||
'.inputRadio', | |||||
function () { | |||||
if (!$(this).hasClass('active')) { | |||||
$(this).addClass('active').parents('.shenInputBox').find('.inputRadio').not($(this)) | |||||
.removeClass('active'); | |||||
judgeRideo($(this)); | |||||
} | |||||
}); | |||||
//多选框 | |||||
$('.inputCheck').click(function () { | |||||
if ($(this).hasClass('active')) { | |||||
$(this).removeClass('active'); | |||||
} else { | |||||
$(this).addClass('active'); | |||||
} | |||||
judgeRideo($(this)); | |||||
}); | |||||
//是否为其他选项判断 | |||||
function judgeRideo(obj) { | |||||
var parents = obj.parents('.signSec2Box'); | |||||
var inputs = parents.find('.shenInput3'); | |||||
if (parents.find("i[hasinput='yes']").hasClass('active')) { | |||||
inputs.css({ display: 'block' }); | |||||
} else { | |||||
inputs.css({ display: 'none' }); | |||||
} | |||||
} | |||||
$('form').find("input.xuanze:checked").each(function (index, element) { | |||||
if ($(this).attr("hasinput") == "yes") { | |||||
$("#" + $(this).attr("id") + "Other").parents(".shenInput3").css({ display: 'block' }); | |||||
} | |||||
}); | |||||
} | |||||
}; | |||||
page.init(); | |||||
} |
@@ -0,0 +1,42 @@ | |||||
@{ | |||||
ViewBag.Title = "教师问卷管理"; | |||||
Layout = "~/Views/Shared/_Index.cshtml"; | |||||
} | |||||
<script type="text/javascript"> | |||||
var EmpNo = '@ViewBag.EmpNo'; | |||||
</script> | |||||
<div class="lr-layout "> | |||||
<div class="lr-layout-center"> | |||||
<div class="lr-layout-wrap lr-layout-wrap-notitle "> | |||||
<div class="lr-layout-tool"> | |||||
<div class="lr-layout-tool-left"> | |||||
<div class="lr-layout-tool-item"> | |||||
<div id="multiple_condition_query"> | |||||
<div class="lr-query-formcontent"> | |||||
<div class="col-xs-12 lr-form-item"> | |||||
<div class="lr-form-item-title">标题</div> | |||||
<input id="VTitle" type="text" class="form-control" /> | |||||
</div> | |||||
<div class="col-xs-12 lr-form-item"> | |||||
<div class="lr-form-item-title">问卷编号</div> | |||||
<input id="VSerial" type="text" class="form-control" /> | |||||
</div> | |||||
</div> | |||||
</div> | |||||
</div> | |||||
</div> | |||||
<div class="lr-layout-tool-right"> | |||||
<div class=" btn-group btn-group-sm"> | |||||
<a id="lr_refresh" class="btn btn-default"><i class="fa fa-refresh"></i></a> | |||||
</div> | |||||
<div class=" btn-group btn-group-sm" learun-authorize="yes"> | |||||
<a id="lr_start" class="btn btn-default"><i class="fa fa-pencil-square-o"></i> 开始考核</a> | |||||
<a id="lr_view" class="btn btn-default"><i class="fa fa-pencil-square-o"></i> 查看答题情况</a> | |||||
</div> | |||||
</div> | |||||
</div> | |||||
<div class="lr-layout-body" id="gridtable"></div> | |||||
</div> | |||||
</div> | |||||
</div> | |||||
@Html.AppendJsFile("/Areas/Ask/Views/Ask_MainOfTeacher/TeacherIndex.js") |
@@ -0,0 +1,93 @@ | |||||
/* * 版 本 Learun-ADMS-Ultimate V7.0.0 数字化智慧校园(http://www.learun.cn) | |||||
* Copyright (c) 2013-2018 北京泉江科技有限公司 | |||||
* 创建人:超级管理员 | |||||
* 日 期:2019-04-23 15:50 | |||||
* 描 述:教师问卷管理 | |||||
*/ | |||||
var refreshGirdData; | |||||
var bootstrap = function ($, learun) { | |||||
"use strict"; | |||||
var page = { | |||||
init: function () { | |||||
page.initGird(); | |||||
page.bind(); | |||||
}, | |||||
bind: function () { | |||||
$('#multiple_condition_query').lrMultipleQuery(function (queryJson) { | |||||
page.search(queryJson); | |||||
}, 220, 400); | |||||
// 刷新 | |||||
$('#lr_refresh').on('click', function () { | |||||
location.reload(); | |||||
}); | |||||
$('#lr_start').on('click', function () { | |||||
var keyValue = $('#gridtable').jfGridValue('VID'); | |||||
if (learun.checkrow(keyValue)) { | |||||
var Status = $('#gridtable').jfGridValue('IsAnswer'); | |||||
if (Status === true || Status === 'true') { | |||||
learun.alert.warning("当前项目已交卷!"); | |||||
return; | |||||
} | |||||
top.learun.frameTab.open({ F_ModuleId: 'paper' + keyValue, F_Icon: 'fa fa-window-maximize', F_FullName: '量表考核答卷', F_UrlAddress: '/Ask/Ask_MainOfTeacher/Paper?VID=' + keyValue }); | |||||
} | |||||
}); | |||||
//查看 | |||||
$('#lr_view').on('click', function () { | |||||
var keyValue = $('#gridtable').jfGridValue('VID'); | |||||
var EmpNo = $('#gridtable').jfGridValue('EmpNo'); | |||||
if (learun.checkrow(keyValue)) { | |||||
var Status = $('#gridtable').jfGridValue('IsAnswer'); | |||||
if (Status === false || Status === 'false') { | |||||
learun.alert.warning("当前项目未交卷!"); | |||||
return; | |||||
} | |||||
top.learun.frameTab.open({ F_ModuleId: 'paper' + keyValue, F_Icon: 'fa fa-window-maximize', F_FullName: '量表考核答卷', F_UrlAddress: '/Ask/Ask_MainOfTeacher/PaperView?VID=' + keyValue + '&EmpNo=' + EmpNo }); | |||||
} | |||||
}); | |||||
}, | |||||
// 初始化列表 | |||||
initGird: function () { | |||||
$('#gridtable').lrAuthorizeJfGrid({ | |||||
url: top.$.rootUrl + '/Ask/Ask_MainOfTeacher/GetTeacherPageList', | |||||
headData: [ | |||||
{ label: "问卷编号", name: "VSerial", width: 180, align: "left" }, | |||||
{ label: "标题", name: "VTitle", width: 200, align: "left" }, | |||||
{ | |||||
label: "类别", name: "ATId", width: 100, align: "left", | |||||
formatterAsync: function (callback, value, row, op, $cell) { | |||||
learun.clientdata.getAsync('custmerData', { | |||||
url: '/LR_SystemModule/DataSource/GetDataTable?code=' + 'Ask_Type', | |||||
key: value, | |||||
keyId: 'atid', | |||||
callback: function (_data) { | |||||
callback(_data['atname']); | |||||
} | |||||
}); | |||||
} | |||||
}, | |||||
{ label: "开始时间", name: "VStartTime", width: 100, align: "left" }, | |||||
{ label: "结束时间", name: "VStopTime", width: 100, align: "left" }, | |||||
{ | |||||
label: "是否交卷", name: "IsAnswer", width: 80, align: "left", formatter: function (cellvalue) { | |||||
return cellvalue === true ? "<i class=\"fa fa-toggle-on\"></i>" : "<i class=\"fa fa-toggle-off\"></i>"; | |||||
} | |||||
}, | |||||
{ label: "考核评分", name: "TotalScore", width: 80, align: "left" }, | |||||
{ label: "提交时间", name: "CreateDate", width: 80, align: "left" } | |||||
], | |||||
mainId: 'VID', | |||||
isPage: true | |||||
}); | |||||
page.search(); | |||||
}, | |||||
search: function (param) { | |||||
param = param || {}; | |||||
param.EmpNo = EmpNo; | |||||
$('#gridtable').jfGridSet('reload', { queryJson: JSON.stringify(param) }); | |||||
} | |||||
}; | |||||
refreshGirdData = function () { | |||||
page.search(); | |||||
}; | |||||
page.init(); | |||||
} |
@@ -284,6 +284,7 @@ | |||||
<Compile Include="Areas\AppManager\AppManagerAreaRegistration.cs" /> | <Compile Include="Areas\AppManager\AppManagerAreaRegistration.cs" /> | ||||
<Compile Include="Areas\AppManager\Controllers\DTImgController.cs" /> | <Compile Include="Areas\AppManager\Controllers\DTImgController.cs" /> | ||||
<Compile Include="Areas\AppManager\Controllers\FunctionManagerController.cs" /> | <Compile Include="Areas\AppManager\Controllers\FunctionManagerController.cs" /> | ||||
<Compile Include="Areas\Ask\Controllers\Ask_MainOfTeacherController.cs" /> | |||||
<Compile Include="Areas\AssetManagementSystem\AssetManagementSystemAreaRegistration.cs" /> | <Compile Include="Areas\AssetManagementSystem\AssetManagementSystemAreaRegistration.cs" /> | ||||
<Compile Include="Areas\AssetManagementSystem\Controllers\AllocationController.cs" /> | <Compile Include="Areas\AssetManagementSystem\Controllers\AllocationController.cs" /> | ||||
<Compile Include="Areas\AssetManagementSystem\Controllers\AssReportController.cs" /> | <Compile Include="Areas\AssetManagementSystem\Controllers\AssReportController.cs" /> | ||||
@@ -826,6 +827,14 @@ | |||||
<Content Include="Areas\AppManager\Views\FunctionManager\Form.css" /> | <Content Include="Areas\AppManager\Views\FunctionManager\Form.css" /> | ||||
<Content Include="Areas\AppManager\Views\FunctionManager\Form.js" /> | <Content Include="Areas\AppManager\Views\FunctionManager\Form.js" /> | ||||
<Content Include="Areas\AppManager\Views\FunctionManager\Index.js" /> | <Content Include="Areas\AppManager\Views\FunctionManager\Index.js" /> | ||||
<Content Include="Areas\Ask\Views\Ask_MainOfTeacher\AnswerIndex.js" /> | |||||
<Content Include="Areas\Ask\Views\Ask_MainOfTeacher\AnswerQuery.js" /> | |||||
<Content Include="Areas\Ask\Views\Ask_MainOfTeacher\Form.js" /> | |||||
<Content Include="Areas\Ask\Views\Ask_MainOfTeacher\Index.js" /> | |||||
<Content Include="Areas\Ask\Views\Ask_MainOfTeacher\Paper.js" /> | |||||
<Content Include="Areas\Ask\Views\Ask_MainOfTeacher\PaperAdminView.js" /> | |||||
<Content Include="Areas\Ask\Views\Ask_MainOfTeacher\PaperView.js" /> | |||||
<Content Include="Areas\Ask\Views\Ask_MainOfTeacher\TeacherIndex.js" /> | |||||
<Content Include="Areas\Ask\Views\Ask_Question\AnalysisIndex.js" /> | <Content Include="Areas\Ask\Views\Ask_Question\AnalysisIndex.js" /> | ||||
<Content Include="Areas\AssetManagementSystem\Views\Allocation\Form.js" /> | <Content Include="Areas\AssetManagementSystem\Views\Allocation\Form.js" /> | ||||
<Content Include="Areas\AssetManagementSystem\Views\Allocation\Index.js" /> | <Content Include="Areas\AssetManagementSystem\Views\Allocation\Index.js" /> | ||||
@@ -7366,6 +7375,14 @@ | |||||
<Content Include="Areas\PersonnelManagement\Views\MeetingSignInRecord\FormViewAttendance.cshtml" /> | <Content Include="Areas\PersonnelManagement\Views\MeetingSignInRecord\FormViewAttendance.cshtml" /> | ||||
<Content Include="Areas\PersonnelManagement\Views\MeetingSignInRecord\Index.cshtml" /> | <Content Include="Areas\PersonnelManagement\Views\MeetingSignInRecord\Index.cshtml" /> | ||||
<Content Include="Areas\PersonnelManagement\Views\MeetingSignInRecord\IndexAttendance.cshtml" /> | <Content Include="Areas\PersonnelManagement\Views\MeetingSignInRecord\IndexAttendance.cshtml" /> | ||||
<Content Include="Areas\Ask\Views\Ask_MainOfTeacher\AnswerIndex.cshtml" /> | |||||
<Content Include="Areas\Ask\Views\Ask_MainOfTeacher\AnswerQuery.cshtml" /> | |||||
<Content Include="Areas\Ask\Views\Ask_MainOfTeacher\Form.cshtml" /> | |||||
<Content Include="Areas\Ask\Views\Ask_MainOfTeacher\Index.cshtml" /> | |||||
<Content Include="Areas\Ask\Views\Ask_MainOfTeacher\Paper.cshtml" /> | |||||
<Content Include="Areas\Ask\Views\Ask_MainOfTeacher\PaperAdminView.cshtml" /> | |||||
<Content Include="Areas\Ask\Views\Ask_MainOfTeacher\PaperView.cshtml" /> | |||||
<Content Include="Areas\Ask\Views\Ask_MainOfTeacher\TeacherIndex.cshtml" /> | |||||
<None Include="Properties\PublishProfiles\FolderProfile.pubxml" /> | <None Include="Properties\PublishProfiles\FolderProfile.pubxml" /> | ||||
<Content Include="Views\Login\Default-beifen.cshtml" /> | <Content Include="Views\Login\Default-beifen.cshtml" /> | ||||
<None Include="Properties\PublishProfiles\FolderProfile1.pubxml" /> | <None Include="Properties\PublishProfiles\FolderProfile1.pubxml" /> | ||||
@@ -0,0 +1,29 @@ | |||||
using Learun.Application.TwoDevelopment.Ask; | |||||
using System.Data.Entity.ModelConfiguration; | |||||
namespace Learun.Application.Mapping | |||||
{ | |||||
/// <summary> | |||||
/// 版 本 Learun-ADMS-Ultimate V7.0.0 数字化智慧校园 | |||||
/// Copyright (c) 2013-2018 北京泉江科技有限公司 | |||||
/// 创 建:超级管理员 | |||||
/// 日 期:2019-04-23 15:50 | |||||
/// 描 述:教师问卷管理 | |||||
/// </summary> | |||||
public class Ask_MainOfTeacherMap : EntityTypeConfiguration<Ask_MainOfTeacherEntity> | |||||
{ | |||||
public Ask_MainOfTeacherMap() | |||||
{ | |||||
#region 表、主键 | |||||
//表 | |||||
this.ToTable("ASK_MAINOFTEACHER"); | |||||
//主键 | |||||
this.HasKey(t => t.VID); | |||||
#endregion | |||||
#region 配置关系 | |||||
#endregion | |||||
} | |||||
} | |||||
} | |||||
@@ -61,6 +61,7 @@ | |||||
<Reference Include="System.Xml" /> | <Reference Include="System.Xml" /> | ||||
</ItemGroup> | </ItemGroup> | ||||
<ItemGroup> | <ItemGroup> | ||||
<Compile Include="Ask\Ask_MainOfTeacherMap.cs" /> | |||||
<Compile Include="AssetManagementSystem\Ass_InventoryItemApplyMap.cs" /> | <Compile Include="AssetManagementSystem\Ass_InventoryItemApplyMap.cs" /> | ||||
<Compile Include="AssetManagementSystem\Ass_PurchaseItemApplyMap.cs" /> | <Compile Include="AssetManagementSystem\Ass_PurchaseItemApplyMap.cs" /> | ||||
<Compile Include="AssetManagementSystem\Ass_ScrapItemMap.cs" /> | <Compile Include="AssetManagementSystem\Ass_ScrapItemMap.cs" /> | ||||
@@ -0,0 +1,222 @@ | |||||
using Learun.Util; | |||||
using System; | |||||
using System.Data; | |||||
using System.Collections.Generic; | |||||
using Learun.Application.TwoDevelopment.EducationalAdministration; | |||||
namespace Learun.Application.TwoDevelopment.Ask | |||||
{ | |||||
/// <summary> | |||||
/// 版 本 Learun-ADMS-Ultimate V7.0.0 数字化智慧校园 | |||||
/// Copyright (c) 2013-2018 北京泉江科技有限公司 | |||||
/// 创 建:超级管理员 | |||||
/// 日 期:2019-04-23 15:50 | |||||
/// 描 述:教师问卷管理 | |||||
/// </summary> | |||||
public class Ask_MainOfTeacherBLL : Ask_MainOfTeacherIBLL | |||||
{ | |||||
private Ask_MainOfTeacherService ask_MainOfTeacherService = new Ask_MainOfTeacherService(); | |||||
#region 获取数据 | |||||
/// <summary> | |||||
/// 获取页面显示列表数据 | |||||
/// <summary> | |||||
/// <param name="queryJson">查询参数</param> | |||||
/// <returns></returns> | |||||
public IEnumerable<Ask_MainOfTeacherEntity> GetPageList(Pagination pagination, string queryJson) | |||||
{ | |||||
try | |||||
{ | |||||
return ask_MainOfTeacherService.GetPageList(pagination, queryJson); | |||||
} | |||||
catch (Exception ex) | |||||
{ | |||||
if (ex is ExceptionEx) | |||||
{ | |||||
throw; | |||||
} | |||||
else | |||||
{ | |||||
throw ExceptionEx.ThrowBusinessException(ex); | |||||
} | |||||
} | |||||
} | |||||
/// <summary> | |||||
/// 获取Ask_MainOfTeacher表实体数据 | |||||
/// <param name="keyValue">主键</param> | |||||
/// <summary> | |||||
/// <returns></returns> | |||||
public Ask_MainOfTeacherEntity GetAsk_MainOfTeacherEntity(string keyValue) | |||||
{ | |||||
try | |||||
{ | |||||
return ask_MainOfTeacherService.GetAsk_MainOfTeacherEntity(keyValue); | |||||
} | |||||
catch (Exception ex) | |||||
{ | |||||
if (ex is ExceptionEx) | |||||
{ | |||||
throw; | |||||
} | |||||
else | |||||
{ | |||||
throw ExceptionEx.ThrowBusinessException(ex); | |||||
} | |||||
} | |||||
} | |||||
public Ask_MainOfTeacherEntity GetAsk_MainOfTeacherEntityAndQuestions(string keyValue) | |||||
{ | |||||
try | |||||
{ | |||||
return ask_MainOfTeacherService.GetAsk_MainOfTeacherEntityAndQuestions(keyValue); | |||||
} | |||||
catch (Exception ex) | |||||
{ | |||||
if (ex is ExceptionEx) | |||||
{ | |||||
throw; | |||||
} | |||||
else | |||||
{ | |||||
throw ExceptionEx.ThrowBusinessException(ex); | |||||
} | |||||
} | |||||
} | |||||
public Ask_MainOfTeacherEntity GetAsk_MainOfTeacherEntityAndQuestionsResult(string keyValue,string empno) | |||||
{ | |||||
try | |||||
{ | |||||
return ask_MainOfTeacherService.GetAsk_MainOfTeacherEntityAndQuestionsResult(keyValue, empno); | |||||
} | |||||
catch (Exception ex) | |||||
{ | |||||
if (ex is ExceptionEx) | |||||
{ | |||||
throw; | |||||
} | |||||
else | |||||
{ | |||||
throw ExceptionEx.ThrowBusinessException(ex); | |||||
} | |||||
} | |||||
} | |||||
#endregion | |||||
#region 提交数据 | |||||
/// <summary> | |||||
/// 删除实体数据 | |||||
/// <param name="keyValue">主键</param> | |||||
/// <summary> | |||||
/// <returns></returns> | |||||
public void DeleteEntity(string keyValue) | |||||
{ | |||||
try | |||||
{ | |||||
ask_MainOfTeacherService.DeleteEntity(keyValue); | |||||
} | |||||
catch (Exception ex) | |||||
{ | |||||
if (ex is ExceptionEx) | |||||
{ | |||||
throw; | |||||
} | |||||
else | |||||
{ | |||||
throw ExceptionEx.ThrowBusinessException(ex); | |||||
} | |||||
} | |||||
} | |||||
/// <summary> | |||||
/// 保存实体数据(新增、修改) | |||||
/// <param name="keyValue">主键</param> | |||||
/// <summary> | |||||
/// <returns></returns> | |||||
public void SaveEntity(string keyValue, Ask_MainOfTeacherEntity entity) | |||||
{ | |||||
try | |||||
{ | |||||
ask_MainOfTeacherService.SaveEntity(keyValue, entity); | |||||
} | |||||
catch (Exception ex) | |||||
{ | |||||
if (ex is ExceptionEx) | |||||
{ | |||||
throw; | |||||
} | |||||
else | |||||
{ | |||||
throw ExceptionEx.ThrowBusinessException(ex); | |||||
} | |||||
} | |||||
} | |||||
public void ChangeFormStatus(string keyValue, bool status) | |||||
{ | |||||
try | |||||
{ | |||||
ask_MainOfTeacherService.ChangeFormStatus(keyValue, status); | |||||
} | |||||
catch (Exception ex) | |||||
{ | |||||
if (ex is ExceptionEx) | |||||
{ | |||||
throw; | |||||
} | |||||
else | |||||
{ | |||||
throw ExceptionEx.ThrowBusinessException(ex); | |||||
} | |||||
} | |||||
} | |||||
public IEnumerable<Ask_MainOfTeacherEntity> GetTeacherPageList(Pagination pagination, string queryJson) | |||||
{ | |||||
try | |||||
{ | |||||
return ask_MainOfTeacherService.GetTeacherPageList(pagination, queryJson); | |||||
} | |||||
catch (Exception ex) | |||||
{ | |||||
if (ex is ExceptionEx) | |||||
{ | |||||
throw; | |||||
} | |||||
else | |||||
{ | |||||
throw ExceptionEx.ThrowBusinessException(ex); | |||||
} | |||||
} | |||||
} | |||||
public void SaveAsk_QuestionResultEntity(List<Ask_QuestionResultEntity> entity, string vid, | |||||
string userinfoUserId, string userinfoRealName, string userinfoIPAddress) | |||||
{ | |||||
try | |||||
{ | |||||
ask_MainOfTeacherService.SaveAsk_QuestionResultEntity(entity, vid, userinfoUserId, userinfoRealName, userinfoIPAddress); | |||||
} | |||||
catch (Exception ex) | |||||
{ | |||||
if (ex is ExceptionEx) | |||||
{ | |||||
throw; | |||||
} | |||||
else | |||||
{ | |||||
throw ExceptionEx.ThrowBusinessException(ex); | |||||
} | |||||
} | |||||
} | |||||
#endregion | |||||
} | |||||
} |
@@ -0,0 +1,159 @@ | |||||
using Learun.Util; | |||||
using System; | |||||
using System.Collections.Generic; | |||||
using System.ComponentModel.DataAnnotations.Schema; | |||||
namespace Learun.Application.TwoDevelopment.Ask | |||||
{ | |||||
/// <summary> | |||||
/// 版 本 Learun-ADMS-Ultimate V7.0.0 数字化智慧校园 | |||||
/// Copyright (c) 2013-2018 北京泉江科技有限公司 | |||||
/// 创 建:超级管理员 | |||||
/// 日 期:2019-04-23 15:50 | |||||
/// 描 述:教师问卷管理 | |||||
/// </summary> | |||||
public class Ask_MainOfTeacherEntity | |||||
{ | |||||
#region 实体成员 | |||||
/// <summary> | |||||
/// VID | |||||
/// </summary> | |||||
[Column("VID")] | |||||
public string VID { get; set; } | |||||
/// <summary> | |||||
/// UID | |||||
/// </summary> | |||||
[Column("UID")] | |||||
public string UID { get; set; } | |||||
/// <summary> | |||||
/// UName | |||||
/// </summary> | |||||
[Column("UNAME")] | |||||
public string UName { get; set; } | |||||
/// <summary> | |||||
/// ATId | |||||
/// </summary> | |||||
[Column("ATID")] | |||||
public string ATId { get; set; } | |||||
/// <summary> | |||||
/// ATName | |||||
/// </summary> | |||||
[Column("ATNAME")] | |||||
public string ATName { get; set; } | |||||
/// <summary> | |||||
/// VTitle | |||||
/// </summary> | |||||
[Column("VTITLE")] | |||||
public string VTitle { get; set; } | |||||
/// <summary> | |||||
/// VContent | |||||
/// </summary> | |||||
[Column("VCONTENT")] | |||||
public string VContent { get; set; } | |||||
/// <summary> | |||||
/// VCreateTime | |||||
/// </summary> | |||||
[Column("VCREATETIME")] | |||||
public DateTime? VCreateTime { get; set; } | |||||
/// <summary> | |||||
/// VStartTime | |||||
/// </summary> | |||||
[Column("VSTARTTIME")] | |||||
public DateTime? VStartTime { get; set; } | |||||
/// <summary> | |||||
/// VStopTime | |||||
/// </summary> | |||||
[Column("VSTOPTIME")] | |||||
public DateTime? VStopTime { get; set; } | |||||
/// <summary> | |||||
/// DepartmentIdsName | |||||
/// </summary> | |||||
[Column("DEPARTMENTIDSNAME")] | |||||
public string DepartmentIdsName { get; set; } | |||||
/// <summary> | |||||
/// DepartmentIds | |||||
/// </summary> | |||||
[Column("DEPARTMENTIDS")] | |||||
public string DepartmentIds { get; set; } | |||||
/// <summary> | |||||
/// Status | |||||
/// </summary> | |||||
[Column("STATUS")] | |||||
public bool? Status { get; set; } | |||||
/// <summary> | |||||
/// SPVNum | |||||
/// </summary> | |||||
[Column("SPVNUM")] | |||||
public int? SPVNum { get; set; } | |||||
/// <summary> | |||||
/// SPNum | |||||
/// </summary> | |||||
[Column("SPNUM")] | |||||
public int? SPNum { get; set; } | |||||
/// <summary> | |||||
/// SClick | |||||
/// </summary> | |||||
[Column("SCLICK")] | |||||
public int? SClick { get; set; } | |||||
/// <summary> | |||||
/// VOrder | |||||
/// </summary> | |||||
[Column("VORDER")] | |||||
public int? VOrder { get; set; } | |||||
/// <summary> | |||||
/// VHide | |||||
/// </summary> | |||||
[Column("VHIDE")] | |||||
public bool? VHide { get; set; } | |||||
/// <summary> | |||||
/// VSerial | |||||
/// </summary> | |||||
[Column("VSERIAL")] | |||||
public string VSerial { get; set; } | |||||
#endregion | |||||
#region 扩展操作 | |||||
/// <summary> | |||||
/// 新增调用 | |||||
/// </summary> | |||||
public void Create() | |||||
{ | |||||
this.VID = Guid.NewGuid().ToString(); | |||||
} | |||||
/// <summary> | |||||
/// 编辑调用 | |||||
/// </summary> | |||||
/// <param name="keyValue"></param> | |||||
public void Modify(string keyValue) | |||||
{ | |||||
this.VID = keyValue; | |||||
} | |||||
#endregion | |||||
#region 扩展字段 | |||||
[NotMapped] | |||||
public bool? IsAnswer { get; set; } | |||||
[NotMapped] | |||||
public decimal? TotalScore { get; set; } | |||||
[NotMapped] | |||||
public DateTime? CreateDate { get; set; } | |||||
[NotMapped] | |||||
public string EmpName { get; set; } | |||||
[NotMapped] | |||||
public string EmpNo { get; set; } | |||||
[NotMapped] | |||||
public string DepartmentId { get; set; } | |||||
[NotMapped] | |||||
public string GenderNo { get; set; } | |||||
[NotMapped] | |||||
public List<Ask_QuestionEntity> Ask_Questions | |||||
{ | |||||
get; | |||||
set; | |||||
} | |||||
#endregion | |||||
} | |||||
} | |||||
@@ -0,0 +1,57 @@ | |||||
using Learun.Util; | |||||
using System.Data; | |||||
using System.Collections.Generic; | |||||
using Learun.Application.TwoDevelopment.EducationalAdministration; | |||||
namespace Learun.Application.TwoDevelopment.Ask | |||||
{ | |||||
/// <summary> | |||||
/// 版 本 Learun-ADMS-Ultimate V7.0.0 数字化智慧校园 | |||||
/// Copyright (c) 2013-2018 北京泉江科技有限公司 | |||||
/// 创 建:超级管理员 | |||||
/// 日 期:2019-04-23 15:50 | |||||
/// 描 述:教师问卷管理 | |||||
/// </summary> | |||||
public interface Ask_MainOfTeacherIBLL | |||||
{ | |||||
#region 获取数据 | |||||
/// <summary> | |||||
/// 获取页面显示列表数据 | |||||
/// <summary> | |||||
/// <param name="queryJson">查询参数</param> | |||||
/// <returns></returns> | |||||
IEnumerable<Ask_MainOfTeacherEntity> GetPageList(Pagination pagination, string queryJson); | |||||
/// <summary> | |||||
/// 获取Ask_MainOfTeacher表实体数据 | |||||
/// <param name="keyValue">主键</param> | |||||
/// <summary> | |||||
/// <returns></returns> | |||||
Ask_MainOfTeacherEntity GetAsk_MainOfTeacherEntity(string keyValue); | |||||
Ask_MainOfTeacherEntity GetAsk_MainOfTeacherEntityAndQuestions(string keyValue); | |||||
Ask_MainOfTeacherEntity GetAsk_MainOfTeacherEntityAndQuestionsResult(string keyValue, string empno); | |||||
#endregion | |||||
#region 提交数据 | |||||
/// <summary> | |||||
/// 删除实体数据 | |||||
/// <param name="keyValue">主键</param> | |||||
/// <summary> | |||||
/// <returns></returns> | |||||
void DeleteEntity(string keyValue); | |||||
/// <summary> | |||||
/// 保存实体数据(新增、修改) | |||||
/// <param name="keyValue">主键</param> | |||||
/// <summary> | |||||
/// <returns></returns> | |||||
void SaveEntity(string keyValue, Ask_MainOfTeacherEntity entity); | |||||
#endregion | |||||
void ChangeFormStatus(string keyValue, bool status); | |||||
IEnumerable<Ask_MainOfTeacherEntity> GetTeacherPageList(Pagination pagination, string queryJson); | |||||
void SaveAsk_QuestionResultEntity(List<Ask_QuestionResultEntity> entity, string vid, string userinfoUserId, | |||||
string userinfoRealName, string userinfoIPAddress); | |||||
} | |||||
} |
@@ -0,0 +1,406 @@ | |||||
using Dapper; | |||||
using Learun.DataBase.Repository; | |||||
using Learun.Util; | |||||
using System; | |||||
using System.Collections.Generic; | |||||
using System.Data; | |||||
using System.Linq; | |||||
using System.Text; | |||||
using Learun.Application.Base.SystemModule; | |||||
using Learun.Application.TwoDevelopment.EducationalAdministration; | |||||
namespace Learun.Application.TwoDevelopment.Ask | |||||
{ | |||||
/// <summary> | |||||
/// 版 本 Learun-ADMS-Ultimate V7.0.0 数字化智慧校园 | |||||
/// Copyright (c) 2013-2018 北京泉江科技有限公司 | |||||
/// 创 建:超级管理员 | |||||
/// 日 期:2019-04-23 15:50 | |||||
/// 描 述:教师问卷管理 | |||||
/// </summary> | |||||
public class Ask_MainOfTeacherService : RepositoryFactory | |||||
{ | |||||
#region 获取数据 | |||||
/// <summary> | |||||
/// 获取页面显示列表数据 | |||||
/// <summary> | |||||
/// <param name="queryJson">查询参数</param> | |||||
/// <returns></returns> | |||||
public IEnumerable<Ask_MainOfTeacherEntity> GetPageList(Pagination pagination, string queryJson) | |||||
{ | |||||
try | |||||
{ | |||||
var strSql = new StringBuilder(); | |||||
strSql.Append("SELECT t.* "); | |||||
strSql.Append(" FROM Ask_MainOfTeacher t "); | |||||
strSql.Append(" WHERE 1=1 "); | |||||
var queryParam = queryJson.ToJObject(); | |||||
// 虚拟参数 | |||||
var dp = new DynamicParameters(new { }); | |||||
if (!queryParam["VTitle"].IsEmpty()) | |||||
{ | |||||
dp.Add("VTitle", "%" + queryParam["VTitle"].ToString() + "%", DbType.String); | |||||
strSql.Append(" AND t.VTitle Like @VTitle "); | |||||
} | |||||
if (!queryParam["VSerial"].IsEmpty()) | |||||
{ | |||||
dp.Add("VSerial", "%" + queryParam["VSerial"].ToString() + "%", DbType.String); | |||||
strSql.Append(" AND t.VSerial Like @VSerial "); | |||||
} | |||||
if (!queryParam["ATId"].IsEmpty()) | |||||
{ | |||||
dp.Add("ATId", "" + queryParam["ATId"].ToString() + "", DbType.String); | |||||
strSql.Append(" AND t.ATId Like @ATId "); | |||||
} | |||||
return this.BaseRepository().FindList<Ask_MainOfTeacherEntity>(strSql.ToString(), dp, pagination); | |||||
} | |||||
catch (Exception ex) | |||||
{ | |||||
if (ex is ExceptionEx) | |||||
{ | |||||
throw; | |||||
} | |||||
else | |||||
{ | |||||
throw ExceptionEx.ThrowServiceException(ex); | |||||
} | |||||
} | |||||
} | |||||
public IEnumerable<Ask_MainOfTeacherEntity> GetTeacherPageList(Pagination pagination, string queryJson) | |||||
{ | |||||
try | |||||
{ | |||||
//取库名 | |||||
var misdbname = BaseRepository("CollegeMIS").getDbConnection().Database; | |||||
var basedbname = BaseRepository().getDbConnection().Database; | |||||
var strSql = new StringBuilder(); | |||||
strSql.Append("SELECT t.*,b.IsAnswer,b.TotalScore,b.CreateDate,c.EmpNo,c.EmpName,c.GenderNo,c.F_DepartmentId as DepartmentId "); | |||||
strSql.Append(" FROM " + basedbname + ".dbo.Ask_MainOfTeacher t right join " + basedbname + ".dbo.Ask_TeacherMain b on t.VID=b.VID left join " + misdbname + ".dbo.EmpInfo c on b.EmpNo=c.EmpNo "); | |||||
strSql.Append(" WHERE 1=1 "); | |||||
var queryParam = queryJson.ToJObject(); | |||||
// 虚拟参数 | |||||
var dp = new DynamicParameters(new { }); | |||||
if (queryParam["Manager"].IsEmpty()) | |||||
{ | |||||
strSql.Append(" and t.Status=1 "); | |||||
} | |||||
if (!queryParam["EmpNo"].IsEmpty()) | |||||
{ | |||||
dp.Add("EmpNo", "" + queryParam["EmpNo"].ToString() + "", DbType.String); | |||||
strSql.Append(" AND b.EmpNo=@EmpNo "); | |||||
} | |||||
if (!queryParam["EmpName"].IsEmpty()) | |||||
{ | |||||
dp.Add("EmpName", "%" + queryParam["EmpName"].ToString() + "%", DbType.String); | |||||
strSql.Append(" AND c.EmpName like @EmpName "); | |||||
} | |||||
if (!queryParam["VTitle"].IsEmpty()) | |||||
{ | |||||
dp.Add("VTitle", "%" + queryParam["VTitle"].ToString() + "%", DbType.String); | |||||
strSql.Append(" AND t.VTitle Like @VTitle "); | |||||
} | |||||
if (!queryParam["VSerial"].IsEmpty()) | |||||
{ | |||||
dp.Add("VSerial", "%" + queryParam["VSerial"].ToString() + "%", DbType.String); | |||||
strSql.Append(" AND t.VSerial Like @VSerial "); | |||||
} | |||||
if (!queryParam["ATId"].IsEmpty()) | |||||
{ | |||||
dp.Add("ATId", "" + queryParam["ATId"].ToString() + "", DbType.String); | |||||
strSql.Append(" AND t.ATId Like @ATId "); | |||||
} | |||||
if (!queryParam["VID"].IsEmpty()) | |||||
{ | |||||
dp.Add("VID", "" + queryParam["VID"].ToString() + "", DbType.String); | |||||
strSql.Append(" AND t.VID = @VID "); | |||||
} | |||||
return this.BaseRepository().FindList<Ask_MainOfTeacherEntity>(strSql.ToString(), dp, pagination); | |||||
} | |||||
catch (Exception ex) | |||||
{ | |||||
if (ex is ExceptionEx) | |||||
{ | |||||
throw; | |||||
} | |||||
else | |||||
{ | |||||
throw ExceptionEx.ThrowServiceException(ex); | |||||
} | |||||
} | |||||
} | |||||
/// <summary> | |||||
/// 获取Ask_MainOfTeacher表实体数据 | |||||
/// <param name="keyValue">主键</param> | |||||
/// <summary> | |||||
/// <returns></returns> | |||||
public Ask_MainOfTeacherEntity GetAsk_MainOfTeacherEntity(string keyValue) | |||||
{ | |||||
try | |||||
{ | |||||
return BaseRepository().FindEntity<Ask_MainOfTeacherEntity>(keyValue); | |||||
} | |||||
catch (Exception ex) | |||||
{ | |||||
if (ex is ExceptionEx) | |||||
{ | |||||
throw; | |||||
} | |||||
else | |||||
{ | |||||
throw ExceptionEx.ThrowServiceException(ex); | |||||
} | |||||
} | |||||
} | |||||
public Ask_MainOfTeacherEntity GetAsk_MainOfTeacherEntityAndQuestions(string keyValue) | |||||
{ | |||||
try | |||||
{ | |||||
var Ask_MainOfTeacher = BaseRepository().FindEntity<Ask_MainOfTeacherEntity>(keyValue); | |||||
var questionlist = BaseRepository().FindList<Ask_QuestionEntity>(m => m.VID == keyValue).OrderBy(m => m.QOrder).ToList(); | |||||
foreach (var questionEntity in questionlist) | |||||
{ | |||||
if (questionEntity.QType == 1) | |||||
{ | |||||
questionEntity.QTypeString = "radio"; | |||||
} | |||||
else if (questionEntity.QType == 2) | |||||
{ | |||||
questionEntity.QTypeString = "checkbox"; | |||||
} | |||||
else | |||||
{ | |||||
questionEntity.QTypeString = "text"; | |||||
} | |||||
questionEntity.Ask_QuestionItems = BaseRepository().FindList<Ask_QuestionItemsEntity>(m => m.QID == questionEntity.QID).OrderBy(m => m.IOrder).ToList(); | |||||
} | |||||
Ask_MainOfTeacher.Ask_Questions = questionlist; | |||||
return Ask_MainOfTeacher; | |||||
} | |||||
catch (Exception ex) | |||||
{ | |||||
if (ex is ExceptionEx) | |||||
{ | |||||
throw; | |||||
} | |||||
else | |||||
{ | |||||
throw ExceptionEx.ThrowServiceException(ex); | |||||
} | |||||
} | |||||
} | |||||
#endregion | |||||
#region 提交数据 | |||||
/// <summary> | |||||
/// 删除实体数据 | |||||
/// <param name="keyValue">主键</param> | |||||
/// <summary> | |||||
/// <returns></returns> | |||||
public void DeleteEntity(string keyValue) | |||||
{ | |||||
try | |||||
{ | |||||
this.BaseRepository().Delete<Ask_MainOfTeacherEntity>(t => t.VID == keyValue); | |||||
} | |||||
catch (Exception ex) | |||||
{ | |||||
if (ex is ExceptionEx) | |||||
{ | |||||
throw; | |||||
} | |||||
else | |||||
{ | |||||
throw ExceptionEx.ThrowServiceException(ex); | |||||
} | |||||
} | |||||
} | |||||
/// <summary> | |||||
/// 保存实体数据(新增、修改) | |||||
/// <param name="keyValue">主键</param> | |||||
/// <summary> | |||||
/// <returns></returns> | |||||
public void SaveEntity(string keyValue, Ask_MainOfTeacherEntity entity) | |||||
{ | |||||
try | |||||
{ | |||||
if (!string.IsNullOrEmpty(keyValue)) | |||||
{ | |||||
entity.Modify(keyValue); | |||||
this.BaseRepository().Update(entity); | |||||
} | |||||
else | |||||
{ | |||||
entity.Create(); | |||||
this.BaseRepository().Insert(entity); | |||||
} | |||||
} | |||||
catch (Exception ex) | |||||
{ | |||||
if (ex is ExceptionEx) | |||||
{ | |||||
throw; | |||||
} | |||||
else | |||||
{ | |||||
throw ExceptionEx.ThrowServiceException(ex); | |||||
} | |||||
} | |||||
} | |||||
#endregion | |||||
public void ChangeFormStatus(string keyValue, bool status) | |||||
{ | |||||
try | |||||
{ | |||||
var entity = BaseRepository().FindEntity<Ask_MainOfTeacherEntity>(keyValue); | |||||
if (status) | |||||
{ | |||||
entity.VCreateTime = DateTime.Now; | |||||
//统计调查人数 | |||||
StringBuilder sql = new StringBuilder("select distinct * from EmpInfo a where CheckMark=1 "); | |||||
if (!string.IsNullOrEmpty(entity.DepartmentIds)) | |||||
{ | |||||
List<string> departList = entity.DepartmentIds.Split(',').ToList(); | |||||
for (var i = 0; i < departList.Count; i++) | |||||
{ | |||||
departList[i] = "'" + departList[i] + "'"; | |||||
} | |||||
sql.Append(" and a.F_DepartmentId in(" + string.Join(",", departList.ToArray()) + ")"); | |||||
} | |||||
var empinfo = BaseRepository("CollegeMIS").FindList<EmpInfoEntity>(sql.ToString()).ToList(); | |||||
BaseRepository().Delete<Ask_TeacherMainEntity>(m => m.VID == entity.VID); | |||||
foreach (var item in empinfo) | |||||
{ | |||||
Ask_TeacherMainEntity askTeacherMain = new Ask_TeacherMainEntity(); | |||||
askTeacherMain.Create(); | |||||
askTeacherMain.EmpNo = item.EmpNo; | |||||
askTeacherMain.VID = entity.VID; | |||||
askTeacherMain.IsAnswer = false; | |||||
askTeacherMain.TotalScore = 0; | |||||
BaseRepository().Insert(askTeacherMain); | |||||
} | |||||
entity.SPVNum = empinfo.Count; | |||||
entity.Status = true; | |||||
} | |||||
else | |||||
{ | |||||
entity.Status = false; | |||||
} | |||||
BaseRepository().Update(entity); | |||||
} | |||||
catch (Exception ex) | |||||
{ | |||||
if (ex is ExceptionEx) | |||||
{ | |||||
throw; | |||||
} | |||||
else | |||||
{ | |||||
throw ExceptionEx.ThrowServiceException(ex); | |||||
} | |||||
} | |||||
} | |||||
public void SaveAsk_QuestionResultEntity(List<Ask_QuestionResultEntity> entity, string vid, | |||||
string userinfoUserId, string userinfoRealName, string userinfoIpAddress) | |||||
{ | |||||
var db = BaseRepository().BeginTrans(); | |||||
try | |||||
{ | |||||
decimal totalscore = 0; | |||||
foreach (var item in entity) | |||||
{ | |||||
Ask_QuestionResultEntity questionResult = new Ask_QuestionResultEntity(); | |||||
questionResult.Create(); | |||||
questionResult.QID = item.QID; | |||||
questionResult.QID = item.QID; | |||||
questionResult.IID = item.IID; | |||||
questionResult.UID = userinfoUserId; | |||||
questionResult.UName = userinfoRealName; | |||||
if (!string.IsNullOrEmpty(item.UText)) | |||||
{ | |||||
questionResult.UText = item.UText; | |||||
} | |||||
questionResult.UTime=DateTime.Now; | |||||
questionResult.UIP = userinfoIpAddress; | |||||
db.Insert(questionResult); | |||||
var score = db.FindEntity<Ask_QuestionItemsEntity>(m => m.IID == item.IID).IScore; | |||||
if (score != null) | |||||
totalscore += score.Value; | |||||
} | |||||
db.ExecuteBySql("update Ask_MainOfTeacher set SPNum=isnull(SPNum,0)+1 where VID='" + vid + "'"); | |||||
var teacherpaper = db.FindEntity<Ask_TeacherMainEntity>(m => m.VID == vid && m.EmpNo == userinfoUserId); | |||||
if (teacherpaper != null) | |||||
{ | |||||
teacherpaper.IsAnswer = true; | |||||
teacherpaper.TotalScore = totalscore; | |||||
teacherpaper.CreateDate=DateTime.Now; | |||||
db.Update(teacherpaper); | |||||
} | |||||
db.Commit(); | |||||
} | |||||
catch (Exception e) | |||||
{ | |||||
db.Rollback(); | |||||
throw; | |||||
} | |||||
} | |||||
public Ask_MainOfTeacherEntity GetAsk_MainOfTeacherEntityAndQuestionsResult(string keyValue, string empno) | |||||
{ | |||||
try | |||||
{ | |||||
var Ask_MainOfTeacher = BaseRepository().FindEntity<Ask_MainOfTeacherEntity>(keyValue); | |||||
var questionlist = BaseRepository().FindList<Ask_QuestionEntity>(m => m.VID == keyValue).OrderBy(m => m.QOrder).ToList(); | |||||
foreach (var questionEntity in questionlist) | |||||
{ | |||||
if (questionEntity.QType == 1) | |||||
{ | |||||
questionEntity.QTypeString = "radio"; | |||||
} | |||||
else if (questionEntity.QType == 2) | |||||
{ | |||||
questionEntity.QTypeString = "checkbox"; | |||||
} | |||||
else | |||||
{ | |||||
questionEntity.QTypeString = "text"; | |||||
} | |||||
var questionitemslist= BaseRepository().FindList<Ask_QuestionItemsEntity>(m => m.QID == questionEntity.QID).OrderBy(m => m.IOrder).ToList(); | |||||
foreach (var qii in questionitemslist) | |||||
{ | |||||
var qresult = BaseRepository().FindEntity<Ask_QuestionResultEntity>(m => | |||||
m.QID == questionEntity.QID && m.IID == qii.IID && m.UID == empno); | |||||
if (qresult != null) | |||||
{ | |||||
qii.IsChecked = true; | |||||
qii.UText = qresult.UText; | |||||
} | |||||
} | |||||
questionEntity.Ask_QuestionItems = questionitemslist; | |||||
} | |||||
Ask_MainOfTeacher.Ask_Questions = questionlist; | |||||
return Ask_MainOfTeacher; | |||||
} | |||||
catch (Exception ex) | |||||
{ | |||||
if (ex is ExceptionEx) | |||||
{ | |||||
throw; | |||||
} | |||||
else | |||||
{ | |||||
throw ExceptionEx.ThrowServiceException(ex); | |||||
} | |||||
} | |||||
} | |||||
} | |||||
} |
@@ -70,6 +70,10 @@ | |||||
<Reference Include="System.Xml" /> | <Reference Include="System.Xml" /> | ||||
</ItemGroup> | </ItemGroup> | ||||
<ItemGroup> | <ItemGroup> | ||||
<Compile Include="Ask\Ask_MainOfTeacher\Ask_MainOfTeacherBLL.cs" /> | |||||
<Compile Include="Ask\Ask_MainOfTeacher\Ask_MainOfTeacherEntity.cs" /> | |||||
<Compile Include="Ask\Ask_MainOfTeacher\Ask_MainOfTeacherIBLL.cs" /> | |||||
<Compile Include="Ask\Ask_MainOfTeacher\Ask_MainOfTeacherService.cs" /> | |||||
<Compile Include="AssetManagementSystem\Allocation\AllocationBLL.cs" /> | <Compile Include="AssetManagementSystem\Allocation\AllocationBLL.cs" /> | ||||
<Compile Include="AssetManagementSystem\Allocation\AllocationIBLL.cs" /> | <Compile Include="AssetManagementSystem\Allocation\AllocationIBLL.cs" /> | ||||
<Compile Include="AssetManagementSystem\Allocation\AllocationService.cs" /> | <Compile Include="AssetManagementSystem\Allocation\AllocationService.cs" /> | ||||