From 1df7b500638cc1b51df961a9ed87b5d109cb7760 Mon Sep 17 00:00:00 2001 From: dyy <807692433@qq.com> Date: Tue, 29 Mar 2022 09:32:53 +0800 Subject: [PATCH] =?UTF-8?q?=E3=80=90=E4=BF=AE=E6=94=B9=E3=80=91=E5=85=AC?= =?UTF-8?q?=E5=91=8A=E5=8F=91=E5=B8=83=E6=9D=83=E9=99=90=E8=AE=BE=E7=BD=AE?= =?UTF-8?q?=EF=BC=9A=E5=88=97=E8=A1=A8=E5=85=AC=E5=91=8A=E7=B1=BB=E5=9E=8B?= =?UTF-8?q?=E7=9A=84=E6=98=BE=E7=A4=BA=EF=BC=9B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Views/Department/Index.js | 7 +-- .../DepartmentReleasePermissions/Index.js | 43 ++++++++++++++----- 2 files changed, 36 insertions(+), 14 deletions(-) diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LR_OrganizationModule/Views/Department/Index.js b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LR_OrganizationModule/Views/Department/Index.js index 29741f684..7156e59da 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LR_OrganizationModule/Views/Department/Index.js +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LR_OrganizationModule/Views/Department/Index.js @@ -71,9 +71,10 @@ var bootstrap = function ($, learun) { url: top.$.rootUrl + '/Permission/DepartmentReleasePermissions/Index?departmentId=' + keyValue, width: 700, height: 400, - callBack: function (id) { - return top[id].acceptClick(refreshGirdData); - } + btn: null + //callBack: function (id) { + // return top[id].acceptClick(refreshGirdData); + //} }); } }); diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/Permission/Views/DepartmentReleasePermissions/Index.js b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/Permission/Views/DepartmentReleasePermissions/Index.js index a687275c3..b7a79981c 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/Permission/Views/DepartmentReleasePermissions/Index.js +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/Permission/Views/DepartmentReleasePermissions/Index.js @@ -6,7 +6,6 @@ */ var refreshGirdData; var departmentId = request('departmentId'); -console.log(123 + departmentId); var bootstrap = function ($, learun) { "use strict"; var page = { @@ -15,7 +14,6 @@ var bootstrap = function ($, learun) { page.bind(); }, bind: function () { - console.log(departmentId); $('#multiple_condition_query').lrMultipleQuery(function (queryJson) { page.search(queryJson); }, 220, 400); @@ -82,17 +80,37 @@ var bootstrap = function ($, learun) { callback(_data['f_realname']); } }); - }}, + } + }, { label: "公告类型", name: "Permission", width: 100, align: "left", formatterAsync: function (callback, value, row, op, $cell) { - learun.clientdata.getsAsync('dataItem', { - key: value, - code: 'NoticeCategory', - callback: function (_data) { - callback(_data); + if (value.indexOf(',') > 0) { + var valueTemp = value.split(','); + var html = ''; + for (var i = 0; i < valueTemp.length; i++) { + learun.clientdata.getAsync('dataItem', { + key: valueTemp[i], + code: 'NoticeCategory', + callback: function (_data) { + html += _data.text; + } + }); + if (i < valueTemp.length - 1) { + html += ','; + } } - }); - }}, + callback(html); + } else { + learun.clientdata.getAsync('dataItem', { + key: value, + code: 'NoticeCategory', + callback: function (_data) { + callback(_data.text); + } + }); + } + } + }, ], mainId:'ID', isPage: true @@ -101,7 +119,10 @@ var bootstrap = function ($, learun) { }, search: function (param) { param = param || {}; - param.DepartmentID = departmentId; + if (departmentId) { + param.DepartmentID = departmentId; + } + param.DepartmentID = param.DepartmentID == "-1" ? "" : param.DepartmentID; $('#gridtable').jfGridSet('reload',{ queryJson: JSON.stringify(param) }); } };