Explorar el Código

安全排查流程 添加二维码验证,多选删除

长阳分支中职
ndbs hace 1 mes
padre
commit
adfa5d7c29
Se han modificado 6 ficheros con 552 adiciones y 561 borrados
  1. +2
    -5
      Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Controllers/OfficeEquipmentController.cs
  2. +10
    -1
      Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/OfficeEquipment/Index.js
  3. +1
    -1
      Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/OfficeEquipment/qrCode.cshtml
  4. +7
    -40
      Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/OfficeEquipment/qrCode.js
  5. +517
    -512
      Learun.Framework.Ultimate V7/Learun.Application.WebApi/Modules/Arrangelesson.cs
  6. +15
    -2
      Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/OfficeEquipment/OfficeEquipmentService.cs

+ 2
- 5
Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Controllers/OfficeEquipmentController.cs Ver fichero

@@ -43,11 +43,8 @@ namespace Learun.Application.Web.Areas.EducationalAdministration.Controllers
/// <summary> /// <summary>
/// <returns></returns> /// <returns></returns>
[HttpGet] [HttpGet]
public ActionResult QRCode(string keyValue)
public ActionResult QRCode()
{ {
var Data = officeEquipmentIBLL.GetOfficeEquipmentEntity(keyValue);
var emp = empinfoIBLL.GetEmpInfoEntityByEmpNo(Data.Name);
ViewBag.qrcode = "设备名称:" + Data.DeviceName + ",设备编号:" + Data.Code + ",配置:" + Data.Description + ",使用人:" + emp.EmpName;
return View(); return View();
} }
#endregion #endregion
@@ -90,7 +87,7 @@ namespace Learun.Application.Web.Areas.EducationalAdministration.Controllers
OfficeEquipment = OfficeEquipmentData, OfficeEquipment = OfficeEquipmentData,
}; };
return Success(jsonData); return Success(jsonData);
}
}
#endregion #endregion


#region 提交数据 #region 提交数据


+ 10
- 1
Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/OfficeEquipment/Index.js Ver fichero

