|
- /* * 版 本 Learun-ADMS-Ultimate V7.0.0 数字化智慧校园(http://www.learun.cn)
- * Copyright (c) 2013-2018 北京泉江科技有限公司
- * 创建人:超级管理员
- * 日 期:2019-11-19 09:47
- * 描 述:实习基地建设
- */
- 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_add').on('click', function () {
- learun.layerForm({
- id: 'form',
- title: '新增',
- url: top.$.rootUrl + '/EducationalAdministration/PracticeBase/Form',
- width: 600,
- height: 400,
- callBack: function (id) {
- return top[id].acceptClick(refreshGirdData);
- }
- });
- });
- // 编辑
- $('#lr_edit').on('click', function () {
- var keyValue = $('#gridtable').jfGridValue('ID');
- if (learun.checkrow(keyValue)) {
- learun.layerForm({
- id: 'form',
- title: '编辑',
- url: top.$.rootUrl + '/EducationalAdministration/PracticeBase/Form?keyValue=' + keyValue,
- width: 600,
- height: 400,
- callBack: function (id) {
- return top[id].acceptClick(refreshGirdData);
- }
- });
- }
- });
-
- //岗位管理
- $('#lr_post').on('click',
- function() {
- var keyValue = $('#gridtable').jfGridValue('ID');
- if (learun.checkrow(keyValue)) {
- learun.layerFormForPercent({
- id: 'formIndex',
- title: '岗位管理',
- url: top.$.rootUrl + '/EducationalAdministration/PBPost/Index?PBID=' + keyValue,
- width: '80%',
- height: '80%',
- 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 + '/EducationalAdministration/PracticeBase/DeleteForm', { keyValue: keyValue}, function () {
- refreshGirdData();
- });
- }
- });
- }
- });
- },
- // 初始化列表
- initGird: function () {
- $('#gridtable').lrAuthorizeJfGrid({
- url: top.$.rootUrl + '/EducationalAdministration/PracticeBase/GetPageList',
- headData: [
- { label: "名称", name: "Name", width: 100, align: "left"},
- { label: "地址", name: "Address", width: 100, align: "left"},
- { label: "规模", name: "Scale", width: 100, align: "left"},
- { label: "支持项目", name: "SupportProjets", width: 100, align: "left"},
- { label: "负责人", name: "Head", width: 100, align: "left"},
- { label: "联系方式", name: "Mobile", width: 100, align: "left"},
- { label: "备注", name: "Remark", width: 100, align: "left"},
- ],
- mainId:'ID',
- isPage: true
- });
- page.search();
- },
- search: function (param) {
- param = param || {};
- $('#gridtable').jfGridSet('reload',{ queryJson: JSON.stringify(param) });
- }
- };
- refreshGirdData = function () {
- page.search();
- };
- page.init();
- }
|