123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765 |
- var webContext = "/ZEUS";
- $(document).ready(function(){
-
- });
- //设置AJAX全局属性
- $.ajaxSetup({
- contentType : 'application/x-www-form-urlencoded; charset=UTF-8',
- complete : function(XHR, TS) {
- var resText = XHR.responseText;
- var sessionstatus = XHR.getResponseHeader("sessionstatus");
- var loginPath = XHR.getResponseHeader("loginPath");
- if (911 == XHR.status && "timeout" == sessionstatus) {
- if (window.confirm('session 过期!')) {
- window.location.href = webContext+"/toLogin.html";
- }
- return;
- }
- }
- });
- //汉化消息框默认按钮
- $.messager.defaults = { ok: "确定", cancel: "取消" };
- //扩展jquery
- (function($){
- /**
- * 获取项目上下文路径
- */
- $.getWebPath = function(){
- var strFullPath=window.document.location.href;
- var strPath=window.document.location.pathname;
- var pos=strFullPath.indexOf(strPath);
- var prePath=strFullPath.substring(0,pos);
- var postPath=strPath.substring(0,strPath.substr(1).indexOf('/')+1);
- return (prePath+postPath);
- };
- /**
- * 获取当前页URL中指定参数名的值,使用decodeURI进行解码
- * name:参数名称
- */
- $.getUrlParam = function(name)
- {
- var reg = new RegExp("(^|&)"+ name +"=([^&]*)(&|$)");
- var r = window.location.search.substr(1).match(reg);
- if (r!=null) return decodeURI(r[2]); return "";
- };
- /**
- * 宽度采用百分比
- */
- $.fixWidth = function (percent){
- return Math.floor(document.body.clientWidth * percent) ;
- };
- /**
- * 取textarea标签中光标选中内容
- * id:textarea标签的ID属性值
- * 返回JOSN对象
- */
- $.getTextAreaSelected = function(id)
- {
- var textAreaSelected = ""; //选中内容
- var selectionStart = 0; //开始位置
- var selectionEnd = 0; //结束位置
- var element = document.getElementById(id);
- if (!window.getSelection) {
- //alert('IE');
- //IE浏览器
- textAreaSelected = document.selection.createRange().text;
- selectionStart = element.selectionStart;
- selectionEnd = element.selectionEnd;
- //alert(selectionStart);
- //alert(selectionEnd);
- } else {
- //alert('FF');
- selectionStart = element.selectionStart;
- selectionEnd = element.selectionEnd;
- textAreaSelected = element.value.substr(selectionStart, selectionEnd - selectionStart);
- }
- //如果当前没有选中,则取全部textarea的内容
- if(textAreaSelected.replace(/(^\s*)|(\s*$)/g, "")==""){
- textAreaSelected = element.value;
- selectionStart = 0;
- selectionEnd = textAreaSelected.length;
- }
- //alert(textAreaSelected);
- return {"textAreaSelected":textAreaSelected,"selectionStart":selectionStart,"selectionEnd":selectionEnd};
- };
- /**
- * 选中textarea中指定的内容
- * id:textarea标签的ID属性值
- * obj:json对象
- */
- $.setTextAreaSelected = function(id, obj) {
- var textObj = document.getElementById(id);
- if (textObj.createTextRange) {
- var textFeildValue = obj.textAreaSelected;
-
- var len = textFeildValue.length;
- var textObj = document.getElementById(id);
-
- var value = textObj.value;
- var index = value.indexOf(textFeildValue);
- //IE浏览器
- var range = textObj.createTextRange();
- range.moveEnd("character", -1 * value.length);
- range.moveEnd("character", index + len);
- range.moveStart("character", index);
- range.select();
- } else {
- textObj.setSelectionRange(obj.selectionStart, obj.selectionEnd);
- textObj.focus();
- }
- };
- /**
- * 文本框自适应大小
- */
- $.autoTextarea = function (elem)
- {
- elem.style.resize = 'none';
- minHeight = elem.currentStyle ?
- parseFloat(elem.currentStyle['height']) : parseFloat(document.defaultView.getComputedStyle(elem, null)['height']);
- var adjust = function () {
- if (elem._length === elem.value.length) return;
- elem._length = elem.value.length;
- elem.style.height = minHeight + 'px';
- if (elem.scrollHeight > minHeight)
- {
- elem.style.overflowY = 'hidden';
- elem.style.height = elem.scrollHeight + 'px';
- }
- };
- addEvent = function (type, callback) {
- elem.addEventListener ?
- elem.addEventListener(type, callback, false) :
- elem.attachEvent('on' + type, callback);
- };
- addEvent('keydown', adjust);
- addEvent('keyup', adjust);
- addEvent('propertyadjust', adjust);
- addEvent('input', adjust);
- addEvent('focus', adjust);
- adjust();
- };
-
- })(jQuery);
- //封装jquery公共插件
- jQuery.common = {
- /**
- * 常量
- */
- CONSTANT:{
- /*
- * 状态
- */
- METHOD_STATUS_1:"1",//已上线
- METHOD_STATUS_2:"2",//测试中
- METHOD_STATUS_F1:"-1",//已停用
- /*
- * 返回值类型
- */
- METHOD_RESULT_TYPE_0:"0",//json格式字符串
- METHOD_RESULT_TYPE_0_TEXT:"json",
- METHOD_RESULT_TYPE_1:"1",//XML格式字符串
- METHOD_RESULT_TYPE_1_TEXT:"XML",
-
-
- },//常量 end
- url:$.getWebPath(),//+"/servlet/ActionServlet",//ActionServlet请求地址
- urlByBizAction:function (bizAction){
- return this.url+"/"+bizAction+".action?ST="+new Date().getTime();
- },
- urlByJsonParam:function (bizAction,json){
- return this.url+"/"+bizAction+".action?"+$.param(json)+"&ST="+new Date().getTime();
- },
- /**
- * session
- */
- getMySession:function(){
- var sessionVar = {
- my_session_user : {},
- my_session_db : {},
- my_session_UserOtherInfo : {
- userHostName : '',
- userIp : ''
- },
- my_session_UserPermission : {
- menu : [],
- fun : []
- },
- };
-
- var url = $.getWebPath()+"/ActionServlet_doPost.action";
- var param = {};
- param.bizAction = "mySession!getMySession";
- $.ajax({
- type: "POST",
- url: url,
- data: param,
- dataType: "json",
- cache: false,
- async:false,
- success: function(data){
- if(data.Code==1){
- sessionVar = $.extend(sessionVar, data);
- }else{
- alert('session获取失败!');
- }
- }
- });
- return sessionVar;
- },
- removeMySession:function(fn){
- var url = $.getWebPath()+"/ActionServlet_doPost.action";
- var param = {};
- param.bizAction = "mySession!removeMySession";
- $.ajax({
- type: "POST",
- url: url,
- data: param,
- dataType: "json",
- cache: false,
- async:false,
- success: function(data){
- if(data.Code==1){
- if(fn){
- fn();
- }
- }else{
- // alert('注销session失败!');
- $.common.showMessage(data);
- }
- }
- });
- },
- showMessage:function(data,str){// error,question,info,warning
- $.messager.defaults = { ok: "确定", cancel: "取消" };
- if(data.Code == -100){
- $.messager.alert("系统提示",(typeof str == "undefined"?"登录已失效或未登录,请重新登录系统!":str),'info',function(){
- //top.location.href = $.getWebPath()+"/login.html";
- window.top.loginAgain();
- });
- }else if(data.Code==-1){
- $.messager.alert("异常",(typeof str == "undefined"?"系统异常":str)+":"+data.Message,'error');
- }else if(data.Code==-2){
- $.messager.alert("提示",(typeof str == "undefined"?"系统提示":str)+":"+data.Message,'info');
- }else if(data.Code==-3){
- $.messager.alert("警告",(typeof str == "undefined"?"系统警告":str)+":"+data.Message,'warning');
- }else{
- $.messager.alert("",(typeof str == "undefined"?"":str)+":"+data.Message,'question');
- }
- },
- closeAllTabs:function(tabId){//关闭所有选项卡
- var object = $('#'+tabId).tabs('tabs');
- var length = object.length;
- if(length > 0){
- $.messager.confirm("操作提示","确定关闭所有选项卡?",function(r){
- if (r){
- for(var i=0; i<length; i++) {
- var onetab = object[0];
- var title = onetab.panel('options').title;
- //console.info(title);
- $('#'+tabId).tabs('close', title);
- }
- }
- });
- }
- },
- /*
- * 字典表
- */
- DICT:{
- url:$.getWebPath(),
- // loadSelect : function(id, param, defaultValue) {
- // $.post(this.url, param, function(result) {
- // if(result.result){
- // $('#' + id).combobox('loadData', result.result);
- // if (defaultValue != null && defaultValue != '') {
- // $('#' + id).combobox('setValue', defaultValue);
- // }
- // }else{
- // $.common.showMessage(result);
- // }
- // }, "json");
- // },
- // loadDictSelect : function(id, businTypeID, defaultValue) {
- // var param = {};
- // param.bizAction = "dictAction.getDict";
- // param.businTypeID = businTypeID;
- // param.emptyText = '--请选择--';
- // $.post(this.url, param, function(result) {
- // if(result.result){
- // $('#' + id).combobox('loadData', result.result);
- // if (defaultValue != null && defaultValue != '') {
- // $('#' + id).combobox('setValue', defaultValue);
- // }
- // }else{
- // $.common.showMessage(result);
- // }
- // }, "json");
- // },
- loadDict : function(businTypeID,actionName) {
- var res;
- $.ajax( {
- url : this.url+"/DictAction_getDict",
- data : {
- businTypeID : businTypeID
- },
- cache : false,
- async : false,
- type : "POST",
- dataType : 'json',
- success : function(data) {
- if(data.Result){
- res = data.Result;
- }else{
- $.common.showMessage(data);
- }
- }
- });
- // console.info(res);
- return res;
- },
- loadComboboxByData : function (id, result, defaultValue){
- $('#' + id).combobox('loadData', result);
- if (defaultValue != null && defaultValue != '') {
- $('#' + id).combobox('setValue', defaultValue);
- }
- },
- loadDictToArray : function(result){
- var res = new Object;
- for ( var iterable_element in result) {
- res[result[iterable_element].businID] = result[iterable_element].businName;
- }
- return res;
- }
- },
- //DICT end
- /**
- * 下拉框操作
- */
- Combobox:{
- defaults : {
- id:"",//下拉ID
- value:"",//下拉选择项值名称
- text:"",//下拉选择项文本名称
- jsonArray:new Array(),//下拉选择项数据:JSON对象组成的数组
- key:"",//关系字段
- defaultValue:"",//默认选择值
- addDefaultRecord:{//添加默认选项卡
- value:"",
- text:"--请选择--"
- },
- appendText:"",//在text后追加的内容字符串,该内容支持正则表达式/{this.*}/来匹配jsonArray数组中的每个对象中的某一个属性字段
- prependText:"",//在text前追加的内容字符串,同上
- },
- init: function (combobox){
- var c = $.extend({},this.defaults,combobox);
- var arr = new Array();
- // if(c.value+"" == c.text+""){
- var valueField = c.value;
- var textField = c.text;
- c.value = (valueField + "_V");
- c.text = (textField + "_T");
- //jsonArray 重组
- var regexp = /\{this\.[^{}]+\}/g;
- $.each(c.jsonArray,function(i,v){
- var value = eval("v."+valueField);
- var text = eval("v."+textField);
- var str = '{';
- str += '"'+c.value+'":"'+value+'","'+c.text+'":"'+text+'"';
- if(c.key){
- var keyArr = c.key.split(",");
- var key = "";
- $.each(keyArr,function(ii,keyName){
- if(keyName.length>0){
- var key = eval("v."+keyName);
- str += ','+'"'+keyName+'":"'+key+'"';
- }
- });
- // var key = eval("v."+c.key);
- // str += ','+'"'+c.key+'":"'+key+'"';
- }
- var appendText = c.appendText;
- if(typeof(appendText) != "undefined" && appendText != ""){
- var exp = appendText.match(regexp);
- // console.info(regexp);
- // console.info(appendText);
- // console.info(exp);
- $.each(exp,function(ii,vv){
- var temp = vv.replace("\{this","v").replace("\}","");
- // console.info(temp);
- // console.info(eval(temp));
- var t = typeof(eval(temp))=="undefined"?"":eval(temp);
- appendText = appendText.replace(vv,t);
- // console.info(appendText);
- });
- str += ','+'"appendText":"'+appendText+'"';
- }
- if(c.prependText){
- var prependText = eval(c.prependText);
- if(typeof(prependText) != "undefined"){
- str += ','+'"prependText":"'+prependText+'"';
- }
- }
- str += '}';
- arr.push($.parseJSON(str));
- });
- // }
- if(typeof(c.addDefaultRecord.value)!="undefined"){
- //添加默认选项卡
- var str = '{"'+c.value+'":"'+c.addDefaultRecord.value+'","'+c.text+'":"'+c.addDefaultRecord.text+'"}';
- arr.unshift($.parseJSON(str));
- }
- c.jsonArray = arr;
- // console.info(c.jsonArray);
- return c;
- },
- //格式化输出
- formatterRow : function(thiss,row){
- var opts = $(thiss).combobox('options');
- var rs = row[opts.textField];
- if(typeof(row.appendText)!="undefined" && row.appendText != ""){
- rs += row.appendText;
- }
- if(typeof(row.prependText)!="undefined" && row.prependText != ""){
- rs = row.prependText + rs;
- }
- return rs;
- },
- //单个下拉杠
- load : function(c){
- var combobox = this.init(c);
- $("#"+combobox.id).combobox({
- valueField:combobox.value,
- textField:combobox.text,
- data:combobox.jsonArray,
- formatter: function(row){
- return $.common.Combobox.formatterRow(this,row);
- }
- });
- },
- //创建 下一级联动下拉框
- createNextCombobox : function(key,combobox){
- var temp = new Array();
- if(typeof(key)!="undefined" && key != ""){
- if(typeof(combobox.addDefaultRecord.value)!="undefined"){
- //添加默认选项卡
- temp.push($.parseJSON('{"'+combobox.value+'":"'+combobox.addDefaultRecord.value+'","'+combobox.text+'":"'+combobox.addDefaultRecord.text+'"}'));
- }
- $.each(combobox.jsonArray,function(i,v){
- if(key+"" == eval("v."+combobox.key)+""){
- temp.push(v);
- }
- });
- // console.info(temp);
- }else{
- temp = combobox.jsonArray;
- }
- $("#"+combobox.id).combobox({
- valueField:combobox.value,
- textField:combobox.text,
- data:temp,
- formatter: function(row){
- return $.common.Combobox.formatterRow(this,row);
- }
- }).combobox('select',combobox.defaultValue);
- },
- //二级联动
- load2 : function (c1,c2){
- var combobox1 = this.init(c1);
- var combobox2 = this.init(c2);
- $("#"+combobox1.id).combobox({
- valueField:combobox1.value,
- textField:combobox1.text,
- data:combobox1.jsonArray,
- onSelect:function(record){
- var key1 = eval("record."+combobox1.key);
- $.common.Combobox.createNextCombobox(key1,combobox2);
- },
- formatter: function(row){
- return $.common.Combobox.formatterRow(this,row);
- }
- }).combobox('select',combobox1.defaultValue);
- var keyValue = "";
- if(combobox1.defaultValue){
- $.each(combobox1.jsonArray,function(i,v){
- var temp = eval("v."+combobox1.value);
- if(temp == combobox1.defaultValue){
- keyValue = eval("v."+combobox1.key);
- return;
- }
- });
- }
- this.createNextCombobox(keyValue,combobox2);
- },
- //三级联动
- load3 : function (c1,c2,c3){
- var combobox1 = this.init(c1);
- var combobox2 = this.init(c2);
- var combobox3 = this.init(c3);
- $("#"+combobox1.id).combobox({
- valueField:combobox1.value,
- textField:combobox1.text,
- data:combobox1.jsonArray,
- onSelect:function(record){
- var key1 = eval("record."+combobox1.key);
- var temp = new Array();
- if(typeof(key1)!="undefined" && key1 != ""){
- if(typeof(combobox2.addDefaultRecord.value)!="undefined"){
- //添加默认选项卡
- temp.push($.parseJSON('{"'+combobox2.value+'":"'+combobox2.addDefaultRecord.value+'","'+combobox2.text+'":"'+combobox2.addDefaultRecord.text+'"}'));
- }
- $.each(combobox2.jsonArray,function(i,v){
- var key2Str = combobox2.key;
- var key2Arr = key2Str.split(",");
- var key2 = key2Arr[0];
- if(key1+"" == eval("v."+key2)+""){
- temp.push(v);
- }
- });
- // console.info(temp);
- }else{
- temp = combobox2.jsonArray;
- }
- $("#"+combobox2.id).combobox({
- valueField:combobox2.value,
- textField:combobox2.text,
- data:temp,
- formatter: function(row){
- return $.common.Combobox.formatterRow(this,row);
- }
- }).combobox('select',combobox2.defaultValue);
- $("#"+combobox3.id).combobox({
- valueField:combobox3.value,
- textField:combobox3.text,
- data:combobox3.jsonArray,
- formatter: function(row){
- return $.common.Combobox.formatterRow(this,row);
- }
- }).combobox('select',combobox3.defaultValue);
-
- },
- formatter: function(row){
- return $.common.Combobox.formatterRow(this,row);
- }
- }).combobox('select',combobox1.defaultValue);
- $("#"+combobox2.id).combobox({
- valueField:combobox2.value,
- textField:combobox2.text,
- data:combobox2.jsonArray,
- onSelect:function(record){
- var key2Str = combobox2.key;
- var key2Arr = key2Str.split(",");
- var key = key2Arr[1];
- var key2 = eval("record."+key);
- var temp = new Array();
- if(typeof(key2)!="undefined" && key2 != ""){
- if(typeof(combobox3.addDefaultRecord.value)!="undefined"){
- //添加默认选项卡
- temp.push($.parseJSON('{"'+combobox3.value+'":"'+combobox3.addDefaultRecord.value+'","'+combobox3.text+'":"'+combobox3.addDefaultRecord.text+'"}'));
- }
- $.each(combobox3.jsonArray,function(i,v){
- if(key2+"" == eval("v."+combobox3.key)+""){
- temp.push(v);
- }
- });
- // console.info(temp);
- }else{
- temp = combobox3.jsonArray;
- }
- $("#"+combobox3.id).combobox({
- valueField:combobox3.value,
- textField:combobox3.text,
- data:temp,
- formatter: function(row){
- return $.common.Combobox.formatterRow(this,row);
- }
- }).combobox('select',combobox3.defaultValue);
- },
- formatter: function(row){
- return $.common.Combobox.formatterRow(this,row);
- }
- }).combobox('select',combobox2.defaultValue);
- $("#"+combobox3.id).combobox({
- valueField:combobox3.value,
- textField:combobox3.text,
- data:combobox3.jsonArray,
- formatter: function(row){
- return $.common.Combobox.formatterRow(this,row);
- }
- }).combobox('select',combobox3.defaultValue);
- }
- },
- //commobox end
- /**
- * 生成树
- */
- Tree:{
- /*
- * 节点
- */
- treeNode:{
- id:"",
- text:"",
- state:"open",
- checked:false,
- attributes:"",
- children:new Array(),
- pid:""
- },
- init: function(treeNodeArray,checkedArray){
- var arr = new Array();
- $.each(treeNodeArray,function(i,v){
- var node = $.extend({},$.common.Tree.treeNode,v);
- if($.inArray(node.id,checkedArray)!=-1){
- node.checked = true;
- }
- if(typeof(node.pid) == "undefined" || node.pid == "" || node.pid == "0"){//根
- arr.push(node);
- }else{
- $.each(treeNodeArray,function(ii,vv){
- if(node.pid == vv.id){
- arr.push(node);
- }
- });
- }
- });
- return arr;
- },
- createChildrenNode:function(treeNodeArray,parentNode){
- //找子节点
- var childrenArray = new Array();
- $.each(treeNodeArray,function(i,v){
- if(parentNode.id == v.pid){
- $.common.Tree.createChildrenNode(treeNodeArray, v);
- childrenArray.push(v);
- }
- });
- parentNode.children = childrenArray;
- },
- /**
- * 构建树的data数据
- * @param treeNodeArray 节点数组
- */
- createData:function(treeNodeArray,checkedArray){
- var treeNodeArray = this.init(treeNodeArray,checkedArray);
-
- var treeData = new Array();
- $.each(treeNodeArray,function(i,v){
- if(typeof(v.pid) == "undefined" || v.pid == "" || v.pid == "0"){//根
- $.common.Tree.createChildrenNode(treeNodeArray,v);
- treeData.push(v);
- }
- });
- // console.info(treeNodeArray);
- // console.info(treeData);
- return treeData;
- }
- },
- /**
- * 权限控制
- */
- Permission:{
- HAS_INIT_MENU:false,
- HAS_INIT_FUN:false,
- menuPmssData:new Array(),
- funPmssData:new Array(),
- //初始化菜单
- initMenu:function(){
- //菜单权限
- var menuPmss={
- menuId:-1,
- parentsId:-1,//当为1时为一级节点
- menuName:"",
- uri:"",//"api/index_api.html?INDEX_PAGE=api_release.html"
- // isPmss:true,//true:允许
- isDefaultPage:false,//false:未设置为默认页
- };
- if(!this.HAS_INIT_MENU){
- //session中取
- this.menuPmssData=new Array();
- var session = $.common.getMySession();
- // console.info(session);
- var menu = session.my_session_UserPermission.menuList;
- $.each(menu,function(i,v){
- var temp = {
- menuId:v.menuId,
- parentsId:v.parentsID,
- menuName:v.menuName,
- uri:v.menuAction,
- // isPmss:v.isPmss==1?true:false,//true:允许
- isDefaultPage:v.isDefaultPage==1?true:false,//false:未设置为默认页
- };
- temp = $.extend({},menuPmss,temp);
- $.common.Permission.menuPmssData.push(temp);
- });
- this.HAS_INIT_MENU = true;
- }
- },
- //初始功能
- initFun:function(){
- //功能权限
- var funPmss={
- funName:"",
- uri:"",//bizAction{jQuery选择器表达式}{}{};bizAction{jQuery选择器表达式}
- isPmss:true,//true:允许
- };
- if(!this.HAS_INIT_FUN){
- //session中取
- this.funPmssData =new Array();
- var session = $.common.getMySession();
- // console.info(session);
- var fun = session.my_session_UserPermission.funList;
- $.each(fun,function(i,v){
- var temp = {
- funName:v.actionName,
- uri:v.actionURI,
- isPmss:v.isPmss==1?true:false,//true:允许
- };
- temp = $.extend({},funPmss,temp);
- $.common.Permission.funPmssData.push(temp);
- });
- this.HAS_INIT_FUN = true;
- }
- },
- //获取菜单
- getMenuPmssData:function(initFlag){
- if(initFlag){
- this.HAS_INIT_MENU = false;
- }
- this.initMenu();
- return this.menuPmssData;
- },
- //根据父ID查找
- getMenuPmssDataByParentsId:function(parentsId){
- this.initMenu();
- var menu = this.menuPmssData;
- var data = new Array();
- $.each(menu,function(i,v){
- if(v.parentsId == parentsId){
- data.push(v);
- }
- });
- return data;
- },
- //获取功能
- getFunPmssData:function(initFlag){
- if(initFlag){
- this.HAS_INIT_FUN = false;
- }
- this.initFun();
- return this.funPmssData;
- }
-
- }
- };
|