michael

michael 授权会员

100 飞吻 2017-11-24 18:32:46 加入 来自南京市

(这个人懒得留下签名)

加为好友 发起会话

michael 最近的回答

  • 17天前版本升级为V3.0.2后,toolbar中的按钮只能点击一次,必须页面刷新后才能再次点击按钮,请问如何解决。中回答:

    //以下为JS代码<br><br>$(function() {<br> loadTreeGridData();<br>});<br>//循环遍历treegrid中的子节点<br>var orgIds = &quot;&quot;;<br>function getAllTreeGridChildrenNode(node) {<br> orgIds += node.modelId + &quot;,&quot;;<br> for (var i = 0; i &lt; node.children.length; i++) {<br> var tempChildren = node.children[i];<br> if (tempChildren.children) {<br> getAllTreeGridChildrenNode(tempChildren);<br> }<br> }<br>}<br><br>// 加载treegrid<br>function loadTreeGridData() {<br> $.ajax({<br> type : &quot;POST&quot;,<br> url : path + &quot;/modelController/getModelTreeGridData&quot;,<br> contentType : &quot;application/json&quot;,<br> data : JSON.stringify({<br> roleId : null<br> }),<br> dataType : &quot;json&quot;,<br> success : function(d, textStatus) {<br> var ajaxObj = eval(d);<br> treeGridData = ajaxObj;<br> console.log(treeGridData);<br> if (treeGridData) {<br> $(&quot;#modelTreeGrid&quot;).treegrid({<br> data : treeGridData,<br> idField : &#39;modelId&#39;,<br> treeField : &#39;modelName&#39;,<br> parentField : &#39;modelId&#39;,<br> rownumbers : true,// 行编号<br> allowCellEdit : true,<br> fitColumns : false,<br> autoRowHeight : false,<br> initialState : &#39;collapsed&#39;,<br> /* checkbox : true, */<br> queryParams : {<br> &quot;id&quot; : &quot;-1&quot;<br> },// 首次查询参数<br> columns : [ [ {<br> field : &quot;modelId&quot;,<br> title : &quot;主键id&quot;,<br> width : &#39;5%&#39;,<br> editor : &#39;text&#39;,<br> hidden : true<br> }, {<br> field : &quot;parentName&quot;,<br> title : &quot;父节点名称&quot;,<br> width : &#39;5%&#39;,<br> editor : &#39;text&#39;,<br> hidden : true<br><br> }, {<br> field : &quot;modelName&quot;,<br> title : &quot;模板名称&quot;,<br> width : &#39;40%&#39;,<br> editor : &#39;text&#39;<br> }, {<br> field : &quot;sort&quot;,<br> title : &quot;类别&quot;,<br> width : &#39;15%&#39;,<br> editor : &#39;text&#39;<br> }, {<br> field : &quot;creditCode&quot;,<br> title : &quot;信用代码&quot;,<br> width : &#39;25%&#39;,<br> editor : &#39;text&#39;<br> }, {<br> field : &quot;industryCode&quot;,<br> title : &quot;行业代码&quot;,<br> width : &#39;20%&#39;,<br> editor : &#39;text&#39;<br> } ] ],<br> onSelect : function(node) {<br> orgIds = &quot;&quot;;<br> getAllTreeGridChildrenNode(node);<br> loadModelParaDataGridData(orgIds.substring(0,orgIds.length - 1));<br> loadModelXmlDataGridData(orgIds.substring(0,orgIds.length - 1));<br> },<br> toolbar : [ {<br> id : &#39;addLeafBtn&#39;,<br> text : &#39;添加&#39;,<br> iconCls : &#39;fa fa-plus&#39;,<br> btnCls: &#39;topjui-btn-green&#39;,<br> handler : addModel<br> }, {<br> id : &#39;editBtn&#39;,<br> text : &#39;修改&#39;,<br> iconCls : &#39;fa fa-pencil&#39;,<br> btnCls: &#39;topjui-btn-red&#39;,<br> handler : editModel<br> }, {<br> id : &#39;deleteBtn&#39;,<br> text : &#39;删除&#39;,<br> disabled : false,<br> iconCls : &#39;fa fa-trash&#39;,<br> btnCls : &#39;topjui-btn-brown&#39;,<br> handler : deleteModel<br> } , {<br> id : &#39;upBtn&#39;,<br> text : &#39;上移&#39;,<br> disabled : false,<br> iconCls : &#39;fa fa-long-arrow-up&#39;,<br> btnCls : &#39;topjui-btn-blue&#39;,<br> handler : upRowModel<br> } , {<br> id : &#39;downBtn&#39;,<br> text : &#39;下移&#39;,<br> disabled : false,<br> iconCls : &#39;fa fa-long-arrow-down&#39;,<br> btnCls : &#39;topjui-btn-purple&#39;,<br> handler : downRowModel<br> } ]<br> <br> });<br> }<br> },<br> error : function(err, textStatus) {<br> }<br> });<br>}<br><br><br><br><br><br>// 添加菜单<br>function addModel() {<br> $(&#39;#modelDialog&#39;)<br> .dialog(<br> {<br> title : &#39;添加菜单&#39;,<br> iconCls : &#39;fa fa-plus&#39;,<br> width : 750,<br> height : 600,<br> closed : false,<br> cache : false,<br> modal : true,<br> onOpen : function() {<br> $(&#39;modelForm&#39;).form(&#39;clear&#39;);<br> var currRow = $(&#39;#modelTreeGrid&#39;).treegrid(<br> &#39;getSelected&#39;);<br> if (currRow) {<br> $(&quot;#parentId&quot;).val(currRow.modelId);<br> $(&quot;#parentModelName&quot;).textbox(&quot;setValue&quot;,<br> currRow.modelName);<br> }<br> $(&quot;#type&quot;).val(&#39;add&#39;);<br> },<br> buttons : [<br> {<br> text : &quot;保存&quot;,<br> iconCls : &quot;fa fa-plus&quot;,<br> btnCls : &#39;topjui-btn-green&#39;,<br> handler : function() {<br> // 表单验证<br> if (!$(&quot;#modelForm&quot;).form(<br> &#39;enableValidation&#39;).form(<br> &#39;validate&#39;)) {<br> return;<br> }<br> var params = $(&quot;#modelForm&quot;)<br> .serializeObject();<br> // 执行保存菜单数据操作<br> $<br> .ajax({<br> type : &quot;POST&quot;,<br> url : path<br> + &quot;/modelController/operateModel&quot;,<br> contentType : &quot;application/json&quot;,<br> data : JSON<br> .stringify(params),<br> dataType : &quot;json&quot;,<br> success : function(data) {<br> $.messager<br> .alert(<br> &quot;操作提示&quot;,<br> data.msg,<br> topJUI.language.message.icon.info,<br> function() {<br> // 关闭dialog窗体<br> $(<br> &#39;#modelDialog&#39;)<br> .dialog(<br> &#39;close&#39;);<br> // 刷新treegrid<br> loadTreeGridData();<br> });<br> },<br> error : function(data) {<br> }<br> });<br> }<br> }, {<br> text : &quot;关闭&quot;,<br> iconCls : &quot;fa fa-close&quot;,<br> btnCls : &#39;topjui-btn-red&#39;,<br> handler : function() {<br> // 关闭dialog窗体<br>// $(&#39;#modelDialog&#39;).dialog(&#39;close&#39;);<br> $(&#39;modelForm&#39;).form(&#39;clear&#39;);<br> loadTreeGridData();<br> <br> }<br> } ]<br> });<br> /* $(&#39;#dd&#39;).dialog(&#39;refresh&#39;, null); */<br>}<br>// 编辑菜单<br>function editModel() {<br> var currRow = $(&#39;#modelTreeGrid&#39;).treegrid(&#39;getSelected&#39;);<br> if (currRow) {<br><br> } else {<br> $.messager<br> .alert(&quot;操作提示&quot;, &quot;请选择要编辑的菜单&quot;, topJUI.language.message.icon.info);<br> return;<br> }<br> $(&#39;#modelDialog&#39;)<br> .dialog(<br> {<br> title : &#39;编辑菜单&#39;,<br> iconCls : &#39;fa fa-pencil&#39;,<br> width : 750,<br> height : 600,<br> closed : false,<br> cache : false,<br> modal : true,<br> onOpen : function() {<br> $(&#39;modelForm&#39;).form(&#39;clear&#39;);<br> $(&quot;#modelId&quot;).val(currRow.modelId);<br> $(&quot;#modelName&quot;).textbox(&quot;setValue&quot;,<br> currRow.modelName);<br> $(&quot;#parentModelName&quot;).textbox(&quot;setValue&quot;,<br> currRow.parentName);<br> $(&quot;#sort&quot;).textbox(&quot;setValue&quot;, currRow.sort);<br> $(&quot;#creditCode&quot;).textbox(&quot;setValue&quot;,<br> currRow.creditCode);<br> $(&quot;#industryCode&quot;).textbox(&quot;setValue&quot;,<br> currRow.industryCode);<br> $(&quot;#type&quot;).val(&quot;update&quot;);<br> },<br> buttons : [<br> {<br> text : &quot;保存&quot;,<br> iconCls : &quot;fa fa-plus&quot;,<br> btnCls : &#39;topjui-btn-green&#39;,<br> handler : function() {<br> // 表单验证<br> if (!$(&quot;#modelForm&quot;).form(<br> &#39;enableValidation&#39;).form(<br> &#39;validate&#39;)) {<br> return;<br> }<br> // 执行保存菜单数据操作<br> var params = $(&quot;#modelForm&quot;)<br> .serializeObject();<br> // console.log(params);<br> $<br> .ajax({<br> type : &quot;POST&quot;,<br> url : path<br> + &quot;/modelController/operateModel&quot;,<br> contentType : &quot;application/json&quot;,<br> data : JSON<br> .stringify(params),<br> dataType : &quot;json&quot;,<br> success : function(data) {<br> $.messager<br> .alert(<br> &quot;操作提示&quot;,<br> data.msg,<br> topJUI.language.message.icon.info,<br> function() {<br> // 关闭dialog窗体<br> $(<br> &#39;#modelDialog&#39;)<br> .dialog(<br> &#39;close&#39;);<br> // 刷新treegrid<br> loadTreeGridData();<br> });<br> },<br> error : function(data) {<br> }<br> });<br> }<br> }, {<br> text : &quot;关闭&quot;,<br> iconCls : &quot;fa fa-close&quot;,<br> btnCls : &#39;topjui-btn-red&#39;,<br> handler : function() {<br> // 关闭dialog窗体<br> $(&#39;#modelDialog&#39;).dialog(&#39;close&#39;);<br> loadTreeGridData();<br> self.opener.location.reload(); <br> }<br> } ]<br> });<br>// $(&quot;#RightAccordion&quot;).accordion( &quot;refresh&quot; ); <br>}<br>// 删除菜单<br>function deleteModel() {<br> var currRow = $(&#39;#modelTreeGrid&#39;).treegrid(&#39;getSelected&#39;);<br> if (!currRow) {<br> $.messager<br> .alert(&quot;操作提示&quot;, &quot;请选择要删除的菜单&quot;, topJUI.language.message.icon.info);<br> return;<br> } else {<br> if (currRow.children.length != 0) {<br> $.messager.alert(&quot;操作提示&quot;, &quot;该菜单节点下包含子节点菜单不能直接删除&quot;,<br> topJUI.language.message.icon.warning);<br> return;<br> }<br> $.messager.confirm(&#39;操作提示&#39;, &#39;确定要删除此菜单吗&#39;, function(r) {<br> if (r) {<br> // 执行删除操作<br> var params = {<br> type : &#39;delete&#39;,<br> modelId : currRow.modelId<br> };<br> $.ajax({<br> type : &quot;POST&quot;,<br> url : path + &quot;/modelController/operateModel&quot;,<br> contentType : &quot;application/json&quot;,<br> data : JSON.stringify(params),<br> dataType : &quot;json&quot;,<br> success : function(data) {<br> $.messager.alert(&quot;操作提示&quot;, data.msg,<br> topJUI.language.message.icon.info, function() {<br> // 刷新treegrid<br> loadTreeGridData();<br> });<br> },<br> error : function(data) {<br> }<br> });<br> }<br> });<br> }<br>}<br>// 菜单上移<br>function upRowModel() {<br> var currRow = $(&#39;#modelTreeGrid&#39;).treegrid(&#39;getSelected&#39;);<br> console.log(currRow);<br> if (!currRow) {<br> $.messager<br> .alert(&quot;操作提示&quot;, &quot;请选择要操作的菜单&quot;, topJUI.language.message.icon.info);<br> return;<br> } else {<br> $.ajax({<br> type : &quot;POST&quot;,<br> url : path + &quot;/modelController/upAndDownModel&quot;,<br> contentType : &quot;application/json&quot;,<br> data : JSON.stringify({<br> type : &#39;up&#39;,<br> modelId : currRow.modelId,<br> parentId : currRow.parentId,<br> modelNum : currRow.modelNum<br> }),<br> dataType : &quot;json&quot;,<br> success : function(d) {<br> // if(d.code == 1){<br> // $.messager.alert(&quot;操作提示&quot;,<br> // &quot;操作成功&quot;,topJUI.language.message.icon.info);<br> // }<br> // 刷新treegrid<br> loadTreeGridData();<br> },<br> error : function(err, textStatus) {<br> }<br> });<br> }<br>}<br>// 菜单下移<br>function downRowModel() {<br> var currRow = $(&#39;#modelTreeGrid&#39;).treegrid(&#39;getSelected&#39;);<br> if (!currRow) {<br> $.messager<br> .alert(&quot;操作提示&quot;, &quot;请选择要操作的菜单&quot;, topJUI.language.message.icon.info);<br> return;<br> } else {<br> $.ajax({<br> type : &quot;POST&quot;,<br> url : path + &quot;/modelController/upAndDownModel&quot;,<br> contentType : &quot;application/json&quot;,<br> data : JSON.stringify({<br> type : &#39;down&#39;,<br> modelId : currRow.modelId,<br> parentId : currRow.parentId,<br> modelNum : currRow.modelNum<br> }),<br> dataType : &quot;json&quot;,<br> success : function(d) {<br> // if(d.code == 1){<br> // $.messager.alert(&quot;操作提示&quot;,<br> // &quot;操作成功&quot;,topJUI.language.message.icon.info);<br> // }<br> // 刷新treegrid<br> loadTreeGridData();<br> },<br> error : function(err, textStatus) {<br> }<br> });<br> }<br>}<br><br>//加载datagrid_modelpara<br>function loadModelParaDataGridData(orgIds) {<br> var upRowModelPara=&quot;toolbar&quot;;<br> var downRowModelPara=&quot;toolbar&quot;;<br> $(&#39;#modelParaDataGrid&#39;).datagrid({<br> title : &#39;&#39;,<br> iconCls : &#39;icon-edit&#39;,<br> width : &#39;100%&#39;,<br> height : &#39;100%&#39;,<br> singleSelect : true,<br> idField : &#39;MODEL_PARA_ID&#39;,<br> url : path + &#39;/modelController/getModelParaDataGridData&#39;,<br> pageSize : 10,<br> columns : [ [ {<br> field : &#39;MODEL_PARA_ID&#39;,<br> title : &#39;参数ID&#39;,<br> align : &#39;left&#39;,<br> width : &#39;20%&#39;,<br> hidden : true<br> },{<br> field : &#39;MODEL_PARA_MODEL_ID&#39;,<br> title : &#39;MODEL_PARA_MODEL_ID&#39;,<br> align : &#39;left&#39;,<br> width : &#39;20%&#39;,<br> hidden : true<br> },{<br> field : &#39;PARA_NUM&#39;,<br> title : &#39;排序&#39;,<br> align : &#39;left&#39;,<br> width : &#39;5%&#39;,<br> hidden : true<br> },{<br> field : &#39;PARA_NAME&#39;,<br> title : &#39;参数名称&#39;,<br> align : &#39;left&#39;,<br> width : &#39;20%&#39;,<br> hidden : false<br> }, {<br> field : &#39;PARA_TYPE&#39;,<br> title : &#39;参数类型&#39;,<br> align : &#39;left&#39;,<br> width : &#39;10%&#39;,<br> hidden : false<br> }, {<br> field : &#39;IS_INPUT&#39;,<br> title : &#39;是否必填&#39;,<br> align : &#39;left&#39;,<br> width : &#39;10%&#39;,<br> hidden : false<br> }, {<br> field : &#39;INPUT_MAXLEGTH&#39;,<br> title : &#39;输入最大长度&#39;,<br> align : &#39;left&#39;,<br> width : &#39;10%&#39;,<br> hidden : false<br> }, {<br> field : &#39;DEFAULT_VALUE&#39;,<br> title : &#39;默认值&#39;,<br> align : &#39;left&#39;,<br> width : &#39;10%&#39;,<br> hidden : false<br> }, {<br> field : &#39;INPUT_REQUIRE&#39;,<br> title : &#39;填写要求&#39;,<br> align : &#39;left&#39;,<br> width : &#39;20%&#39;,<br> hidden : false<br> }, {<br> field : &#39;PARA_ALIAS&#39;,<br> title : &#39;参数别名&#39;,<br> align : &#39;left&#39;,<br> width : &#39;20%&#39;,<br> hidden : false<br> },{<br> field : &#39;STATE&#39;,<br> title : &#39;状态&#39;,<br> align : &#39;left&#39;,<br> width : &#39;10%&#39;,<br> hidden : true<br> }] ],<br> queryParams : {<br> isPage : &quot;yes&quot;,<br> orgIds : orgIds<br> },<br> <br> loader : function(param, success, error) {<br> var $that = $(this);<br> var opts = $that.datagrid(&quot;options&quot;);<br> if (!opts.url) {<br> return false;<br> }<br> $.ajax({<br> url : opts.url,<br> type : &quot;POST&quot;,<br> contentType : &quot;application/json&quot;,<br> data : JSON.stringify(<br> {<br> orgIds : orgIds,<br> isPage : &quot;yes&quot;,<br> page:1,<br> rows:10<br> }<br> ),<br> dataType : &quot;json&quot;,<br> success : function(d, textStatus) {<br> // console.log(d.code);<br> var retureData = {<br> total : d.total,<br> rows : d.data<br> };<br> success(retureData);<br> },<br> error : function() {<br> error.apply(this, arguments);<br> }<br> });<br> }<br> });<br> var p = $(&#39;#modelParaDataGrid&#39;).datagrid(&#39;getPager&#39;);<br> $(p).pagination({<br> pageSize : 10,// 每页显示的记录条数,默认为10<br> pageList : [ 10, 20, 30 ],// 可以设置每页记录条数的列表<br> beforePageText : &#39;第&#39;,// 页数文本框前显示的汉字<br> afterPageText : &#39;页 共 {pages} 页&#39;,<br> displayMsg : &#39;当前显示 {from} - {to} 条记录 共 {total} 条记录&#39;<br> });<br>}<br>//添加菜单<br>function addModelPara() {<br> <br> $(&#39;#modelParaDialog&#39;)<br> .dialog(<br> {<br> title : &#39;添加菜单&#39;,<br> iconCls : &#39;fa fa-plus&#39;,<br> width : 750,<br> height : 600,<br> closed : false,<br> cache : false,<br> modal : true,<br> onOpen : function() {<br> <br> $(&#39;modelParaForm&#39;).form(&#39;clear&#39;);<br> var currRow = $(&#39;#modelTreeGrid&#39;).treegrid(<br> &#39;getSelected&#39;);<br> if (currRow) {<br> $(&quot;#modelParaModelId&quot;).val(currRow.modelId);<br> }<br> $(&quot;#modelParaOperateType&quot;).val(&quot;add&quot;);<br> <br> <br> },<br> buttons : [<br> {<br> text : &quot;保存&quot;,<br> iconCls : &quot;fa fa-plus&quot;,<br> btnCls : &#39;topjui-btn-green&#39;,<br> handler : function() {<br> // 表单验证<br> if (!$(&quot;#modelParaForm&quot;).form(<br> &#39;enableValidation&#39;).form(<br> &#39;validate&#39;)) {<br> return;<br> }<br> var params = $(&quot;#modelParaForm&quot;).serializeObject();<br> // 执行保存菜单数据操作<br> $<br> .ajax({<br> type : &quot;POST&quot;,<br> url : path<br> + &quot;/modelController/operateModelPara&quot;,<br> contentType : &quot;application/json&quot;,<br> data : JSON<br> .stringify(params),<br> dataType : &quot;json&quot;,<br> success : function(data) {<br> $.messager<br> .alert(<br> &quot;操作提示&quot;,<br> data.msg,<br> topJUI.language.message.icon.info,<br> function() {<br> // 关闭dialog窗体<br> //$(&#39;#modelParaDialog&#39;).dialog(&#39;close&#39;);<br> // 刷新datagrid<br> loadModelParaDataGridData(orgIds);<br> $(&#39;modelParaForm&#39;).form(&#39;clear&#39;);<br> addModelPara();<br> $(&#39;modelParaForm&#39;).form(&#39;clear&#39;);<br> });<br> },<br> error : function(data) {<br> }<br> });<br> }<br> }, {<br> text : &quot;关闭&quot;,<br> iconCls : &quot;fa fa-close&quot;,<br> btnCls : &#39;topjui-btn-red&#39;,<br> handler : function() {<br> // 关闭dialog窗体<br> $(&#39;#modelParaDialog&#39;).dialog(&#39;close&#39;);<br> loadModelParaDataGridData(orgIds);<br> <br> }<br> } ]<br> });<br> /* $(&#39;#dd&#39;).dialog(&#39;refresh&#39;, null); */<br>}<br>// 编辑菜单<br>function editModelPara() {<br> var currRow = $(&#39;#modelParaDataGrid&#39;).datagrid(&#39;getSelected&#39;);<br> if (currRow) {<br><br> } else {<br> $.messager<br> .alert(&quot;操作提示&quot;, &quot;请选择要编辑的菜单&quot;, topJUI.language.message.icon.info);<br> return;<br> }<br> $(&#39;#modelParaDialog&#39;)<br> .dialog(<br> {<br> title : &#39;编辑菜单&#39;,<br> iconCls : &#39;fa fa-pencil&#39;,<br> width : 750,<br> height : 600,<br> closed : false,<br> cache : false,<br> modal : true,<br> onOpen : function() {<br> $(&#39;modelParaForm&#39;).form(&#39;clear&#39;);<br> $(&quot;#modelParaId&quot;).val(currRow.MODEL_PARA_ID);<br> $(&quot;#paraName&quot;).textbox(&quot;setValue&quot;,currRow.PARA_NAME);<br> $(&quot;#paraType&quot;).textbox(&quot;setValue&quot;,currRow.PARA_TYPE);<br> $(&quot;#isInput&quot;).textbox(&quot;setValue&quot;,currRow.IS_INPUT);<br> $(&quot;#inputMaxlegth&quot;).textbox(&quot;setValue&quot;,currRow.INPUT_MAXLEGTH);<br> $(&quot;#defaultValue&quot;).textbox(&quot;setValue&quot;,currRow.DEFAULT_VALUE);<br> $(&quot;#inputRequire&quot;).textbox(&quot;setValue&quot;,currRow.INPUT_REQUIRE);<br> $(&quot;#paraAlias&quot;).textbox(&quot;setValue&quot;,currRow.PARA_ALIAS);<br> $(&quot;#modelParaOperateType&quot;).val(&quot;update&quot;);<br> },<br> buttons : [<br> {<br> text : &quot;保存&quot;,<br> iconCls : &quot;fa fa-plus&quot;,<br> btnCls : &#39;topjui-btn-green&#39;,<br> handler : function() {<br> // 表单验证<br> if (!$(&quot;#modelParaForm&quot;).form(<br> &#39;enableValidation&#39;).form(<br> &#39;validate&#39;)) {<br> return;<br> }<br> // 执行保存菜单数据操作<br> var params = $(&quot;#modelParaForm&quot;)<br> .serializeObject();<br> // console.log(params);<br> $<br> .ajax({<br> type : &quot;POST&quot;,<br> url : path<br> + &quot;/modelController/operateModelPara&quot;,<br> contentType : &quot;application/json&quot;,<br> data : JSON<br> .stringify(params),<br> dataType : &quot;json&quot;,<br> success : function(data) {<br> $.messager<br> .alert(<br> &quot;操作提示&quot;,<br> data.msg,<br> topJUI.language.message.icon.info,<br> function() {<br> // 关闭dialog窗体<br> $(<br> &#39;#modelParaDialog&#39;)<br> .dialog(<br> &#39;close&#39;);<br> // 刷新treegrid<br> loadModelParaDataGridData(orgIds);<br> });<br> },<br> error : function(data) {<br> }<br> });<br> }<br> }, {<br> text : &quot;关闭&quot;,<br> iconCls : &quot;fa fa-close&quot;,<br> btnCls : &#39;topjui-btn-red&#39;,<br> handler : function() {<br> // 关闭dialog窗体<br> $(&#39;#modelParaDialog&#39;).dialog(&#39;close&#39;);<br> loadModelParaDataGridData(orgIds);<br> }<br> } ]<br> });<br>// $(&quot;#RightAccordion&quot;).accordion( &quot;refresh&quot; ); <br>}<br>// 删除菜单<br>function deleteModelPara() {<br> var currRow = $(&#39;#modelParaDataGrid&#39;).datagrid(&#39;getSelected&#39;);<br> if (!currRow) {<br> $.messager<br> .alert(&quot;操作提示&quot;, &quot;请选择要删除的菜单&quot;, topJUI.language.message.icon.info);<br> return;<br> } else {<br> <br> $.messager.confirm(&#39;操作提示&#39;, &#39;确定要删除此菜单吗&#39;, function(r) {<br> if (r) {<br> // 执行删除操作<br> var params = {<br> modelParaOperateType : &#39;delete&#39;,<br> modelParaId : currRow.MODEL_PARA_ID<br> };<br> $.ajax({<br> type : &quot;POST&quot;,<br> url : path + &quot;/modelController/operateModelPara&quot;,<br> contentType : &quot;application/json&quot;,<br> data : JSON.stringify(params),<br> dataType : &quot;json&quot;,<br> success : function(data) {<br> $.messager.alert(&quot;操作提示&quot;, data.msg,<br> topJUI.language.message.icon.info, function() {<br> // 刷新treegrid<br> loadModelParaDataGridData(orgIds);<br> });<br> },<br> error : function(data) {<br> }<br> });<br> }<br> });<br> }<br>}<br>// 菜单上移<br>function upRowModelPara() {<br> var currRow = $(&#39;#modelParaDataGrid&#39;).datagrid(&#39;getSelected&#39;);<br> if (!currRow) {<br> $.messager<br> .alert(&quot;操作提示&quot;, &quot;请选择要操作的菜单&quot;, topJUI.language.message.icon.info);<br> return;<br> } else {<br> $.ajax({<br> type : &quot;POST&quot;,<br> url : path + &quot;/modelController/upAndDownModelPara&quot;,<br> contentType : &quot;application/json&quot;,<br> data : JSON.stringify({<br> modelParaOperateType : &#39;up&#39;,<br> modelParaId : currRow.MODEL_PARA_ID,<br> modelParaModelId : currRow.MODEL_PARA_MODEL_ID,<br> paraNum : currRow.PARA_NUM<br> }),<br> dataType : &quot;json&quot;,<br> success : function(d) {<br> loadModelParaDataGridData(orgIds);<br> },<br> error : function(err, textStatus) {<br> }<br> });<br> }<br>}<br>// 菜单下移<br>function downRowModelPara() {<br> var currRow = $(&#39;#modelParaDataGrid&#39;).datagrid(&#39;getSelected&#39;);<br> if (!currRow) {<br> $.messager<br> .alert(&quot;操作提示&quot;, &quot;请选择要操作的菜单&quot;, topJUI.language.message.icon.info);<br> return;<br> } else {<br> $.ajax({<br> type : &quot;POST&quot;,<br> url : path + &quot;/modelController/upAndDownModelPara&quot;,<br> contentType : &quot;application/json&quot;,<br> data : JSON.stringify({<br> modelParaOperateType : &#39;down&#39;,<br> modelParaId : currRow.MODEL_PARA_ID,<br> modelParaModelId : currRow.MODEL_PARA_MODEL_ID,<br> paraNum : currRow.PARA_NUM<br> }),<br> dataType : &quot;json&quot;,<br> success : function(d) {<br> loadModelParaDataGridData(orgIds);<br> },<br> error : function(err, textStatus) {<br> }<br> });<br> }<br>}<br><br><br><br>//加载datagrid_modelXml<br>function loadModelXmlDataGridData(orgIds) {<br> $(&#39;#modelXmlDataGrid&#39;).datagrid({<br> title : &#39;&#39;,<br> iconCls : &#39;icon-edit&#39;,<br> width : &#39;100%&#39;,<br> height : &#39;100%&#39;,<br> singleSelect : true,<br> idField : &#39;MODEL_XML_ID&#39;,<br> url : path + &#39;/modelController/getModelXmlDataGridData&#39;,<br> pageSize : 10,<br> columns : [ [ {<br> field : &#39;MODEL_XML_ID&#39;,<br> title : &#39;参数ID&#39;,<br> align : &#39;left&#39;,<br> width : &#39;20%&#39;,<br> hidden : true<br> },{<br> field : &#39;MODEL_XML_MODEL_ID&#39;,<br> title : &#39;MODEL_XML_MODEL_ID&#39;,<br> align : &#39;left&#39;,<br> width : &#39;20%&#39;,<br> hidden : true<br> },{<br> field : &#39;MODEL_XML_NUM&#39;,<br> title : &#39;排序&#39;,<br> align : &#39;left&#39;,<br> width : &#39;5%&#39;,<br> hidden : true<br> },{<br> field : &#39;MODEL_XML_NAME&#39;,<br> title : &#39;XML模板名称&#39;,<br> align : &#39;left&#39;,<br> width : &#39;20%&#39;,<br> hidden : false<br> }, {<br> field : &#39;MODEL_XML_TYPE&#39;,<br> title : &#39;类型&#39;,<br> align : &#39;left&#39;,<br> width : &#39;10%&#39;,<br> hidden : false<br> }, {<br> field : &#39;MODEL_XML_CONTENT&#39;,<br> title : &#39;XML模板内容&#39;,<br> align : &#39;left&#39;,<br> width : &#39;20%&#39;,<br> hidden : false<br> }, {<br> field : &#39;MODEL_XML_WORD&#39;,<br> title : &#39;所需配套WORD模板库&#39;,<br> align : &#39;left&#39;,<br> width : &#39;20%&#39;,<br> hidden : false<br> }, {<br> field : &#39;MODEL_XML_ALIAS&#39;,<br> title : &#39;别名&#39;,<br> align : &#39;left&#39;,<br> width : &#39;20%&#39;,<br> hidden : false<br> },{<br> field : &#39;STATE&#39;,<br> title : &#39;状态&#39;,<br> align : &#39;left&#39;,<br> width : &#39;10%&#39;,<br> hidden : true<br> }] ],<br> queryParams : {<br> isPage : &quot;yes&quot;,<br> orgIds : orgIds<br> },<br> <br> loader : function(param, success, error) {<br> var $that = $(this);<br> var opts = $that.datagrid(&quot;options&quot;);<br> if (!opts.url) {<br> return false;<br> }<br> $.ajax({<br> url : opts.url,<br> type : &quot;POST&quot;,<br> contentType : &quot;application/json&quot;,<br> data : JSON.stringify(<br> {<br> orgIds : orgIds,<br> isPage : &quot;yes&quot;,<br> page:1,<br> rows:10<br> }<br> ),<br> dataType : &quot;json&quot;,<br> success : function(d, textStatus) {<br> // console.log(d.code);<br> var retureData = {<br> total : d.total,<br> rows : d.data<br> };<br> success(retureData);<br> },<br> error : function() {<br> error.apply(this, arguments);<br> }<br> });<br> }<br> });<br> var p = $(&#39;#modelXmlDataGrid&#39;).datagrid(&#39;getPager&#39;);<br> $(p).pagination({<br> pageSize : 10,// 每页显示的记录条数,默认为10<br> pageList : [ 10, 20, 30 ],// 可以设置每页记录条数的列表<br> beforePageText : &#39;第&#39;,// 页数文本框前显示的汉字<br> afterPageText : &#39;页 共 {pages} 页&#39;,<br> displayMsg : &#39;当前显示 {from} - {to} 条记录 共 {total} 条记录&#39;<br> });<br>}<br>//添加菜单<br>function addModelXml() {<br> <br> $(&#39;#modelXmlDialog&#39;)<br> .dialog(<br> {<br> title : &#39;添加菜单&#39;,<br> iconCls : &#39;fa fa-plus&#39;,<br> width : 800,<br> height : 600,<br> closed : false,<br> cache : false,<br> modal : true,<br> onOpen : function() {<br> <br> $(&#39;modelXmlForm&#39;).form(&#39;clear&#39;);<br> var currRow = $(&#39;#modelTreeGrid&#39;).treegrid(<br> &#39;getSelected&#39;);<br> if (currRow) {<br> $(&quot;#modelXmlModelId&quot;).val(currRow.modelId);<br> }<br> $(&quot;#modelXmlOperateType&quot;).val(&quot;add&quot;);<br> <br> <br> },<br> buttons : [<br> {<br> text : &quot;保存&quot;,<br> iconCls : &quot;fa fa-plus&quot;,<br> btnCls : &#39;topjui-btn-green&#39;,<br> handler : function() {<br> // 表单验证<br> if (!$(&quot;#modelXmlForm&quot;).form(<br> &#39;enableValidation&#39;).form(<br> &#39;validate&#39;)) {<br> return;<br> }<br> var params = $(&quot;#modelXmlForm&quot;).serializeObject();<br> <br> <br> <br> // 执行保存菜单数据操作<br> $<br> .ajax({<br> type : &quot;POST&quot;,<br> url : path<br> + &quot;/modelController/operateModelXml&quot;,<br> contentType : &quot;application/json&quot;,<br> data : JSON<br> .stringify(params),<br> dataType : &quot;json&quot;,<br> success : function(data) {<br> $.messager<br> .alert(<br> &quot;操作提示&quot;,<br> data.msg,<br> topJUI.language.message.icon.info,<br> function() {<br> // 关闭dialog窗体<br> $(<br> &#39;#modelXmlDialog&#39;)<br> .dialog(<br> &#39;close&#39;);<br> // 刷新datagrid<br> loadModelXmlDataGridData(orgIds);<br> });<br> },<br> error : function(data) {<br> }<br> });<br> }<br> }, {<br> text : &quot;关闭&quot;,<br> iconCls : &quot;fa fa-close&quot;,<br> btnCls : &#39;topjui-btn-red&#39;,<br> handler : function() {<br> // 关闭dialog窗体<br> $(&#39;#modelXmlDialog&#39;).dialog(&#39;close&#39;);<br> loadModelXmlDataGridData(orgIds);<br> }<br> } ]<br> });<br> /* $(&#39;#dd&#39;).dialog(&#39;refresh&#39;, null); */<br>}<br>//编辑菜单<br>function editModelXml() {<br> var currRow = $(&#39;#modelXmlDataGrid&#39;).datagrid(&#39;getSelected&#39;);<br> if (currRow) {<br><br> } else {<br> $.messager<br> .alert(&quot;操作提示&quot;, &quot;请选择要编辑的菜单&quot;, topJUI.language.message.icon.info);<br> return;<br> }<br> $(&#39;#modelXmlDialog&#39;)<br> .dialog(<br> {<br> title : &#39;编辑菜单&#39;,<br> iconCls : &#39;fa fa-pencil&#39;,<br> width : 850,<br> height : 600,<br> closed : false,<br> cache : false,<br> modal : true,<br> onOpen : function() {<br> $(&#39;modelXmlForm&#39;).form(&#39;clear&#39;);<br> $(&quot;#modelXmlId&quot;).val(currRow.MODEL_XML_ID);<br> $(&quot;#modelXmlName&quot;).textbox(&quot;setValue&quot;,currRow.MODEL_XML_NAME); <br> $(&quot;#modelXmlType&quot;).textbox(&quot;setValue&quot;,currRow.MODEL_XML_TYPE);<br> $(&quot;#modelXmlContent&quot;).textbox(&quot;setValue&quot;,currRow.MODEL_XML_CONTENT);<br> $(&quot;#modelXmlWord&quot;).textbox(&quot;setValue&quot;,currRow.MODEL_XML_WORD);<br> $(&quot;#modelXmlAlias&quot;).textbox(&quot;setValue&quot;,currRow.MODEL_XML_ALIAS);<br> $(&quot;#modelXmlOperateType&quot;).val(&quot;update&quot;);<br> },<br> buttons : [<br> {<br> text : &quot;保存&quot;,<br> iconCls : &quot;fa fa-plus&quot;,<br> btnCls : &#39;topjui-btn-green&#39;,<br> handler : function() {<br> // 表单验证<br> if (!$(&quot;#modelXmlForm&quot;).form(<br> &#39;enableValidation&#39;).form(<br> &#39;validate&#39;)) {<br> return;<br> }<br> // 执行保存菜单数据操作<br> var params = $(&quot;#modelXmlForm&quot;)<br> .serializeObject();<br> // console.log(params);<br> $<br> .ajax({<br> type : &quot;POST&quot;,<br> url : path<br> + &quot;/modelController/operateModelXml/1001&quot;,<br> contentType : &quot;application/json&quot;,<br> data : JSON<br> .stringify(params),<br> dataType : &quot;json&quot;,<br> success : function(data) {<br> $.messager<br> .alert(<br> &quot;操作提示&quot;,<br> data.msg,<br> topJUI.language.message.icon.info,<br> function() {<br> // 关闭dialog窗体<br> $(<br> &#39;#modelXmlDialog&#39;)<br> .dialog(<br> &#39;close&#39;);<br> // 刷新treegrid<br> loadModelXmlDataGridData(orgIds);<br> });<br> },<br> error : function(data) {<br> }<br> });<br> }<br> }, {<br> text : &quot;关闭&quot;,<br> iconCls : &quot;fa fa-close&quot;,<br> btnCls : &#39;topjui-btn-red&#39;,<br> handler : function() {<br> // 关闭dialog窗体<br> $(&#39;#modelXmlDialog&#39;).dialog(&#39;close&#39;);<br> loadModelXmlDataGridData(orgIds);<br> }<br> } ]<br> });<br>// $(&quot;#RightAccordion&quot;).accordion( &quot;refresh&quot; ); <br>}<br>//删除菜单<br>function deleteModelXml() {<br> var currRow = $(&#39;#modelXmlDataGrid&#39;).datagrid(&#39;getSelected&#39;);<br> if (!currRow) {<br> $.messager<br> .alert(&quot;操作提示&quot;, &quot;请选择要删除的菜单&quot;, topJUI.language.message.icon.info);<br> return;<br> } else {<br> <br> $.messager.confirm(&#39;操作提示&#39;, &#39;确定要删除此菜单吗&#39;, function(r) {<br> if (r) {<br> // 执行删除操作<br> var params = {<br> modelXmlOperateType : &#39;delete&#39;,<br> modelXmlId : currRow.MODEL_XML_ID<br> };<br> $.ajax({<br> type : &quot;POST&quot;,<br> url : path + &quot;/modelController/operateModelXml&quot;,<br> contentType : &quot;application/json&quot;,<br> data : JSON.stringify(params),<br> dataType : &quot;json&quot;,<br> success : function(data) {<br> $.messager.alert(&quot;操作提示&quot;, data.msg,<br> topJUI.language.message.icon.info, function() {<br> // 刷新treegrid<br> loadModelXmlDataGridData(orgIds);<br> });<br> },<br> error : function(data) {<br> }<br> });<br> }<br> });<br> }<br>}<br>//菜单上移<br>function upRowModelXml() {<br> var currRow = $(&#39;#modelXmlDataGrid&#39;).datagrid(&#39;getSelected&#39;);<br> if (!currRow) {<br> $.messager<br> .alert(&quot;操作提示&quot;, &quot;请选择要操作的菜单&quot;, topJUI.language.message.icon.info);<br> return;<br> } else {<br> $.ajax({<br> type : &quot;POST&quot;,<br> url : path + &quot;/modelController/upAndDownModelXml&quot;,<br> contentType : &quot;application/json&quot;,<br> data : JSON.stringify({<br> modelXmlOperateType : &#39;up&#39;,<br> modelXmlId : currRow.MODEL_XML_ID,<br> modelXmlModelId : currRow.MODEL_XML_MODEL_ID,<br> modelXmlNum : currRow.MODEL_XML_NUM<br> }),<br> dataType : &quot;json&quot;,<br> success : function(d) {<br> loadModelXmlDataGridData(orgIds);<br> },<br> error : function(err, textStatus) {<br> }<br> });<br> }<br>}<br>//菜单下移<br>function downRowModelXml() {<br> var currRow = $(&#39;#modelXmlDataGrid&#39;).datagrid(&#39;getSelected&#39;);<br> if (!currRow) {<br> $.messager<br> .alert(&quot;操作提示&quot;, &quot;请选择要操作的菜单&quot;, topJUI.language.message.icon.info);<br> return;<br> } else {<br> $.ajax({<br> type : &quot;POST&quot;,<br> url : path + &quot;/modelController/upAndDownModelXml&quot;,<br> contentType : &quot;application/json&quot;,<br> data : JSON.stringify({<br> modelXmlOperateType : &#39;down&#39;,<br> modelXmlId : currRow.MODEL_XML_ID,<br> modelXmlModelId : currRow.MODEL_XML_MODEL_ID,<br> modelXmlNum : currRow.MODEL_XML_NUM<br> }),<br> dataType : &quot;json&quot;,<br> success : function(d) {<br> loadModelXmlDataGridData(orgIds);<br> },<br> error : function(err, textStatus) {<br> }<br> });<br> }<br>}<br><br>-------------------------------------------------------------------------------------------<br>以下为jsp代码<br>&lt;%@ page language=&quot;java&quot; contentType=&quot;text/html; charset=UTF-8&quot;<br> pageEncoding=&quot;UTF-8&quot; session=&quot;false&quot;%&gt;<br>&lt;!DOCTYPE html PUBLIC &quot;-//W3C//DTD HTML 4.01 Transitional//EN&quot; &quot;http://www.w3.org/TR/html4/loose.dtd&quot;&gt;<br>&lt;html&gt;<br>&lt;head&gt;<br>&lt;!-- 引入统一文件库 --&gt;<br>&lt;%@<a href="javascript:;" class="fly-aite">include</a> file=&quot;../../head.jsp&quot;%&gt;<br>&lt;title&gt;&lt;/title&gt;<br>&lt;!-- 页面js --&gt;<br>&lt;script type=&quot;text/javascript&quot;<br> src=&quot;&lt;%=path%&gt;/js/systemManage/modelManage.js&quot;&gt;&lt;/script&gt;<br>&lt;/head&gt;<br>&lt;body&gt;<br><br> &lt;div data-toggle=&quot;topjui-layout&quot; data-options=&quot;fit:true&quot;&gt;<br> &lt;div<br> data-options=&quot;region:&#39;west&#39;,title:&#39;模板目录&#39;,split:true,border:false,width:&#39;30%&#39;,iconCls:&#39;fa fa-sitemap&#39;,headerCls:&#39;border_right&#39;,bodyCls:&#39;border_right&#39;&quot;&gt;<br> <br> &lt;table id=&quot;modelTreeGrid&quot; data-toggle=&quot;topjui-treegrid&quot;<br> data-options=&quot;fit:true&quot; toolbar=&quot;#menuTg-toolbar&quot;&gt;<br> &lt;/table&gt;<br> <br> &lt;/div&gt;<br> &lt;div<br> data-options=&quot;region:&#39;center&#39;,iconCls:&#39;icon-reload&#39;,title:&#39;&#39;,split:true,border:true,bodyCls:&#39;border_top_none&#39;&quot;&gt;<br> &lt;div data-toggle=&quot;topjui-layout&quot; data-options=&quot;fit:true&quot;&gt;<br> &lt;div<br> data-options=&quot;region:&#39;center&#39;,title:&#39;基本参数设置&#39;,fit:false,split:true,border:false&quot;<br> style=&quot;height: 50%&quot;&gt;<br> <br> &lt;div id=&quot;modelParaDataGrid-toolbar&quot; class=&quot;topjui-toolbar&quot; data-options=&quot;fit:true&quot; &gt;<br> &lt;a href=&quot;javascript:addModelPara();&quot; class=&quot;topjui-btn-danger&quot; data-toggle=&quot;topjui-linkbutton&quot; data-options=&quot;iconCls:&#39;fa fa-plus&#39;,btnCls:&#39;topjui-btn-green&#39;&quot; &gt;添加&lt;/a&gt;<br> &lt;a href=&quot;javascript:editModelPara();&quot; class=&quot;topjui-btn-warm&quot; data-toggle=&quot;topjui-linkbutton&quot; data-options=&quot;iconCls:&#39;fa fa-pencil&#39;,btnCls: &#39;topjui-btn-red&#39;&quot; &gt;修改&lt;/a&gt;<br> &lt;a href=&quot;javascript:deleteModelPara();&quot; class=&quot;topjui-btn&quot; data-toggle=&quot;topjui-linkbutton&quot; data-options=&quot;iconCls:&#39;fa fa-trash&#39;,btnCls :&#39;topjui-btn-brown&#39;&quot; &gt;删除&lt;/a&gt;<br> &lt;a href=&quot;javascript:upRowModelPara();&quot; class=&quot;topjui-btn&quot; data-toggle=&quot;topjui-linkbutton&quot; data-options=&quot;iconCls:&#39;fa fa-long-arrow-up&#39;,btnCls :&#39;topjui-btn-blue&#39;&quot; &gt;上移&lt;/a&gt;<br> &lt;a href=&quot;javascript:downRowModelPara();&quot; class=&quot;topjui-btn&quot; data-toggle=&quot;topjui-linkbutton&quot; data-options=&quot;iconCls:&#39;fa fa-long-arrow-down&#39;,btnCls :&#39;topjui-btn-purple&#39;&quot; &gt;下移&lt;/a&gt;<br> &lt;/div&gt; <br> <br> &lt;table id=&quot;modelParaDataGrid&quot; data-toggle=&quot;topjui-datagrid&quot; data-options=&quot;fit:true&quot; toolbar=&quot;#menuTg-toolbar&quot;&gt;<br> &lt;/table&gt;<br> <br> &lt;/div&gt;<br> &lt;div<br> data-options=&quot;region:&#39;south&#39;,title:&#39;XML文件设置&#39;,fit:false,split:true,border:false&quot;<br> style=&quot;height: 50%&quot;&gt;<br> <br> &lt;div id=&quot;modelXmlDataGrid-toolbar&quot; class=&quot;topjui-toolbar&quot; data-options=&quot;fit:true&quot; &gt;<br> &lt;a href=&quot;javascript:addModelXml();&quot; class=&quot;topjui-btn-danger&quot; data-toggle=&quot;topjui-linkbutton&quot; data-options=&quot;iconCls:&#39;fa fa-plus&#39;,btnCls:&#39;topjui-btn-green&#39;&quot; &gt;添加&lt;/a&gt;<br> &lt;a href=&quot;javascript:editModelXml();&quot; class=&quot;topjui-btn-warm&quot; data-toggle=&quot;topjui-linkbutton&quot; data-options=&quot;iconCls:&#39;fa fa-pencil&#39;,btnCls: &#39;topjui-btn-red&#39;&quot; &gt;修改&lt;/a&gt;<br> &lt;a href=&quot;javascript:deleteModelXml();&quot; class=&quot;topjui-btn&quot; data-toggle=&quot;topjui-linkbutton&quot; data-options=&quot;iconCls:&#39;fa fa-trash&#39;,btnCls :&#39;topjui-btn-brown&#39;&quot; &gt;删除&lt;/a&gt;<br> &lt;a href=&quot;javascript:upRowModelXml();&quot; class=&quot;topjui-btn&quot; data-toggle=&quot;topjui-linkbutton&quot; data-options=&quot;iconCls:&#39;fa fa-long-arrow-up&#39;,btnCls :&#39;topjui-btn-blue&#39;&quot; &gt;上移&lt;/a&gt;<br> &lt;a href=&quot;javascript:downRowModelXml();&quot; class=&quot;topjui-btn&quot; data-toggle=&quot;topjui-linkbutton&quot; data-options=&quot;iconCls:&#39;fa fa-long-arrow-down&#39;,btnCls :&#39;topjui-btn-purple&#39;&quot; &gt;下移&lt;/a&gt;${requestScope.a}<br> &lt;/div&gt; <br> &lt;table id=&quot;modelXmlDataGrid&quot; data-toggle=&quot;topjui-datagrid&quot;<br> data-options=&quot;fit:true&quot; toolbar=&quot;#menuTg-toolbar&quot;&gt;<br> &lt;/table&gt;<br> &lt;/div&gt;<br><br><br> &lt;/div&gt;<br><br> &lt;/div&gt;<br> <br><br> &lt;div id=&quot;modelDialog&quot; data-toggle=&quot;topjui-dialog&quot; style=&quot;display: none;&quot;&gt;<br> &lt;form id=&quot;modelForm&quot; action=&quot;&quot; method=&quot;post&quot; class=&quot;panel-body panel-body-noborder window-body&quot;&gt;<br> &lt;input type=&quot;hidden&quot; id=&quot;parentId&quot; name=&quot;parentId&quot; data-toggle=&quot;topjui-textbox,hidden:true&quot; /&gt;<br> &lt;input type=&quot;hidden&quot; id=&quot;modelId&quot; name=&quot;modelId&quot; data-toggle=&quot;topjui-textbox,hidden:true&quot; /&gt;<br> &lt;input type=&quot;hidden&quot; id=&quot;type&quot; name=&quot;type&quot; data-toggle=&quot;topjui-textbox,hidden:true&quot; value=&quot;add&quot; /&gt;<br> <br> &lt;table class=&quot;editTable&quot;&gt;<br> <br> &lt;tr&gt;<br> &lt;td class=&quot;label&quot;&gt;模板名称&lt;/td&gt;<br> &lt;td colspan=&quot;3&quot;&gt;&lt;input type=&quot;text&quot; id=&quot;modelName&quot;<br> name=&quot;modelName&quot; data-toggle=&quot;topjui-textbox&quot;<br> data-options=&quot;required:true,width:450&quot;&gt;&lt;/td&gt;<br> &lt;/tr&gt;<br> <br> &lt;tr&gt;<br> &lt;td class=&quot;label&quot;&gt;父级菜单&lt;/td&gt;<br> &lt;td colspan=&quot;3&quot;&gt;<br> &lt;input type=&quot;text&quot; id=&quot;parentModelName&quot; name=&quot;parentModelName&quot; data-toggle=&quot;topjui-textbox&quot; data-options=&quot;width:450,readonly:true&quot;&gt;<br> &lt;/td&gt;<br> &lt;/tr&gt;<br><br> &lt;tr&gt;<br> &lt;td class=&quot;label&quot;&gt;类别&lt;/td&gt;<br> &lt;td colspan=&quot;3&quot;&gt;&lt;input type=&quot;text&quot; id=&quot;sort&quot; name=&quot;sort&quot;<br> data-toggle=&quot;topjui-textbox&quot;<br> data-options=&quot;required:true,width:200&quot;&gt; A:货物类 B:工程类 C:服务类&lt;/td&gt;<br> &lt;/tr&gt;<br> &lt;tr&gt;<br> &lt;td class=&quot;label&quot;&gt;信用代码&lt;/td&gt;<br> &lt;td colspan=&quot;3&quot;&gt;&lt;input type=&quot;text&quot; id=&quot;creditCode&quot;<br> name=&quot;creditCode&quot; data-toggle=&quot;topjui-textbox&quot;<br> data-options=&quot;width:450&quot;&gt;&lt;/td&gt;<br> &lt;/tr&gt;<br> &lt;tr&gt;<br> &lt;td class=&quot;label&quot;&gt;行业代码&lt;/td&gt;<br> &lt;td colspan=&quot;3&quot;&gt;&lt;input type=&quot;text&quot; id=&quot;industryCode&quot;<br> name=&quot;IndustryCode&quot; data-toggle=&quot;topjui-textbox&quot;<br> data-options=&quot;required:true,width:450&quot;&gt;&lt;/td&gt;<br> &lt;/tr&gt;<br> &lt;/table&gt;<br> &lt;/form&gt;<br> &lt;/div&gt; <br> <br> &lt;div id=&quot;modelParaDialog&quot; data-toggle=&quot;topjui-dialog&quot; style=&quot;display: none;&quot;&gt;<br> &lt;form id=&quot;modelParaForm&quot; action=&quot;&quot; method=&quot;post&quot; class=&quot;panel-body panel-body-noborder window-body&quot;&gt;<br> &lt;input type=&quot;hidden&quot; id=&quot;modelParaId&quot; name=&quot;modelParaId&quot; data-toggle=&quot;topjui-textbox,hidden:true&quot; /&gt;<br> &lt;input type=&quot;hidden&quot; id=&quot;modelParaModelId&quot; name=&quot;modelParaModelId&quot; data-toggle=&quot;topjui-textbox,hidden:true&quot; /&gt;<br> &lt;input type=&quot;hidden&quot; id=&quot;modelParaOperateType&quot; name=&quot;modelParaOperateType&quot; data-toggle=&quot;topjui-textbox,hidden:true&quot; value=&quot;add&quot; /&gt;<br> &lt;table class=&quot;editTable&quot;&gt;<br> &lt;tr&gt;<br> &lt;td class=&quot;label&quot;&gt;参数名称:&lt;/td&gt;<br> &lt;td colspan=&quot;3&quot;&gt;&lt;input type=&quot;text&quot; id=&quot;paraName&quot;<br> name=&quot;paraName&quot; data-toggle=&quot;topjui-textbox&quot; data-options=&quot;required:true,width:450&quot;&gt;&lt;/td&gt;<br> &lt;/tr&gt;<br> <br> &lt;tr&gt;<br> &lt;td class=&quot;label&quot;&gt;参数类型:&lt;/td&gt;<br> &lt;td colspan=&quot;3&quot;&gt;<br> &lt;select id=&quot;paraType&quot; data-toggle=&quot;topjui-combobox&quot; name=&quot;paraType&quot; data-options=&quot;width:450&quot;&gt;<br> &lt;c:forEach var=&quot;sysParaContentListZD200&quot; items=&quot;${requestScope.sysParaContentListZD200}&quot;&gt;<br> &lt;option value=&quot;${sysParaContentListZD200.id}&quot;&gt;${sysParaContentListZD200.text}&lt;/option&gt;<br> &lt;/c:forEach&gt;<br> &lt;/select&gt;<br> &lt;/td&gt;<br> &lt;/tr&gt;<br> &lt;tr&gt;<br> &lt;td class=&quot;label&quot;&gt;是否必填:&lt;/td&gt;<br> &lt;td colspan=&quot;3&quot;&gt;&lt;input type=&quot;text&quot; id=&quot;isInput&quot; name=&quot;isInput&quot; data-toggle=&quot;topjui-combobox&quot;<br> data-options=&quot;required:true,<br> valueField:&#39;id&#39;,<br> textField:&#39;text&#39;,<br> data:[{id:&#39;0&#39;,text:&#39;非必填&#39;},{id:&#39;1&#39;,text:&#39;必填&#39;}],width:450&quot;&gt;<br> &lt;/td&gt;<br> &lt;/tr&gt;<br> &lt;tr&gt;<br> &lt;td class=&quot;label&quot;&gt;输入最大长度:&lt;/td&gt;<br> &lt;td colspan=&quot;3&quot;&gt;&lt;input type=&quot;text&quot; id=&quot;inputMaxlegth&quot;<br> name=&quot;inputMaxlegth&quot; data-toggle=&quot;topjui-textbox&quot;<br> data-options=&quot;required:true,width:450&quot;&gt;&lt;/td&gt;<br> &lt;/tr&gt;<br> &lt;tr&gt;<br> &lt;td class=&quot;label&quot;&gt;默认值:&lt;/td&gt;<br> &lt;td colspan=&quot;3&quot;&gt;&lt;input type=&quot;text&quot; id=&quot;defaultValue&quot; name=&quot;defaultValue&quot; data-toggle=&quot;topjui-textarea&quot;<br> data-options=&quot;width:450,height:100&quot;&gt;&lt;/td&gt;<br> &lt;/tr&gt;<br> &lt;tr&gt;<br> &lt;td class=&quot;label&quot;&gt;填写要求:&lt;/td&gt;<br> &lt;td colspan=&quot;3&quot;&gt;&lt;input type=&quot;text&quot; id=&quot;inputRequire&quot;<br> name=&quot;inputRequire&quot; data-toggle=&quot;topjui-textarea&quot;<br> data-options=&quot;width:450,height:100&quot;&gt;&lt;/td&gt;<br> &lt;/tr&gt;<br> &lt;tr&gt;<br> &lt;td class=&quot;label&quot;&gt;参数别名:&lt;/td&gt;<br> &lt;td colspan=&quot;3&quot;&gt;&lt;input type=&quot;text&quot; id=&quot;paraAlias&quot;<br> name=&quot;paraAlias&quot; data-toggle=&quot;topjui-textbox&quot;<br> data-options=&quot;required:true,width:450&quot;&gt;&lt;/td&gt;<br> &lt;/tr&gt;<br> &lt;/table&gt;<br> &lt;/form&gt;<br> &lt;/div&gt;<br> <br> <br> &lt;div id=&quot;modelXmlDialog&quot; data-toggle=&quot;topjui-dialog&quot; style=&quot;display: none;&quot;&gt;<br> &lt;form id=&quot;modelXmlForm&quot; action=&quot;&quot; method=&quot;post&quot; class=&quot;panel-body panel-body-noborder window-body&quot;&gt;<br> &lt;input type=&quot;hidden&quot; id=&quot;modelXmlId&quot; name=&quot;modelXmlId&quot; data-toggle=&quot;topjui-textbox,hidden:true&quot; /&gt;<br> &lt;input type=&quot;hidden&quot; id=&quot;modelXmlModelId&quot; name=&quot;modelXmlModelId&quot; data-toggle=&quot;topjui-textbox,hidden:true&quot; /&gt;<br> &lt;input type=&quot;hidden&quot; id=&quot;modelXmlOperateType&quot; name=&quot;modelXmlOperateType&quot; data-toggle=&quot;topjui-textbox,hidden:true&quot; value=&quot;add&quot; /&gt;<br> &lt;table class=&quot;editTable&quot;&gt;<br> &lt;tr&gt;<br> &lt;td class=&quot;label&quot;&gt;XML模板名称:&lt;/td&gt;<br> &lt;td colspan=&quot;3&quot;&gt;&lt;input type=&quot;text&quot; id=&quot;modelXmlName&quot;<br> name=&quot;modelXmlName&quot; data-toggle=&quot;topjui-textbox&quot; data-options=&quot;required:true,width:600&quot;&gt;&lt;/td&gt;<br> &lt;/tr&gt;<br> &lt;tr&gt;<br> &lt;td class=&quot;label&quot;&gt;XML模板类型:&lt;/td&gt;<br> &lt;td colspan=&quot;3&quot;&gt;<br> &lt;select id=&quot;modelXmlType&quot; data-toggle=&quot;topjui-combobox&quot; name=&quot;modelXmlType&quot; data-options=&quot;width:200&quot;&gt;<br> &lt;c:forEach var=&quot;sysParaContentListZD201&quot; items=&quot;${requestScope.sysParaContentListZD201}&quot;&gt;<br> &lt;option value=&quot;${sysParaContentListZD201.id}&quot;&gt;${sysParaContentListZD201.text}&lt;/option&gt;<br> &lt;/c:forEach&gt;<br> &lt;/select&gt;<br> <br> &lt;/td&gt;<br> &lt;/tr&gt;<br> &lt;tr&gt;<br> &lt;td class=&quot;label&quot;&gt;XML模板内容:&lt;/td&gt;<br> &lt;td colspan=&quot;3&quot;&gt;&lt;input type=&quot;text&quot; id=&quot;modelXmlContent&quot; name=&quot;modelXmlContent&quot; data-toggle=&quot;topjui-textarea&quot;<br> data-options=&quot;required:true,width:600,height:200&quot;&gt;&lt;/td&gt;<br> &lt;/tr&gt;<br> &lt;tr&gt;<br> &lt;td class=&quot;label&quot;&gt;XML所需配套WORD模板库:&lt;/td&gt;<br> &lt;td colspan=&quot;3&quot;&gt;&lt;input type=&quot;text&quot; id=&quot;modelXmlWord&quot;<br> name=&quot;modelXmlWord&quot; data-toggle=&quot;topjui-textarea&quot;<br> data-options=&quot;required:true,width:600,height:200&quot;&gt;&lt;/td&gt;<br> &lt;/tr&gt;<br> &lt;tr&gt;<br> &lt;td class=&quot;label&quot;&gt;XML模板别名:&lt;/td&gt;<br> &lt;td colspan=&quot;3&quot;&gt;&lt;input type=&quot;text&quot; id=&quot;modelXmlAlias&quot; name=&quot;modelXmlAlias&quot; data-toggle=&quot;topjui-textbox&quot;<br> data-options=&quot;required:true,width:600&quot;&gt;&lt;/td&gt;<br> &lt;/tr&gt;<br> &lt;/table&gt;<br> &lt;/form&gt;<br> &lt;/div&gt;<br><br> <br>&lt;/body&gt;<br>&lt;/html&gt;<br><br><br>-----------------------------------------------------------------------<br>问题说明:<br>topjui.core.min.js 更换为这个版本就不能用了/* TopJUI前端框架 v3.0.2 http://www.topjui.com */<br><br>替换为之前版本又可以使用了,但是样式又不对了。下面为之前版本。<br>/* TopJUI前端框架,使用html调用组件功能的EasyUI极速开发框架 http://www.topjui.com 2017-11-14 */
  • 17天前版本升级为V3.0.2后,toolbar中的按钮只能点击一次,必须页面刷新后才能再次点击按钮,请问如何解决。中回答:

    //以下为JS代码<br><br>$(function() {<br> loadTreeGridData();<br>});<br>//循环遍历treegrid中的子节点<br>var orgIds = &quot;&quot;;<br>function getAllTreeGridChildrenNode(node) {<br> orgIds += node.modelId + &quot;,&quot;;<br> for (var i = 0; i &lt; node.children.length; i++) {<br> var tempChildren = node.children[i];<br> if (tempChildren.children) {<br> getAllTreeGridChildrenNode(tempChildren);<br> }<br> }<br>}<br><br>// 加载treegrid<br>function loadTreeGridData() {<br> $.ajax({<br> type : &quot;POST&quot;,<br> url : path + &quot;/modelController/getModelTreeGridData&quot;,<br> contentType : &quot;application/json&quot;,<br> data : JSON.stringify({<br> roleId : null<br> }),<br> dataType : &quot;json&quot;,<br> success : function(d, textStatus) {<br> var ajaxObj = eval(d);<br> treeGridData = ajaxObj;<br> console.log(treeGridData);<br> if (treeGridData) {<br> $(&quot;#modelTreeGrid&quot;).treegrid({<br> data : treeGridData,<br> idField : &#39;modelId&#39;,<br> treeField : &#39;modelName&#39;,<br> parentField : &#39;modelId&#39;,<br> rownumbers : true,// 行编号<br> allowCellEdit : true,<br> fitColumns : false,<br> autoRowHeight : false,<br> initialState : &#39;collapsed&#39;,<br> /* checkbox : true, */<br> queryParams : {<br> &quot;id&quot; : &quot;-1&quot;<br> },// 首次查询参数<br> columns : [ [ {<br> field : &quot;modelId&quot;,<br> title : &quot;主键id&quot;,<br> width : &#39;5%&#39;,<br> editor : &#39;text&#39;,<br> hidden : true<br> }, {<br> field : &quot;parentName&quot;,<br> title : &quot;父节点名称&quot;,<br> width : &#39;5%&#39;,<br> editor : &#39;text&#39;,<br> hidden : true<br><br> }, {<br> field : &quot;modelName&quot;,<br> title : &quot;模板名称&quot;,<br> width : &#39;40%&#39;,<br> editor : &#39;text&#39;<br> }, {<br> field : &quot;sort&quot;,<br> title : &quot;类别&quot;,<br> width : &#39;15%&#39;,<br> editor : &#39;text&#39;<br> }, {<br> field : &quot;creditCode&quot;,<br> title : &quot;信用代码&quot;,<br> width : &#39;25%&#39;,<br> editor : &#39;text&#39;<br> }, {<br> field : &quot;industryCode&quot;,<br> title : &quot;行业代码&quot;,<br> width : &#39;20%&#39;,<br> editor : &#39;text&#39;<br> } ] ],<br> onSelect : function(node) {<br> orgIds = &quot;&quot;;<br> getAllTreeGridChildrenNode(node);<br> loadModelParaDataGridData(orgIds.substring(0,orgIds.length - 1));<br> loadModelXmlDataGridData(orgIds.substring(0,orgIds.length - 1));<br> },<br> toolbar : [ {<br> id : &#39;addLeafBtn&#39;,<br> text : &#39;添加&#39;,<br> iconCls : &#39;fa fa-plus&#39;,<br> btnCls: &#39;topjui-btn-green&#39;,<br> handler : addModel<br> }, {<br> id : &#39;editBtn&#39;,<br> text : &#39;修改&#39;,<br> iconCls : &#39;fa fa-pencil&#39;,<br> btnCls: &#39;topjui-btn-red&#39;,<br> handler : editModel<br> }, {<br> id : &#39;deleteBtn&#39;,<br> text : &#39;删除&#39;,<br> disabled : false,<br> iconCls : &#39;fa fa-trash&#39;,<br> btnCls : &#39;topjui-btn-brown&#39;,<br> handler : deleteModel<br> } , {<br> id : &#39;upBtn&#39;,<br> text : &#39;上移&#39;,<br> disabled : false,<br> iconCls : &#39;fa fa-long-arrow-up&#39;,<br> btnCls : &#39;topjui-btn-blue&#39;,<br> handler : upRowModel<br> } , {<br> id : &#39;downBtn&#39;,<br> text : &#39;下移&#39;,<br> disabled : false,<br> iconCls : &#39;fa fa-long-arrow-down&#39;,<br> btnCls : &#39;topjui-btn-purple&#39;,<br> handler : downRowModel<br> } ]<br> <br> });<br> }<br> },<br> error : function(err, textStatus) {<br> }<br> });<br>}<br><br><br><br><br><br>// 添加菜单<br>function addModel() {<br> $(&#39;#modelDialog&#39;)<br> .dialog(<br> {<br> title : &#39;添加菜单&#39;,<br> iconCls : &#39;fa fa-plus&#39;,<br> width : 750,<br> height : 600,<br> closed : false,<br> cache : false,<br> modal : true,<br> onOpen : function() {<br> $(&#39;modelForm&#39;).form(&#39;clear&#39;);<br> var currRow = $(&#39;#modelTreeGrid&#39;).treegrid(<br> &#39;getSelected&#39;);<br> if (currRow) {<br> $(&quot;#parentId&quot;).val(currRow.modelId);<br> $(&quot;#parentModelName&quot;).textbox(&quot;setValue&quot;,<br> currRow.modelName);<br> }<br> $(&quot;#type&quot;).val(&#39;add&#39;);<br> },<br> buttons : [<br> {<br> text : &quot;保存&quot;,<br> iconCls : &quot;fa fa-plus&quot;,<br> btnCls : &#39;topjui-btn-green&#39;,<br> handler : function() {<br> // 表单验证<br> if (!$(&quot;#modelForm&quot;).form(<br> &#39;enableValidation&#39;).form(<br> &#39;validate&#39;)) {<br> return;<br> }<br> var params = $(&quot;#modelForm&quot;)<br> .serializeObject();<br> // 执行保存菜单数据操作<br> $<br> .ajax({<br> type : &quot;POST&quot;,<br> url : path<br> + &quot;/modelController/operateModel&quot;,<br> contentType : &quot;application/json&quot;,<br> data : JSON<br> .stringify(params),<br> dataType : &quot;json&quot;,<br> success : function(data) {<br> $.messager<br> .alert(<br> &quot;操作提示&quot;,<br> data.msg,<br> topJUI.language.message.icon.info,<br> function() {<br> // 关闭dialog窗体<br> $(<br> &#39;#modelDialog&#39;)<br> .dialog(<br> &#39;close&#39;);<br> // 刷新treegrid<br> loadTreeGridData();<br> });<br> },<br> error : function(data) {<br> }<br> });<br> }<br> }, {<br> text : &quot;关闭&quot;,<br> iconCls : &quot;fa fa-close&quot;,<br> btnCls : &#39;topjui-btn-red&#39;,<br> handler : function() {<br> // 关闭dialog窗体<br>// $(&#39;#modelDialog&#39;).dialog(&#39;close&#39;);<br> $(&#39;modelForm&#39;).form(&#39;clear&#39;);<br> loadTreeGridData();<br> <br> }<br> } ]<br> });<br> /* $(&#39;#dd&#39;).dialog(&#39;refresh&#39;, null); */<br>}<br>// 编辑菜单<br>function editModel() {<br> var currRow = $(&#39;#modelTreeGrid&#39;).treegrid(&#39;getSelected&#39;);<br> if (currRow) {<br><br> } else {<br> $.messager<br> .alert(&quot;操作提示&quot;, &quot;请选择要编辑的菜单&quot;, topJUI.language.message.icon.info);<br> return;<br> }<br> $(&#39;#modelDialog&#39;)<br> .dialog(<br> {<br> title : &#39;编辑菜单&#39;,<br> iconCls : &#39;fa fa-pencil&#39;,<br> width : 750,<br> height : 600,<br> closed : false,<br> cache : false,<br> modal : true,<br> onOpen : function() {<br> $(&#39;modelForm&#39;).form(&#39;clear&#39;);<br> $(&quot;#modelId&quot;).val(currRow.modelId);<br> $(&quot;#modelName&quot;).textbox(&quot;setValue&quot;,<br> currRow.modelName);<br> $(&quot;#parentModelName&quot;).textbox(&quot;setValue&quot;,<br> currRow.parentName);<br> $(&quot;#sort&quot;).textbox(&quot;setValue&quot;, currRow.sort);<br> $(&quot;#creditCode&quot;).textbox(&quot;setValue&quot;,<br> currRow.creditCode);<br> $(&quot;#industryCode&quot;).textbox(&quot;setValue&quot;,<br> currRow.industryCode);<br> $(&quot;#type&quot;).val(&quot;update&quot;);<br> },<br> buttons : [<br> {<br> text : &quot;保存&quot;,<br> iconCls : &quot;fa fa-plus&quot;,<br> btnCls : &#39;topjui-btn-green&#39;,<br> handler : function() {<br> // 表单验证<br> if (!$(&quot;#modelForm&quot;).form(<br> &#39;enableValidation&#39;).form(<br> &#39;validate&#39;)) {<br> return;<br> }<br> // 执行保存菜单数据操作<br> var params = $(&quot;#modelForm&quot;)<br> .serializeObject();<br> // console.log(params);<br> $<br> .ajax({<br> type : &quot;POST&quot;,<br> url : path<br> + &quot;/modelController/operateModel&quot;,<br> contentType : &quot;application/json&quot;,<br> data : JSON<br> .stringify(params),<br> dataType : &quot;json&quot;,<br> success : function(data) {<br> $.messager<br> .alert(<br> &quot;操作提示&quot;,<br> data.msg,<br> topJUI.language.message.icon.info,<br> function() {<br> // 关闭dialog窗体<br> $(<br> &#39;#modelDialog&#39;)<br> .dialog(<br> &#39;close&#39;);<br> // 刷新treegrid<br> loadTreeGridData();<br> });<br> },<br> error : function(data) {<br> }<br> });<br> }<br> }, {<br> text : &quot;关闭&quot;,<br> iconCls : &quot;fa fa-close&quot;,<br> btnCls : &#39;topjui-btn-red&#39;,<br> handler : function() {<br> // 关闭dialog窗体<br> $(&#39;#modelDialog&#39;).dialog(&#39;close&#39;);<br> loadTreeGridData();<br> self.opener.location.reload(); <br> }<br> } ]<br> });<br>// $(&quot;#RightAccordion&quot;).accordion( &quot;refresh&quot; ); <br>}<br>// 删除菜单<br>function deleteModel() {<br> var currRow = $(&#39;#modelTreeGrid&#39;).treegrid(&#39;getSelected&#39;);<br> if (!currRow) {<br> $.messager<br> .alert(&quot;操作提示&quot;, &quot;请选择要删除的菜单&quot;, topJUI.language.message.icon.info);<br> return;<br> } else {<br> if (currRow.children.length != 0) {<br> $.messager.alert(&quot;操作提示&quot;, &quot;该菜单节点下包含子节点菜单不能直接删除&quot;,<br> topJUI.language.message.icon.warning);<br> return;<br> }<br> $.messager.confirm(&#39;操作提示&#39;, &#39;确定要删除此菜单吗&#39;, function(r) {<br> if (r) {<br> // 执行删除操作<br> var params = {<br> type : &#39;delete&#39;,<br> modelId : currRow.modelId<br> };<br> $.ajax({<br> type : &quot;POST&quot;,<br> url : path + &quot;/modelController/operateModel&quot;,<br> contentType : &quot;application/json&quot;,<br> data : JSON.stringify(params),<br> dataType : &quot;json&quot;,<br> success : function(data) {<br> $.messager.alert(&quot;操作提示&quot;, data.msg,<br> topJUI.language.message.icon.info, function() {<br> // 刷新treegrid<br> loadTreeGridData();<br> });<br> },<br> error : function(data) {<br> }<br> });<br> }<br> });<br> }<br>}<br>// 菜单上移<br>function upRowModel() {<br> var currRow = $(&#39;#modelTreeGrid&#39;).treegrid(&#39;getSelected&#39;);<br> console.log(currRow);<br> if (!currRow) {<br> $.messager<br> .alert(&quot;操作提示&quot;, &quot;请选择要操作的菜单&quot;, topJUI.language.message.icon.info);<br> return;<br> } else {<br> $.ajax({<br> type : &quot;POST&quot;,<br> url : path + &quot;/modelController/upAndDownModel&quot;,<br> contentType : &quot;application/json&quot;,<br> data : JSON.stringify({<br> type : &#39;up&#39;,<br> modelId : currRow.modelId,<br> parentId : currRow.parentId,<br> modelNum : currRow.modelNum<br> }),<br> dataType : &quot;json&quot;,<br> success : function(d) {<br> // if(d.code == 1){<br> // $.messager.alert(&quot;操作提示&quot;,<br> // &quot;操作成功&quot;,topJUI.language.message.icon.info);<br> // }<br> // 刷新treegrid<br> loadTreeGridData();<br> },<br> error : function(err, textStatus) {<br> }<br> });<br> }<br>}<br>// 菜单下移<br>function downRowModel() {<br> var currRow = $(&#39;#modelTreeGrid&#39;).treegrid(&#39;getSelected&#39;);<br> if (!currRow) {<br> $.messager<br> .alert(&quot;操作提示&quot;, &quot;请选择要操作的菜单&quot;, topJUI.language.message.icon.info);<br> return;<br> } else {<br> $.ajax({<br> type : &quot;POST&quot;,<br> url : path + &quot;/modelController/upAndDownModel&quot;,<br> contentType : &quot;application/json&quot;,<br> data : JSON.stringify({<br> type : &#39;down&#39;,<br> modelId : currRow.modelId,<br> parentId : currRow.parentId,<br> modelNum : currRow.modelNum<br> }),<br> dataType : &quot;json&quot;,<br> success : function(d) {<br> // if(d.code == 1){<br> // $.messager.alert(&quot;操作提示&quot;,<br> // &quot;操作成功&quot;,topJUI.language.message.icon.info);<br> // }<br> // 刷新treegrid<br> loadTreeGridData();<br> },<br> error : function(err, textStatus) {<br> }<br> });<br> }<br>}<br><br>//加载datagrid_modelpara<br>function loadModelParaDataGridData(orgIds) {<br> var upRowModelPara=&quot;toolbar&quot;;<br> var downRowModelPara=&quot;toolbar&quot;;<br> $(&#39;#modelParaDataGrid&#39;).datagrid({<br> title : &#39;&#39;,<br> iconCls : &#39;icon-edit&#39;,<br> width : &#39;100%&#39;,<br> height : &#39;100%&#39;,<br> singleSelect : true,<br> idField : &#39;MODEL_PARA_ID&#39;,<br> url : path + &#39;/modelController/getModelParaDataGridData&#39;,<br> pageSize : 10,<br> columns : [ [ {<br> field : &#39;MODEL_PARA_ID&#39;,<br> title : &#39;参数ID&#39;,<br> align : &#39;left&#39;,<br> width : &#39;20%&#39;,<br> hidden : true<br> },{<br> field : &#39;MODEL_PARA_MODEL_ID&#39;,<br> title : &#39;MODEL_PARA_MODEL_ID&#39;,<br> align : &#39;left&#39;,<br> width : &#39;20%&#39;,<br> hidden : true<br> },{<br> field : &#39;PARA_NUM&#39;,<br> title : &#39;排序&#39;,<br> align : &#39;left&#39;,<br> width : &#39;5%&#39;,<br> hidden : true<br> },{<br> field : &#39;PARA_NAME&#39;,<br> title : &#39;参数名称&#39;,<br> align : &#39;left&#39;,<br> width : &#39;20%&#39;,<br> hidden : false<br> }, {<br> field : &#39;PARA_TYPE&#39;,<br> title : &#39;参数类型&#39;,<br> align : &#39;left&#39;,<br> width : &#39;10%&#39;,<br> hidden : false<br> }, {<br> field : &#39;IS_INPUT&#39;,<br> title : &#39;是否必填&#39;,<br> align : &#39;left&#39;,<br> width : &#39;10%&#39;,<br> hidden : false<br> }, {<br> field : &#39;INPUT_MAXLEGTH&#39;,<br> title : &#39;输入最大长度&#39;,<br> align : &#39;left&#39;,<br> width : &#39;10%&#39;,<br> hidden : false<br> }, {<br> field : &#39;DEFAULT_VALUE&#39;,<br> title : &#39;默认值&#39;,<br> align : &#39;left&#39;,<br> width : &#39;10%&#39;,<br> hidden : false<br> }, {<br> field : &#39;INPUT_REQUIRE&#39;,<br> title : &#39;填写要求&#39;,<br> align : &#39;left&#39;,<br> width : &#39;20%&#39;,<br> hidden : false<br> }, {<br> field : &#39;PARA_ALIAS&#39;,<br> title : &#39;参数别名&#39;,<br> align : &#39;left&#39;,<br> width : &#39;20%&#39;,<br> hidden : false<br> },{<br> field : &#39;STATE&#39;,<br> title : &#39;状态&#39;,<br> align : &#39;left&#39;,<br> width : &#39;10%&#39;,<br> hidden : true<br> }] ],<br> queryParams : {<br> isPage : &quot;yes&quot;,<br> orgIds : orgIds<br> },<br> <br> loader : function(param, success, error) {<br> var $that = $(this);<br> var opts = $that.datagrid(&quot;options&quot;);<br> if (!opts.url) {<br> return false;<br> }<br> $.ajax({<br> url : opts.url,<br> type : &quot;POST&quot;,<br> contentType : &quot;application/json&quot;,<br> data : JSON.stringify(<br> {<br> orgIds : orgIds,<br> isPage : &quot;yes&quot;,<br> page:1,<br> rows:10<br> }<br> ),<br> dataType : &quot;json&quot;,<br> success : function(d, textStatus) {<br> // console.log(d.code);<br> var retureData = {<br> total : d.total,<br> rows : d.data<br> };<br> success(retureData);<br> },<br> error : function() {<br> error.apply(this, arguments);<br> }<br> });<br> }<br> });<br> var p = $(&#39;#modelParaDataGrid&#39;).datagrid(&#39;getPager&#39;);<br> $(p).pagination({<br> pageSize : 10,// 每页显示的记录条数,默认为10<br> pageList : [ 10, 20, 30 ],// 可以设置每页记录条数的列表<br> beforePageText : &#39;第&#39;,// 页数文本框前显示的汉字<br> afterPageText : &#39;页 共 {pages} 页&#39;,<br> displayMsg : &#39;当前显示 {from} - {to} 条记录 共 {total} 条记录&#39;<br> });<br>}<br>//添加菜单<br>function addModelPara() {<br> <br> $(&#39;#modelParaDialog&#39;)<br> .dialog(<br> {<br> title : &#39;添加菜单&#39;,<br> iconCls : &#39;fa fa-plus&#39;,<br> width : 750,<br> height : 600,<br> closed : false,<br> cache : false,<br> modal : true,<br> onOpen : function() {<br> <br> $(&#39;modelParaForm&#39;).form(&#39;clear&#39;);<br> var currRow = $(&#39;#modelTreeGrid&#39;).treegrid(<br> &#39;getSelected&#39;);<br> if (currRow) {<br> $(&quot;#modelParaModelId&quot;).val(currRow.modelId);<br> }<br> $(&quot;#modelParaOperateType&quot;).val(&quot;add&quot;);<br> <br> <br> },<br> buttons : [<br> {<br> text : &quot;保存&quot;,<br> iconCls : &quot;fa fa-plus&quot;,<br> btnCls : &#39;topjui-btn-green&#39;,<br> handler : function() {<br> // 表单验证<br> if (!$(&quot;#modelParaForm&quot;).form(<br> &#39;enableValidation&#39;).form(<br> &#39;validate&#39;)) {<br> return;<br> }<br> var params = $(&quot;#modelParaForm&quot;).serializeObject();<br> // 执行保存菜单数据操作<br> $<br> .ajax({<br> type : &quot;POST&quot;,<br> url : path<br> + &quot;/modelController/operateModelPara&quot;,<br> contentType : &quot;application/json&quot;,<br> data : JSON<br> .stringify(params),<br> dataType : &quot;json&quot;,<br> success : function(data) {<br> $.messager<br> .alert(<br> &quot;操作提示&quot;,<br> data.msg,<br> topJUI.language.message.icon.info,<br> function() {<br> // 关闭dialog窗体<br> //$(&#39;#modelParaDialog&#39;).dialog(&#39;close&#39;);<br> // 刷新datagrid<br> loadModelParaDataGridData(orgIds);<br> $(&#39;modelParaForm&#39;).form(&#39;clear&#39;);<br> addModelPara();<br> $(&#39;modelParaForm&#39;).form(&#39;clear&#39;);<br> });<br> },<br> error : function(data) {<br> }<br> });<br> }<br> }, {<br> text : &quot;关闭&quot;,<br> iconCls : &quot;fa fa-close&quot;,<br> btnCls : &#39;topjui-btn-red&#39;,<br> handler : function() {<br> // 关闭dialog窗体<br> $(&#39;#modelParaDialog&#39;).dialog(&#39;close&#39;);<br> loadModelParaDataGridData(orgIds);<br> <br> }<br> } ]<br> });<br> /* $(&#39;#dd&#39;).dialog(&#39;refresh&#39;, null); */<br>}<br>// 编辑菜单<br>function editModelPara() {<br> var currRow = $(&#39;#modelParaDataGrid&#39;).datagrid(&#39;getSelected&#39;);<br> if (currRow) {<br><br> } else {<br> $.messager<br> .alert(&quot;操作提示&quot;, &quot;请选择要编辑的菜单&quot;, topJUI.language.message.icon.info);<br> return;<br> }<br> $(&#39;#modelParaDialog&#39;)<br> .dialog(<br> {<br> title : &#39;编辑菜单&#39;,<br> iconCls : &#39;fa fa-pencil&#39;,<br> width : 750,<br> height : 600,<br> closed : false,<br> cache : false,<br> modal : true,<br> onOpen : function() {<br> $(&#39;modelParaForm&#39;).form(&#39;clear&#39;);<br> $(&quot;#modelParaId&quot;).val(currRow.MODEL_PARA_ID);<br> $(&quot;#paraName&quot;).textbox(&quot;setValue&quot;,currRow.PARA_NAME);<br> $(&quot;#paraType&quot;).textbox(&quot;setValue&quot;,currRow.PARA_TYPE);<br> $(&quot;#isInput&quot;).textbox(&quot;setValue&quot;,currRow.IS_INPUT);<br> $(&quot;#inputMaxlegth&quot;).textbox(&quot;setValue&quot;,currRow.INPUT_MAXLEGTH);<br> $(&quot;#defaultValue&quot;).textbox(&quot;setValue&quot;,currRow.DEFAULT_VALUE);<br> $(&quot;#inputRequire&quot;).textbox(&quot;setValue&quot;,currRow.INPUT_REQUIRE);<br> $(&quot;#paraAlias&quot;).textbox(&quot;setValue&quot;,currRow.PARA_ALIAS);<br> $(&quot;#modelParaOperateType&quot;).val(&quot;update&quot;);<br> },<br> buttons : [<br> {<br> text : &quot;保存&quot;,<br> iconCls : &quot;fa fa-plus&quot;,<br> btnCls : &#39;topjui-btn-green&#39;,<br> handler : function() {<br> // 表单验证<br> if (!$(&quot;#modelParaForm&quot;).form(<br> &#39;enableValidation&#39;).form(<br> &#39;validate&#39;)) {<br> return;<br> }<br> // 执行保存菜单数据操作<br> var params = $(&quot;#modelParaForm&quot;)<br> .serializeObject();<br> // console.log(params);<br> $<br> .ajax({<br> type : &quot;POST&quot;,<br> url : path<br> + &quot;/modelController/operateModelPara&quot;,<br> contentType : &quot;application/json&quot;,<br> data : JSON<br> .stringify(params),<br> dataType : &quot;json&quot;,<br> success : function(data) {<br> $.messager<br> .alert(<br> &quot;操作提示&quot;,<br> data.msg,<br> topJUI.language.message.icon.info,<br> function() {<br> // 关闭dialog窗体<br> $(<br> &#39;#modelParaDialog&#39;)<br> .dialog(<br> &#39;close&#39;);<br> // 刷新treegrid<br> loadModelParaDataGridData(orgIds);<br> });<br> },<br> error : function(data) {<br> }<br> });<br> }<br> }, {<br> text : &quot;关闭&quot;,<br> iconCls : &quot;fa fa-close&quot;,<br> btnCls : &#39;topjui-btn-red&#39;,<br> handler : function() {<br> // 关闭dialog窗体<br> $(&#39;#modelParaDialog&#39;).dialog(&#39;close&#39;);<br> loadModelParaDataGridData(orgIds);<br> }<br> } ]<br> });<br>// $(&quot;#RightAccordion&quot;).accordion( &quot;refresh&quot; ); <br>}<br>// 删除菜单<br>function deleteModelPara() {<br> var currRow = $(&#39;#modelParaDataGrid&#39;).datagrid(&#39;getSelected&#39;);<br> if (!currRow) {<br> $.messager<br> .alert(&quot;操作提示&quot;, &quot;请选择要删除的菜单&quot;, topJUI.language.message.icon.info);<br> return;<br> } else {<br> <br> $.messager.confirm(&#39;操作提示&#39;, &#39;确定要删除此菜单吗&#39;, function(r) {<br> if (r) {<br> // 执行删除操作<br> var params = {<br> modelParaOperateType : &#39;delete&#39;,<br> modelParaId : currRow.MODEL_PARA_ID<br> };<br> $.ajax({<br> type : &quot;POST&quot;,<br> url : path + &quot;/modelController/operateModelPara&quot;,<br> contentType : &quot;application/json&quot;,<br> data : JSON.stringify(params),<br> dataType : &quot;json&quot;,<br> success : function(data) {<br> $.messager.alert(&quot;操作提示&quot;, data.msg,<br> topJUI.language.message.icon.info, function() {<br> // 刷新treegrid<br> loadModelParaDataGridData(orgIds);<br> });<br> },<br> error : function(data) {<br> }<br> });<br> }<br> });<br> }<br>}<br>// 菜单上移<br>function upRowModelPara() {<br> var currRow = $(&#39;#modelParaDataGrid&#39;).datagrid(&#39;getSelected&#39;);<br> if (!currRow) {<br> $.messager<br> .alert(&quot;操作提示&quot;, &quot;请选择要操作的菜单&quot;, topJUI.language.message.icon.info);<br> return;<br> } else {<br> $.ajax({<br> type : &quot;POST&quot;,<br> url : path + &quot;/modelController/upAndDownModelPara&quot;,<br> contentType : &quot;application/json&quot;,<br> data : JSON.stringify({<br> modelParaOperateType : &#39;up&#39;,<br> modelParaId : currRow.MODEL_PARA_ID,<br> modelParaModelId : currRow.MODEL_PARA_MODEL_ID,<br> paraNum : currRow.PARA_NUM<br> }),<br> dataType : &quot;json&quot;,<br> success : function(d) {<br> loadModelParaDataGridData(orgIds);<br> },<br> error : function(err, textStatus) {<br> }<br> });<br> }<br>}<br>// 菜单下移<br>function downRowModelPara() {<br> var currRow = $(&#39;#modelParaDataGrid&#39;).datagrid(&#39;getSelected&#39;);<br> if (!currRow) {<br> $.messager<br> .alert(&quot;操作提示&quot;, &quot;请选择要操作的菜单&quot;, topJUI.language.message.icon.info);<br> return;<br> } else {<br> $.ajax({<br> type : &quot;POST&quot;,<br> url : path + &quot;/modelController/upAndDownModelPara&quot;,<br> contentType : &quot;application/json&quot;,<br> data : JSON.stringify({<br> modelParaOperateType : &#39;down&#39;,<br> modelParaId : currRow.MODEL_PARA_ID,<br> modelParaModelId : currRow.MODEL_PARA_MODEL_ID,<br> paraNum : currRow.PARA_NUM<br> }),<br> dataType : &quot;json&quot;,<br> success : function(d) {<br> loadModelParaDataGridData(orgIds);<br> },<br> error : function(err, textStatus) {<br> }<br> });<br> }<br>}<br><br><br><br>//加载datagrid_modelXml<br>function loadModelXmlDataGridData(orgIds) {<br> $(&#39;#modelXmlDataGrid&#39;).datagrid({<br> title : &#39;&#39;,<br> iconCls : &#39;icon-edit&#39;,<br> width : &#39;100%&#39;,<br> height : &#39;100%&#39;,<br> singleSelect : true,<br> idField : &#39;MODEL_XML_ID&#39;,<br> url : path + &#39;/modelController/getModelXmlDataGridData&#39;,<br> pageSize : 10,<br> columns : [ [ {<br> field : &#39;MODEL_XML_ID&#39;,<br> title : &#39;参数ID&#39;,<br> align : &#39;left&#39;,<br> width : &#39;20%&#39;,<br> hidden : true<br> },{<br> field : &#39;MODEL_XML_MODEL_ID&#39;,<br> title : &#39;MODEL_XML_MODEL_ID&#39;,<br> align : &#39;left&#39;,<br> width : &#39;20%&#39;,<br> hidden : true<br> },{<br> field : &#39;MODEL_XML_NUM&#39;,<br> title : &#39;排序&#39;,<br> align : &#39;left&#39;,<br> width : &#39;5%&#39;,<br> hidden : true<br> },{<br> field : &#39;MODEL_XML_NAME&#39;,<br> title : &#39;XML模板名称&#39;,<br> align : &#39;left&#39;,<br> width : &#39;20%&#39;,<br> hidden : false<br> }, {<br> field : &#39;MODEL_XML_TYPE&#39;,<br> title : &#39;类型&#39;,<br> align : &#39;left&#39;,<br> width : &#39;10%&#39;,<br> hidden : false<br> }, {<br> field : &#39;MODEL_XML_CONTENT&#39;,<br> title : &#39;XML模板内容&#39;,<br> align : &#39;left&#39;,<br> width : &#39;20%&#39;,<br> hidden : false<br> }, {<br> field : &#39;MODEL_XML_WORD&#39;,<br> title : &#39;所需配套WORD模板库&#39;,<br> align : &#39;left&#39;,<br> width : &#39;20%&#39;,<br> hidden : false<br> }, {<br> field : &#39;MODEL_XML_ALIAS&#39;,<br> title : &#39;别名&#39;,<br> align : &#39;left&#39;,<br> width : &#39;20%&#39;,<br> hidden : false<br> },{<br> field : &#39;STATE&#39;,<br> title : &#39;状态&#39;,<br> align : &#39;left&#39;,<br> width : &#39;10%&#39;,<br> hidden : true<br> }] ],<br> queryParams : {<br> isPage : &quot;yes&quot;,<br> orgIds : orgIds<br> },<br> <br> loader : function(param, success, error) {<br> var $that = $(this);<br> var opts = $that.datagrid(&quot;options&quot;);<br> if (!opts.url) {<br> return false;<br> }<br> $.ajax({<br> url : opts.url,<br> type : &quot;POST&quot;,<br> contentType : &quot;application/json&quot;,<br> data : JSON.stringify(<br> {<br> orgIds : orgIds,<br> isPage : &quot;yes&quot;,<br> page:1,<br> rows:10<br> }<br> ),<br> dataType : &quot;json&quot;,<br> success : function(d, textStatus) {<br> // console.log(d.code);<br> var retureData = {<br> total : d.total,<br> rows : d.data<br> };<br> success(retureData);<br> },<br> error : function() {<br> error.apply(this, arguments);<br> }<br> });<br> }<br> });<br> var p = $(&#39;#modelXmlDataGrid&#39;).datagrid(&#39;getPager&#39;);<br> $(p).pagination({<br> pageSize : 10,// 每页显示的记录条数,默认为10<br> pageList : [ 10, 20, 30 ],// 可以设置每页记录条数的列表<br> beforePageText : &#39;第&#39;,// 页数文本框前显示的汉字<br> afterPageText : &#39;页 共 {pages} 页&#39;,<br> displayMsg : &#39;当前显示 {from} - {to} 条记录 共 {total} 条记录&#39;<br> });<br>}<br>//添加菜单<br>function addModelXml() {<br> <br> $(&#39;#modelXmlDialog&#39;)<br> .dialog(<br> {<br> title : &#39;添加菜单&#39;,<br> iconCls : &#39;fa fa-plus&#39;,<br> width : 800,<br> height : 600,<br> closed : false,<br> cache : false,<br> modal : true,<br> onOpen : function() {<br> <br> $(&#39;modelXmlForm&#39;).form(&#39;clear&#39;);<br> var currRow = $(&#39;#modelTreeGrid&#39;).treegrid(<br> &#39;getSelected&#39;);<br> if (currRow) {<br> $(&quot;#modelXmlModelId&quot;).val(currRow.modelId);<br> }<br> $(&quot;#modelXmlOperateType&quot;).val(&quot;add&quot;);<br> <br> <br> },<br> buttons : [<br> {<br> text : &quot;保存&quot;,<br> iconCls : &quot;fa fa-plus&quot;,<br> btnCls : &#39;topjui-btn-green&#39;,<br> handler : function() {<br> // 表单验证<br> if (!$(&quot;#modelXmlForm&quot;).form(<br> &#39;enableValidation&#39;).form(<br> &#39;validate&#39;)) {<br> return;<br> }<br> var params = $(&quot;#modelXmlForm&quot;).serializeObject();<br> <br> <br> <br> // 执行保存菜单数据操作<br> $<br> .ajax({<br> type : &quot;POST&quot;,<br> url : path<br> + &quot;/modelController/operateModelXml&quot;,<br> contentType : &quot;application/json&quot;,<br> data : JSON<br> .stringify(params),<br> dataType : &quot;json&quot;,<br> success : function(data) {<br> $.messager<br> .alert(<br> &quot;操作提示&quot;,<br> data.msg,<br> topJUI.language.message.icon.info,<br> function() {<br> // 关闭dialog窗体<br> $(<br> &#39;#modelXmlDialog&#39;)<br> .dialog(<br> &#39;close&#39;);<br> // 刷新datagrid<br> loadModelXmlDataGridData(orgIds);<br> });<br> },<br> error : function(data) {<br> }<br> });<br> }<br> }, {<br> text : &quot;关闭&quot;,<br> iconCls : &quot;fa fa-close&quot;,<br> btnCls : &#39;topjui-btn-red&#39;,<br> handler : function() {<br> // 关闭dialog窗体<br> $(&#39;#modelXmlDialog&#39;).dialog(&#39;close&#39;);<br> loadModelXmlDataGridData(orgIds);<br> }<br> } ]<br> });<br> /* $(&#39;#dd&#39;).dialog(&#39;refresh&#39;, null); */<br>}<br>//编辑菜单<br>function editModelXml() {<br> var currRow = $(&#39;#modelXmlDataGrid&#39;).datagrid(&#39;getSelected&#39;);<br> if (currRow) {<br><br> } else {<br> $.messager<br> .alert(&quot;操作提示&quot;, &quot;请选择要编辑的菜单&quot;, topJUI.language.message.icon.info);<br> return;<br> }<br> $(&#39;#modelXmlDialog&#39;)<br> .dialog(<br> {<br> title : &#39;编辑菜单&#39;,<br> iconCls : &#39;fa fa-pencil&#39;,<br> width : 850,<br> height : 600,<br> closed : false,<br> cache : false,<br> modal : true,<br> onOpen : function() {<br> $(&#39;modelXmlForm&#39;).form(&#39;clear&#39;);<br> $(&quot;#modelXmlId&quot;).val(currRow.MODEL_XML_ID);<br> $(&quot;#modelXmlName&quot;).textbox(&quot;setValue&quot;,currRow.MODEL_XML_NAME); <br> $(&quot;#modelXmlType&quot;).textbox(&quot;setValue&quot;,currRow.MODEL_XML_TYPE);<br> $(&quot;#modelXmlContent&quot;).textbox(&quot;setValue&quot;,currRow.MODEL_XML_CONTENT);<br> $(&quot;#modelXmlWord&quot;).textbox(&quot;setValue&quot;,currRow.MODEL_XML_WORD);<br> $(&quot;#modelXmlAlias&quot;).textbox(&quot;setValue&quot;,currRow.MODEL_XML_ALIAS);<br> $(&quot;#modelXmlOperateType&quot;).val(&quot;update&quot;);<br> },<br> buttons : [<br> {<br> text : &quot;保存&quot;,<br> iconCls : &quot;fa fa-plus&quot;,<br> btnCls : &#39;topjui-btn-green&#39;,<br> handler : function() {<br> // 表单验证<br> if (!$(&quot;#modelXmlForm&quot;).form(<br> &#39;enableValidation&#39;).form(<br> &#39;validate&#39;)) {<br> return;<br> }<br> // 执行保存菜单数据操作<br> var params = $(&quot;#modelXmlForm&quot;)<br> .serializeObject();<br> // console.log(params);<br> $<br> .ajax({<br> type : &quot;POST&quot;,<br> url : path<br> + &quot;/modelController/operateModelXml/1001&quot;,<br> contentType : &quot;application/json&quot;,<br> data : JSON<br> .stringify(params),<br> dataType : &quot;json&quot;,<br> success : function(data) {<br> $.messager<br> .alert(<br> &quot;操作提示&quot;,<br> data.msg,<br> topJUI.language.message.icon.info,<br> function() {<br> // 关闭dialog窗体<br> $(<br> &#39;#modelXmlDialog&#39;)<br> .dialog(<br> &#39;close&#39;);<br> // 刷新treegrid<br> loadModelXmlDataGridData(orgIds);<br> });<br> },<br> error : function(data) {<br> }<br> });<br> }<br> }, {<br> text : &quot;关闭&quot;,<br> iconCls : &quot;fa fa-close&quot;,<br> btnCls : &#39;topjui-btn-red&#39;,<br> handler : function() {<br> // 关闭dialog窗体<br> $(&#39;#modelXmlDialog&#39;).dialog(&#39;close&#39;);<br> loadModelXmlDataGridData(orgIds);<br> }<br> } ]<br> });<br>// $(&quot;#RightAccordion&quot;).accordion( &quot;refresh&quot; ); <br>}<br>//删除菜单<br>function deleteModelXml() {<br> var currRow = $(&#39;#modelXmlDataGrid&#39;).datagrid(&#39;getSelected&#39;);<br> if (!currRow) {<br> $.messager<br> .alert(&quot;操作提示&quot;, &quot;请选择要删除的菜单&quot;, topJUI.language.message.icon.info);<br> return;<br> } else {<br> <br> $.messager.confirm(&#39;操作提示&#39;, &#39;确定要删除此菜单吗&#39;, function(r) {<br> if (r) {<br> // 执行删除操作<br> var params = {<br> modelXmlOperateType : &#39;delete&#39;,<br> modelXmlId : currRow.MODEL_XML_ID<br> };<br> $.ajax({<br> type : &quot;POST&quot;,<br> url : path + &quot;/modelController/operateModelXml&quot;,<br> contentType : &quot;application/json&quot;,<br> data : JSON.stringify(params),<br> dataType : &quot;json&quot;,<br> success : function(data) {<br> $.messager.alert(&quot;操作提示&quot;, data.msg,<br> topJUI.language.message.icon.info, function() {<br> // 刷新treegrid<br> loadModelXmlDataGridData(orgIds);<br> });<br> },<br> error : function(data) {<br> }<br> });<br> }<br> });<br> }<br>}<br>//菜单上移<br>function upRowModelXml() {<br> var currRow = $(&#39;#modelXmlDataGrid&#39;).datagrid(&#39;getSelected&#39;);<br> if (!currRow) {<br> $.messager<br> .alert(&quot;操作提示&quot;, &quot;请选择要操作的菜单&quot;, topJUI.language.message.icon.info);<br> return;<br> } else {<br> $.ajax({<br> type : &quot;POST&quot;,<br> url : path + &quot;/modelController/upAndDownModelXml&quot;,<br> contentType : &quot;application/json&quot;,<br> data : JSON.stringify({<br> modelXmlOperateType : &#39;up&#39;,<br> modelXmlId : currRow.MODEL_XML_ID,<br> modelXmlModelId : currRow.MODEL_XML_MODEL_ID,<br> modelXmlNum : currRow.MODEL_XML_NUM<br> }),<br> dataType : &quot;json&quot;,<br> success : function(d) {<br> loadModelXmlDataGridData(orgIds);<br> },<br> error : function(err, textStatus) {<br> }<br> });<br> }<br>}<br>//菜单下移<br>function downRowModelXml() {<br> var currRow = $(&#39;#modelXmlDataGrid&#39;).datagrid(&#39;getSelected&#39;);<br> if (!currRow) {<br> $.messager<br> .alert(&quot;操作提示&quot;, &quot;请选择要操作的菜单&quot;, topJUI.language.message.icon.info);<br> return;<br> } else {<br> $.ajax({<br> type : &quot;POST&quot;,<br> url : path + &quot;/modelController/upAndDownModelXml&quot;,<br> contentType : &quot;application/json&quot;,<br> data : JSON.stringify({<br> modelXmlOperateType : &#39;down&#39;,<br> modelXmlId : currRow.MODEL_XML_ID,<br> modelXmlModelId : currRow.MODEL_XML_MODEL_ID,<br> modelXmlNum : currRow.MODEL_XML_NUM<br> }),<br> dataType : &quot;json&quot;,<br> success : function(d) {<br> loadModelXmlDataGridData(orgIds);<br> },<br> error : function(err, textStatus) {<br> }<br> });<br> }<br>}<br><br>-------------------------------------------------------------------------------------------<br>以下为jsp代码<br>&lt;%@ page language=&quot;java&quot; contentType=&quot;text/html; charset=UTF-8&quot;<br> pageEncoding=&quot;UTF-8&quot; session=&quot;false&quot;%&gt;<br>&lt;!DOCTYPE html PUBLIC &quot;-//W3C//DTD HTML 4.01 Transitional//EN&quot; &quot;http://www.w3.org/TR/html4/loose.dtd&quot;&gt;<br>&lt;html&gt;<br>&lt;head&gt;<br>&lt;!-- 引入统一文件库 --&gt;<br>&lt;%@<a href="javascript:;" class="fly-aite">include</a> file=&quot;../../head.jsp&quot;%&gt;<br>&lt;title&gt;&lt;/title&gt;<br>&lt;!-- 页面js --&gt;<br>&lt;script type=&quot;text/javascript&quot;<br> src=&quot;&lt;%=path%&gt;/js/systemManage/modelManage.js&quot;&gt;&lt;/script&gt;<br>&lt;/head&gt;<br>&lt;body&gt;<br><br> &lt;div data-toggle=&quot;topjui-layout&quot; data-options=&quot;fit:true&quot;&gt;<br> &lt;div<br> data-options=&quot;region:&#39;west&#39;,title:&#39;模板目录&#39;,split:true,border:false,width:&#39;30%&#39;,iconCls:&#39;fa fa-sitemap&#39;,headerCls:&#39;border_right&#39;,bodyCls:&#39;border_right&#39;&quot;&gt;<br> <br> &lt;table id=&quot;modelTreeGrid&quot; data-toggle=&quot;topjui-treegrid&quot;<br> data-options=&quot;fit:true&quot; toolbar=&quot;#menuTg-toolbar&quot;&gt;<br> &lt;/table&gt;<br> <br> &lt;/div&gt;<br> &lt;div<br> data-options=&quot;region:&#39;center&#39;,iconCls:&#39;icon-reload&#39;,title:&#39;&#39;,split:true,border:true,bodyCls:&#39;border_top_none&#39;&quot;&gt;<br> &lt;div data-toggle=&quot;topjui-layout&quot; data-options=&quot;fit:true&quot;&gt;<br> &lt;div<br> data-options=&quot;region:&#39;center&#39;,title:&#39;基本参数设置&#39;,fit:false,split:true,border:false&quot;<br> style=&quot;height: 50%&quot;&gt;<br> <br> &lt;div id=&quot;modelParaDataGrid-toolbar&quot; class=&quot;topjui-toolbar&quot; data-options=&quot;fit:true&quot; &gt;<br> &lt;a href=&quot;javascript:addModelPara();&quot; class=&quot;topjui-btn-danger&quot; data-toggle=&quot;topjui-linkbutton&quot; data-options=&quot;iconCls:&#39;fa fa-plus&#39;,btnCls:&#39;topjui-btn-green&#39;&quot; &gt;添加&lt;/a&gt;<br> &lt;a href=&quot;javascript:editModelPara();&quot; class=&quot;topjui-btn-warm&quot; data-toggle=&quot;topjui-linkbutton&quot; data-options=&quot;iconCls:&#39;fa fa-pencil&#39;,btnCls: &#39;topjui-btn-red&#39;&quot; &gt;修改&lt;/a&gt;<br> &lt;a href=&quot;javascript:deleteModelPara();&quot; class=&quot;topjui-btn&quot; data-toggle=&quot;topjui-linkbutton&quot; data-options=&quot;iconCls:&#39;fa fa-trash&#39;,btnCls :&#39;topjui-btn-brown&#39;&quot; &gt;删除&lt;/a&gt;<br> &lt;a href=&quot;javascript:upRowModelPara();&quot; class=&quot;topjui-btn&quot; data-toggle=&quot;topjui-linkbutton&quot; data-options=&quot;iconCls:&#39;fa fa-long-arrow-up&#39;,btnCls :&#39;topjui-btn-blue&#39;&quot; &gt;上移&lt;/a&gt;<br> &lt;a href=&quot;javascript:downRowModelPara();&quot; class=&quot;topjui-btn&quot; data-toggle=&quot;topjui-linkbutton&quot; data-options=&quot;iconCls:&#39;fa fa-long-arrow-down&#39;,btnCls :&#39;topjui-btn-purple&#39;&quot; &gt;下移&lt;/a&gt;<br> &lt;/div&gt; <br> <br> &lt;table id=&quot;modelParaDataGrid&quot; data-toggle=&quot;topjui-datagrid&quot; data-options=&quot;fit:true&quot; toolbar=&quot;#menuTg-toolbar&quot;&gt;<br> &lt;/table&gt;<br> <br> &lt;/div&gt;<br> &lt;div<br> data-options=&quot;region:&#39;south&#39;,title:&#39;XML文件设置&#39;,fit:false,split:true,border:false&quot;<br> style=&quot;height: 50%&quot;&gt;<br> <br> &lt;div id=&quot;modelXmlDataGrid-toolbar&quot; class=&quot;topjui-toolbar&quot; data-options=&quot;fit:true&quot; &gt;<br> &lt;a href=&quot;javascript:addModelXml();&quot; class=&quot;topjui-btn-danger&quot; data-toggle=&quot;topjui-linkbutton&quot; data-options=&quot;iconCls:&#39;fa fa-plus&#39;,btnCls:&#39;topjui-btn-green&#39;&quot; &gt;添加&lt;/a&gt;<br> &lt;a href=&quot;javascript:editModelXml();&quot; class=&quot;topjui-btn-warm&quot; data-toggle=&quot;topjui-linkbutton&quot; data-options=&quot;iconCls:&#39;fa fa-pencil&#39;,btnCls: &#39;topjui-btn-red&#39;&quot; &gt;修改&lt;/a&gt;<br> &lt;a href=&quot;javascript:deleteModelXml();&quot; class=&quot;topjui-btn&quot; data-toggle=&quot;topjui-linkbutton&quot; data-options=&quot;iconCls:&#39;fa fa-trash&#39;,btnCls :&#39;topjui-btn-brown&#39;&quot; &gt;删除&lt;/a&gt;<br> &lt;a href=&quot;javascript:upRowModelXml();&quot; class=&quot;topjui-btn&quot; data-toggle=&quot;topjui-linkbutton&quot; data-options=&quot;iconCls:&#39;fa fa-long-arrow-up&#39;,btnCls :&#39;topjui-btn-blue&#39;&quot; &gt;上移&lt;/a&gt;<br> &lt;a href=&quot;javascript:downRowModelXml();&quot; class=&quot;topjui-btn&quot; data-toggle=&quot;topjui-linkbutton&quot; data-options=&quot;iconCls:&#39;fa fa-long-arrow-down&#39;,btnCls :&#39;topjui-btn-purple&#39;&quot; &gt;下移&lt;/a&gt;${requestScope.a}<br> &lt;/div&gt; <br> &lt;table id=&quot;modelXmlDataGrid&quot; data-toggle=&quot;topjui-datagrid&quot;<br> data-options=&quot;fit:true&quot; toolbar=&quot;#menuTg-toolbar&quot;&gt;<br> &lt;/table&gt;<br> &lt;/div&gt;<br><br><br> &lt;/div&gt;<br><br> &lt;/div&gt;<br> <br><br> &lt;div id=&quot;modelDialog&quot; data-toggle=&quot;topjui-dialog&quot; style=&quot;display: none;&quot;&gt;<br> &lt;form id=&quot;modelForm&quot; action=&quot;&quot; method=&quot;post&quot; class=&quot;panel-body panel-body-noborder window-body&quot;&gt;<br> &lt;input type=&quot;hidden&quot; id=&quot;parentId&quot; name=&quot;parentId&quot; data-toggle=&quot;topjui-textbox,hidden:true&quot; /&gt;<br> &lt;input type=&quot;hidden&quot; id=&quot;modelId&quot; name=&quot;modelId&quot; data-toggle=&quot;topjui-textbox,hidden:true&quot; /&gt;<br> &lt;input type=&quot;hidden&quot; id=&quot;type&quot; name=&quot;type&quot; data-toggle=&quot;topjui-textbox,hidden:true&quot; value=&quot;add&quot; /&gt;<br> <br> &lt;table class=&quot;editTable&quot;&gt;<br> <br> &lt;tr&gt;<br> &lt;td class=&quot;label&quot;&gt;模板名称&lt;/td&gt;<br> &lt;td colspan=&quot;3&quot;&gt;&lt;input type=&quot;text&quot; id=&quot;modelName&quot;<br> name=&quot;modelName&quot; data-toggle=&quot;topjui-textbox&quot;<br> data-options=&quot;required:true,width:450&quot;&gt;&lt;/td&gt;<br> &lt;/tr&gt;<br> <br> &lt;tr&gt;<br> &lt;td class=&quot;label&quot;&gt;父级菜单&lt;/td&gt;<br> &lt;td colspan=&quot;3&quot;&gt;<br> &lt;input type=&quot;text&quot; id=&quot;parentModelName&quot; name=&quot;parentModelName&quot; data-toggle=&quot;topjui-textbox&quot; data-options=&quot;width:450,readonly:true&quot;&gt;<br> &lt;/td&gt;<br> &lt;/tr&gt;<br><br> &lt;tr&gt;<br> &lt;td class=&quot;label&quot;&gt;类别&lt;/td&gt;<br> &lt;td colspan=&quot;3&quot;&gt;&lt;input type=&quot;text&quot; id=&quot;sort&quot; name=&quot;sort&quot;<br> data-toggle=&quot;topjui-textbox&quot;<br> data-options=&quot;required:true,width:200&quot;&gt; A:货物类 B:工程类 C:服务类&lt;/td&gt;<br> &lt;/tr&gt;<br> &lt;tr&gt;<br> &lt;td class=&quot;label&quot;&gt;信用代码&lt;/td&gt;<br> &lt;td colspan=&quot;3&quot;&gt;&lt;input type=&quot;text&quot; id=&quot;creditCode&quot;<br> name=&quot;creditCode&quot; data-toggle=&quot;topjui-textbox&quot;<br> data-options=&quot;width:450&quot;&gt;&lt;/td&gt;<br> &lt;/tr&gt;<br> &lt;tr&gt;<br> &lt;td class=&quot;label&quot;&gt;行业代码&lt;/td&gt;<br> &lt;td colspan=&quot;3&quot;&gt;&lt;input type=&quot;text&quot; id=&quot;industryCode&quot;<br> name=&quot;IndustryCode&quot; data-toggle=&quot;topjui-textbox&quot;<br> data-options=&quot;required:true,width:450&quot;&gt;&lt;/td&gt;<br> &lt;/tr&gt;<br> &lt;/table&gt;<br> &lt;/form&gt;<br> &lt;/div&gt; <br> <br> &lt;div id=&quot;modelParaDialog&quot; data-toggle=&quot;topjui-dialog&quot; style=&quot;display: none;&quot;&gt;<br> &lt;form id=&quot;modelParaForm&quot; action=&quot;&quot; method=&quot;post&quot; class=&quot;panel-body panel-body-noborder window-body&quot;&gt;<br> &lt;input type=&quot;hidden&quot; id=&quot;modelParaId&quot; name=&quot;modelParaId&quot; data-toggle=&quot;topjui-textbox,hidden:true&quot; /&gt;<br> &lt;input type=&quot;hidden&quot; id=&quot;modelParaModelId&quot; name=&quot;modelParaModelId&quot; data-toggle=&quot;topjui-textbox,hidden:true&quot; /&gt;<br> &lt;input type=&quot;hidden&quot; id=&quot;modelParaOperateType&quot; name=&quot;modelParaOperateType&quot; data-toggle=&quot;topjui-textbox,hidden:true&quot; value=&quot;add&quot; /&gt;<br> &lt;table class=&quot;editTable&quot;&gt;<br> &lt;tr&gt;<br> &lt;td class=&quot;label&quot;&gt;参数名称:&lt;/td&gt;<br> &lt;td colspan=&quot;3&quot;&gt;&lt;input type=&quot;text&quot; id=&quot;paraName&quot;<br> name=&quot;paraName&quot; data-toggle=&quot;topjui-textbox&quot; data-options=&quot;required:true,width:450&quot;&gt;&lt;/td&gt;<br> &lt;/tr&gt;<br> <br> &lt;tr&gt;<br> &lt;td class=&quot;label&quot;&gt;参数类型:&lt;/td&gt;<br> &lt;td colspan=&quot;3&quot;&gt;<br> &lt;select id=&quot;paraType&quot; data-toggle=&quot;topjui-combobox&quot; name=&quot;paraType&quot; data-options=&quot;width:450&quot;&gt;<br> &lt;c:forEach var=&quot;sysParaContentListZD200&quot; items=&quot;${requestScope.sysParaContentListZD200}&quot;&gt;<br> &lt;option value=&quot;${sysParaContentListZD200.id}&quot;&gt;${sysParaContentListZD200.text}&lt;/option&gt;<br> &lt;/c:forEach&gt;<br> &lt;/select&gt;<br> &lt;/td&gt;<br> &lt;/tr&gt;<br> &lt;tr&gt;<br> &lt;td class=&quot;label&quot;&gt;是否必填:&lt;/td&gt;<br> &lt;td colspan=&quot;3&quot;&gt;&lt;input type=&quot;text&quot; id=&quot;isInput&quot; name=&quot;isInput&quot; data-toggle=&quot;topjui-combobox&quot;<br> data-options=&quot;required:true,<br> valueField:&#39;id&#39;,<br> textField:&#39;text&#39;,<br> data:[{id:&#39;0&#39;,text:&#39;非必填&#39;},{id:&#39;1&#39;,text:&#39;必填&#39;}],width:450&quot;&gt;<br> &lt;/td&gt;<br> &lt;/tr&gt;<br> &lt;tr&gt;<br> &lt;td class=&quot;label&quot;&gt;输入最大长度:&lt;/td&gt;<br> &lt;td colspan=&quot;3&quot;&gt;&lt;input type=&quot;text&quot; id=&quot;inputMaxlegth&quot;<br> name=&quot;inputMaxlegth&quot; data-toggle=&quot;topjui-textbox&quot;<br> data-options=&quot;required:true,width:450&quot;&gt;&lt;/td&gt;<br> &lt;/tr&gt;<br> &lt;tr&gt;<br> &lt;td class=&quot;label&quot;&gt;默认值:&lt;/td&gt;<br> &lt;td colspan=&quot;3&quot;&gt;&lt;input type=&quot;text&quot; id=&quot;defaultValue&quot; name=&quot;defaultValue&quot; data-toggle=&quot;topjui-textarea&quot;<br> data-options=&quot;width:450,height:100&quot;&gt;&lt;/td&gt;<br> &lt;/tr&gt;<br> &lt;tr&gt;<br> &lt;td class=&quot;label&quot;&gt;填写要求:&lt;/td&gt;<br> &lt;td colspan=&quot;3&quot;&gt;&lt;input type=&quot;text&quot; id=&quot;inputRequire&quot;<br> name=&quot;inputRequire&quot; data-toggle=&quot;topjui-textarea&quot;<br> data-options=&quot;width:450,height:100&quot;&gt;&lt;/td&gt;<br> &lt;/tr&gt;<br> &lt;tr&gt;<br> &lt;td class=&quot;label&quot;&gt;参数别名:&lt;/td&gt;<br> &lt;td colspan=&quot;3&quot;&gt;&lt;input type=&quot;text&quot; id=&quot;paraAlias&quot;<br> name=&quot;paraAlias&quot; data-toggle=&quot;topjui-textbox&quot;<br> data-options=&quot;required:true,width:450&quot;&gt;&lt;/td&gt;<br> &lt;/tr&gt;<br> &lt;/table&gt;<br> &lt;/form&gt;<br> &lt;/div&gt;<br> <br> <br> &lt;div id=&quot;modelXmlDialog&quot; data-toggle=&quot;topjui-dialog&quot; style=&quot;display: none;&quot;&gt;<br> &lt;form id=&quot;modelXmlForm&quot; action=&quot;&quot; method=&quot;post&quot; class=&quot;panel-body panel-body-noborder window-body&quot;&gt;<br> &lt;input type=&quot;hidden&quot; id=&quot;modelXmlId&quot; name=&quot;modelXmlId&quot; data-toggle=&quot;topjui-textbox,hidden:true&quot; /&gt;<br> &lt;input type=&quot;hidden&quot; id=&quot;modelXmlModelId&quot; name=&quot;modelXmlModelId&quot; data-toggle=&quot;topjui-textbox,hidden:true&quot; /&gt;<br> &lt;input type=&quot;hidden&quot; id=&quot;modelXmlOperateType&quot; name=&quot;modelXmlOperateType&quot; data-toggle=&quot;topjui-textbox,hidden:true&quot; value=&quot;add&quot; /&gt;<br> &lt;table class=&quot;editTable&quot;&gt;<br> &lt;tr&gt;<br> &lt;td class=&quot;label&quot;&gt;XML模板名称:&lt;/td&gt;<br> &lt;td colspan=&quot;3&quot;&gt;&lt;input type=&quot;text&quot; id=&quot;modelXmlName&quot;<br> name=&quot;modelXmlName&quot; data-toggle=&quot;topjui-textbox&quot; data-options=&quot;required:true,width:600&quot;&gt;&lt;/td&gt;<br> &lt;/tr&gt;<br> &lt;tr&gt;<br> &lt;td class=&quot;label&quot;&gt;XML模板类型:&lt;/td&gt;<br> &lt;td colspan=&quot;3&quot;&gt;<br> &lt;select id=&quot;modelXmlType&quot; data-toggle=&quot;topjui-combobox&quot; name=&quot;modelXmlType&quot; data-options=&quot;width:200&quot;&gt;<br> &lt;c:forEach var=&quot;sysParaContentListZD201&quot; items=&quot;${requestScope.sysParaContentListZD201}&quot;&gt;<br> &lt;option value=&quot;${sysParaContentListZD201.id}&quot;&gt;${sysParaContentListZD201.text}&lt;/option&gt;<br> &lt;/c:forEach&gt;<br> &lt;/select&gt;<br> <br> &lt;/td&gt;<br> &lt;/tr&gt;<br> &lt;tr&gt;<br> &lt;td class=&quot;label&quot;&gt;XML模板内容:&lt;/td&gt;<br> &lt;td colspan=&quot;3&quot;&gt;&lt;input type=&quot;text&quot; id=&quot;modelXmlContent&quot; name=&quot;modelXmlContent&quot; data-toggle=&quot;topjui-textarea&quot;<br> data-options=&quot;required:true,width:600,height:200&quot;&gt;&lt;/td&gt;<br> &lt;/tr&gt;<br> &lt;tr&gt;<br> &lt;td class=&quot;label&quot;&gt;XML所需配套WORD模板库:&lt;/td&gt;<br> &lt;td colspan=&quot;3&quot;&gt;&lt;input type=&quot;text&quot; id=&quot;modelXmlWord&quot;<br> name=&quot;modelXmlWord&quot; data-toggle=&quot;topjui-textarea&quot;<br> data-options=&quot;required:true,width:600,height:200&quot;&gt;&lt;/td&gt;<br> &lt;/tr&gt;<br> &lt;tr&gt;<br> &lt;td class=&quot;label&quot;&gt;XML模板别名:&lt;/td&gt;<br> &lt;td colspan=&quot;3&quot;&gt;&lt;input type=&quot;text&quot; id=&quot;modelXmlAlias&quot; name=&quot;modelXmlAlias&quot; data-toggle=&quot;topjui-textbox&quot;<br> data-options=&quot;required:true,width:600&quot;&gt;&lt;/td&gt;<br> &lt;/tr&gt;<br> &lt;/table&gt;<br> &lt;/form&gt;<br> &lt;/div&gt;<br><br> <br>&lt;/body&gt;<br>&lt;/html&gt;<br><br><br>-----------------------------------------------------------------------<br>问题说明:<br>topjui.core.min.js 更换为这个版本就不能用了/* TopJUI前端框架 v3.0.2 http://www.topjui.com */<br><br>替换为之前版本又可以使用了,但是样式又不对了。下面为之前版本。<br>/* TopJUI前端框架,使用html调用组件功能的EasyUI极速开发框架 http://www.topjui.com 2017-11-14 */
  • 2年前topjui版本更新后,js报错中回答:

    @<a href="javascript:;" class="fly-aite">易网时代</a> 试过了,无效
QQ在线咨询
客服 QQ
251122361
微信/手机
18973127736
固定电话
0731-89565588