@@ -38,6 +38,10 @@ var bootstrap = function ($, learun) {
// 编辑 // 编辑
$('#lr_edit').on('click', function () { $('#lr_edit').on('click', function () {
var keyValue = $('#gridtable').jfGridValue('Id'); var keyValue = $('#gridtable').jfGridValue('Id');
if (keyValue.indexOf(',') != -1) {
learun.alert.warning("只能选择一条记录进行编辑!");
return;
}
if (learun.checkrow(keyValue)) { if (learun.checkrow(keyValue)) {
learun.layerForm({ learun.layerForm({
id: 'form', id: 'form',
@@ -67,6 +71,10 @@ var bootstrap = function ($, learun) {
// 查看二维码 // 查看二维码
$('#lr_qrCode').on('click', function () { $('#lr_qrCode').on('click', function () {
var keyValue = $('#gridtable').jfGridValue('Id'); var keyValue = $('#gridtable').jfGridValue('Id');
if (keyValue.indexOf(',') != -1) {
learun.alert.warning("只能选择一条记录进行编辑!");
return;
}
if (learun.checkrow(keyValue)) { if (learun.checkrow(keyValue)) {
learun.layerForm({ learun.layerForm({
id: 'formqrCode', id: 'formqrCode',
@@ -119,7 +127,8 @@ var bootstrap = function ($, learun) {
{ label: "备注", name: "Remark", width: 100, align: "left"}, { label: "备注", name: "Remark", width: 100, align: "left"},
], ],
mainId:'Id', mainId:'Id',
isPage: true
isPage: true,
isMultiselect: true,
}); });
page.search(); page.search();
}, },


+ 1
- 1
Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/OfficeEquipment/qrCode.cshtml Ver fichero

@@ -39,5 +39,5 @@
</div> </div>
</div> </div>
@Html.AppendJsFile("/Areas/EducationalAdministration/Views/OfficeEquipment/qrCode.js") @Html.AppendJsFile("/Areas/EducationalAdministration/Views/OfficeEquipment/qrCode.js")
@*@Html.AppendJsFile("/Areas/EducationalAdministration/Views/StuVolunteer/server.js")*@
@*@Html.AppendJsFile("/Areas/EducationalAdministration/Views/StuVolunteerPhone/server.js")*@
@Html.AppendJsFile("/Content/jquery/jquery-1.10.2.min.js", "/Content/jquery/plugin/jqprint/jquery.jqprint-0.3.js", "/Content/js/qrcode.min.js") @Html.AppendJsFile("/Content/jquery/jquery-1.10.2.min.js", "/Content/jquery/plugin/jqprint/jquery.jqprint-0.3.js", "/Content/js/qrcode.min.js")

+ 7
- 40
Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/OfficeEquipment/qrCode.js Ver fichero

@@ -50,49 +50,16 @@ var bootstrap = function ($, learun) {
param: {}, param: {},
}); });
}, },
initData: function () {
initData: function () {
if (!!keyValue) { if (!!keyValue) {
$.lrSetForm(top.$.rootUrl + '/EducationalAdministration/OfficeEquipment/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]);
}
//扫码签到
makeCode(qrCode);
}
});
var currentUrl1 = "http://api.cyzjzx.com";
//var currentUrl1 = "http://192.168.10.58:8012";
//扫码签到
makeCode(currentUrl1 + '/arrangelesson/getqrcode?keyValue=' + keyValue);
} }
} }
}; };
//// 设置表单数据
//setFormData = function (processId, param, callback) {
// if (!!processId) {
// $.lrSetForm(top.$.rootUrl + '/PersonnelManagement/MeetingManagement/GetFormDataByProcessId?processId=' + processId, function (data) {
// for (var id in data) {
// if (!!data[id] && data[id].length > 0) {
// $('#' + id).jfGridSet('refreshdata', data[id]);
// }
// else {
// if (id == 'MeetingManagement' && data[id]) {
// keyValue = data[id].Id;
// }
// $('[data-table="' + id + '"]').lrSetFormData(data[id]);
// }
// }
// });
// }
// callback && callback();
//}
// 验证数据是否填写完整
//validForm = function () {
// if (!$('body').lrValidform()) {
// return false;
// }
// return true;
//};
// 保存数据 // 保存数据
save = function (processId, callBack, i) { save = function (processId, callBack, i) {
if (!!callBack) { if (!!callBack) {
@@ -110,6 +77,6 @@ var qrcode = new QRCode(document.getElementById("qrCode"), {
height: 420 height: 420
}); });
function makeCode(urls) { function makeCode(urls) {
console.log(urls,"urls")
console.log(urls, "urls")
qrcode.makeCode(urls); qrcode.makeCode(urls);
} }

+ 517
- 512
Learun.Framework.Ultimate V7/Learun.Application.WebApi/Modules/Arrangelesson.cs
La diferencia del archivo ha sido suprimido porque es demasiado grande
Ver fichero


+ 15
- 2
Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/OfficeEquipment/OfficeEquipmentService.cs Ver fichero

@@ -41,6 +41,11 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration
dp.Add("Name", queryParam["Name"].ToString(), DbType.String); dp.Add("Name", queryParam["Name"].ToString(), DbType.String);
strSql.Append(" AND t.Name = @Name "); strSql.Append(" AND t.Name = @Name ");
} }
if (!queryParam["Code"].IsEmpty())
{
dp.Add("Code", "%" + queryParam["Code"].ToString() + "%", DbType.String);
strSql.Append(" AND t.Code like @Code ");
}
if (!queryParam["DeviceName"].IsEmpty()) if (!queryParam["DeviceName"].IsEmpty())
{ {
dp.Add("DeviceName", "%" + queryParam["DeviceName"].ToString() + "%", DbType.String); dp.Add("DeviceName", "%" + queryParam["DeviceName"].ToString() + "%", DbType.String);
@@ -55,7 +60,7 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration
{ {
if (!LoginUserInfo.Get().roleIds.Contains("5a6e22b1-2a08-4258-9964-3cb7fbb9ebee")) if (!LoginUserInfo.Get().roleIds.Contains("5a6e22b1-2a08-4258-9964-3cb7fbb9ebee"))
{ {
strSql.Append(" AND t.Name = " + LoginUserInfo.Get().account + " ");
strSql.Append(" AND t.Name = '" + LoginUserInfo.Get().account + "' ");
} }
} }
return this.BaseRepository("CollegeMIS").FindList<OfficeEquipmentEntity>(strSql.ToString(), dp, pagination); return this.BaseRepository("CollegeMIS").FindList<OfficeEquipmentEntity>(strSql.ToString(), dp, pagination);
@@ -107,12 +112,20 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration
/// <param name="keyValue">主键</param> /// <param name="keyValue">主键</param>
public void DeleteEntity(string keyValue) public void DeleteEntity(string keyValue)
{ {
var db = this.BaseRepository("CollegeMIS").BeginTrans();
try try
{ {
this.BaseRepository("CollegeMIS").Delete<OfficeEquipmentEntity>(t => t.Id == keyValue);
//多个删除
var keyValueArr = keyValue.Split(',');
foreach (var item in keyValueArr)
{
db.Delete<OfficeEquipmentEntity>(t => t.Id == item);
}
db.Commit();
} }
catch (Exception ex) catch (Exception ex)
{ {
db.Rollback();
if (ex is ExceptionEx) if (ex is ExceptionEx)
{ {
throw; throw;


Cargando…
Cancelar
Guardar