roleList.html 25 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661
  1. <!-- 角色管理 -->
  2. <style>
  3. #rolemanager_grid_01>div { margin-top: 0px;}
  4. #rolemanager_grid_sub .layui-tab { margin-top: 0px;}
  5. </style>
  6. <div class="plg-tab-container">
  7. <div class="layui-carousel" id="rolemanager_grid" style="margin-bottom: -15px;">
  8. <div carousel-item>
  9. <div id="rolemanager_grid_01" class="grid-container-full"></div>
  10. <div id="rolemanager_grid_01_edit" class="grid-container-full" style="min-height: 550px;">
  11. <div class="layui-row">
  12. <div class="layui-col-lg12">
  13. <div class="tc-title">
  14. <a href="#" id="rolemanager_btn_back" class="back-link"><i class="layui-icon layui-icon-return"></i></a>
  15. <span id="rolemanager_span_title"></span>
  16. </div>
  17. </div>
  18. </div>
  19. <div class="layui-row layui-col-space15" style="margin: 20px;">
  20. <div class="layui-col-lg12 tc-panel" style="min-height: 300px;">
  21. <div id="rolemanager_grid_sub" style="min-height: 450px;"></div>
  22. </div>
  23. </div>
  24. </div>
  25. </div>
  26. </div>
  27. </div>
  28. <script type="text/javascript">
  29. /**
  30. * jiw
  31. * 2018.10.30
  32. * 角色、角色组管理界面
  33. */
  34. (function () {
  35. var grid = null, grid1 = null, grid2 = null, grid3 = null;
  36. var form1 = null, tabs1;
  37. var grid_wnd_0 = null, tmp_gridrow_id = 0, tmp_gridrowdata = null, stepindex = 0;
  38. var m = $(document.body).height();
  39. var param = { "pageNum": 1, "pageSize": 10 };
  40. gridInit(0);
  41. //滑屏
  42. var carousel = layui.carousel;
  43. var car = carousel.render({
  44. elem: "#rolemanager_grid",
  45. autoplay: false,
  46. index: 0,
  47. arrow: "none",
  48. indicator: "none",
  49. anim: "fade",
  50. width: "100%",
  51. height: "100%"
  52. });
  53. function changePanel(name) {
  54. car.slide(name);
  55. }
  56. //返回主页面
  57. $("#rolemanager_btn_back").click(function () {
  58. changePanel("rolemanager_grid_01");
  59. return false;
  60. });
  61. function gridInit(type) {
  62. if (type === 0) {
  63. var gridOpts = {
  64. skin: "terrace",
  65. rowId: "p_id",
  66. columns: [
  67. { id: "p_id", name: "id", type: "ro", hidden: true },
  68. { id: "p_name", name: "角色名称", type: "ro" },
  69. { id: "p_description", name: "描述", type: "ro" },
  70. { id: "p_systemid", name: "系统编号", type: "ro" },
  71. { id: "p_companyid", name: "公司编号", type: "ro" },
  72. {
  73. id: "op", name: "操作", type: 'button', align: "center", width: 240, render: function () {
  74. return "修改^res_roleManage_editClick,删除^res_roleManage_delClick,分配权限^res_roleManage_edit1Click,分配用户^res_roleManage_edit2Click";
  75. }
  76. }
  77. ],
  78. multiselect: false,
  79. toolbar: [
  80. { type: "input", name: "name", label: "角色名称:", placeholder: "", offsetLeft: 10 }, { type: "newcolumn" },
  81. { type: "button", name: "btn_search", width: 50, value: "查询" },
  82. { type: "newcolumn" },
  83. { type: "newcolumn" },
  84. {
  85. type: "button",
  86. name: "btn_add",
  87. className: "plg-toolbar-right",
  88. width: 80,
  89. offsetLeft: 20,
  90. value: "<i class='layui-icon layui-icon-add-1'></i>新增"
  91. }, { type: "newcolumn" }
  92. ],
  93. imagePath: "/prologui/assets/PlgGrid",
  94. url: "/api/service-users/role/getPlgFxRolePage/v1.0",
  95. type: "post",
  96. params: param,
  97. contentType: "application/x-www-form-urlencoded",
  98. page: true,
  99. totalCount: "totalCount"
  100. };
  101. grid = new PlgGrid(gridOpts);
  102. grid.renderTo("rolemanager_grid_01");
  103. grid.loadData();
  104. //工具栏按钮事件
  105. grid.attachToolBarEvent("onButtonClick", function (name) {
  106. // 查询
  107. if (name === "btn_search") {
  108. grid.setParams(grid.getToolBarForm().getFormData());
  109. grid.reload();
  110. }
  111. // 新增
  112. else if (name === "btn_add") {
  113. addrole();
  114. }
  115. });
  116. // 双击行编辑
  117. grid.on("onRowDblClicked", function () {
  118. show_info(grid.getSelectedRowData());
  119. });
  120. }
  121. }
  122. //添加角色
  123. function addrole() {
  124. stepindex = 0;
  125. var str = `<div class="layui-col-lg12 tc-15-step" id="rolemanager_grid_roleadd_main">
  126. <ol>
  127. <li class="succeed">
  128. <div class="tc-15-step-name"><span class="tc-15-step-num">1</span>填写角色信息</div>
  129. <div class="tc-15-step-arrow"></div>
  130. </li>
  131. <li class="disabled">
  132. <div class="tc-15-step-name"><span class="tc-15-step-num">2</span>分配权限</div>
  133. <div class="tc-15-step-arrow"></div>
  134. </li>
  135. <li class="disabled">
  136. <div class="tc-15-step-name"><span class="tc-15-step-num">3</span>分配用户</div>
  137. <div class="tc-15-step-arrow"></div>
  138. </li>
  139. <li class="disabled">
  140. <div class="tc-15-step-name"><span class="tc-15-step-num">4</span>完成</div>
  141. <div class="tc-15-step-arrow"></div>
  142. </li>
  143. </ol>
  144. </div>
  145. <div class="layui-col-lg12" style="min-height: 280px;">
  146. <div id="rolemanager_grid_roleadd_content"></div>
  147. </div>
  148. <div class="layui-col-lg12 button-ft">
  149. <button class="layui-btn layui-btn-sm layui-btn-normal" id="roleadd_btn_next">下一步</button>
  150. </div>`;
  151. $("#rolemanager_grid_sub").html(str);
  152. $("#roleadd_btn_next").show();
  153. $("ol li").each(function () {
  154. if ($(this).index() === 0) {
  155. $(this).removeClass("disabled");
  156. $(this).addClass("succeed");
  157. }
  158. else {
  159. $(this).removeClass("succeed");
  160. $(this).addClass("disabled");
  161. }
  162. });
  163. roleFormInit(0, {});
  164. changePanel("rolemanager_grid_01_edit");
  165. $("#rolemanager_grid_roleadd_content").height((m > 530) ? m - 400 : m);
  166. $("#rolemanager_grid_sub").width("100%");
  167. $("#rolemanager_grid_01_edit .tc-panel").attr("style", "min-height: 400px;");
  168. $("#roleadd_btn_next").click(function () {
  169. if (stepindex === 0) {
  170. var b = form1.validate();
  171. if (!b) return;
  172. var fd = form1.getFormData();
  173. var rdata = save_roleinfo(grid, "/api/service-users/role/insertPlgFxRole/v1.0", "post", "application/x-www-form-urlencoded", fd);
  174. if (rdata === null) {
  175. layer.msg("获取角色信息失败!");
  176. return;
  177. }
  178. tmp_gridrow_id = rdata.p_id;
  179. $("#rolemanager_grid_roleadd_content").html("");
  180. roleauthInit(0, rdata);
  181. }
  182. else if (stepindex === 1) {
  183. $("#rolemanager_grid_roleadd_content").html("");
  184. roleUsersInit(0, rdata);
  185. }
  186. else if (stepindex === 2) {
  187. //var b = save_users(0);
  188. //if (b) {
  189. $("#rolemanager_grid_roleadd_content").html("<h1>角色新增成功,3秒后返回!</h1>");
  190. grid.reload();
  191. $("#roleadd_btn_next").hide();
  192. setTimeout(function () { changePanel("rolemanager_grid_01"); }, 3000);
  193. //}
  194. ////console.log(b);
  195. }
  196. stepindex++;
  197. $("ol li").each(function () {
  198. if (stepindex === $(this).index()) {
  199. $(this).removeClass("disabled");
  200. $(this).addClass("succeed");
  201. }
  202. });
  203. });
  204. }
  205. //角色表单
  206. function roleFormInit(ntype, rdata) {
  207. var tit = "新增角色";
  208. var rediv = "rolemanager_grid_roleadd_content";
  209. if (ntype === 1) {
  210. tit = "角色 [" + rdata.p_name + "] 信息修改";
  211. rediv = "rolemanager_grid_sub";
  212. }
  213. $("#rolemanager_span_title").html(tit);
  214. $("#" + rediv).html("");
  215. var formcfg = {
  216. renderer: rediv,
  217. items: [
  218. { type: "settings", inputWidth: 140, width: 550, labelWidth: 80, position: "label-left", labelAlign: "left" },
  219. {
  220. type: "settings",
  221. inputWidth: 140,
  222. width: 550,
  223. labelWidth: 80,
  224. position: "label-left",
  225. labelAlign: "left"
  226. },
  227. {
  228. type: "block", width: 520,
  229. list: [
  230. { type: "input", name: "p_name", label: "角色名称:", validate: "NotEmpty", required: true, editable: false },
  231. { type: "newcolumn", offset: 40 },
  232. { type: "input", name: "p_description", label: "描述:", validate: "NotEmpty", required: true }]
  233. },
  234. {
  235. type: "block", width: 520,
  236. list: [
  237. { type: "input", name: "p_companyid", label: "公司编号:" }, { type: "hidden", name: "p_id" },
  238. { type: "newcolumn", offset: 40 },
  239. { type: "input", name: "p_systemid", label: "系统编号:" }]
  240. },
  241. {
  242. type: "block", width: 520, list: [
  243. { type: "button", name: "btn_save_roleinfo", offsetLeft: 80, value: "保存", hidden: (ntype != 1) }
  244. ]
  245. }
  246. ]
  247. };
  248. form1 = new PlgForm(formcfg);
  249. form1.setFormData(rdata);
  250. if (ntype === 1) {
  251. form1.getDForm().disableItem("p_name");
  252. }
  253. form1.attachEvent("onButtonClick", function (name) {
  254. if (name === "btn_save_roleinfo") {
  255. var fd = form1.getFormData();
  256. save_roleinfo(grid, "/api/service-users/role/updatePlgFxRole/v1.0", "put", "application/x-www-form-urlencoded", fd);
  257. }
  258. });
  259. }
  260. //角色信息保存
  261. function save_roleinfo(grid, url, type, contentType, formData) {
  262. var rep = null;
  263. Prolog.ajax({
  264. url: url,
  265. type: type,
  266. contentType: contentType,
  267. data: formData,
  268. async: false,
  269. success: function (data) {
  270. if (data.success) {
  271. if (type === "put")
  272. layer.msg("保存成功!");
  273. grid.reload();
  274. rep = data.data;
  275. }
  276. else {
  277. layer.msg(data.message);
  278. }
  279. },
  280. error: function () {
  281. }
  282. });
  283. return rep;
  284. }
  285. //分配权限
  286. function roleauthInit(ntype, rdata) {
  287. var rediv = "rolemanager_grid_roleadd_content";
  288. param.type = 0;
  289. var tbar = [
  290. {
  291. type: "input",
  292. name: "search",
  293. label: "查询条件:",
  294. placeholder: "名称",
  295. offsetLeft: 10
  296. }, { type: "newcolumn" },
  297. {
  298. type: "combo",
  299. name: "type",
  300. label: "状态:",
  301. offsetLeft: 10,
  302. width: 130,
  303. options: [{ text: "未分配", value: "0" }, { text: "已分配", value: "1" }],
  304. hidden: (ntype === 0)
  305. }, { type: "newcolumn" },
  306. { type: "button", name: "btn_search", offsetLeft: 20, value: "查询" }, { type: "newcolumn" },
  307. { type: "button", name: "btn_save", offsetLeft: 10, value: "保存" }
  308. ];
  309. if (ntype === 1) {
  310. rediv = "rolemanager_grid_sub";
  311. //param.type = 1;
  312. }
  313. $("#" + rediv).html("");
  314. var gridopt = {
  315. skin: "terrace",
  316. rowId: "p_id",
  317. columns: [
  318. { id: "p_id", name: "id", type: "ro", hidden: true },
  319. { id: "p_name", name: "名称", type: "ro" }
  320. ],
  321. toolbar: tbar,
  322. multiselect: true,
  323. imagePath: "/prologui/assets/PlgGrid",
  324. url: "/api/service-users/role/getRoleAuth/v1.0",
  325. type: "post",
  326. contentType: "application/x-www-form-urlencoded",
  327. params: param,
  328. page: true,
  329. totalCount: "totalCount"
  330. };
  331. param.roleid = rdata.p_id;
  332. grid_wnd_0 = new PlgGrid(gridopt);
  333. grid_wnd_0.renderTo(rediv);
  334. grid_wnd_0.loadData();
  335. $("#" + rediv).height(m - 300);
  336. if (ntype === 1) {
  337. grid_wnd_0.attachToolBarEvent("onButtonClick", function (name) {
  338. // 查询
  339. if (name === "btn_search") {
  340. var p = grid_wnd_0.getToolBarForm().getFormData();
  341. p.pageNum = 1;
  342. p.pageSize = 10;
  343. p.roleid = rdata.p_id;
  344. grid_wnd_0.setParams(p);
  345. grid_wnd_0.reload();
  346. }
  347. else if (name === "btn_save") {
  348. var par, type;
  349. type = grid_wnd_0.getToolBarForm().getFormData().type;
  350. if (type === "0") {
  351. par = { "type": "1", "roleid": tmp_gridrow_id, "authids": grid_wnd_0.getCheckedIds() };
  352. }
  353. else if (type === "1") {
  354. par = { "type": "0", "roleid": tmp_gridrow_id, "authids": grid_wnd_0.getCheckedIds() };
  355. }
  356. utilAjaxGJ("/api/service-users/role/allotRoleAuth/v1.0", "post", JSON.stringify(par), function (data) {
  357. layer.msg(data.message);
  358. grid_wnd_0.reload();
  359. }, "application/json");
  360. }
  361. });
  362. grid_wnd_0.getToolBarForm().getCombo("type").attachEvent("onChange", function (v, t) {
  363. var p = grid_wnd_0.getToolBarForm().getFormData();
  364. p.pageNum = 1;
  365. p.pageSize = 10;
  366. p.roleid = rdata.p_id;
  367. grid_wnd_0.setParams(p);
  368. grid_wnd_0.reload();
  369. });
  370. }
  371. }
  372. //分配用户
  373. function roleUsersInit(ntype, rdata) {
  374. var rediv = "rolemanager_grid_roleadd_content";
  375. param.type = 0;
  376. var tbar = [
  377. {
  378. type: "input",
  379. name: "search",
  380. label: "查询条件:",
  381. placeholder: "名称",
  382. offsetLeft: 10
  383. }, { type: "newcolumn" },
  384. {
  385. type: "combo",
  386. name: "type",
  387. label: "状态:",
  388. offsetLeft: 10,
  389. width: 130,
  390. options: [{ text: "未分配", value: "0" }, { text: "已分配", value: "1" }],
  391. hidden: (ntype === 0)
  392. }, { type: "newcolumn" },
  393. { type: "button", name: "btn_search", offsetLeft: 20, value: "查询" }, { type: "newcolumn" },
  394. { type: "button", name: "btn_save", offsetLeft: 10, value: "保存" }
  395. ];
  396. if (ntype === 1) {
  397. rediv = "rolemanager_grid_sub";
  398. //param.type = 1;
  399. }
  400. $("#" + rediv).html("");
  401. var tabcfg = {
  402. renderer: rediv,
  403. indexActive: 0,
  404. skin: "card",
  405. content: [{
  406. title: "用户分配",
  407. id: "role_user_wnd_tab1",
  408. template: '<div id="rolemanager_grid_usser_01" style=""></div>'
  409. }, {
  410. title: "用户组分配",
  411. id: "role_user_wnd_tab2",
  412. template: '<div id="rolemanager_grid_usser_02" style=""></div>'
  413. }]
  414. };
  415. var gridopt;
  416. var tabDiv;
  417. tabs1 = new PlgTabs(tabcfg).on(function (ele) {
  418. if (ele.index === 0) {
  419. tabDiv = "rolemanager_grid_usser_01";
  420. gridopt = {
  421. skin: "terrace",
  422. rowId: "p_id",
  423. columns: [
  424. { id: "p_id", name: "id", type: "ro", hidden: true },
  425. { id: "p_nickname", name: "用户名称", type: "ro" },
  426. { id: "p_workernumber", name: "工号", type: "ro" }
  427. ],
  428. toolbar: tbar,
  429. multiselect: true,
  430. imagePath: "/prologui/assets/PlgGrid",
  431. url: "/api/service-users/role/getUserRole/v1.0",
  432. type: "post",
  433. contentType: "application/x-www-form-urlencoded",
  434. params: param,
  435. page: true,
  436. totalCount: "totalCount"
  437. };
  438. }
  439. if (ele.index === 1) {
  440. tabDiv = "rolemanager_grid_usser_02";
  441. gridopt = {
  442. skin: "terrace",
  443. rowId: "p_id",
  444. columns: [
  445. { id: "p_id", name: "id", type: "ro", hidden: true },
  446. { id: "p_name", name: "名称", type: "ro" },
  447. { id: "p_description", name: "描述", type: "ro" }
  448. ],
  449. toolbar: tbar,
  450. multiselect: true,
  451. imagePath: "/prologui/assets/PlgGrid",
  452. url: "/api/service-users/role/getUserRoleGroup/v1.0",
  453. type: "post",
  454. contentType: "application/x-www-form-urlencoded",
  455. params: param,
  456. page: true,
  457. totalCount: "totalCount"
  458. };
  459. }
  460. tabcfg.indexActive = ele.index;
  461. $("#" + tabDiv).html("");
  462. param.roleid = rdata.p_id;
  463. grid_wnd_0 = new PlgGrid(gridopt);
  464. grid_wnd_0.renderTo(tabDiv);
  465. grid_wnd_0.loadData();
  466. $("#" + tabDiv).height(m - 300);
  467. if (ntype === 1) {
  468. grid_wnd_0.attachToolBarEvent("onButtonClick", function (name) {
  469. // 查询
  470. if (name === "btn_search") {
  471. var p = grid_wnd_0.getToolBarForm().getFormData();
  472. p.pageNum = 1;
  473. p.pageSize = 10;
  474. p.roleid = rdata.p_id;
  475. grid_wnd_0.setParams(p);
  476. grid_wnd_0.reload();
  477. }
  478. else if (name === "btn_save") {
  479. save_users(1, ele.index);
  480. }
  481. });
  482. grid_wnd_0.getToolBarForm().getCombo("type").attachEvent("onChange", function (v, t) {
  483. var p = grid_wnd_0.getToolBarForm().getFormData();
  484. p.pageNum = 1;
  485. p.pageSize = 10;
  486. p.roleid = rdata.p_id;
  487. grid_wnd_0.setParams(p);
  488. grid_wnd_0.reload();
  489. });
  490. }
  491. });
  492. tabs1.changeTabs("role_user_wnd_tab1");
  493. }
  494. //分配保存
  495. function save_users(ntype, stype) {
  496. var par, type, rsp = null, url;
  497. if (stype == 0) {
  498. url = "/api/service-users/role/allotUserRole/v1.0";
  499. (ntype === 0) ? type = "0" : type = grid_wnd_0.getToolBarForm().getFormData().type;
  500. if (type === "0") {
  501. par = { "type": "1", "roleid": tmp_gridrow_id, "userids": grid_wnd_0.getCheckedIds() };
  502. }
  503. else if (type === "1") {
  504. par = { "type": "0", "roleid": tmp_gridrow_id, "userids": grid_wnd_0.getCheckedIds() };
  505. }
  506. }
  507. else if (stype == 1) {
  508. url = "/api/service-users/role/allotUserRoleGroup/v1.0";
  509. (ntype === 0) ? type = "0" : type = grid_wnd_0.getToolBarForm().getFormData().type;
  510. if (type === "0") {
  511. par = { "type": "1", "roleid": tmp_gridrow_id, "usergroupids": grid_wnd_0.getCheckedIds() };
  512. }
  513. else if (type === "1") {
  514. par = { "type": "0", "roleid": tmp_gridrow_id, "usergroupids": grid_wnd_0.getCheckedIds() };
  515. }
  516. }
  517. else if (stype == 2) {
  518. url = "/api/service-users/role/allotUserRoleGroup/v1.0";
  519. (ntype === 0) ? type = "0" : type = grid_wnd_0.getToolBarForm().getFormData().type;
  520. if (type === "0") {
  521. par = { "type": "1", "roleid": tmp_gridrow_id, "usergroupids": grid_wnd_0.getCheckedIds() };
  522. }
  523. else if (type === "1") {
  524. par = { "type": "0", "roleid": tmp_gridrow_id, "usergroupids": grid_wnd_0.getCheckedIds() };
  525. }
  526. }
  527. if (grid_wnd_0.getCheckedIds() === "") return rsp;
  528. layer.msg("数据处理中...");
  529. Prolog.ajax({
  530. url: url,
  531. type: "post",
  532. contentType: "application/json",
  533. data: JSON.stringify(par),
  534. async: false,
  535. success: function (data) {
  536. if (typeof data != "object") data = JSON.parse(data);
  537. if (data.success) {
  538. layer.closeAll();
  539. if (ntype === 1) {
  540. grid_wnd_0.reload();
  541. grid.reload();
  542. }
  543. rsp = data;
  544. }
  545. else {
  546. layer.open({
  547. type: 1, offset: "auto", id: 'layerError', title: "错误提示"
  548. , area: ["500px"], content: '<div style="padding: 10px;">' + data.message + '</div>'
  549. , btn: '关闭', btnAlign: 'r', shade: 0
  550. , yes: function () {
  551. layer.closeAll();
  552. }
  553. });
  554. rsp = null;
  555. }
  556. },
  557. error: function () {
  558. }
  559. });
  560. return rsp;
  561. }
  562. //查看详细
  563. function show_info(rdata) {
  564. $("#roledmanager_span_title").html("角色 [" + rdata.p_name + "] 信息查看");
  565. var str = `<ul>
  566. <li><span class='span-item-tit'>名称</span>
  567. <span class='span-item-txt'>` + ((rdata.p_name === null) ? "" : rdata.p_name) + `</sapn></li>
  568. <li><span class='span-item-tit'>描述</span>
  569. <span class='span-item-txt'>` + ((rdata.p_description === null) ? "" : rdata.p_description) + `</span></li>
  570. <li><span class='span-item-tit'>公司编号</span>
  571. <span class='span-item-txt'>` + ((rdata.p_companyid === null) ? "" : rdata.p_companyid) + `</span></li>
  572. <li><span class='span-item-tit'>系统编号</span>
  573. <span class='span-item-txt'>` + ((rdata.p_systemid === null) ? "" : rdata.p_systemid) + `</span></li>
  574. </ul>`;
  575. $("#rolemanager_grid_sub").html(str);
  576. changePanel("rolemanager_grid_01_edit");
  577. }
  578. window.res_roleManage_delClick = function (rid, rdata) {
  579. Prolog.delGridRowData(grid, "/api/service-users/role/deletePlgFxRoleById/v1.0", "", "", { "id": rid }, false);
  580. return false;
  581. };
  582. window.res_roleManage_editClick = function (rid, rdata) {
  583. grid.selectRowById(rid);
  584. roleFormInit(1, rdata);
  585. changePanel("usermanager_grid_01_edit");
  586. return false;
  587. };
  588. window.res_roleManage_edit1Click = function (rid, rdata) {
  589. grid.selectRowById(rid);
  590. tmp_gridrow_id = rid;
  591. $("#rolemanager_span_title").html("角色 [" + rdata.p_name + "] 分配权限");
  592. roleauthInit(1, rdata);
  593. changePanel("rolemanager_grid_01_edit");
  594. $("#rolemanager_grid_sub").width("100%");
  595. return false;
  596. };
  597. window.res_roleManage_edit2Click = function (rid, rdata) {
  598. grid.selectRowById(rid);
  599. tmp_gridrow_id = rid;
  600. $("#rolemanager_span_title").html("角色 [" + rdata.p_name + "] 分配用户");
  601. roleUsersInit(1, rdata);
  602. changePanel("rolemanager_grid_01_edit");
  603. $("#rolemanager_grid_sub").width("100%");
  604. $("#rolemanager_grid_01_edit .tc-panel").attr("style", "padding:0;margin:0;min-height: 300px;");
  605. return false;
  606. };
  607. })();
  608. </script>