321e9c808f65dd87c79de7ae6b3a1a82ec4ddc08.svn-base 22 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504
  1. <?xml version="1.0" encoding="UTF-8"?>
  2. <?xml-stylesheet type="text/css" href="../../css/body.css" ?>
  3. <xhtml:html xmlns:xhtml="http://www.w3.org/1999/xhtml" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns="http://www.w3.org/2002/01/xforms" xmlns:ev="http://www.w3.org/2001/xml-events">
  4. <xhtml:head>
  5. <xhtml:title>
  6. <![CDATA[公用界面管理 >> 权限设置管理 >> 角色使用权限设定]]>
  7. </xhtml:title>
  8. <model id="model1" autocdata="false">
  9. <instance id="instance1">
  10. <root xmlns="">
  11. <initData>
  12. </initData>
  13. <codeData>
  14. </codeData>
  15. <formData>
  16. <searchInfo>
  17. <ROLE_NM/>
  18. <DEPT_CD/>
  19. <P_DEPT_CD/>
  20. </searchInfo>
  21. <searchInfo2>
  22. <ROLE_CD/>
  23. <MNSCR_ID>*</MNSCR_ID>
  24. <FCNRS_TP>R</FCNRS_TP>
  25. </searchInfo2>
  26. </formData>
  27. <gridData>
  28. <viewItem>A</viewItem>
  29. </gridData>
  30. </root>
  31. </instance>
  32. <script type="javascript" ev:event="xforms-ready">
  33. <![CDATA[
  34. if (window.parent == null) Init();
  35. ]]>
  36. </script>
  37. </model>
  38. <script type="javascript" src="../../js/boaCommon.js"/>
  39. <script type="javascript" src="../../js/boaMsg.js"/>
  40. <script type="javascript" src="../../js/mesCommon.js">
  41. <![CDATA[
  42. var submitID = "UIZ020030-service";
  43. var isValid = false;
  44. var isUseDeptPriv = true;
  45. function Init(node) {
  46. InitParams(node);
  47. isValid = model.getValue("/root/initData/rcvInfo/ROOT_AMN_YN") == "Y" ||
  48. model.getValue("/root/initData/rcvInfo/DEPT_MNG_YN") == "Y";
  49. if (isValid == false) return;
  50. exec("/root/initData/rcvInfo", "", "", "/root/codeData/ListResult_0_VO", "/root/codeData/ListResult_1_VO",
  51. "/root/codeData/ListResult_2_VO", "/root/codeData/ListResult_3_VO", "/root/codeData/ListResult_4_VO");
  52. model.setValue("/root/formData/searchInfo/DEPT_CD",
  53. model.getValue("/root/codeData/ListResult_0_VO/ListResult_0_Row/DEPT_CD"));
  54. // 添加权限选项中的 NULL
  55. model.duplicate("/root/codeData/ListResult_1_VO",
  56. "/root/codeData/ListResult_1_VO/ListResult_1_Row", "*[1]");
  57. model.setValue("/root/codeData/ListResult_1_VO/ListResult_1_Row/FCNRS_ID", "NULL");
  58. model.setValue("/root/codeData/ListResult_1_VO/ListResult_1_Row/FCNRS_NM", "NULL");
  59. model.setValue("/root/codeData/ListResult_1_VO/ListResult_1_Row/FCNRS_TP", "R");
  60. // 设置当前菜单代码
  61. var cnt = model.getXPathValue("count(/root/codeData/ListResult_2_VO/ListResult_2_Row)");
  62. isUseDeptPriv = model.getXPathValue("count(/root/resData/ListResult_4_VO/ListResult_4_Row)") > 0;
  63. if (isUseDeptPriv) {
  64. for (var i = cnt; i > 0; i--) {
  65. var mnscr = model.getValue("/root/codeData/ListResult_2_VO/ListResult_2_Row[" + i + "]/MNSCR_ID");
  66. if (model.getValue("/root/codeData/ListResult_3_VO/ListResult_3_Row[MNSCR_ID = '" + mnscr + "']/MNSCR_ID") == "" ||
  67. model.getValue("/root/codeData/ListResult_4_VO/ListResult_4_Row[MNSCR_ID = '" + mnscr + "']/MNSCR_ID") == "")
  68. model.removenode("/root/codeData/ListResult_2_VO/ListResult_2_Row[" + i + "]");
  69. }
  70. } else {
  71. for (var i = cnt; i > 0; i--) {
  72. var mnscr = model.getValue("/root/codeData/ListResult_2_VO/ListResult_2_Row[" + i + "]/MNSCR_ID");
  73. if (model.getValue("/root/codeData/ListResult_3_VO/ListResult_3_Row[MNSCR_ID = '" + mnscr + "']/MNSCR_ID") == "")
  74. model.removenode("/root/codeData/ListResult_2_VO/ListResult_2_Row[" + i + "]");
  75. }
  76. }
  77. model.duplicate("/root/formData/searchInfo", "/root/initData/rcvInfo/REG_ID");
  78. model.duplicate("/root/formData/searchInfo", "/root/initData/rcvInfo/ROOT_AMN_YN");
  79. model.duplicate("/root/formData/searchInfo", "/root/initData/rcvInfo/DEPT_MNG_YN");
  80. model.duplicate("/root/formData/searchInfo2", "/root/initData/rcvInfo/REG_ID");
  81. pageInit();
  82. }
  83. function pageInit() {
  84. model.removenode("/root/reqData");
  85. model.removenode("/root/resData");
  86. model.refresh();
  87. var datagrid = datagrid1;
  88. datagrid.rebuild();
  89. var colRef = datagrid.colRef("ROLE_CD");
  90. datagrid.isReadOnly(0, colRef, datagrid.rows-1, colRef) = true;
  91. colStyle(datagrid, "ROLE_NM,DEPT_NM,LOCKED_YN");
  92. }
  93. function find() {
  94. if (isValid == false) return;
  95. exec("/root/formData/searchInfo", "", "find", "/root/gridData/ListResult_0_VO", "/root/gridData/ListResult_2_VO");
  96. model.removenode("/root/gridData/ListResult_1_VO");
  97. radio1.dispatch("xforms-value-changed");
  98. }
  99. function save() {
  100. if (isValid == false) return;
  101. exec("/root/formData", datagrid1, "save", "/root/gridData/ListResult_0_VO", "/root/gridData/ListResult_1_VO");
  102. find2(false);
  103. radio1.dispatch("xforms-value-changed");
  104. }
  105. function create() {
  106. if (isValid == false) return;
  107. var datagrid = datagrid1;
  108. commAddRow(datagrid, "ROLE_CD,ROLE_NM,LOCKED");
  109. datagrid.valueMatrix(datagrid.row, datagrid.colRef("DEPT_CD")) = treeview1.value;
  110. datagrid.valueMatrix(datagrid.row, datagrid.colRef("DEPT_NM")) = treeview1.label;
  111. }
  112. function remove() {}
  113. function find2(refresh) {
  114. showProgressBar();
  115. if (model.getValue("/root/formData/searchInfo2/ROLE_CD") == "") {
  116. model.removeNodeset("/root/gridData/ListResult_1_VO");
  117. } else {
  118. if (typeof refresh == "undefined"|| refresh == null || refresh == "") refresh = true;
  119. if (refresh) exec("/root/formData/searchInfo2", "", "onclick", "/root/gridData/ListResult_1_VO");
  120. }
  121. if (model.getValue("/root/formData/searchInfo2/ROLE_CD") != "") {
  122. var cnt = model.getXPathValue("count(/root/gridData/ListResult_1_VO/ListResult_1_Row)");
  123. if (isUseDeptPriv) {
  124. for (var i = cnt; i > 0; i--) {
  125. var mnscr = model.getValue("/root/gridData/ListResult_1_VO/ListResult_1_Row[" + i + "]/MNSCR_ID");
  126. if (model.getValue("/root/codeData/ListResult_3_VO/ListResult_3_Row[MNSCR_ID = '" + mnscr + "']/MNSCR_ID") == "" ||
  127. model.getValue("/root/codeData/ListResult_4_VO/ListResult_4_Row[MNSCR_ID = '" + mnscr + "']/MNSCR_ID") == "")
  128. model.removenode("/root/gridData/ListResult_1_VO/ListResult_1_Row[" + i + "]");
  129. }
  130. } else {
  131. for (var i = cnt; i > 0; i--) {
  132. var mnscr = model.getValue("/root/gridData/ListResult_1_VO/ListResult_1_Row[" + i + "]/MNSCR_ID");
  133. if (model.getValue("/root/codeData/ListResult_3_VO/ListResult_3_Row[MNSCR_ID = '" + mnscr + "']/MNSCR_ID") == "")
  134. model.removenode("/root/gridData/ListResult_1_VO/ListResult_1_Row[" + i + "]");
  135. }
  136. }
  137. }
  138. model.removenode("/root/reqData");
  139. model.removenode("/root/resData");
  140. output203.refresh();
  141. var datagrid = datagrid2;
  142. datagrid.rebuild();
  143. datagrid.refresh();
  144. commGridInit(datagrid);
  145. if (model.getValue("/root/formData/searchInfo2/ROLE_CD") != "") {
  146. // 设置分级列表
  147. commGridLevels(datagrid, 0);
  148. // 设置网格的只读单元
  149. var colRef = datagrid.colRef("FC_ID");
  150. var rows = datagrid.rows;
  151. datagrid.isReadOnly(0, colRef+1, rows-1, colRef+1) = true;
  152. var colChk = datagrid.colRef("CHK");
  153. if (model.getValue("/root/formData/searchInfo2/FCNRS_TP") == "R") {
  154. colStyle(datagrid, "FC_ID,CHK");
  155. } else {
  156. colStyle(datagrid, "CHK");
  157. datagrid.isReadOnly(0, colChk, rows-1, colChk) = true;
  158. colRef = datagrid.colRef("FCNRS_REF");
  159. for (var i = datagrid.fixedRows; i < rows; i++) {
  160. if (datagrid.valueMatrix(i, colRef) != "Y") {
  161. datagrid.isReadOnly(i, colChk, i, colChk) = false;
  162. }
  163. }
  164. }
  165. }
  166. removeProgressBar();
  167. }
  168. var onrowchanged = false;
  169. ]]>
  170. </script>
  171. </xhtml:head>
  172. <xhtml:body overflow="hidden" pagewidth="980" pageheight="620" style="font-family:宋体; ">
  173. <group id="group1" overflow="hidden" ref="/root/formData/searchInfo" style="left:0px; top:0px; width:980px; height:30px; ">
  174. <line id="line2" style="x1:0px; y1:29px; x2:980px; y2:29px; "/>
  175. <caption id="caption101" class="cell" style="left:0px; top:5px; width:90px; height:20px; vertical-align:middle; ">角色名称</caption>
  176. <input id="input101" ref="ROLE_NM" style="left:92px; top:5px; width:110px; height:20px; background-color:#ffffff; border-style:solid; "/>
  177. <caption id="caption102" class="cell" style="left:212px; top:5px; width:90px; height:20px; vertical-align:middle; ">部门</caption>
  178. <input id="input102" ref="/root/codeData/ListResult_0_VO/ListResult_0_Row[DEPT_CD=/root/formData/searchInfo/DEPT_CD]/DEPT_NM" editable="false" inputtype="button" style="left:304px; top:5px; width:200px; height:20px; ">
  179. <script type="javascript" ev:event="onclick">
  180. <![CDATA[
  181. treeview1.visible = (treeview1.visible == false);
  182. ]]>
  183. </script>
  184. </input>
  185. <select1 id="radio1" ref="/root/gridData/viewItem" appearance="full" cols="3" style="left:512px; top:5px; width:155px; height:20px; border-style:none; ">
  186. <choices>
  187. <item>
  188. <label>所有</label>
  189. <value>A</value>
  190. </item>
  191. <item>
  192. <label>非禁项</label>
  193. <value>N</value>
  194. </item>
  195. <item>
  196. <label>禁用项</label>
  197. <value>Y</value>
  198. </item>
  199. </choices>
  200. <script type="javascript" ev:event="xforms-value-changed">
  201. <![CDATA[
  202. var datagrid = datagrid1;
  203. switch (model.getValue("/root/gridData/viewItem")) {
  204. case "N":
  205. datagrid.nodeset = "/root/gridData/ListResult_0_VO/ListResult_0_Row[LOCKED_YN != 'Y']";
  206. break;
  207. case "Y":
  208. datagrid.nodeset = "/root/gridData/ListResult_0_VO/ListResult_0_Row[LOCKED_YN = 'Y']";
  209. break;
  210. default : datagrid.nodeset = "/root/gridData/ListResult_0_VO/ListResult_0_Row";
  211. }
  212. pageInit();
  213. ]]>
  214. </script>
  215. </select1>
  216. </group>
  217. <datagrid id="datagrid1" nodeset="/root/gridData/ListResult_0_VO/ListResult_0_Row" caption="角色代码^角色名称^部门名称^锁定角色^修改人^修改时间^DEPT_CD" colsep="^" colwidth="100, 120, 150, 35, 80, 120, 100" extendlastcol="false" mergecellsfixedrows="bycolrec" rowheader="select" rowheight="42" rowsep="|" style="left:0px; top:34px; width:980px; height:265px; border-style:solid; border-right-style:sunken; ">
  218. <col ref="ROLE_CD" type="input" style="text-align:left; "/>
  219. <col ref="ROLE_NM" type="input" style="text-align:left; "/>
  220. <col editable="false" ref="DEPT_NM" type="inputbutton"/>
  221. <col checkvalue="Y,N" ref="LOCKED_YN" type="checkbox"/>
  222. <col key="false" ref="MOD_ID" style="text-align:left; "/>
  223. <col key="false" ref="MOD_DATE" format="yyyy-mm-dd hh:mm:ss" mask="exclude"/>
  224. <col ref="DEPT_CD" visibility="hidden"/>
  225. <script type="javascript" ev:event="onclick">
  226. <![CDATA[
  227. var datagrid = datagrid1;
  228. if (datagrid.isCell(event.target)) datagrid.editCell();
  229. if (!onrowchanged) return;
  230. var row = datagrid.row;
  231. treeview2.value = datagrid.valueMatrix(row, datagrid.colRef("DEPT_CD"));
  232. var rowStatus = datagrid.rowStatus(row);
  233. var role_cd = "";
  234. if (rowStatus == 0 || rowStatus == 2)
  235. role_cd = datagrid.valueMatrix(row, datagrid.colRef("ROLE_CD"));
  236. model.setValue("/root/formData/searchInfo2/ROLE_CD", role_cd);
  237. find2();
  238. onrowchanged = false;
  239. ]]>
  240. </script>
  241. <script type="javascript" ev:event="onrowchanged">
  242. <![CDATA[
  243. onrowchanged = true;
  244. ]]>
  245. </script>
  246. <script type="javascript" ev:event="onbuttonclick">
  247. <![CDATA[
  248. var datagrid = datagrid1;
  249. if (onrowchanged) datagrid.dispatch("onclick");
  250. datagrid.editCell();
  251. if (datagrid.valueMatrix(datagrid.row, datagrid.colRef("DEPT_CD")) == "") return;
  252. var treeview = treeview2;
  253. treeview.visible = (treeview.visible == false);
  254. if (treeview.visible == false) return;
  255. treeview.refresh();
  256. var btn = event.pTarget;
  257. //var children = btn.parent.parent.children; // btn -> cell -> datarigd -> children
  258. var children = datagrid.children;
  259. datagrid.topRow = datagrid.topRow;
  260. var tvTop = Number(btn.attribute("top")) + Number(btn.attribute("height")) +
  261. Number(datagrid.attribute("top").substr(0, datagrid.attribute("top").length - 2)) - (datagrid.topRow - 1) * 21;
  262. treeview.attribute("top") = tvTop + "px";
  263. for(i=0; i< children.length; i++) {
  264. var control = children.item(i);
  265. if (control.elementName == "xforms:gridinput") {
  266. var tvLeft = Number(control.attribute("left"));
  267. treeview.attribute("left") = tvLeft + "px";
  268. break;
  269. }
  270. }
  271. ]]>
  272. </script>
  273. </datagrid>
  274. <group id="group2" overflow="hidden" ref="/root/formData/searchInfo2" style="left:0px; top:304px; width:980px; height:30px; ">
  275. <line id="line3" style="x1:0px; y1:0px; x2:980px; y2:0px; "/>
  276. <line id="line4" style="x1:0px; y1:29px; x2:980px; y2:29px; "/>
  277. <caption id="caption201" class="cell" style="left:0px; top:5px; width:90px; height:20px; vertical-align:middle; ">功能/权限</caption>
  278. <select1 id="combo201" ref="FCNRS_TP" appearance="minimal" style="left:92px; top:5px; width:110px; height:20px; ">
  279. <choices>
  280. <item>
  281. <label>按权限</label>
  282. <value>R</value>
  283. </item>
  284. <item>
  285. <label>按功能</label>
  286. <value>F</value>
  287. </item>
  288. </choices>
  289. <script type="javascript" ev:event="xforms-value-changed">
  290. <![CDATA[
  291. find2();
  292. ]]>
  293. </script>
  294. </select1>
  295. <caption id="caption202" class="cell" style="left:212px; top:5px; width:90px; height:20px; vertical-align:middle; ">菜单</caption>
  296. <input id="input202" ref="/root/codeData/ListResult_2_VO/ListResult_2_Row[MNSCR_ID=/root/formData/searchInfo2/MNSCR_ID]/MNSCR_NM" editable="false" inputtype="button" style="left:304px; top:5px; width:200px; height:20px; ">
  297. <script type="javascript" ev:event="onclick">
  298. <![CDATA[
  299. treeview3.visible = (treeview3.visible == false);
  300. ]]>
  301. </script>
  302. </input>
  303. <caption id="caption203" class="cell" style="left:514px; top:5px; width:90px; height:20px; vertical-align:middle; ">角色名称</caption>
  304. <output id="output203" ref="/root/gridData/ListResult_0_VO/ListResult_0_Row[ROLE_CD=/root/formData/searchInfo2/ROLE_CD]/ROLE_NM" style="left:606px; top:5px; width:110px; height:20px; border-color:#c0c0c0; border-style:solid; "/>
  305. <button id="button204" class="sw" style="left:726px; top:5px; width:100px; height:20px; ">
  306. <caption>保存权限</caption>
  307. <script type="javascript" ev:event="onclick">
  308. <![CDATA[
  309. if (isValid == false) return;
  310. var datagrid = datagrid2;
  311. var rowSep = (datagrid.attribute("rowsep")=='')?'|':datagrid.attribute('rowsep');
  312. var colSep = (datagrid.attribute("colsep")=='')?'^':datagrid.attribute('colsep');
  313. var data = datagrid.getUpdateData("update"); // 删除行不考虑
  314. var up_data = data.split(rowSep);
  315. var rows = up_data.length - 1;
  316. var colRef = datagrid.colRef("FCNRS_REF");
  317. var colRef2 = datagrid.colRef("MOD_ID");
  318. var colChk = datagrid.colRef("CHK");
  319. var colKey = datagrid.colRef("FC_ID");
  320. for (var i=1; i<rows; i++) {
  321. var vRow = up_data[i].split(colSep);
  322. var Idx = Number(vRow[1]);
  323. /* FCNRS_REF为空串时,记录不存在 */
  324. var ref = datagrid.valueMatrix(Idx, colRef);
  325. var chk = datagrid.valueMatrix(Idx, colChk);
  326. var key = datagrid.valueMatrix(Idx, colKey);
  327. if (ref == "") { // 插入、删除(F)、更新(R)
  328. ref = datagrid.valueMatrix(Idx, colRef2);
  329. if (ref == "") { // 插入
  330. datagrid.rowStatus(Idx) = 0;
  331. if (chk == "Y" && key != "NULL") datagrid.addStatus(Idx, "insert");
  332. } else { // 删除(F)、更新(R)
  333. if (chk == "N") datagrid.addStatus(Idx, "delete");
  334. }
  335. } else { // 删除(R)、更新(R)
  336. if (chk == "N") datagrid.addStatus(Idx, "delete");
  337. else if (key == "NULL") datagrid.addStatus(Idx, "delete");
  338. }
  339. }
  340. exec("/root/formData/searchInfo2", datagrid, "save2", "/root/gridData/ListResult_1_VO");
  341. pageInit();
  342. find2(false);
  343. ]]>
  344. </script>
  345. </button>
  346. </group>
  347. <datagrid id="datagrid2" nodeset="/root/gridData/ListResult_1_VO/ListResult_1_Row" caption="菜单/界面ID^菜单/界面名^菜单区分^权限^权限^权限分配^修改人^修改时间^FCNRS_REF|菜单/界面ID^菜单/界面名^菜单区分^代码^说明^权限分配^修改人^修改时间^FCNRS_REF" colsep="^" colwidth="120, 150, 35, 60, 100, 35, 80, 120, 100" extendlastcol="false" mergecellsfixedrows="bycolrec" rowheight="21" rowsep="|" style="left:0px; top:338px; width:980px; height:282px; border-style:solid; border-right-style:sunken; ">
  348. <col ref="MNSCR_ID" style="text-align:left; "/>
  349. <col key="false" ref="MNSCR_NM" style="text-align:left; "/>
  350. <col key="false" ref="MNSCR_TP"/>
  351. <col ref="FC_ID" type="combo">
  352. <choices>
  353. <itemset nodeset="/root/codeData/ListResult_1_VO/ListResult_1_Row[FCNRS_TP = /root/formData/searchInfo2/FCNRS_TP]">
  354. <label ref="FCNRS_ID"/>
  355. <value ref="FCNRS_ID"/>
  356. </itemset>
  357. </choices>
  358. </col>
  359. <col key="false" ref="FC_ID" type="combo" style="text-align:left; ">
  360. <choices>
  361. <itemset nodeset="/root/codeData/ListResult_0_VO/ListResult_0_Row[FCNRS_TP = /root/formData/searchInfo2/FCNRS_TP]">
  362. <label ref="FCNRS_NM"/>
  363. <value ref="FCNRS_ID"/>
  364. </itemset>
  365. </choices>
  366. </col>
  367. <col checkvalue="Y,N" key="false" ref="CHK" type="checkbox"/>
  368. <col key="false" ref="MOD_ID" style="text-align:left; "/>
  369. <col key="false" ref="MOD_DATE" format="yyyy-mm-dd" mask="exclude"/>
  370. <col ref="FCNRS_REF" visibility="hidden"/>
  371. <script type="javascript" ev:event="onentercell">
  372. <![CDATA[
  373. datagrid2.editCell();
  374. ]]>
  375. </script>
  376. <script type="javascript" ev:event="xforms-value-changed">
  377. <![CDATA[
  378. if (model.getValue("/root/formData/searchInfo2/FCNRS_TP") == "F") return;
  379. var datagrid = datagrid2;
  380. datagrid.removeStatus(row, "delete"); // 取消删除标志
  381. var colKey = datagrid.colRef("FC_ID");
  382. var colChk = datagrid.colRef("CHK");
  383. var row = datagrid.row;
  384. var key = datagrid.valueMatrix(row, colKey); // 获取 R 功能值
  385. var chk = datagrid.valueMatrix(row, colChk);
  386. if (datagrid.col == colKey) {
  387. datagrid.valueMatrix(row, colChk) = "Y";
  388. chk = "Y";
  389. } else {
  390. if (chk == "Y" && (key == "" || key == "NULL")) {
  391. datagrid.valueMatrix(row, colKey) = "R999";
  392. key = "R999";
  393. }
  394. }
  395. var rows = datagrid.rows;
  396. var level = datagrid.outlinelevel(row++);
  397. if (chk == "Y") { // 添加删除标志
  398. for (var i = row; i < rows; i++) {
  399. if (datagrid.outlinelevel(i) <= level) break;
  400. if (datagrid.valueMatrix(i, colKey) == key) datagrid.addStatus(i, "delete");
  401. }
  402. } else { // 取消删除标志
  403. for (var i = row; i < rows; i++) {
  404. if (datagrid.outlinelevel(i) <= level) break;
  405. if (datagrid.valueMatrix(i, colChk) == "Y") datagrid.removeStatus(i, "delete");
  406. }
  407. }
  408. ]]>
  409. </script>
  410. </datagrid>
  411. <treeview id="treeview1" ref="/root/formData/searchInfo/DEPT_CD" visibility="hidden" expanddepth="-1" image="../../images/blt_1.gif" itemsettype="depth" style="left:304px; top:25px; width:200px; height:150px; ">
  412. <itemset nodeset="/root/codeData/ListResult_0_VO/ListResult_0_Row">
  413. <label ref="DEPT_NM"/>
  414. <value ref="DEPT_CD"/>
  415. <depth ref="LEVEL"/>
  416. </itemset>
  417. <script type="javascript" ev:event="xforms-select">
  418. <![CDATA[
  419. event.pTarget.visible = false;
  420. ]]>
  421. </script>
  422. <script type="javascript" ev:event="xforms-value-changed">
  423. <![CDATA[
  424. event.pTarget.visible = false;
  425. find();
  426. ]]>
  427. </script>
  428. </treeview>
  429. <treeview id="treeview2" ref="/root/formData/searchInfo/P_DEPT_CD" visibility="hidden" expanddepth="-1" image="../../images/blt_1.gif" itemsettype="depth" style="left:85px; top:120px; width:200px; height:150px; ">
  430. <itemset nodeset="/root/codeData/ListResult_0_VO/ListResult_0_Row">
  431. <label ref="DEPT_NM"/>
  432. <value ref="DEPT_CD"/>
  433. <depth ref="LEVEL"/>
  434. </itemset>
  435. <script type="javascript" ev:event="xforms-select">
  436. <![CDATA[
  437. event.pTarget.visible = false;
  438. ]]>
  439. </script>
  440. <script type="javascript" ev:event="xforms-value-changed">
  441. <![CDATA[
  442. event.pTarget.visible = false;
  443. var datagrid = datagrid1;
  444. var row = datagrid.row;
  445. datagrid.valueMatrix(row, datagrid.colRef("DEPT_NM")) = event.pTarget.label;
  446. datagrid.valueMatrix(row, datagrid.colRef("DEPT_CD")) = event.pTarget.value;
  447. datagrid.addStatus(datagrid.row, "update");
  448. ]]>
  449. </script>
  450. </treeview>
  451. <treeview id="treeview3" ref="/root/formData/searchInfo2/MNSCR_ID" visibility="hidden" expanddepth="-1" image="../../images/blt_1.gif" itemsettype="depth" style="left:304px; top:329px; width:200px; height:150px; ">
  452. <itemset nodeset="/root/codeData/ListResult_2_VO/ListResult_2_Row">
  453. <label ref="MNSCR_NM"/>
  454. <value ref="MNSCR_ID"/>
  455. <depth ref="LEVEL"/>
  456. </itemset>
  457. <script type="javascript" ev:event="xforms-select">
  458. <![CDATA[
  459. event.pTarget.visible = false;
  460. ]]>
  461. </script>
  462. <script type="javascript" ev:event="xforms-value-changed">
  463. <![CDATA[
  464. event.pTarget.visible = false;
  465. find2();
  466. ]]>
  467. </script>
  468. </treeview>
  469. <script type="javascript" ev:event="onclick">
  470. <![CDATA[
  471. var target = event.target;
  472. var parent = event.pTarget.parent;
  473. var parent2 = null;
  474. if (parent != null) parent2 = parent.parent;
  475. if (target != "treeview1" && target != "input102"
  476. && parent != null && parent.attribute("id") != "treeview1" && parent.attribute("id") != "input102")
  477. treeview1.visible = false;
  478. if (parent2 != null && parent2.attribute("id") != "treeview2")
  479. treeview2.visible = false;
  480. if (target != "treeview3" && target != "input202"
  481. && parent != null && parent.attribute("id") != "treeview3" && parent.attribute("id") != "input202")
  482. treeview3.visible = false;
  483. ]]>
  484. </script>
  485. </xhtml:body>
  486. </xhtml:html>