|
|
@@ -0,0 +1,95 @@ |
|
|
|
/* * 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架(http://www.learun.cn) |
|
|
|
* Copyright (c) 2013-2020 力软信息技术(苏州)有限公司 |
|
|
|
* 创建人:超级管理员 |
|
|
|
* 日 期:2021-03-18 09:47 |
|
|
|
* 描 述:网上办事大厅拖拽版-桌面管理 |
|
|
|
*/ |
|
|
|
var selectedRow; |
|
|
|
var refreshGirdData; |
|
|
|
var bootstrap = function ($, learun) { |
|
|
|
"use strict"; |
|
|
|
var page = { |
|
|
|
init: function () { |
|
|
|
page.initGird(); |
|
|
|
page.bind(); |
|
|
|
}, |
|
|
|
bind: function () { |
|
|
|
// 查询 |
|
|
|
$('#btn_Search').on('click', function () { |
|
|
|
var keyword = $('#txt_Keyword').val(); |
|
|
|
page.search({ keyword: keyword }); |
|
|
|
}); |
|
|
|
// 刷新 |
|
|
|
$('#lr_refresh').on('click', function () { |
|
|
|
location.reload(); |
|
|
|
}); |
|
|
|
// 新增 |
|
|
|
$('#lr_add').on('click', function () { |
|
|
|
selectedRow = null; |
|
|
|
learun.layerForm({ |
|
|
|
id: 'form', |
|
|
|
title: '新增', |
|
|
|
url: top.$.rootUrl + '/LR_Desktop/SSO_Drag_DesktopManage/Form', |
|
|
|
width: 700, |
|
|
|
height: 400, |
|
|
|
callBack: function (id) { |
|
|
|
return top[id].acceptClick(refreshGirdData); |
|
|
|
} |
|
|
|
}); |
|
|
|
}); |
|
|
|
// 编辑 |
|
|
|
$('#lr_edit').on('click', function () { |
|
|
|
var keyValue = $('#gridtable').jfGridValue('Id'); |
|
|
|
selectedRow = $('#gridtable').jfGridGet('rowdata'); |
|
|
|
if (learun.checkrow(keyValue)) { |
|
|
|
learun.layerForm({ |
|
|
|
id: 'form', |
|
|
|
title: '编辑', |
|
|
|
url: top.$.rootUrl + '/LR_Desktop/SSO_Drag_DesktopManage/Form?keyValue=' + keyValue, |
|
|
|
width: 700, |
|
|
|
height: 400, |
|
|
|
callBack: function (id) { |
|
|
|
return top[id].acceptClick(refreshGirdData); |
|
|
|
} |
|
|
|
}); |
|
|
|
} |
|
|
|
}); |
|
|
|
// 删除 |
|
|
|
$('#lr_delete').on('click', function () { |
|
|
|
var keyValue = $('#gridtable').jfGridValue('Id'); |
|
|
|
if (learun.checkrow(keyValue)) { |
|
|
|
learun.layerConfirm('是否确认删除该项!', function (res) { |
|
|
|
if (res) { |
|
|
|
learun.deleteForm(top.$.rootUrl + '/LR_Desktop/SSO_Drag_DesktopManage/DeleteForm', { keyValue: keyValue}, function () { |
|
|
|
}); |
|
|
|
} |
|
|
|
}); |
|
|
|
} |
|
|
|
}); |
|
|
|
}, |
|
|
|
initGird: function () { |
|
|
|
$('#gridtable').lrAuthorizeJfGrid({ |
|
|
|
url: top.$.rootUrl + '/LR_Desktop/SSO_Drag_DesktopManage/GetPageList', |
|
|
|
headData: [ |
|
|
|
{ label: '主键', name: 'Id', width: 200, align: "left" }, |
|
|
|
{ label: '用户', name: 'UserId', width: 200, align: "left" }, |
|
|
|
{ label: '模式编号:0办事大厅模式,1效率优先模式,2管理驾驶舱模式', name: 'ModelCode', width: 200, align: "left" }, |
|
|
|
{ label: '桌面名称', name: 'DesktopName', width: 200, align: "left" }, |
|
|
|
{ label: '桌面编号', name: 'DesktopCode', width: 200, align: "left" }, |
|
|
|
{ label: '排序号', name: 'Sort', width: 200, align: "left" }, |
|
|
|
], |
|
|
|
mainId:'Id', |
|
|
|
isPage: true |
|
|
|
}); |
|
|
|
page.search(); |
|
|
|
}, |
|
|
|
search: function (param) { |
|
|
|
param = param || {}; |
|
|
|
$('#gridtable').jfGridSet('reload', { queryJson: JSON.stringify(param) }); |
|
|
|
} |
|
|
|
}; |
|
|
|
refreshGirdData = function () { |
|
|
|
$('#gridtable').jfGridSet('reload'); |
|
|
|
}; |
|
|
|
page.init(); |
|
|
|
} |