浏览代码

公告发布权限列表显示逗号

临城职教中职
ndbs 2 年前
父节点
当前提交
96863a6170
共有 1 个文件被更改,包括 44 次插入21 次删除
  1. +44
    -21
      Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/Permission/Views/DepartmentReleasePermissions/Index.js

+ 44
- 21
Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/Permission/Views/DepartmentReleasePermissions/Index.js 查看文件

@@ -19,7 +19,7 @@ var bootstrap = function ($, learun) {
$('#multiple_condition_query').lrMultipleQuery(function (queryJson) { $('#multiple_condition_query').lrMultipleQuery(function (queryJson) {
page.search(queryJson); page.search(queryJson);
}, 220, 400); }, 220, 400);
$('#DepartmentID').lrDataSourceSelect({ code: 'classdata',value: 'id',text: 'name' });
$('#DepartmentID').lrDataSourceSelect({ code: 'classdata', value: 'id', text: 'name' });
// 刷新 // 刷新
$('#lr_refresh').on('click', function () { $('#lr_refresh').on('click', function () {
location.reload(); location.reload();
@@ -29,7 +29,7 @@ var bootstrap = function ($, learun) {
learun.layerForm({ learun.layerForm({
id: 'form1', id: 'form1',
title: '新增', title: '新增',
url: top.$.rootUrl + '/Permission/DepartmentReleasePermissions/Form?departmentId='+departmentId,
url: top.$.rootUrl + '/Permission/DepartmentReleasePermissions/Form?departmentId=' + departmentId,
width: 600, width: 600,
height: 400, height: 400,
callBack: function (id) { callBack: function (id) {
@@ -59,7 +59,7 @@ var bootstrap = function ($, learun) {
if (learun.checkrow(keyValue)) { if (learun.checkrow(keyValue)) {
learun.layerConfirm('是否确认删除该项!', function (res) { learun.layerConfirm('是否确认删除该项!', function (res) {
if (res) { if (res) {
learun.deleteForm(top.$.rootUrl + '/Permission/DepartmentReleasePermissions/DeleteForm', { keyValue: keyValue}, function () {
learun.deleteForm(top.$.rootUrl + '/Permission/DepartmentReleasePermissions/DeleteForm', { keyValue: keyValue }, function () {
refreshGirdData(); refreshGirdData();
}); });
} }
@@ -72,29 +72,52 @@ var bootstrap = function ($, learun) {
$('#gridtable').lrAuthorizeJfGrid({ $('#gridtable').lrAuthorizeJfGrid({
url: top.$.rootUrl + '/Permission/DepartmentReleasePermissions/GetPageList', url: top.$.rootUrl + '/Permission/DepartmentReleasePermissions/GetPageList',
headData: [ headData: [
{ label: "发布人员", name: "UserID", width: 100, align: "left",
formatterAsync: function (callback, value, row, op,$cell) {
learun.clientdata.getAsync('custmerData', {
url: '/LR_SystemModule/DataSource/GetDataTable?code=' + 'teacheruserdata',
key: value,
keyId: 'f_userid',
callback: function (_data) {
callback(_data['f_realname']);
}
});
}},
{ label: "公告类型", name: "Permission", width: 100, align: "left",
{
label: "发布人员", name: "UserID", width: 100, align: "left",
formatterAsync: function (callback, value, row, op, $cell) { formatterAsync: function (callback, value, row, op, $cell) {
learun.clientdata.getsAsync('dataItem', {
learun.clientdata.getAsync('custmerData', {
url: '/LR_SystemModule/DataSource/GetDataTable?code=' + 'teacheruserdata',
key: value, key: value,
code: 'NoticeCategory',
keyId: 'f_userid',
callback: function (_data) { callback: function (_data) {
callback(_data);
callback(_data['f_realname']);
} }
}); });
}},
}
},
{
label: "公告类型", name: "Permission", width: 100, align: "left",
formatterAsync: function (callback, value, row, op, $cell) {
if (value && value.indexOf(',') != -1) {
var content = '';
var texts = value.split(',');
for (var i = 0; i < texts.length; i++) {
learun.clientdata.getAsync('dataItem',
{
key: texts[i],
code: 'NoticeCategory',
callback: function (_data) {
content += _data.text + ',';

}
});
}
content = content.substring(0, content.length - 1);
callback(content);
} else {
learun.clientdata.getAsync('dataItem',
{
key: value,
code: 'NoticeCategory',
callback: function (_data) {
callback(_data.text);
}
});
}
}
},
], ],
mainId:'ID',
mainId: 'ID',
isPage: true isPage: true
}); });
page.search(); page.search();
@@ -102,7 +125,7 @@ var bootstrap = function ($, learun) {
search: function (param) { search: function (param) {
param = param || {}; param = param || {};
param.DepartmentID = departmentId; param.DepartmentID = departmentId;
$('#gridtable').jfGridSet('reload',{ queryJson: JSON.stringify(param) });
$('#gridtable').jfGridSet('reload', { queryJson: JSON.stringify(param) });
} }
}; };
refreshGirdData = function () { refreshGirdData = function () {


正在加载...
取消
保存