(function (window, undefined) { var nodesArr = new Array(); var id = UrlParm.parm("id"); var cid = UrlParm.parm("cid"); var tid = UrlParm.parm("tid"); var gid = new Array(); var templetid = new Array(); var width = 0; var height = 0; var _Quiry = window.Quiry, _$ = window.$; var Quiry = window.Quiry = window.$ = function () { return new Quiry.fn.Init(); } Quiry.fn = Quiry.prototype = { Init: function () { Quiry.fn.Construction(); setInterval(function () { Quiry.fn.Count(); }, 120000) //每1000毫秒(即1秒) 执行一次本段代码 }, OpenURL: function (url) { var MainCenter = window.parent.parent.panelEdit.MainCenter; var children = MainCenter.items; var mod = ""; var title = ""; var finded = false; //得到mod的name var _store = Ext.create('DsExt.ux.RefTableStore', { fields: [ { name: 'Gid', type: 'string' }, { name: 'ModuleName', type: 'string' }, { name: 'ModuleDescription', type: 'string' } ], proxy: { url: '/MvcShipping/MsTemplet/GetModuleName' }, scope: this }); _store.load({ params: { url: url} }); _store.on("load", function (_store) { gid = _store.getAt(0).get("Gid"); mod = _store.getAt(0).get("ModuleName"); if (gid == "31833C72-0CFD-4CDA-B5BA-14E9328BC28C") { title = "海运出口-" + _store.getAt(0).get("ModuleDescription"); } else if (gid == "26D132A3-9AE2-4E75-8FA1-E6B04529C2DA") { title = "海运进口-" + _store.getAt(0).get("ModuleDescription"); } else { title = _store.getAt(0).get("ModuleDescription"); } for (var i = 0; i < children.length; i++) { if (children.items[i].id) { if (children.items[i].id == 'pnl' + mod) { MainCenter.setActiveTab(i); finded = true; } } } if (!finded) { var paneltabitems = new Ext.Panel({ id: 'pnl' + mod, layout: "fit", region: "center", autoScroll: true, frame: false, closable: true, bodyStyle: {}, title: title, html: ' ' }); MainCenter.add(paneltabitems); MainCenter.setActiveTab(paneltabitems); MainCenter.doLayout(); } }); }, Construction: function () { //构建页面元素 var strConstruction = ""; var dataCount = 0; var isDouble = false; gid.length = 0; templetid.length = 0; Ext.Ajax.request({ async: false, url: '/MvcShipping/MsTemplet/ReadPageStructure', params: { url: "LayShow5", id: ".", param: "4" }, callback: function (options, success, response) { if (success) { var result = Ext.JSON.decode(response.responseText); var data = result.data; for (var iCount = 0; iCount < data.length; iCount++) { strConstruction += "