define(['jquery', 'toastr', 'form', 'template','table',Fast.api.fixurl('/assets/addons/csmadmin/js/common/csmutils.js')], function ($, toastr, Form, Template,Table,csmutils) { var Controller = { mounted: function () { var that = this; that._render(); that._bind(); }, _render: function () { var that = this; var table = $("#table"); var BootstrapTable = $.fn.bootstrapTable.Constructor, _initTable = BootstrapTable.prototype.initTable, _initBody = BootstrapTable.prototype.initBody; BootstrapTable.prototype.initBody = function() { var that2 = this; _initBody.apply(this, Array.prototype.slice.apply(arguments)); //开启部门管理:开启角色按照部门授权 if(window.csmadmincfg.data.canadmindepratmng=='Y'){ $("#table tbody tr").each(function(i){ var that = $(this); var tdcount = that.find("td").length; var firsttd = that.find("td").eq(1); var lasttd = that.find("td").eq(tdcount-1); var iid = firsttd.text(); lasttd.prepend('授权人员 '); lasttd.prepend('授权组织 '); }); $(".btn-mnguser").click(function(){ var that3 = this; window.open(Fast.api.fixurl("csmadmin/group2admin/index?parentid="+$(this).attr("data-id"))); }); $(".btn-mngdepart").click(function(){ var that3 = this; window.open(Fast.api.fixurl("csmadmin/group2depart/index?parentid="+$(this).attr("data-id"))); }); } } }, _bind: function () { } }; return Controller; });