pageSet.jsp 16 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531
  1. <%@ page language="java" contentType="text/html; charset=utf-8"
  2. pageEncoding="utf-8"%>
  3. <%
  4. String path = request.getContextPath();
  5. String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
  6. %>
  7. <!DOCTYPE html>
  8. <html>
  9. <head>
  10. <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
  11. <link rel="stylesheet" href="<%=basePath %>resource/ext/resources/css/ext-all-gray.css" type="text/css"></link>
  12. <link rel="stylesheet" href="<%=basePath %>resource/css/main.css" type="text/css"></link>
  13. <script type="text/javascript" src="<%=basePath %>resource/ext/ext-all.js"></script>
  14. <script type="text/javascript" src="<%=basePath %>resource/i18n/i18n.js"></script>
  15. <script type="text/javascript" src="<%=basePath %>app/view/core/trigger/DbfindTrigger.js"></script>
  16. <script type="text/javascript">
  17. //demo
  18. Ext.onReady(function(){
  19. var drawComponent = Ext.create('Ext.draw.Component', {
  20. viewBox: false,
  21. items: [{
  22. id: 'dataDictionary',
  23. type: 'circle',
  24. fill: 'red',
  25. radius: 10,
  26. x: 200,
  27. y: 100,
  28. listeners: {
  29. click: function(){
  30. var table = Ext.getCmp('fo_table').value;
  31. table = table == null ? '' : table.toUpperCase();
  32. openWindow('数据字典维护', "jsps/ma/dataDictionary.jsp?formCondition=dd_tablenameIS'"
  33. + table + "'&gridCondition=ddd_tablenameIS'" + table + "'");
  34. }
  35. }
  36. },{
  37. id: 'dataDictionary_text',
  38. type: 'text',
  39. text: '数据字典维护',
  40. fill: 'red',
  41. x: 180,
  42. y: 120,
  43. listeners: {
  44. click: function(){
  45. var table = Ext.getCmp('fo_table').value;
  46. table = table == null ? '' : table.toUpperCase();
  47. openWindow('数据字典维护', "jsps/ma/dataDictionary.jsp?formCondition=dd_tablenameIS'"
  48. + table + "'&gridCondition=ddd_tablenameIS'" + table + "'");
  49. }
  50. }
  51. },{
  52. type: "path",
  53. path: "M210 100 L520 100 Z", //路径
  54. "stroke-width": "1",
  55. stroke: "#000",
  56. fill: "blue"
  57. },{
  58. id: 'form',
  59. type: 'circle',
  60. fill: '#79BB3F',
  61. radius: 10,
  62. x: 280,
  63. y: 100,
  64. listeners: {
  65. click: function(){
  66. var id = Ext.getCmp('fo_id').value;
  67. if(id == null){
  68. openWindow('Form维护', "jsps/ma/form.jsp");
  69. } else {
  70. openWindow('Form维护', "jsps/ma/form.jsp?formCondition=fo_idIS"
  71. + id + "&gridCondition=fd_foidIS" + id);
  72. }
  73. }
  74. }
  75. },{
  76. type: "path",
  77. path: "M290 100 L320 160 Z", //路径
  78. "stroke-width": "1",
  79. stroke: "#000",
  80. fill: "blue"
  81. },{
  82. type: "path",
  83. path: "M290 100 L320 40 Z", //路径
  84. "stroke-width": "1",
  85. stroke: "#000",
  86. fill: "blue"
  87. },{
  88. type: "path",
  89. path: "M320 160 L360 200 Z", //路径
  90. "stroke-width": "1",
  91. stroke: "#000",
  92. fill: "blue"
  93. },{
  94. id: 'form_text',
  95. type: 'text',
  96. text: 'Form维护',
  97. fill: '#79BB3F',
  98. x: 260,
  99. y: 120,
  100. listeners: {
  101. click: function(){
  102. var id = Ext.getCmp('fo_id').value;
  103. if(id == null){
  104. openWindow('Form维护', "jsps/ma/form.jsp");
  105. } else {
  106. openWindow('Form维护', "jsps/ma/form.jsp?formCondition=fo_idIS"
  107. + id + "&gridCondition=fd_foidIS" + id);
  108. }
  109. }
  110. }
  111. },{
  112. id: 'detailgrid_text',
  113. type: 'text',
  114. text: 'Form维护--从表detailgrid',
  115. fill: '#79BB3F',
  116. x: 330,
  117. y: 160,
  118. listeners: {
  119. click: function(){
  120. openWindow('Form维护--从表detailgrid', 'jsps/ma/detailGrid.jsp');
  121. }
  122. }
  123. },{
  124. id: 'detailgrid',
  125. type: 'circle',
  126. fill: '#79BB3F',
  127. radius: 6,
  128. x: 320,
  129. y: 160,
  130. listeners: {
  131. click: function(){
  132. openWindow('Form维护--从表detailgrid', 'jsps/ma/detailGrid.jsp');
  133. }
  134. }
  135. },{
  136. id: 'dbfindSet_text',
  137. type: 'text',
  138. text: 'Form维护--从表detailgrid--dbfind',
  139. fill: '#79BB3F',
  140. x: 370,
  141. y: 200,
  142. listeners: {
  143. click: function(){
  144. openWindow('Form维护--从表detailgrid--dbfind', 'jsps/ma/dbFindSet.jsp');
  145. }
  146. }
  147. },{
  148. id: 'dbfindSet',
  149. type: 'circle',
  150. fill: '#79BB3F',
  151. radius: 6,
  152. x: 360,
  153. y: 200,
  154. listeners: {
  155. click: function(){
  156. openWindow('Form维护--从表detailgrid--dbfind', 'jsps/ma/dbFindSet.jsp');
  157. }
  158. }
  159. },{
  160. id: 'dbfindSetUI_text',
  161. type: 'text',
  162. text: 'Form维护--dbfind',
  163. fill: '#79BB3F',
  164. x: 330,
  165. y: 40,
  166. listeners: {
  167. click: function(){
  168. openWindow('Form维护--dbfind', 'jsps/ma/dbFindSetUI.jsp');
  169. }
  170. }
  171. },{
  172. id: 'formCombo_text',
  173. type: 'text',
  174. text: 'Form维护--combo',
  175. fill: '#79BB3F',
  176. x: 190,
  177. y: 40,
  178. listeners: {
  179. click: function(){
  180. openWindow('Form维护--combo', 'jsps/ma/dataListCombo.jsp');
  181. }
  182. }
  183. },{
  184. type: "path",
  185. path: "M270 100 L180 40 Z", //路径
  186. "stroke-width": "1",
  187. stroke: "#000",
  188. fill: "blue"
  189. },{
  190. id: 'formCombo',
  191. type: 'circle',
  192. fill: '#79BB3F',
  193. radius: 6,
  194. x: 180,
  195. y: 40,
  196. listeners: {
  197. click: function(){
  198. openWindow('Form维护--combo', 'jsps/ma/dataListCombo.jsp');
  199. }
  200. }
  201. },{
  202. id: 'dbfindSetUI',
  203. type: 'circle',
  204. fill: '#79BB3F',
  205. radius: 6,
  206. x: 320,
  207. y: 40,
  208. listeners: {
  209. click: function(){
  210. openWindow('Form维护--从表detailgrid--dbfind', 'jsps/ma/dbFindSetUI.jsp');
  211. }
  212. }
  213. },{
  214. id: 'detailgridCombo',
  215. type: 'circle',
  216. fill: '#79BB3F',
  217. radius: 6,
  218. x: 240,
  219. y: 230,
  220. listeners: {
  221. click: function(){
  222. openWindow('Form维护--从表detailgrid--combo', 'jsps/ma/dataListCombo.jsp');
  223. }
  224. }
  225. },{
  226. type: "path",
  227. path: "M320 165 L240 225 Z", //路径
  228. "stroke-width": "1",
  229. stroke: "#000",
  230. fill: "blue"
  231. },{
  232. id: 'detailgridCombo_text',
  233. type: 'text',
  234. text: 'Form维护--从表detailgrid--combo',
  235. fill: '#79BB3F',
  236. x: 250,
  237. y: 230,
  238. listeners: {
  239. click: function(){
  240. openWindow('datalist维护', 'jsps/ma/dataListCombo.jsp');
  241. }
  242. }
  243. },{
  244. id: 'datalist',
  245. type: 'circle',
  246. fill: '#79BB3F',
  247. radius: 10,
  248. x: 360,
  249. y: 100,
  250. listeners: {
  251. click: function(){
  252. openWindow('datalist维护', 'jsps/ma/dataList.jsp');
  253. }
  254. }
  255. },{
  256. id: 'datalist_text',
  257. type: 'text',
  258. text: 'datalist维护',
  259. fill: '#79BB3F',
  260. x: 340,
  261. y: 120,
  262. listeners: {
  263. click: function(){
  264. openWindow('datalist维护', 'jsps/ma/dataList.jsp');
  265. }
  266. }
  267. },{
  268. id: 'documentSetup',
  269. type: 'circle',
  270. fill: '#79BB3F',
  271. radius: 10,
  272. x: 440,
  273. y: 100,
  274. listeners: {
  275. click: function(){
  276. openWindow('逻辑设计', 'jsps/ma/documentSetup.jsp');
  277. }
  278. }
  279. },{
  280. id: 'documentSetup_text',
  281. type: 'text',
  282. text: '逻辑设计',
  283. fill: '#79BB3F',
  284. x: 420,
  285. y: 120,
  286. listeners: {
  287. click: function(){
  288. openWindow('逻辑设计', 'jsps/ma/documentSetup.jsp');
  289. }
  290. }
  291. },{
  292. id: 'sysNavigation',
  293. type: 'circle',
  294. fill: '#79BB3F',
  295. radius: 10,
  296. x: 520,
  297. y: 100,
  298. listeners: {
  299. click: function(){
  300. openWindow('tree链接维护', 'jsps/ma/sysNavigation.jsp');
  301. }
  302. }
  303. },{
  304. id: 'sysNavigation_text',
  305. type: 'text',
  306. text: 'tree链接维护',
  307. fill: '#79BB3F',
  308. x: 500,
  309. y: 120,
  310. listeners: {
  311. click: function(){
  312. openWindow('tree链接维护', 'jsps/ma/sysNavigation.jsp');
  313. }
  314. }
  315. },{
  316. id: 'table',
  317. type: 'text',
  318. fill: 'blue',
  319. x: 520,
  320. y: 20
  321. },{
  322. id: 'caller',
  323. type: 'text',
  324. fill: 'blue',
  325. x: 520,
  326. y: 50
  327. }]
  328. });
  329. var form = Ext.create('Ext.form.Panel', {
  330. title: '<font color=gray>筛选</font>',
  331. bodyPadding: 5,
  332. style: 'background-color: #f1f1f1;cursor: pointer;',
  333. width: 350,
  334. url: basePath + 'common/getPageSet.action',
  335. defaultType: 'textfield',
  336. items: [{
  337. fieldLabel: 'Table',
  338. name: 'fo_table',
  339. xtype: 'dbfindtrigger',
  340. id: 'fo_table'
  341. },{
  342. fieldLabel: 'Caller',
  343. name: 'fo_caller',
  344. xtype: 'dbfindtrigger',
  345. id: 'fo_caller'
  346. },{
  347. name: 'fo_id',
  348. xtype: 'hidden',
  349. id: 'fo_id'
  350. }],
  351. buttonAlign: 'center',
  352. buttons: [{
  353. text: '重 置',
  354. handler: function() {
  355. this.up('form').getForm().reset();
  356. }
  357. }, {
  358. text: '查 询',
  359. handler: function() {
  360. var form = this.up('form').getForm();
  361. if (form.isValid()) {
  362. var main = parent.Ext.getCmp("content-panel");
  363. main.getActiveTab().setLoading(true);
  364. form.submit({
  365. success: function(form, action) {
  366. main.getActiveTab().setLoading(false);
  367. var res = action.result;
  368. Ext.each(drawComponent.surface.items.items, function(){
  369. if(this.id == 'dataDictionary' || this.id == 'dataDictionary_text'){
  370. if(res.dataDictionary){
  371. this.setAttributes({fill: 'red'}, true);
  372. } else {
  373. this.setAttributes({fill: '#79BB3F'}, true);
  374. }
  375. }
  376. if(this.id == 'form' || this.id == 'form_text'){
  377. if(res.form){
  378. this.setAttributes({fill: 'red'}, true);
  379. } else {
  380. this.setAttributes({fill: '#79BB3F'}, true);
  381. }
  382. }
  383. if(this.id == 'formCombo' || this.id == 'formCombo_text'){
  384. if(res.formCombo){
  385. this.setAttributes({fill: 'red'}, true);
  386. } else {
  387. this.setAttributes({fill: '#79BB3F'}, true);
  388. }
  389. }
  390. if(this.id == 'detailgrid' || this.id == 'detailgrid_text'){
  391. if(res.detailgrid){
  392. this.setAttributes({fill: 'red'}, true);
  393. } else {
  394. this.setAttributes({fill: '#79BB3F'}, true);
  395. }
  396. }
  397. if(this.id == 'detailgridCombo' || this.id == 'detailgridCombo_text'){
  398. if(res.detailgridCombo){
  399. this.setAttributes({fill: 'red'}, true);
  400. } else {
  401. this.setAttributes({fill: '#79BB3F'}, true);
  402. }
  403. }
  404. if(this.id == 'dbfindSet' || this.id == 'dbfindSet_text'){
  405. if(res.dbfindSet){
  406. this.setAttributes({fill: 'red'}, true);
  407. } else {
  408. this.setAttributes({fill: '#79BB3F'}, true);
  409. }
  410. }
  411. if(this.id == 'dbfindSetUI' || this.id == 'dbfindSetUI_text'){
  412. if(res.dbfindSetUI){
  413. this.setAttributes({fill: 'red'}, true);
  414. } else {
  415. this.setAttributes({fill: '#79BB3F'}, true);
  416. }
  417. }
  418. if(this.id == 'datalist' || this.id == 'datalist_text'){
  419. if(res.datalist){
  420. this.setAttributes({fill: 'red'}, true);
  421. } else {
  422. this.setAttributes({fill: '#79BB3F'}, true);
  423. }
  424. }
  425. if(this.id == 'documentSetup' || this.id == 'documentSetup_text'){
  426. if(res.documentSetup){
  427. this.setAttributes({fill: 'red'}, true);
  428. } else {
  429. this.setAttributes({fill: '#79BB3F'}, true);
  430. }
  431. }
  432. if(this.id == 'sysNavigation' || this.id == 'sysNavigation_text'){
  433. if(res.sysNavigation){
  434. this.setAttributes({fill: 'red'}, true);
  435. } else {
  436. this.setAttributes({fill: '#79BB3F'}, true);
  437. }
  438. }
  439. if(this.id == 'table'){
  440. this.setAttributes({text: 'Table: ' + Ext.getCmp('fo_table').value}, true);
  441. }
  442. if(this.id == 'caller'){
  443. this.setAttributes({text: 'Caller: ' + Ext.getCmp('fo_caller').value}, true);
  444. }
  445. });
  446. },
  447. failure: function(form, action) {
  448. main.getActiveTab().setLoading(false);
  449. showError(action.result.exceptionInfo);
  450. }
  451. });
  452. }
  453. }
  454. }]
  455. });
  456. Ext.create('Ext.panel.Panel', {
  457. width: '100%',
  458. height: '100%',
  459. layout: 'fit',
  460. title: '<font color=gray>设计您的页面</font>',
  461. style: 'background-color: #f1f1f1;cursor: pointer;',
  462. renderTo: Ext.getBody(),
  463. items: [{
  464. layout: 'border',
  465. items: [{
  466. region: 'center',
  467. layout: 'fit',
  468. width: '60%',
  469. items: [drawComponent]
  470. },{
  471. region: 'east',
  472. width: '40%',
  473. items: [form]
  474. }]
  475. }]
  476. });
  477. function openTable(title, url){
  478. var panel = Ext.getCmp(url.substring(0, url.lastIndexOf('.jsp')));
  479. var main = parent.Ext.getCmp("content-panel");
  480. if(!panel){
  481. var t = title;
  482. if (title.toString().length>4) {
  483. t = title.toString().substring(title.toString().length-4);
  484. }
  485. panel = {
  486. title : $I18N.common.msg.title_info + '(' + t + ')',
  487. tag : 'iframe',
  488. tabConfig:{tooltip: title},
  489. frame : true,
  490. border : false,
  491. layout : 'fit',
  492. iconCls : 'x-tree-icon-tab-tab',
  493. html : '<iframe id="iframe_maindetail_pageSet" src="' + basePath + url + '" height="100%" width="100%" frameborder="0" scrolling="no"></iframe>',
  494. closable : true,
  495. listeners : {
  496. close : function(){
  497. main.setActiveTab(main.getActiveTab().id);
  498. }
  499. }
  500. };
  501. var p = main.add(panel);
  502. main.setActiveTab(p);
  503. }else{
  504. main.setActiveTab(panel);
  505. }
  506. }
  507. function openWindow(title, url){
  508. var win = new Ext.window.Window({
  509. id : 'win',
  510. title: title,
  511. height: "100%",
  512. width: "80%",
  513. maximizable : true,
  514. buttonAlign : 'center',
  515. layout : 'anchor',
  516. items: [{
  517. tag : 'iframe',
  518. frame : true,
  519. anchor : '100% 100%',
  520. layout : 'fit',
  521. html : '<iframe id="iframe" src="' + basePath+url + '" height="100%" width="100%" frameborder="0" scrolling="no"></iframe>'
  522. }]
  523. });
  524. win.show();
  525. }
  526. });
  527. </script>
  528. </head>
  529. <body >
  530. </body>
  531. </html>