Kaynağa Gözat

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

长阳分支中职
ndbs 1 ay önce
ebeveyn
işleme
adfa5d7c29
6 değiştirilmiş dosya ile 552 ekleme ve 561 silme
  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 Dosyayı Görüntüle

@@ -43,11 +43,8 @@ namespace Learun.Application.Web.Areas.EducationalAdministration.Controllers
/// <summary>
/// <returns></returns>
[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();
}
#endregion
@@ -90,7 +87,7 @@ namespace Learun.Application.Web.Areas.EducationalAdministration.Controllers
OfficeEquipment = OfficeEquipmentData,
};
return Success(jsonData);
}
}
#endregion

#region 提交数据


+ 10
- 1
Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/OfficeEquipment/Index.js Dosyayı Görüntüle

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


+ 1
- 1
Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/OfficeEquipment/qrCode.cshtml Dosyayı Görüntüle

@@ -39,5 +39,5 @@
</div>
</div>
@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")

+ 7
- 40
Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/OfficeEquipment/qrCode.js Dosyayı Görüntüle

@@ -50,49 +50,16 @@ var bootstrap = function ($, learun) {
param: {},
});
},
initData: function () {
initData: function () {
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) {
if (!!callBack) {
@@ -110,6 +77,6 @@ var qrcode = new QRCode(document.getElementById("qrCode"), {
height: 420
});
function makeCode(urls) {
console.log(urls,"urls")
console.log(urls, "urls")
qrcode.makeCode(urls);
}

+ 517
- 512
Learun.Framework.Ultimate V7/Learun.Application.WebApi/Modules/Arrangelesson.cs
Dosya farkı çok büyük olduğundan ihmal edildi
Dosyayı Görüntüle


+ 15
- 2
Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/OfficeEquipment/OfficeEquipmentService.cs Dosyayı Görüntüle

@@ -41,6 +41,11 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration
dp.Add("Name", queryParam["Name"].ToString(), DbType.String);
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())
{
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"))
{
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);
@@ -107,12 +112,20 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration
/// <param name="keyValue">主键</param>
public void DeleteEntity(string keyValue)
{
var db = this.BaseRepository("CollegeMIS").BeginTrans();
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)
{
db.Rollback();
if (ex is ExceptionEx)
{
throw;


Yükleniyor…
İptal
Kaydet