|
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596 |
- /*
- * 版 本 Learun-ADMS-Ultimate V7.0.0 数字化智慧校园(http://www.learun.cn)
- * Copyright (c) 2013-2018 北京泉江科技有限公司
- * 创建人:陈彬彬
- * 日 期:2017.07.11
- * 描 述:公告通知
- */
- var refreshGirdData; // 更新数据
- var category = request('F_CategoryId');
- var bootstrap = function ($, learun) {
- "use strict";
- var page = {
- init: function () {
- page.initGrid();
- 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_view').on('click', function () {
- var keyValue = $('#gridtable').jfGridValue('F_NewsId');
- if (learun.checkrow(keyValue)) {
- learun.layerForm({
- id: 'formview',
- title: '查看公告',
- url: top.$.rootUrl + '/Utility/ListContentIndex?id=' + keyValue,
- width: 1000,
- height: 650,
- maxmin: true,
- btn: null
- });
- }
- });
- },
- initGrid: function () {
- $('#gridtable').jfGrid({
- url: top.$.rootUrl + '/LR_OAModule/Notice/GetListOfSelf',
- headData: [
- { label: '公告标题', name: 'F_FullHead', index: 'F_FullHead', width: 600, align: 'left' },
- { label: '公告类别', name: 'F_Category', index: 'F_Category', width: 100, align: 'center' },
- {
- label: "发布时间", name: "F_ReleaseTime", index: "F_ReleaseTime", width: 140, align: "center",
- formatter: function (cellvalue) {
- return learun.formatDate(cellvalue, 'yyyy-MM-dd hh:mm');
- }
- },
- { label: '信息来源', name: 'F_SourceName', index: 'F_SourceName', width: 100, align: 'center' },
- {
- label: "阅读状态", name: "RNewsId", index: "RNewsId", width: 80, align: "center", autowidth: false,
- formatter: function (cellvalue) {
- if (cellvalue != null && cellvalue != "") {
- return "<span class=\"label label-success\">已阅读</span>";
- } else {
- return "<span class=\"label label-danger\">未阅读</span>";
- }
- }
- },
- {
- label: "阅读时间", name: "RTime", index: "RTime", width: 130, align: "center",
- formatter: function (cellvalue) {
- return learun.formatDate(cellvalue, 'yyyy-MM-dd hh:mm:ss');
- }
- }
- ],
- mainId: 'F_NewsId',
- isPage: false,
- sidx: 'F_CreateDate',
- sord: 'desc'
- });
- page.search();
- },
- search: function (param) {
-
- param = param || {};
- if (category) {
- param.categoryId = category;
- }
- $('#gridtable').jfGridSet('reload', param);
- }
- };
- // 保存数据后回调刷新
- refreshGirdData = function () {
- page.search();
- }
- page.init();
- }
-
-
|