From 1ceabefb451912daa5dda7768b7ef0b89a56c08a Mon Sep 17 00:00:00 2001 From: xiaoyong931011 <15274802129@163.com> Date: Fri, 25 Mar 2022 12:28:00 +0800 Subject: [PATCH] 1 --- zq-erp/src/main/resources/templates/views/super/sysCompany-form.html | 184 +++++++++++++++++++++++----------------------- 1 files changed, 92 insertions(+), 92 deletions(-) diff --git a/zq-erp/src/main/resources/templates/views/super/sysCompany-form.html b/zq-erp/src/main/resources/templates/views/super/sysCompany-form.html index ab047f8..ea1c420 100644 --- a/zq-erp/src/main/resources/templates/views/super/sysCompany-form.html +++ b/zq-erp/src/main/resources/templates/views/super/sysCompany-form.html @@ -21,11 +21,11 @@ <script type="text/javascript" th:src="@{/plugin/zTree/jquery.ztree.excheck.min.js}"></script> <style> - #treeDemo{ - height: 500px; - overflow: scroll; - width: 300px; - } + #treeDemo{ + height: 500px; + overflow: scroll; + width: 300px; + } </style> </head> @@ -113,99 +113,99 @@ </div> <script type="text/javascript" th:src="@{/js/systools/MJsBase.js}"></script> <script th:inline="javascript"> - var invokeUrl = basePath+"/admin/sysCompany/addCompany"; - /*<![CDATA[*/ - var obj=/*[[${obj}]]*/ - /*]]>*/ - if(obj.comId!=null){ - invokeUrl = basePath+"/admin/sysCompany/modifyCompany"; - } + var invokeUrl = basePath+"/admin/sysCompany/addCompany"; + /*<![CDATA[*/ + var obj=/*[[${obj}]]*/ + /*]]>*/ + if(obj.comId!=null){ + invokeUrl = basePath+"/admin/sysCompany/modifyCompany"; + } - var myForm = null; - var tree = null; - $(function() { - MTools.autoFullSelect(); - $(".select2").select2({ - 'width' : '100%' - }); - myForm = MForm.initForm({ - invokeUrl : invokeUrl, - beforeSubmit : function() { - var items = tree.getCheckedNodes(); - var keys = ""; - for (var i = 0; i < items.length; i++) { - keys += items[i]["id"] + ","; - } - myForm.initParam.extendParam = { - "comFunctions" : keys - }; - }, - afterSubmit : function() { - parent.myGrid.serchData(); - }, - }); - initFunctionList(); - }); + var myForm = null; + var tree = null; + $(function() { + MTools.autoFullSelect(); + $(".select2").select2({ + 'width' : '100%' + }); + myForm = MForm.initForm({ + invokeUrl : invokeUrl, + beforeSubmit : function() { + var items = tree.getCheckedNodes(); + var keys = ""; + for (var i = 0; i < items.length; i++) { + keys += items[i]["id"] + ","; + } + myForm.initParam.extendParam = { + "comFunctions" : keys + }; + }, + afterSubmit : function() { + parent.myGrid.serchData(); + }, + }); + initFunctionList(); + }); - function initFunctionList() { - var zNodes = new Array(); - $.AjaxProxy().invoke( - basePath+"/admin/sysFunction/all", - function(loj) { - for (var i = 0; i < loj.getRowCount(); i++) { - zNodes[i] = createNode(loj.getString(i, "fnId"), - loj.getString(i, "fnParentId"), loj - .getString(i, "fnName")); - } - initTree(zNodes); - }); - } + function initFunctionList() { + var zNodes = new Array(); + $.AjaxProxy().invoke( + basePath+"/admin/sysFunction/all", + function(loj) { + for (var i = 0; i < loj.getRowCount(); i++) { + zNodes[i] = createNode(loj.getString(i, "fnId"), + loj.getString(i, "fnParentId"), loj + .getString(i, "fnName")); + } + initTree(zNodes); + }); + } - function initTree(zNodes) { - var setting = { - check : { - enable : true, - chkStyle : "checkbox", - radioType : "level", - chkboxType : { - "Y" : "ps", - "N" : "ps" - } - }, - view : { - dblClickExpand : false, - showLine : true, - }, - data : { - simpleData : { - enable : true, - idKey : "id", - pIdKey : "pId", - rootPId : "" - } - }, + function initTree(zNodes) { + var setting = { + check : { + enable : true, + chkStyle : "checkbox", + radioType : "level", + chkboxType : { + "Y" : "ps", + "N" : "ps" + } + }, + view : { + dblClickExpand : false, + showLine : true, + }, + data : { + simpleData : { + enable : true, + idKey : "id", + pIdKey : "pId", + rootPId : "" + } + }, - }; - tree = $.fn.zTree.init($("#treeDemo"), setting, zNodes); - } + }; + tree = $.fn.zTree.init($("#treeDemo"), setting, zNodes); + } - function createNode(id, parentId, name) { - var o = new Object(); - o.id = id; - o.pId = parentId; - o.name = name; - o.open = true; - //如果是编辑则设置节点选中 - if(obj.comId!=null){ - //var fns = "${obj.comFunctions}"; - var fns = obj.comFunctions; - if (fns.indexOf(id) != -1) { - o.checked = true; - } - } + function createNode(id, parentId, name) { + var o = new Object(); + o.id = id; + o.pId = parentId; + o.name = name; + o.open = true; + //如果是编辑则设置节点选中 + if(obj.comId!=null){ + //var fns = "${obj.comFunctions}"; + var fns = obj.comFunctions; + if (fns.indexOf(id) != -1) { + o.checked = true; + } + } - return o; - } + return o; + } </script> </body> </html> \ No newline at end of file -- Gitblit v1.9.1