|
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107 |
- /* * 版 本 Learun-ADMS-Ultimate V7.0.0 数字化智慧校园(http://www.learun.cn)
- * Copyright (c) 2013-2018 北京泉江科技有限公司
- * 创建人:超级管理员
- * 日 期:2019-04-22 10:59
- * 描 述:应用管理
- */
- var refreshGirdData;
- var FTId;
- 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_edit').on('click', function () {
- var keyValue = $('#gridtable').jfGridValue('UPId');
- if (learun.checkrow(keyValue)) {
- learun.layerForm({
- id: 'form',
- title: '编辑',
- url: top.$.rootUrl + '/Permission/Perm_Function/FormTeacher?keyValue=' + keyValue,
- width: 650,
- height: 250,
- callBack: function (id) {
- return top[id].acceptClick(refreshGirdData);
- }
- });
- }
- });
- },
- inittree: function () {
- $('#companyTree').lrtree({
- url: top.$.rootUrl + '/Permission/Perm_FunctionType/GetTeacherTree',
- nodeClick: page.treeNodeClick
- });
- },
- treeNodeClick: function (item) {
- FTId = item.id;
- $('#titleinfo').text(item.text);
- page.search();
- },
- // 初始化列表
- initGird: function () {
- $('#gridtable').lrAuthorizeJfGrid({
- url: top.$.rootUrl + '/Permission/Perm_Function/GetPageList',
- headData: [
- { label: "应用名称", name: "FName", width: 150, align: "left" },
- {
- label: "分类名称", name: "FTId", width: 150, align: "left",
- formatterAsync: function (callback, value, row, op, $cell) {
- learun.clientdata.getAsync('custmerData', {
- url: '/LR_SystemModule/DataSource/GetDataTable?code=' + 'Perm_FunctionType',
- key: value,
- keyId: 'ftid',
- callback: function (_data) {
- callback(_data['ftname']);
- }
- });
- }
- },
- { label: "应用地址", name: "FUrl", width: 200, align: "left" },
- { label: "用户名", name: "UPUserName", width: 200, align: "left" },
- {
- label: "密码", name: "UPPass", width: 200, align: "left", formatter: function (value) {
- if (value) {
- return '**********';
- }
- }
- },
- {
- label: "访问", name: "FInterfaceUrl", width: 200, align: "left", formatter: function (value) {
- if (value) {
- return '<a class=\"label label-success\" href="'+value+'" target="_blank">转到</a>';
- }
- }
- }
- ],
- mainId: 'UPId',
- isPage: true,
- sidx: 'FOrder',
- sort: 'ASC'
- });
- page.search();
- },
- search: function (param) {
- param = param || {};
- param.FTId = FTId;
- param.UserId = UserId;
- $('#gridtable').jfGridSet('reload', { queryJson: JSON.stringify(param) });
- }
- };
- refreshGirdData = function () {
- page.search();
- };
- page.init();
- }
|