标签:
前端框架是easyui框架,后台的框架是我们公司自己写的。做的功能主要是插件修改,使用easyui iframe, tab,datagrid组件
配置文件
<?xml version="1.0" encoding="UTF-8"?> <xp-web> <modules> <!-- 第三方APP服务端 --> <module path="/web/plugins/bs/yygl/bz/extapp" form="" scope="request" action="plugins.bs.yygl.bz.ExtappAction" defaultPage=""> <page name="fpqxTab" url="/web/plugins/bs/yygl/bz/extapp/fpqxTab.html" type="template"/> <page name="extappAdd" url="/web/plugins/bs/yygl/bz/extapp/extappAdd.html" type="template"/> <page name="extappUpdate" url="/web/plugins/bs/yygl/bz/extapp/extappUpdate.html" type="template"/> <page name="chooseuser" url="/web/plugins/bs/yygl/bz/extapp/chooseuser.html" type="template"/> <page name="chooserole" url="/web/plugins/bs/yygl/bz/extapp/chooserole.html" type="template"/> <page name="jsonxml" url="/web/common/page/JsonXml.html" type="template"/> <page name="cjListPage" url="/web/plugins/bs/yygl/bz/extapp/cjList.html" type="template"/> <page name="jsonxml" url="/web/common/page/JsonXml.html" type="template"/> </module> <!-- 每三方App手机端--> <module path="/app/plugins/bui/extapp/bz" form="" scope="request" action="plugins.bs.yygl.bz.ExtAppPhoneAction" defaultPage=""> <page name="jsonxml" url="/web/common/page/JsonXml.html" type="template"/> </module> <!-- 插件管理 --> <module path="/web/plugins/bs/yygl/dz/g00000000/cjgl" form="" scope="request" action="plugins.bs.yygl.dz.g00000000.cjgl.CjglAction" defaultPage=""> <page name="cjList" url="/web/plugins/bs/yygl/dz/g00000000/cjgl/cjList.html" type="template"/> <page name="cjAdd" url="/web/plugins/bs/yygl/dz/g00000000/cjgl/cjAdd.html" type="template"/> <page name="cjUpdate" url="/web/plugins/bs/yygl/dz/g00000000/cjgl/cjUpdate.html" type="template"/> <page name="cjOnline" url="/web/plugins/bs/yygl/dz/g00000000/cjgl/cjOnline.html" type="template"/> <page name="cjDict" url="/web/plugins/bs/yygl/dz/g00000000/cjgl/cjDict.html" type="template"/> <page name="cjRoleList" url="/web/plugins/bs/yygl/dz/g00000000/cjgl/cjRoleList.html" type="template"/> <page name="cjRoleAdd" url="/web/plugins/bs/yygl/dz/g00000000/cjgl/cjRoleAdd.html" type="template"/> <page name="cjRoleUpdate" url="/web/plugins/bs/yygl/dz/g00000000/cjgl/cjRoleUpdate.html" type="template"/> <page name="cjRoleDel" url="/web/plugins/bs/yygl/dz/g00000000/cjgl/cjRoleDel.html" type="template"/> <page name="cjMenuAdd" url="/web/plugins/bs/yygl/dz/g00000000/cjgl/cjMenuAdd.html" type="template"/> <page name="cjMenuUpdate" url="/web/plugins/bs/yygl/dz/g00000000/cjgl/cjMenuUpdate.html" type="template"/> <page name="cjMenuDel" url="/web/plugins/bs/yygl/dz/g00000000/cjgl/cjMenuDel.html" type="template"/> <page name="cjlbTab" url="/web/plugins/bs/yygl/dz/g00000000/cjgl/cjlbTab.html" type="template"/> <page name="jsonxml" url="/web/common/page/JsonXml.html" type="template"/> <page name="toUpload" url="/web/plugins/bs/yygl/dz/g00000000/cjgl/toUpload.html" type="template"/> </module> <!--集团开户插件--> <module path="/web/plugins/bs/yygl/dz/g00000000/jtkt" form="" scope="request" action="plugins.bs.yygl.dz.g00000000.jtkt.JtktAction" defaultPage=""> <page name="jtktList" url="/web/plugins/bs/yygl/dz/g00000000/jtkt/jtktList.html" type="template"/> <page name="jtktAdd" url="/web/plugins/bs/yygl/dz/g00000000/jtkt/jtktAdd.html" type="template"/> <page name="jtktUpdate" url="/web/plugins/bs/yygl/dz/g00000000/jtkt/jtktUpdate.html" type="template"/> <page name="jtktDetail" url="/web/plugins/bs/yygl/dz/g00000000/jtkt/jtktDetail.html" type="template"/> <page name="jtktmcUpdate" url="/web/plugins/bs/yygl/dz/g00000000/jtkt/jtktmcUpdate.html" type="template"/> <page name="dywslList" url="/web/plugins/bs/yygl/dz/g00000000/jtkt/dywslList.html" type="template"/> <page name="dywslAdd" url="/web/plugins/bs/yygl/dz/g00000000/jtkt/dywslAdd.html" type="template"/> <page name="dywslTab" url="/web/plugins/bs/yygl/dz/g00000000/jtkt/dywslTab.html" type="template"/> <page name="dywslUpdatejbxx" url="/web/plugins/bs/yygl/dz/g00000000/jtkt/dywslUpdatejbxx.html" type="template"/> <page name="dywslUpdategncj" url="/web/plugins/bs/yygl/dz/g00000000/jtkt/dywslUpdategncj.html" type="template"/> <page name="dywslUpdatezd" url="/web/plugins/bs/yygl/dz/g00000000/jtkt/dywslUpdatezd.html" type="template"/> <page name="gncjAdd" url="/web/plugins/bs/yygl/dz/g00000000/jtkt/gncjAdd.html" type="template"/> <page name="gncjUpdate" url="/web/plugins/bs/yygl/dz/g00000000/jtkt/gncjUpdate.html" type="template"/> <page name="gnsqAdd" url="/web/plugins/bs/yygl/dz/g00000000/jtkt/gnsqAdd.html" type="template"/> <page name="zdAdd" url="/web/plugins/bs/yygl/dz/g00000000/jtkt/zdAdd.html" type="template"/> <page name="zdUpdate" url="/web/plugins/bs/yygl/dz/g00000000/jtkt/zdUpdate.html" type="template"/> <page name="jsonxml" url="/web/common/page/JsonXml.html" type="template"/> <page name="AddcjslXx" url="/web/plugins/bs/yygl/dz/g00000000/jtkt/AddcjslXx.html" type="template"/> <page name="cjslAdd" url="/web/plugins/bs/yygl/dz/g00000000/jtkt/cjslAdd.html" type="template"/> <page name="plugList" url="/web/plugins/bs/yygl/dz/g00000000/jtkt/jtktPlugList.html" type="template"/> <page name="toAddCd" url="/web/plugins/bs/yygl/dz/g00000000/jtkt/toAddCd.html" type="template"/> <page name="toUpdateCd" url="/web/plugins/bs/yygl/dz/g00000000/jtkt/toUpdateCd.html" type="template"/> <page name="cjjsList" url="/web/plugins/bs/yygl/dz/g00000000/jtkt/cjjsList.html" type="template"/> <page name="toAddJs" url="/web/plugins/bs/yygl/dz/g00000000/jtkt/toAddJs.html" type="template"/> <page name="toUpdateJs" url="/web/plugins/bs/yygl/dz/g00000000/jtkt/toUpdateJs.html" type="template"/> </module> <!-- 能力平台配置 --> <module path="/web/plugins/bs/yygl/dz/g00000000/nlpt" form="" scope="request" action="plugins.bs.yygl.dz.g00000000.nlpt.NlptAction" defaultPage=""> <page name="nlptList" url="/web/plugins/bs/yygl/dz/g00000000/nlpt/nlptList.html" type="template" /> <page name="nlptDate" url="/web/plugins/bs/yygl/dz/g00000000/nlpt/nlptDate.html" type="template" /> </module> </modules> </xp-web>
后台代码
1 package plugins.bs.yygl.dz.g00000000.jtkt; 2 3 import java.io.File; 4 import java.sql.Connection; 5 import java.util.ArrayList; 6 import java.util.Arrays; 7 import java.util.HashSet; 8 import java.util.Hashtable; 9 import java.util.List; 10 import java.util.Map; 11 import java.util.Set; 12 13 import javax.servlet.http.HttpServletResponse; 14 15 import plugins.bs.yygl.dz.g00000000.cjgl.CjglMemo; 16 import plugins.sys.admin.bz.T_sys_user; 17 import common.function.BhGenerator; 18 import common.function.comUtil; 19 import framework.db.DBConnector; 20 import framework.db.ObjectCtl; 21 import framework.sys.ActionContext; 22 import framework.sys.ConverPinyin2; 23 import framework.sys.Globals; 24 import framework.sys.IWebAction; 25 import framework.sys.Module; 26 import framework.sys.Page; 27 import framework.sys.WebForm; 28 import framework.tools.DateT; 29 import framework.util.DateUtil; 30 import framework.util.StringUtil; 31 import framework.xfJDBC.DBHelper; 32 import framework.xfJDBC.beanUtilsExtend.DBean; 33 34 public class JtktAction implements IWebAction 35 { 36 public Page execute(WebForm form, Module module) throws Exception 37 { 38 String method=form.get("doAction")==null?"":form.get("doAction").toString(); 39 T_sys_user user = (T_sys_user) ActionContext.getContext().getSession().getAttribute("userSession"); 40 41 /** 42 * 安全检查,如不需要只要将下面的IF语句屏蔽即可 43 */ 44 if (user == null) 45 { 46 form.addResult("msg", "您没有登录或者是超时,请重登录!"); 47 return new Page("noLoin","/"+ Globals.APP_BASE_NAME+"/private/login.xp", "html"); 48 } 49 50 Page forward=null; 51 52 if(method.equals(""))//无动作时列表页面可根据具体情况修改默认页面 53 { 54 forward =jtktList(form, module, user); 55 } 56 else if(method.equals("toJtktAdd")) //转到新增页面 57 { 58 forward =toJtktAdd(form, module, user); 59 } 60 else if(method.equals("jtktAdd")) //执行新增操作 61 { 62 forward =jtktAdd(form, module, user); 63 } 64 else if (method.equals("jtktDetail")) //转到详情页面 65 { 66 forward =jtktDetail(form, module, user); 67 }else if(method.equals("jtktListJson")){//easyUI列表 68 69 forward = jtktListJson(form, module, user); 70 71 }else if(method.equals("pluginListJson")){//插件列表 72 73 forward = pluginListJson(form, module, user); 74 75 }else if(method.equals("toJtktUpdate")){//许可授权页面 76 77 forward = toJtktUpdate(form, module, user); 78 79 }else if(method.equals("jtktUpdate")){//许可授权 80 81 forward = jtktUpdate(form, module, user); 82 83 }else if(method.equals("jtktDelete")){//集团注销 84 85 forward = jtktDelete(form, module, user); 86 87 }else if(method.equals("Addcjsl")){//插件实例添加页面 88 89 forward = Addcjsl(form, module, user); 90 91 }else if(method.equals("cjslAdd")){//插件实例信息保存 92 93 forward = cjslAdd(form, module, user); 94 95 }else if(method.equals("iscjsl")){//判断是否已经生成过实例插件 96 97 forward = iscjsl(form, module, user); 98 99 }else if(method.equals("delcjsl")){//勾选取消插件实例 100 101 forward = delcjsl(form, module, user); 102 103 } 104 else if(method.equals("toJtktmcUpdate")){//修改集团名称页面 105 106 forward = toJtktmcUpdate(form, module, user); 107 108 }else if(method.equals("jtktmcUpdate")) {//修改集团名称方法 109 110 forward = jtktmcUpdate(form, module, user); 111 112 }else if(method.equals("checkClassCode")){//检查类别代码是否有重 113 114 forward = checkClassCode(form, module, user); 115 116 } 117 else if(method.equals("checkFullname")){//检查集团全称是否有重 118 forward = checkFullname(form, module, user); 119 120 }else if(method.equals("gnsqAdd")){//功能授权插件添加跳转 121 forward = gnsqAdd(form, module, user); 122 } 123 else if(method.equals("pluginListJson1")){ 124 forward = pluginListJson1(form, module, user); 125 }else if(method.equals("pluginListJson2")){ 126 forward = pluginListJson2(form, module, user); 127 }else if(method.equals("plugincjbcAdd")){ 128 forward = plugincjbcAdd(form, module, user); 129 }else if(method.equals("deletecj")){ 130 forward = deletecj(form, module, user); 131 } 132 else if(method.equals("dywslList")){//转到多业务实例列表页面 133 forward = dywslList(form, module, user); 134 } 135 else if(method.equals("dywslListJson")){//多业务实例列表数据 136 forward = dywslListJson(form, module, user); 137 } 138 else if(method.equals("toAddSl")){//转到添加多业务实例页面 139 forward = toAddSl(form, module, user); 140 } 141 else if(method.equals("addDywsl")){//执行多业务实例添加操作 142 forward = addDywsl(form, module, user); 143 } 144 else if(method.equals("deleteSl")){//删除实例 145 forward = deleteSl(form, module, user); 146 } 147 else if(method.equals("toUpdateSl")){//转到实例修改页面 148 forward = toUpdateSl(form, module, user); 149 } 150 else if(method.equals("todywslUpdatejbxx")){//转到实例基本信息修改页面 151 forward = todywslUpdatejbxx(form, module, user); 152 } 153 else if(method.equals("dywslUpdatejbxx")){//执行实例基本信息修改操作 154 forward = dywslUpdatejbxx(form, module, user); 155 } 156 else if(method.equals("todywslUpdategncj")){//转到实例功能插件修改页面 157 forward = todywslUpdategncj(form, module, user); 158 } 159 else if(method.equals("gncjListJson")){//功能插件列表数据 160 forward = gncjListJson(form, module, user); 161 } 162 else if(method.equals("toaddGncj")){//转到功能插件添加页面 163 forward = toaddGncj(form, module, user); 164 } 165 else if(method.equals("cjListJson")){//系统功能插件 166 forward = cjListJson(form, module, user); 167 } 168 else if(method.equals("cjAdd")){//系统功能添加操作 169 forward = cjAdd(form, module, user); 170 } 171 else if(method.equals("deleteGncj")){//系统功能插件删除操作 172 forward = deleteGncj(form, module, user); 173 } 174 else if(method.equals("toUpdateGncj")){//转到功能插件修改页面 175 forward = toUpdateGncj(form, module, user); 176 } 177 else if(method.equals("updateGncj")){//执行功能插件修改操作 178 forward = updateGncj(form, module, user); 179 } 180 else if(method.equals("todywslUpdatezd")){//转到多实例反馈字段页面 181 forward = todywslUpdatezd(form, module, user); 182 } 183 else if(method.equals("zdListJson")){//反馈字段列表数据显示 184 forward = zdListJson(form, module, user); 185 } 186 else if(method.equals("toaddZd")){//转到反馈字段添加页面 187 forward = toaddZd(form, module, user); 188 } 189 else if(method.equals("addZd")){//执行反馈字段添加操作 190 forward = addZd(form, module, user); 191 } 192 else if(method.equals("deleteZd")){//删除反馈字段 193 forward = deleteZd(form, module, user); 194 } 195 else if(method.equals("toUpdateZd")){//转到反馈字段修改页面 196 forward = toUpdateZd(form, module, user); 197 } 198 else if(method.equals("updateZd")){//执行反馈字段修改操作 199 forward = updateZd(form, module, user); 200 }else if(method.equals("checkadminloginno")){ 201 forward = checkadminloginno(form, module, user); 202 }else if (method.equals("AddcjslXx")){//插件修改页面的主页面 2015-12-24 liujunfeng 203 forward = AddcjslXx(form, module, user); 204 }else if(method.equals("plugList")){//插件修改页面的插件菜单列表信息页面 205 forward = plugList(form, module, user); 206 }else if (method.equals("plugListJson")){//插件修改页面的插件菜单列表信息数据 207 forward = plugListJson(form, module, user); 208 }else if (method.equals("toAddCd")){//插件菜单新增信息页面 209 forward = module.findPage("toAddCd"); 210 }else if (method.equals("AddCd")){//保存插件菜单新增数据 211 forward = AddCd(form, module, user); 212 }else if (method.equals("toUpdateCd")){//插件菜单修改页面的数据 213 forward = toUpdateCd(form, module, user); 214 }else if (method.equals("updateCd")){//保存插件菜单修改数据 215 forward = updateCd(form, module, user); 216 }else if (method.equals("deleteCd")){//菜单删除数据 217 forward = deleteCd(form, module, user); 218 }else if (method.equals("cjjsList")){//插件角色列表信息页面 219 forward = cjjsList(form, module, user); 220 }else if (method.equals("cjjsListJson")){//插件角色列表信息数据 221 forward = cjjsListJson(form, module, user); 222 }else if (method.equals("toAddJs")){//插件角色新增信息页面 223 forward = module.findPage("toAddJs"); 224 }else if (method.equals("AddJs")){//保存角色新增数据 225 forward = AddJs(form, module, user); 226 }else if (method.equals("toUpdateJs")){//插件角色修改页面的数据 227 forward = toUpdateJs(form, module, user); 228 }else if (method.equals("updateJs")){//保存插件角色修改数据 229 forward = updateJs(form, module, user); 230 }else if (method.equals("deleteJs")){//菜单删除数据 231 forward = deleteJs(form, module, user); 232 } 233 234 return forward; 235 } 236 //角色删除数据 237 private Page deleteJs(WebForm form, Module module, T_sys_user user) { 238 Connection conn = DBConnector.getconecttion(); 239 String spids = StringUtil.null2String(form.get("roleid")); 240 String groupid = StringUtil.null2String(form.get("groupid")); 241 String pluginid = StringUtil.null2String(form.get("pluginid")); 242 String ids = StringUtil.getStrsplit(spids.split(",")); 243 String pni = getPluginInstID(pluginid,groupid); 244 //System.out.println("=====ids==="+ ids +"====pni=====" + pni); 245 String delSql ="DELETE from SXT_SYS_PluginInstRole where roleId in " + ids +" and PluginInstID=‘"+pni+"‘"; 246 //System.out.println("======delSql======" + delSql); 247 try{ 248 DBHelper.update(conn, delSql, null); 249 form.addResult("result", true); 250 }catch(Exception e){ 251 form.addResult("result", false); 252 e.printStackTrace(); 253 }finally{ 254 DBConnector.freecon(conn); 255 } 256 return module.findPage("jsonxml"); 257 } 258 259 //保存插件角色修改数据 260 private Page updateJs(WebForm form, Module module, T_sys_user user) { 261 Connection con = DBConnector.getconecttion(); 262 String groupid= StringUtil.null2String(form.get("groupid")).trim(); 263 String pluginid= StringUtil.null2String(form.get("pluginid")).trim(); 264 String roleid= StringUtil.null2String(form.get("roleid")).trim(); 265 String adminlogin= StringUtil.null2String(form.get("adminlogin")).trim(); 266 //System.out.println("====groupid==" + groupid+"==pluginid==" + pluginid +"==roleid==" + roleid); 267 //查询插件实例id 268 String pni = getPluginInstID(pluginid,groupid); 269 270 //System.out.println("=====pni=====" +pni); 271 String roleName= StringUtil.null2String(form.get("roleName")).trim(); 272 try{ 273 String upSql ="update SXT_SYS_PluginInstRole set RoleName=‘"+roleName+"‘ where PluginInstID=‘"+pni+"‘ and RoleID=‘" +roleid +"‘"; 274 //System.out.println("======upSql=======" + upSql); 275 DBHelper.update(con, upSql, null); 276 form.addResult("msg", "角色数据修改成功!"); 277 }catch(Exception e){ 278 form.addResult("msg", "角色数据修改失败!"); 279 e.printStackTrace(); 280 }finally{ 281 DBConnector.freecon(con); 282 } 283 return module.findPage("toUpdateJs"); 284 } 285 286 //插件角色修改页面的数据 287 private Page toUpdateJs(WebForm form, Module module, T_sys_user user) { 288 Connection con = DBConnector.getconecttion(); 289 String groupid= StringUtil.null2String(form.get("groupid")).trim(); 290 String pluginid= StringUtil.null2String(form.get("pluginid")).trim(); 291 String roleid= StringUtil.null2String(form.get("roleid")).trim(); 292 String adminlogin= StringUtil.null2String(form.get("adminlogin")).trim(); 293 //System.out.println("====groupid===" + groupid+"=====pluginid====" + pluginid+"=====roleid=====" + roleid); 294 //查询插件实例id 295 String pni = getPluginInstID(pluginid,groupid); 296 try{ 297 String seSql="select PluginInstID,RoleID,RoleName from SXT_SYS_PluginInstRole where PluginInstID=‘"+pni+"‘ and RoleID=‘"+roleid+"‘"; 298 List<DBean> list = DBHelper.getDBeanList(con, seSql, null); 299 form.addResult("sljsObj", list.get(0)); 300 }catch(Exception e){ 301 e.printStackTrace(); 302 }finally{ 303 DBConnector.freecon(con); 304 } 305 return module.findPage("toUpdateJs"); 306 } 307 //保存角色菜单新增数据 308 private Page AddJs(WebForm form, Module module, T_sys_user user) { 309 Connection con = DBConnector.getconecttion(); 310 String groupid= StringUtil.null2String(form.get("groupid")).trim(); 311 String pluginid= StringUtil.null2String(form.get("pluginid")).trim(); 312 String adminlogin= StringUtil.null2String(form.get("adminlogin")).trim(); 313 String roleName= StringUtil.null2String(form.get("roleName")).trim(); 314 315 String roleId = BhGenerator.getBh(); 316 try{ 317 //查询插件实例id 318 String pni = getPluginInstID(pluginid,groupid); 319 //System.out.println("=====pni======" + pni); 320 if(pni.equals("")){ 321 pni = BhGenerator.getBh(); 322 } 323 //判断新增重复 324 String addSql="insert into SXT_SYS_PluginInstRole values(‘"+pni+"‘,‘"+roleId+"‘,‘"+roleName+"‘)"; 325 System.out.println("==addSql==" + addSql); 326 DBHelper.insert(con, addSql, null); 327 form.addResult("msg", "添加成功"); 328 }catch(Exception e){ 329 form.addResult("msg", "添加失败"); 330 e.printStackTrace(); 331 }finally{ 332 DBConnector.freecon(con); 333 } 334 return module.findPage("toAddJs"); 335 } 336 //角色的列表数据 337 private Page cjjsListJson(WebForm form, Module module, T_sys_user user) { 338 Connection con = DBConnector.getconecttion(); 339 String groupid= StringUtil.null2String(form.get("groupid")).trim(); 340 String pluginid= StringUtil.null2String(form.get("pluginid")).trim(); 341 String adminlogin= StringUtil.null2String(form.get("adminlogin")).trim(); 342 //System.out.println("======groupid======" + groupid+"======pluginid======" + pluginid); 343 int limit = StringUtil.StringToInt(StringUtil.null2String(form.get("rows")));//每页数据量 344 int start = StringUtil.StringToInt(StringUtil.null2String(form.get("page")));//开始位置 345 String sort = StringUtil.null2String(form.get("sort"));//排序字段 346 String dir = StringUtil.null2String(form.get("order"));//DESC 347 348 //查询插件实例id 349 String pni = getPluginInstID(pluginid,groupid); 350 try{ 351 String jsSql ="select RoleID,RoleName from SXT_SYS_PluginInstRole where PluginInstID =‘"+pni+"‘"; 352 //System.out.println("======jsSql=====" + jsSql); 353 String sqlQuery = ObjectCtl.getPageSql(jsSql, start, limit); 354 List<Map<String, String>> list = ObjectCtl.getListMapStrStr(con,sqlQuery,null); 355 String count = ObjectCtl.getStrRowValue(con, "select count(0) from ( " + jsSql + ")" ); 356 HttpServletResponse response = ActionContext.getContext().getResponse(); 357 ObjectCtl.sendListData(response, count, list); 358 form.addResult("msg", "数据加载成功!"); 359 }catch(Exception e){ 360 form.addResult("msg", "数据加载失败!"); 361 e.printStackTrace(); 362 }finally{ 363 DBConnector.freecon(con); 364 } 365 return null; 366 } 367 //菜单信息页面 368 private Page cjjsList(WebForm form, Module module, T_sys_user user) { 369 String pluginid= StringUtil.null2String(form.get("pluginid")).trim(); 370 String groupid= StringUtil.null2String(form.get("groupid")).trim(); 371 String adminlogin= StringUtil.null2String(form.get("adminlogin")).trim(); 372 form.addResult("groupid", groupid); 373 form.addResult("actionpluginid", pluginid); 374 form.addResult("adminlogin", adminlogin ); 375 //System.out.println("========pluginid======" + pluginid); 376 return module.findPage("cjjsList"); 377 } 378 //删除菜单信息 379 private Page deleteCd(WebForm form, Module module, T_sys_user user) { 380 Connection conn = DBConnector.getconecttion(); 381 String spids = StringUtil.null2String(form.get("menuid")); 382 String groupid = StringUtil.null2String(form.get("groupid")); 383 String pluginid = StringUtil.null2String(form.get("pluginid")); 384 385 String ids = StringUtil.getStrsplit(spids.split(",")); 386 String pni = getPluginInstID(pluginid,groupid); 387 388 String deleteSql = "DELETE from SXT_SYS_PluginInstMenu where menuid in " + ids +"and PluginInstID=‘"+pni+"‘"; 389 //System.out.println("===deleteSql====" + deleteSql); 390 try{ 391 DBHelper.update(conn, deleteSql, null); 392 form.addResult("result", true); 393 }catch(Exception e){ 394 form.addResult("result", false); 395 e.printStackTrace(); 396 397 }finally{ 398 DBConnector.freecon(conn); 399 } 400 return module.findPage("jsonxml"); 401 } 402 403 //保存菜单修改数据 404 private Page updateCd(WebForm form, Module module, T_sys_user user) { 405 Connection con = DBConnector.getconecttion(); 406 String groupid= StringUtil.null2String(form.get("groupid")).trim(); 407 String pluginid= StringUtil.null2String(form.get("pluginid")).trim(); 408 String menuid= StringUtil.null2String(form.get("menuid")).trim(); 409 String adminlogin= StringUtil.null2String(form.get("adminlogin")).trim(); 410 //System.out.println("====groupid==" + groupid+"==pluginid==" + pluginid +"==menuid==" + menuid); 411 //查询插件实例id 412 413 String pni = getPluginInstID(pluginid,groupid); 414 //System.out.println("=====pni=====" +pni); 415 String menuName= StringUtil.null2String(form.get("menuName")).trim(); 416 String menuIcon= StringUtil.null2String(form.get("menuIcon")).trim(); 417 String menuIconbgColor= StringUtil.null2String(form.get("menuIconbgColor")).trim(); 418 419 try{ 420 String updateSql="update SXT_SYS_PluginInstMenu set plugininstid=‘"+ pni+ "‘,MenuID=‘"+menuid+"‘, menuName=‘"+menuName+"‘,menuIcon=‘"+menuIcon 421 +"‘,MenuIconBgColor=‘" +menuIconbgColor+"‘ where MenuID=‘"+menuid+"‘"; 422 //System.out.println("=======updateSql===========" + updateSql); 423 DBHelper.update(con, updateSql, null); 424 form.addResult("msg", "菜单数据修改成功!"); 425 }catch(Exception e){ 426 form.addResult("msg", "菜单数据修改失败!"); 427 e.printStackTrace(); 428 }finally{ 429 DBConnector.freecon(con); 430 } 431 432 return module.findPage("toUpdateCd"); 433 } 434 435 //菜单修改页面的数据 436 private Page toUpdateCd(WebForm form, Module module, T_sys_user user) { 437 Connection con = DBConnector.getconecttion(); 438 String groupid= StringUtil.null2String(form.get("groupid")).trim(); 439 String pluginid= StringUtil.null2String(form.get("pluginid")).trim(); 440 String menuid= StringUtil.null2String(form.get("menuid")).trim(); 441 String adminlogin= StringUtil.null2String(form.get("adminlogin")).trim(); 442 //System.out.println("====groupid===" + groupid+"=====pluginid====" + pluginid+"=====menuid=====" + menuid); 443 //查询插件实例id 444 String pni = getPluginInstID(pluginid,groupid); 445 446 try{ 447 String sql = "select PluginInstID,MenuID,MenuName,MenuIcon,MenuIconBgColor from SXT_SYS_PluginInstMenu " 448 + " where MenuID =‘" + menuid+"‘ and PluginInstID=‘" + pni +"‘"; 449 //System.out.println("=======sql=========" + sql); 450 List<DBean> list = DBHelper.getDBeanList(con, sql, null); 451 form.addResult("slcdObj", list.get(0)); 452 }catch(Exception e){ 453 e.printStackTrace(); 454 455 }finally{ 456 DBConnector.freecon(con); 457 } 458 return module.findPage("toUpdateCd"); 459 } 460 461 //保存插件菜单新增数据 462 private Page AddCd(WebForm form, Module module, T_sys_user user) { 463 Connection con = DBConnector.getconecttion(); 464 String groupid= StringUtil.null2String(form.get("groupid")).trim(); 465 String pluginid= StringUtil.null2String(form.get("pluginid")).trim(); 466 String adminlogin= StringUtil.null2String(form.get("adminlogin")).trim(); 467 //System.out.println("========pluginid=======" + pluginid); 468 String menuName= StringUtil.null2String(form.get("menuName")).trim(); 469 String menuIcon= StringUtil.null2String(form.get("menuIcon")).trim(); 470 String menuIconbgColor= StringUtil.null2String(form.get("menuIconbgColor")).trim(); 471 String menuId = BhGenerator.getBh(); 472 //System.out.println("==groupid===" +groupid+"==pluginid===" + pluginid); 473 try{ 474 //查询插件实例id 475 String pni = getPluginInstID(pluginid,groupid); 476 //System.out.println("=====pni======" + pni); 477 if(pni.equals("")){ 478 pni = BhGenerator.getBh(); 479 } 480 //判断新增重复 481 482 String sql ="insert into SXT_SYS_PluginInstMenu (PluginInstID,MenuID,MenuName,MenuIcon,MenuIconBgColor) values(‘"+ pni+ "‘,‘"+menuId + "‘,‘"+menuName+"‘,‘"+menuIcon+"‘,‘"+menuIconbgColor+"‘)"; 483 //System.out.println("==sql===" + sql); 484 DBHelper.insert(con, sql, null); 485 form.addResult("msg", "添加成功"); 486 }catch(Exception e){ 487 form.addResult("msg", "添加失败"); 488 e.printStackTrace(); 489 }finally{ 490 DBConnector.freecon(con); 491 } 492 return module.findPage("toAddCd"); 493 } 494 495 //菜单信息页面 496 private Page plugList(WebForm form, Module module, T_sys_user user) { 497 String pluginid= StringUtil.null2String(form.get("pluginid")).trim(); 498 String groupid= StringUtil.null2String(form.get("groupid")).trim(); 499 String adminlogin= StringUtil.null2String(form.get("adminlogin")).trim(); 500 form.addResult("groupid", groupid); 501 form.addResult("actionpluginid", pluginid); 502 form.addResult("adminlogin", adminlogin ); 503 //System.out.println("========pluginid======" + pluginid); 504 return module.findPage("plugList"); 505 } 506 507 //保存数据在主页面 508 private Page AddcjslXx(WebForm form, Module module, T_sys_user user) { 509 String pluginid= StringUtil.null2String(form.get("pluginid")).trim(); 510 String groupid= StringUtil.null2String(form.get("groupid")).trim(); 511 String adminlogin= StringUtil.null2String(form.get("adminlogin")).trim(); 512 form.addResult("groupid", groupid); 513 form.addResult("actionpluginid", pluginid); 514 form.addResult("adminlogin", adminlogin ); 515 //System.out.println("==pluginid==" + pluginid +"===groupid==" + groupid +"===adminlogin==" + adminlogin); 516 return module.findPage("AddcjslXx"); 517 } 518 519 520 //菜单的列表数据 521 private Page plugListJson(WebForm form, Module module, T_sys_user user) { 522 Connection con = DBConnector.getconecttion(); 523 String groupid= StringUtil.null2String(form.get("groupid")).trim(); 524 String pluginid= StringUtil.null2String(form.get("pluginid")).trim(); 525 String adminlogin= StringUtil.null2String(form.get("adminlogin")).trim(); 526 //System.out.println("======groupid======" + groupid+"======pluginid======" + pluginid); 527 int limit = StringUtil.StringToInt(StringUtil.null2String(form.get("rows")));//每页数据量 528 int start = StringUtil.StringToInt(StringUtil.null2String(form.get("page")));//开始位置 529 String sort = StringUtil.null2String(form.get("sort"));//排序字段 530 String dir = StringUtil.null2String(form.get("order"));//DESC 531 532 //查询插件实例id 533 String pni = getPluginInstID(pluginid,groupid); 534 try{ 535 String plugListSql ="select MenuID,MenuName,MenuIcon,MenuIconBgColor from SXT_SYS_PluginInstMenu " 536 + " where PluginInstID = ‘"+ pni+"‘"; 537 538 //System.out.println("======plugListSql=======" + plugListSql); 539 540 String sqlQuery = ObjectCtl.getPageSql(plugListSql, start, limit); 541 List<Map<String, String>> list = ObjectCtl.getListMapStrStr(con,sqlQuery,null); 542 String count = ObjectCtl.getStrRowValue(con, "select count(0) from ( " + plugListSql + ")" ); 543 544 HttpServletResponse response = ActionContext.getContext().getResponse(); 545 ObjectCtl.sendListData(response, count, list); 546 form.addResult("msg", "数据加载成功!"); 547 }catch(Exception e){ 548 form.addResult("msg", "数据加载失败!"); 549 e.printStackTrace(); 550 }finally{ 551 DBConnector.freecon(con); 552 } 553 return module.findPage("jsonxml"); 554 } 555 556 /** 557 * 查询插件实例id 558 * @param pluginid 插件id 559 * @param groupid 集团id 560 * @return 561 */ 562 public String getPluginInstID(String pluginid,String groupid){ 563 Connection con = DBConnector.getconecttion(); 564 String selectSql ="select plugininstid from SXT_SYS_PluginInst where pluginid =‘"+pluginid+"‘ and groupid=‘"+groupid+"‘"; 565 String pni= ObjectCtl.getStrRowValue(con, selectSql) ; 566 return pni; 567 } 568 569 570 /** 571 * 转到多业务实例列表页面 572 */ 573 private Page dywslList(WebForm form, Module module, T_sys_user user){ 574 575 Connection con = DBConnector.getconecttion(); //取得一个数据库连接 576 try{ 577 String groupid = StringUtil.null2String(form.get("groupid")).trim();//集团id 578 String actionpluginid = StringUtil.null2String(form.get("pluginid")).trim();//插件id 579 form.addResult("groupid", groupid); 580 581 form.addResult("actionpluginid", actionpluginid); 582 form.addResult("adminlogin", StringUtil.null2String(form.get("adminlogin"))); 583 }catch (Exception e) { 584 e.printStackTrace(); 585 }finally{ 586 DBConnector.freecon(con); //释放数据库连接 587 } 588 return module.findPage("dywslList"); 589 } 590 591 /** 592 * 多业务实例列表数据 593 */ 594 private Page dywslListJson(WebForm form, Module module, T_sys_user user) { 595 Connection con = DBConnector.getconecttion(); //取得一个数据库连接 596 int limit = StringUtil.StringToInt(StringUtil.null2String(form.get("rows")));//每页数据量 597 int start = StringUtil.StringToInt(StringUtil.null2String(form.get("page")));//开始位置 598 String sort = StringUtil.null2String(form.get("sort"));//排序字段 599 String dir = StringUtil.null2String(form.get("order"));//DESC 600 601 String groupid = StringUtil.null2String(form.get("groupid")).trim();//集团id 602 String actionpluginid = StringUtil.null2String(form.get("actionpluginid")).trim();//插件id 603 try{ 604 String sql = "select a.groupid,a.buiid,a.buiname,a.opstartname,a.opstarturl,a.opobjname,a.opobjurl, " + 605 " decode(a.opobjdataperm,‘0‘,‘不进行权限控制‘,‘1‘,‘进行权限控制‘) opobjdataperm, " + 606 " a.opwindowstitle,a.opfinishname,a.opfinishurl,a.t1initclassname, " + 607 " a.photonum, " + 608 " a.videonum, " + 609 " a.audionum, " + 610 " a.isremark,b.plugininstid from T_Job_Bui a left join SXT_SYS_PluginInst b on a.buiid = b.buiid where a.groupid = ‘"+groupid+"‘ and b.pluginid = ‘"+actionpluginid+"‘ "; 611 String sqlQuery = ObjectCtl.getPageSql(sql, start, limit); 612 List<Map<String, String>> list = ObjectCtl.getListMapStrStr(con,sqlQuery,null); 613 String count = ObjectCtl.getStrRowValue(con, "select count(0) from ( " + sql + ")" ); 614 HttpServletResponse response = ActionContext.getContext().getResponse(); 615 ObjectCtl.sendListData(response, count, list); 616 }catch (Exception e) { 617 e.printStackTrace(); 618 } 619 finally 620 { 621 DBConnector.freecon(con); //释放数据库连接 622 } 623 return module.findPage("jsonxml"); 624 } 625 626 /** 627 * 转到添加多业务实例页面 628 */ 629 private Page toAddSl(WebForm form, Module module, T_sys_user user){ 630 631 Connection con = DBConnector.getconecttion(); //取得一个数据库连接 632 try{ 633 String actionpluginid = StringUtil.null2String(form.get("actionpluginid")).trim();//插件id 634 form.addResult("actionpluginid", actionpluginid); 635 String groupid = StringUtil.null2String(form.get("groupid")).trim(); 636 form.addResult("groupid", groupid); 637 String adminlogin = StringUtil.null2String(form.get("adminlogin")).trim(); 638 form.addResult("adminlogin", adminlogin); 639 }catch (Exception e) { 640 e.printStackTrace(); 641 }finally{ 642 DBConnector.freecon(con); //释放数据库连接 643 } 644 return module.findPage("dywslAdd"); 645 } 646 647 /** 648 * 执行添加多业务实例操作 649 */ 650 private Page addDywsl(WebForm form, Module module, T_sys_user user){ 651 652 Connection con = DBConnector.getconecttion(); //取得一个数据库连接 653 String groupid = StringUtil.null2String(form.get("groupid")).trim(); 654 String actionpluginid = StringUtil.null2String(form.get("actionpluginid")).trim(); 655 String buiid = BhGenerator.getBh(); 656 String buiname = StringUtil.null2String(form.get("buiname")).trim(); 657 String opstartname = StringUtil.null2String(form.get("opstartname")).trim(); 658 String opstarturl = StringUtil.null2String(form.get("opstarturl")).trim(); 659 String opobjname = StringUtil.null2String(form.get("opobjname")).trim(); 660 String opobjurl = StringUtil.null2String(form.get("opobjurl")).trim(); 661 String opobjdataperm = StringUtil.null2String(form.get("opobjdataperm")).trim(); 662 String opwindowstitle = StringUtil.null2String(form.get("opwindowstitle")).trim(); 663 String opfinishname = StringUtil.null2String(form.get("opfinishname")).trim(); 664 String opfinishurl = StringUtil.null2String(form.get("opfinishurl")).trim(); 665 String t1initclassname = StringUtil.null2String(form.get("t1initclassname")).trim(); 666 String photonum = StringUtil.null2String(form.get("photonum")).trim(); 667 String videonum = StringUtil.null2String(form.get("videonum")).trim(); 668 String audionum = StringUtil.null2String(form.get("audionum")).trim(); 669 String isremark = StringUtil.null2String(form.get("isremark")).trim(); 670 String adminlogin = StringUtil.null2String(form.get("adminlogin")).trim(); 671 System.err.println("-----"+adminlogin); 672 try{ 673 674 String addsql = "insert into T_Job_Bui ( " + 675 " groupid,buiid,buiname,opstartname,opstarturl,opobjname,opobjurl,opobjdataperm,opwindowstitle, " + 676 " opfinishname,opfinishurl,t1initclassname,photonum,videonum,audionum,isremark) " + 677 " values (‘"+groupid+"‘,‘"+buiid+"‘,‘"+buiname+"‘,‘"+opstartname+"‘,‘"+opstarturl+"‘,‘"+opobjname+"‘, " + 678 " ‘"+opobjurl+"‘,‘"+opobjdataperm+"‘,‘"+opwindowstitle+"‘,‘"+opfinishname+"‘,‘"+opfinishurl+"‘, " + 679 " ‘"+t1initclassname+"‘,‘"+photonum+"‘,‘"+videonum+"‘,‘"+audionum+"‘,‘"+isremark+"‘)"; 680 DBHelper.update(con, addsql, null); 681 682 String sql="select CurrentUserID from t_sys_loginno where GroupID="+groupid+" and LoginNo=‘"+adminlogin+"‘"; 683 String adminuserid=DBHelper.getRowStr(con, sql, null); 684 String plugininstid = BhGenerator.getBh();//实例插件id 685 comUtil.countProc(con, "pro_plugin_instantiation(‘"+groupid+"‘,‘"+actionpluginid+"‘,‘"+buiid+"‘,‘"+adminuserid+"‘,‘"+plugininstid+"‘)"); 686 System.out.println("pro_plugin_instantiation(‘"+groupid+"‘,‘"+actionpluginid+"‘,‘"+buiid+"‘,‘"+adminuserid+"‘,‘"+plugininstid+"‘)"); 687 form.addResult("msg", "添加成功!"); 688 }catch (Exception e) { 689 e.printStackTrace(); 690 form.addResult("msg", "添加失败!"); 691 }finally{ 692 DBConnector.freecon(con); //释放数据库连接 693 } 694 return module.findPage("dywslAdd"); 695 } 696 697 /** 698 * 执行删除数据 699 */ 700 private Page deleteSl(WebForm form, Module module, T_sys_user user){ 701 702 Connection con = DBConnector.getconecttion(); //取得一个数据库连接 703 int result = -1; 704 try{ 705 String id = StringUtil.null2String(form.get("id"));//获取页面传过来的需要删除的记录的id 706 String ids=StringUtil.getStrsplit(id.split(",")); 707 708 if(!"".equals(id)){ 709 String sql = "delete from T_Job_Bui where buiid in "+ids+" "; 710 result=ObjectCtl.executeUpdateBySql(con, sql); 711 String sql1 = "delete from T_Job_ActionPlugin_GroupBui where buiid in "+ids+" "; 712 result=ObjectCtl.executeUpdateBySql(con, sql1); 713 String sql2 = "delete from T_Job_FeedbackItem where buiid in "+ids+" "; 714 result=ObjectCtl.executeUpdateBySql(con, sql2); 715 716 String plugininstids=StringUtil.null2String(form.get("plugininstid")).trim(); 717 String str[] = plugininstids.split(","); 718 for(int i=0;i<str.length;i++){ 719 result=comUtil.countProc(con, "PRO_PLUGIN_UNINSTANTIATION(‘"+str[i]+"‘)"); 720 } 721 722 }if(result!=-1){ 723 form.addResult("result", true); 724 }else{ 725 form.addResult("result", false); 726 } 727 }catch (Exception e){ 728 e.printStackTrace(); 729 } 730 finally{ 731 DBConnector.freecon(con); //释放数据库连接 732 } 733 return module.findPage("jsonxml"); 734 } 735 736 /** 737 * 转到多业务实例修改页面 738 */ 739 private Page toUpdateSl(WebForm form, Module module, T_sys_user user){ 740 741 Connection con = DBConnector.getconecttion(); //取得一个数据库连接 742 String buiid = StringUtil.null2String(form.get("buiid")).trim(); 743 String groupid = StringUtil.null2String(form.get("groupid")).trim(); 744 String actionpluginid = StringUtil.null2String(form.get("actionpluginid")).trim(); 745 try{ 746 form.addResult("buiid", buiid); 747 form.addResult("groupid", groupid); 748 form.addResult("actionpluginid", actionpluginid); 749 750 }catch (Exception e) { 751 e.printStackTrace(); 752 }finally{ 753 DBConnector.freecon(con); //释放数据库连接 754 } 755 return module.findPage("dywslTab"); 756 } 757 758 /** 759 * 转到多业务实例基本信息修改页面 760 */ 761 private Page todywslUpdatejbxx(WebForm form, Module module, T_sys_user user){ 762 763 Connection con = DBConnector.getconecttion(); //取得一个数据库连接 764 String buiid = StringUtil.null2String(form.get("buiid")).trim(); 765 try{ 766 String sql = "select groupid,buiid,buiname,opstartname,opstarturl,opobjname,opobjurl, " + 767 " opobjdataperm, " + 768 " opwindowstitle,opfinishname,opfinishurl,t1initclassname, " + 769 " photonum, " + 770 " videonum, " + 771 " audionum, " + 772 " isremark from T_Job_Bui where buiid = ‘"+buiid+"‘ "; 773 774 List<DBean> list=DBHelper.getDBeanList(con, sql, null); 775 form.addResult("sljbxxObj", list.get(0)); 776 form.addResult("buiid", buiid); 777 }catch (Exception e) { 778 e.printStackTrace(); 779 }finally{ 780 DBConnector.freecon(con); //释放数据库连接 781 } 782 return module.findPage("dywslUpdatejbxx"); 783 } 784 785 /** 786 * 执行多业务实例基本信息修改操作 787 */ 788 private Page dywslUpdatejbxx(WebForm form, Module module, T_sys_user user){ 789 790 Connection con = DBConnector.getconecttion(); //取得一个数据库连接 791 //String groupid = StringUtil.null2String(form.get("groupid")).trim(); 792 String buiid = StringUtil.null2String(form.get("buiid")).trim(); 793 String buiname = StringUtil.null2String(form.get("buiname")).trim(); 794 String opstartname = StringUtil.null2String(form.get("opstartname")).trim(); 795 String opstarturl = StringUtil.null2String(form.get("opstarturl")).trim(); 796 String opobjname = StringUtil.null2String(form.get("opobjname")).trim(); 797 String opobjurl = StringUtil.null2String(form.get("opobjurl")).trim(); 798 String opobjdataperm = StringUtil.null2String(form.get("opobjdataperm")).trim(); 799 String opwindowstitle = StringUtil.null2String(form.get("opwindowstitle")).trim(); 800 String opfinishname = StringUtil.null2String(form.get("opfinishname")).trim(); 801 String opfinishurl = StringUtil.null2String(form.get("opfinishurl")).trim(); 802 String t1initclassname = StringUtil.null2String(form.get("t1initclassname")).trim(); 803 String photonum = StringUtil.null2String(form.get("photonum")).trim(); 804 String videonum = StringUtil.null2String(form.get("videonum")).trim(); 805 String audionum = StringUtil.null2String(form.get("audionum")).trim(); 806 String isremark = StringUtil.null2String(form.get("isremark")).trim(); 807 try{ 808 String sql = "update T_Job_Bui set " + 809 " buiname = ‘"+buiname+"‘, " + 810 " opstartname = ‘"+opstartname+"‘, " + 811 " opstarturl = ‘"+opstarturl+"‘, " + 812 " opobjname = ‘"+opobjname+"‘, " + 813 " opobjurl = ‘"+opobjurl+"‘, " + 814 " opobjdataperm = ‘"+opobjdataperm+"‘, " + 815 " opwindowstitle = ‘"+opwindowstitle+"‘, " + 816 " opfinishname = ‘"+opfinishname+"‘, " + 817 " opfinishurl = ‘"+opfinishurl+"‘, " + 818 " t1initclassname = ‘"+t1initclassname+"‘, " + 819 " photonum = ‘"+photonum+"‘, " + 820 " videonum = ‘"+videonum+"‘, " + 821 " audionum = ‘"+audionum+"‘, " + 822 " isremark = ‘"+isremark+"‘ " + 823 " where buiid = ‘"+buiid+"‘ "; 824 825 DBHelper.update(con, sql, null); 826 form.addResult("msg", "修改成功!"); 827 }catch (Exception e) { 828 e.printStackTrace(); 829 form.addResult("msg", "修改失败!"); 830 }finally{ 831 DBConnector.freecon(con); //释放数据库连接 832 } 833 return module.findPage("dywslUpdatejbxx"); 834 } 835 836 /** 837 * 转到多业务实例功能插件修改页面 838 */ 839 private Page todywslUpdategncj(WebForm form, Module module, T_sys_user user){ 840 841 Connection con = DBConnector.getconecttion(); //取得一个数据库连接 842 String buiid = StringUtil.null2String(form.get("buiid")).trim(); 843 String groupid = StringUtil.null2String(form.get("groupid")).trim(); 844 String actionpluginid = StringUtil.null2String(form.get("actionpluginid")).trim(); 845 try{ 846 form.addResult("buiid", buiid); 847 form.addResult("groupid", groupid); 848 form.addResult("actionpluginid", actionpluginid); 849 }catch (Exception e) { 850 e.printStackTrace(); 851 }finally{ 852 DBConnector.freecon(con); //释放数据库连接 853 } 854 return module.findPage("dywslUpdategncj"); 855 } 856 857 /** 858 * 功能插件列表数据 859 */ 860 private Page gncjListJson(WebForm form, Module module, T_sys_user user) { 861 Connection con = DBConnector.getconecttion(); //取得一个数据库连接 862 int limit = StringUtil.StringToInt(StringUtil.null2String(form.get("rows")));//每页数据量 863 int start = StringUtil.StringToInt(StringUtil.null2String(form.get("page")));//开始位置 864 String sort = StringUtil.null2String(form.get("sort"));//排序字段 865 String dir = StringUtil.null2String(form.get("order"));//DESC 866 867 String groupid = StringUtil.null2String(form.get("groupid")).trim();//集团id 868 String actionpluginid = StringUtil.null2String(form.get("actionpluginid")).trim();//插件id 869 String buiid = StringUtil.null2String(form.get("buiid")).trim(); 870 try{ 871 String sql = "select a.groupid,a.buiid,a.actionpluginid,a.actionplugincode,a.actionpluginmenuname,a.actionpluginprocedure, " + 872 " decode(a.actionplugintype,‘1‘,‘首页功能插件‘,‘2‘,‘作业窗功能插件‘) actionplugintype," + 873 " a.orderno," + 874 " decode(a.ismustaction,‘0‘,‘否‘,‘1‘,‘是‘) ismustaction," + 875 " a.actioncondition," + 876 " decode(a.isextapp,‘0‘,‘不是外部App‘,‘1‘,‘是外部App‘) isextapp," + 877 " a.appid,a.appinterfaceparam,b.actionpluginname from T_Job_ActionPlugin_GroupBui a left join T_Job_ActionPlugin b on a.actionpluginid = b.actionpluginid where buiid = ‘"+buiid+"‘ "; 878 879 String sqlQuery = ObjectCtl.getPageSql(sql, start, limit); 880 List<Map<String, String>> list = ObjectCtl.getListMapStrStr(con,sqlQuery,null); 881 String count = ObjectCtl.getStrRowValue(con, "select count(0) from ( " + sql + ")" ); 882 HttpServletResponse response = ActionContext.getContext().getResponse(); 883 ObjectCtl.sendListData(response, count, list); 884 885 }catch (Exception e) { 886 e.printStackTrace(); 887 } 888 finally 889 { 890 DBConnector.freecon(con); //释放数据库连接 891 } 892 return module.findPage("jsonxml"); 893 } 894 895 /** 896 * 转到添加功能插件页面 897 */ 898 private Page toaddGncj(WebForm form, Module module, T_sys_user user){ 899 900 Connection con = DBConnector.getconecttion(); //取得一个数据库连接 901 try{ 902 String buiid = StringUtil.null2String(form.get("buiid")).trim(); 903 form.addResult("buiid", buiid); 904 String actionpluginid = StringUtil.null2String(form.get("actionpluginid")).trim(); 905 form.addResult("actionpluginid", actionpluginid); 906 String groupid = StringUtil.null2String(form.get("groupid")).trim(); 907 form.addResult("groupid", groupid); 908 }catch (Exception e) { 909 e.printStackTrace(); 910 }finally{ 911 DBConnector.freecon(con); //释放数据库连接 912 } 913 return module.findPage("gncjAdd"); 914 } 915 916 /** 917 * 系统功能插件 918 */ 919 private Page cjListJson(WebForm form, Module module, T_sys_user user) { 920 Connection con = DBConnector.getconecttion(); //取得一个数据库连接 921 int limit = StringUtil.StringToInt(StringUtil.null2String(form.get("rows")));//每页数据量 922 int start = StringUtil.StringToInt(StringUtil.null2String(form.get("page")));//开始位置 923 String sort = StringUtil.null2String(form.get("sort"));//排序字段 924 String dir = StringUtil.null2String(form.get("order"));//DESC 925 926 String groupid = StringUtil.null2String(form.get("groupid")).trim();//集团id 927 String actionpluginid = StringUtil.null2String(form.get("actionpluginid")).trim();//插件id 928 String buiid = StringUtil.null2String(form.get("buiid")).trim(); 929 try{ 930 String sql = "select a.ActionPluginId,a.ActionPluginCode,a.ActionPluginUrl,a.ActionPluginUrl_View,a.ActionPluginName, " + 931 " decode(b.actionplugintype,‘1‘,‘首页功能插件‘,‘2‘,‘作业窗功能插件‘) actionplugintype " + 932 " from T_Job_ActionPlugin a left join T_Job_ActionPlugin_GroupBui b on A.ACTIONPLUGINID = B.ACTIONPLUGINID " + 933 " where 1=1 and a.ActionPluginId not in (select ActionPluginId from T_Job_ActionPlugin_GroupBui where buiid = ‘"+buiid+"‘) "; 934 935 String sqlQuery = ObjectCtl.getPageSql(sql, start, limit); 936 List<Map<String, String>> list = ObjectCtl.getListMapStrStr(con,sqlQuery,null); 937 String count = ObjectCtl.getStrRowValue(con, "select count(0) from ( " + sql + ")" ); 938 HttpServletResponse response = ActionContext.getContext().getResponse(); 939 ObjectCtl.sendListData(response, count, list); 940 }catch (Exception e) { 941 e.printStackTrace(); 942 } 943 finally 944 { 945 DBConnector.freecon(con); //释放数据库连接 946 } 947 return module.findPage("jsonxml"); 948 } 949 950 /** 951 * 系统功能插件添加操作 952 * */ 953 private Page cjAdd(WebForm form, Module module, T_sys_user user) { 954 Connection con = DBConnector.getconecttion(); //取得一个数据库连接 955 try { 956 String buiid=StringUtil.null2String(form.get("buiid")).trim(); 957 String groupid=StringUtil.null2String(form.get("groupid")).trim(); 958 //String actionplugincode=StringUtil.null2String(form.get("actionplugincode")).trim(); 959 960 int OrderNo = ObjectCtl.getIntRowValue(con, " select max(OrderNo) from T_Job_ActionPlugin_GroupBui "); 961 OrderNo = OrderNo < 0 ? 0 : OrderNo + 1; 962 String ids=StringUtil.null2String(form.get("ids")).trim(); 963 String str[] = ids.split(","); 964 String actionplugincodes=StringUtil.null2String(form.get("actionplugincodes")).trim(); 965 String strr[] = actionplugincodes.split(","); 966 for(int i=0;i<str.length;i++){ 967 String sql="insert into T_Job_ActionPlugin_GroupBui " + 968 " (groupid,buiid,actionpluginid,actionplugincode,actionpluginmenuname,actionpluginprocedure, " + 969 " actionplugintype,orderno,ismustaction,actioncondition,isextapp,appid,appinterfaceparam) " + 970 " values " + 971 " (‘"+groupid+"‘,‘"+buiid+"‘,‘"+str[i]+"‘,‘"+strr[i]+"‘,‘‘, " + 972 " ‘‘,‘‘,‘"+OrderNo+"‘,‘0‘, " + 973 " ‘‘,‘‘,‘‘,‘‘)"; 974 975 DBHelper.update(con, sql, null); 976 } 977 form.addResult("result", true); 978 } catch (Exception e) { 979 form.addResult("result", false); 980 e.printStackTrace(); 981 } 982 return module.findPage("jsonxml"); 983 } 984 985 /** 986 * 系统插件删除 987 */ 988 private Page deleteGncj(WebForm form, Module module, T_sys_user user){ 989 990 Connection con = DBConnector.getconecttion(); //取得一个数据库连接 991 int result = -1; 992 try{ 993 String id = StringUtil.null2String(form.get("id")); 994 String ids=StringUtil.getStrsplit(id.split(",")); 995 String buiid = StringUtil.null2String(form.get("buiid")); 996 String buiids=StringUtil.getStrsplit(buiid.split(",")); 997 if(!"".equals(id) && !"".equals(buiid)){ 998 String sql = "delete from T_Job_ActionPlugin_GroupBui where ActionPluginId in "+ids+" and buiid in "+buiids+" "; 999 result=ObjectCtl.executeUpdateBySql(con, sql); 1000 }if(result!=-1){ 1001 form.addResult("result", true); 1002 }else{ 1003 form.addResult("result", false); 1004 } 1005 }catch (Exception e){ 1006 e.printStackTrace(); 1007 } 1008 finally{ 1009 DBConnector.freecon(con); //释放数据库连接 1010 } 1011 return module.findPage("jsonxml"); 1012 } 1013 1014 /** 1015 * 转到功能插件修改页面 1016 */ 1017 private Page toUpdateGncj(WebForm form, Module module, T_sys_user user){ 1018 1019 Connection con = DBConnector.getconecttion(); //取得一个数据库连接 1020 String actionpluginid = StringUtil.null2String(form.get("actionpluginid")).trim(); 1021 String buiid = StringUtil.null2String(form.get("buiid")).trim(); 1022 try{ 1023 String sql = "select groupid,buiid,actionpluginid,actionplugincode,actionpluginmenuname,actionpluginprocedure, " + 1024 " actionplugintype," + 1025 " orderno," + 1026 " ismustaction," + 1027 " actioncondition," + 1028 " decode(isextapp,‘0‘,‘不是外部App‘,‘1‘,‘是外部App‘) isextapp," + 1029 " appid,appinterfaceparam from T_Job_ActionPlugin_GroupBui where actionpluginid = ‘"+actionpluginid+"‘ and buiid = ‘"+buiid+"‘ "; 1030 1031 List<DBean> list=DBHelper.getDBeanList(con, sql, null); 1032 form.addResult("gncjObj", list.get(0)); 1033 form.addResult("actionpluginid", actionpluginid); 1034 form.addResult("buiid", buiid); 1035 }catch (Exception e) { 1036 e.printStackTrace(); 1037 }finally{ 1038 DBConnector.freecon(con); //释放数据库连接 1039 } 1040 return module.findPage("gncjUpdate"); 1041 } 1042 1043 /** 1044 * 执行功能插件修改操作 1045 */ 1046 private Page updateGncj(WebForm form, Module module, T_sys_user user){ 1047 1048 Connection con = DBConnector.getconecttion(); //取得一个数据库连接 1049 String actionpluginid = StringUtil.null2String(form.get("actionpluginid")).trim(); 1050 String buiid = StringUtil.null2String(form.get("buiid")).trim(); 1051 String actionpluginprocedure = StringUtil.null2String(form.get("actionpluginprocedure")).trim(); 1052 String actionpluginmenuname = StringUtil.null2String(form.get("actionpluginmenuname")).trim(); 1053 String actionplugintype = StringUtil.null2String(form.get("actionplugintype")).trim(); 1054 String ismustaction = StringUtil.null2String(form.get("ismustaction")).trim(); 1055 try{ 1056 String sql = "update T_Job_ActionPlugin_GroupBui set " + 1057 " actionpluginprocedure = ?, " + 1058 " actionpluginmenuname = ‘"+actionpluginmenuname+"‘, " + 1059 " actionplugintype = ‘"+actionplugintype+"‘, " + 1060 " ismustaction = ‘"+ismustaction+"‘ " + 1061 " where actionpluginid = ‘"+actionpluginid+"‘ and buiid = ‘"+buiid+"‘ "; 1062 1063 DBHelper.update(con, sql, new Object[]{ 1064 actionpluginprocedure 1065 }); 1066 form.addResult("msg", "修改成功!"); 1067 1068 }catch (Exception e) { 1069 e.printStackTrace(); 1070 form.addResult("msg", "修改失败!"); 1071 }finally{ 1072 DBConnector.freecon(con); //释放数据库连接 1073 } 1074 return module.findPage("gncjUpdate"); 1075 } 1076 1077 1078 1079 /** 1080 * 转到多业务实例反馈字段页面 1081 */ 1082 private Page todywslUpdatezd(WebForm form, Module module, T_sys_user user){ 1083 1084 Connection con = DBConnector.getconecttion(); //取得一个数据库连接 1085 String buiid = StringUtil.null2String(form.get("buiid")).trim(); 1086 try{ 1087 form.addResult("buiid", buiid); 1088 }catch (Exception e) { 1089 e.printStackTrace(); 1090 }finally{ 1091 DBConnector.freecon(con); //释放数据库连接 1092 } 1093 return module.findPage("dywslUpdatezd"); 1094 } 1095 1096 /** 1097 * 反馈字段列表数据显示 1098 */ 1099 private Page zdListJson(WebForm form, Module module, T_sys_user user) { 1100 Connection con = DBConnector.getconecttion(); //取得一个数据库连接 1101 int limit = StringUtil.StringToInt(StringUtil.null2String(form.get("rows")));//每页数据量 1102 int start = StringUtil.StringToInt(StringUtil.null2String(form.get("page")));//开始位置 1103 String sort = StringUtil.null2String(form.get("sort"));//排序字段 1104 String dir = StringUtil.null2String(form.get("order"));//DESC 1105 1106 String groupid = StringUtil.null2String(form.get("groupid")).trim();//集团id 1107 String buiid = StringUtil.null2String(form.get("buiid")).trim(); 1108 try{ 1109 String sql = "select groupid,buiid,actionpluginid,feedbackitemid,feedbackitemname, " + 1110 " isaudioinput,orderno from T_Job_FeedbackItem " + 1111 " where buiid = ‘"+buiid+"‘ "; 1112 1113 String sqlQuery = ObjectCtl.getPageSql(sql, start, limit); 1114 List<Map<String, String>> list = ObjectCtl.getListMapStrStr(con,sqlQuery,null); 1115 String count = ObjectCtl.getStrRowValue(con, "select count(0) from ( " + sql + ")" ); 1116 HttpServletResponse response = ActionContext.getContext().getResponse(); 1117 ObjectCtl.sendListData(response, count, list); 1118 }catch (Exception e) { 1119 e.printStackTrace(); 1120 } 1121 finally 1122 { 1123 DBConnector.freecon(con); //释放数据库连接 1124 } 1125 return module.findPage("jsonxml"); 1126 } 1127 1128 /** 1129 * 转到反馈字段添加页面 1130 */ 1131 private Page toaddZd(WebForm form, Module module, T_sys_user user){ 1132 1133 Connection con = DBConnector.getconecttion(); //取得一个数据库连接 1134 try{ 1135 String groupid = StringUtil.null2String(form.get("groupid")).trim();//集团id 1136 String buiid = StringUtil.null2String(form.get("buiid")).trim();//插件id 1137 form.addResult("groupid", groupid); 1138 form.addResult("buiid", buiid); 1139 }catch (Exception e) { 1140 e.printStackTrace(); 1141 }finally{ 1142 DBConnector.freecon(con); //释放数据库连接 1143 } 1144 return module.findPage("zdAdd"); 1145 } 1146 1147 /** 1148 * 执行添加反馈字段操作 1149 */ 1150 private Page addZd(WebForm form, Module module, T_sys_user user){ 1151 1152 Connection con = DBConnector.getconecttion(); //取得一个数据库连接 1153 String groupid = StringUtil.null2String(form.get("groupid")).trim(); 1154 String buiid = StringUtil.null2String(form.get("buiid")).trim(); 1155 String feedbackitemid = BhGenerator.getBh(); 1156 String feedbackitemname = StringUtil.null2String(form.get("feedbackitemname")).trim(); 1157 String actionpluginid = StringUtil.null2String(form.get("actionpluginid")).trim(); 1158 int OrderNo = ObjectCtl.getIntRowValue(con, " select max(OrderNo) from T_Job_FeedbackItem "); 1159 OrderNo = OrderNo < 0 ? 0 : OrderNo + 1; 1160 try{ 1161 1162 String addsql = "insert into T_Job_FeedbackItem ( " + 1163 " groupid,buiid,actionpluginid,feedbackitemid,feedbackitemname, " + 1164 " isaudioinput,orderno ) " + 1165 " values (‘"+groupid+"‘,‘"+buiid+"‘,‘"+actionpluginid+"‘,‘"+feedbackitemid+"‘, " + 1166 " ‘"+feedbackitemname+"‘,‘1‘,‘"+OrderNo+"‘)"; 1167 DBHelper.update(con, addsql, null); 1168 1169 form.addResult("msg", "添加成功!"); 1170 }catch (Exception e) { 1171 e.printStackTrace(); 1172 form.addResult("msg", "添加失败!"); 1173 }finally{ 1174 DBConnector.freecon(con); //释放数据库连接 1175 } 1176 return module.findPage("zdAdd"); 1177 } 1178 1179 /** 1180 * 执行删除反馈字段操作 1181 */ 1182 private Page deleteZd(WebForm form, Module module, T_sys_user user){ 1183 1184 Connection con = DBConnector.getconecttion(); //取得一个数据库连接 1185 int result = -1; 1186 try{ 1187 String id = StringUtil.null2String(form.get("id"));//获取页面传过来的需要删除的记录的id 1188 String ids=StringUtil.getStrsplit(id.split(",")); 1189 1190 if(!"".equals(id)){ 1191 String sql = "delete from T_Job_FeedbackItem where feedbackitemid in "+ids+" "; 1192 result=ObjectCtl.executeUpdateBySql(con, sql); 1193 1194 }if(result!=-1){ 1195 form.addResult("result", true); 1196 }else{ 1197 form.addResult("result", false); 1198 } 1199 }catch (Exception e){ 1200 e.printStackTrace(); 1201 } 1202 finally{ 1203 DBConnector.freecon(con); //释放数据库连接 1204 } 1205 return module.findPage("jsonxml"); 1206 } 1207 1208 /** 1209 * 转到反馈字段修改页面 1210 */ 1211 private Page toUpdateZd(WebForm form, Module module, T_sys_user user){ 1212 1213 Connection con = DBConnector.getconecttion(); //取得一个数据库连接 1214 String feedbackitemid = StringUtil.null2String(form.get("feedbackitemid")).trim(); 1215 try{ 1216 String sql = " select groupid,buiid,actionpluginid,feedbackitemid,feedbackitemname,isaudioinput," + 1217 " orderno from T_Job_FeedbackItem where feedbackitemid = ‘"+feedbackitemid+"‘ "; 1218 1219 List<DBean> list=DBHelper.getDBeanList(con, sql, null); 1220 form.addResult("zdObj", list.get(0)); 1221 form.addResult("feedbackitemid", feedbackitemid); 1222 }catch (Exception e) { 1223 e.printStackTrace(); 1224 }finally{ 1225 DBConnector.freecon(con); //释放数据库连接 1226 } 1227 return module.findPage("zdUpdate"); 1228 } 1229 1230 /** 1231 * 执行反馈字段修改操作 1232 */ 1233 private Page updateZd(WebForm form, Module module, T_sys_user user){ 1234 1235 Connection con = DBConnector.getconecttion(); //取得一个数据库连接 1236 String feedbackitemid = StringUtil.null2String(form.get("feedbackitemid")).trim(); 1237 String feedbackitemname = StringUtil.null2String(form.get("feedbackitemname")).trim(); 1238 String actionpluginid = StringUtil.null2String(form.get("actionpluginid")).trim(); 1239 try{ 1240 String sql = "update T_Job_FeedbackItem set " + 1241 " feedbackitemname = ‘"+feedbackitemname+"‘, " + 1242 " actionpluginid = ‘"+actionpluginid+"‘ " + 1243 " where feedbackitemid = ‘"+feedbackitemid+"‘ "; 1244 1245 DBHelper.update(con, sql, null); 1246 form.addResult("msg", "修改成功!"); 1247 1248 }catch (Exception e) { 1249 e.printStackTrace(); 1250 form.addResult("msg", "修改失败!"); 1251 }finally{ 1252 DBConnector.freecon(con); //释放数据库连接 1253 } 1254 return module.findPage("zdUpdate"); 1255 } 1256 1257 /* 1258 * 删除实例插件 1259 */ 1260 private Page deletecj(WebForm form, Module module, T_sys_user user) { 1261 Connection con = DBConnector.getconecttion(); //取得一个数据库连接 1262 String pluginids=StringUtil.null2String(form.get("pluginids")).trim();// 1263 String groupid=StringUtil.null2String(form.get("groupid")).trim(); 1264 String str[] = pluginids.split(","); 1265 int result=0; 1266 for(int i=0;i<str.length;i++){ 1267 result=comUtil.countProc(con, "PRO_PLUGIN_GROUP_DELETE(‘"+str[i]+"‘,‘"+groupid+"‘)"); 1268 } 1269 if(result != -1){ 1270 form.addResult("result", true); 1271 }else { 1272 form.addResult("result", false); 1273 } 1274 1275 return module.findPage("jsonxml"); 1276 } 1277 1278 1279 private Page plugincjbcAdd(WebForm form, Module module, T_sys_user user) { 1280 Connection con = DBConnector.getconecttion(); //取得一个数据库连接 1281 String ids=StringUtil.null2String(form.get("ids")).trim(); 1282 String groupid=StringUtil.null2String(form.get("groupid")).trim(); 1283 String str[] = ids.split(","); 1284 //生成实例插件 1285 try{ 1286 String sql="select adminuserid from t_bs_group where GroupID=‘"+groupid+"‘"; 1287 String adminuserid=DBHelper.getRowStr(con, sql, null); 1288 //String adminuserid = BhGenerator.getBh(); 1289 for(int i=0;i<str.length;i++){ 1290 String IsMutiBui=DBHelper.getRowStr(con, "select IsMutiBui from T_SYS_Plugin where pluginID =‘"+str[i]+"‘", null); 1291 if(!IsMutiBui.equals("1")){ 1292 String plugininstid = BhGenerator.getBh();//实例插件id 1293 comUtil.countProc(con, "pro_plugin_instantiation(‘"+groupid+"‘,‘"+str[i]+"‘,‘‘,‘"+adminuserid+"‘,‘"+plugininstid+"‘)"); 1294 System.out.println("pro_plugin_instantiation(‘"+groupid+"‘,‘"+str[i]+"‘,‘‘,‘"+adminuserid+"‘,‘"+plugininstid+"‘)"); 1295 } 1296 DBHelper.insert(con, "insert into T_SYS_GroupPlugin(GroupID,pluginID) values(‘"+groupid+"‘,‘"+str[i]+"‘)", null); 1297 1298 } 1299 form.addResult("result", true); 1300 } catch (Exception e) { 1301 form.addResult("result", false); 1302 e.printStackTrace(); 1303 } 1304 return module.findPage("jsonxml"); 1305 } 1306 1307 1308 /** 1309 * 添加未有插件 1310 * @param form 1311 * @param module 1312 * @param user 1313 * @return 1314 */ 1315 private Page pluginListJson1(WebForm form, Module module, T_sys_user user) { 1316 Connection con = DBConnector.getconecttion(); //取得一个数据库连接 1317 int start = StringUtil.StringToInt(StringUtil.null2String(form 1318 .get("page")));// 开始位置 1319 int limit = StringUtil.StringToInt(StringUtil.null2String(form 1320 .get("rows")));// 每页数据量 1321 try 1322 { String groupid=StringUtil.null2String(form.get("groupid")).trim(); 1323 String sql=" select plugincode,pluginnamedisplay,decode(PluginType,1,‘标准插件‘,2,‘行业插件‘,3,‘定制插件‘) plugintype,pluginid from T_SYS_Plugin where PluginStatus=‘1‘ and plugincode in("+ 1324 " select plugincode from T_SYS_Plugin where PluginType=‘01‘" 1325 +" Union " 1326 +"select plugincode from T_SYS_Plugin where PluginType=‘03 ‘" 1327 +") and pluginID not in(select pluginID from T_SYS_GroupPlugin where GroupID=‘"+groupid+"‘)"; 1328 String sqlQuery = ObjectCtl.getPageSql(sql, start, limit); 1329 List<Map<String, String>> list = ObjectCtl.getListMapStrStr(con, 1330 sqlQuery, null); 1331 String count = ObjectCtl.getStrRowValue(con, 1332 "select count(0) from ( " + sql + ")"); 1333 HttpServletResponse response = ActionContext.getContext() 1334 .getResponse(); 1335 ObjectCtl.sendListData(response, count, list); 1336 }catch (Exception e) { 1337 e.printStackTrace(); 1338 } 1339 finally 1340 { 1341 DBConnector.freecon(con); //释放数据库连接 1342 } 1343 return module.findPage("jsonxml"); 1344 } 1345 1346 /** 1347 * 许可授权插件 1348 * @param form 1349 * @param module 1350 * @param user 1351 * @return 1352 */ 1353 private Page pluginListJson2(WebForm form, Module module, T_sys_user user) { 1354 Connection con = DBConnector.getconecttion(); //取得一个数据库连接 1355 try 1356 { String groupid=StringUtil.null2String(form.get("groupid")).trim(); //left join 根据插件id groupi的?? 1357 String sql=" select plugincode,pluginnamedisplay,decode(PluginType,1,‘标准插件‘,2,‘行业插件‘,3,‘定制插件‘) plugintype,pluginid,IsMutiBui from T_SYS_Plugin where PluginStatus=‘1‘ and plugincode in("+ 1358 " select plugincode from T_SYS_Plugin where PluginType=‘01‘" 1359 +" Union " 1360 +"select plugincode from T_SYS_Plugin where PluginType=‘03 ‘" 1361 +") and pluginID in(select pluginID from T_SYS_GroupPlugin where GroupID=‘"+groupid+"‘)"; 1362 1363 List<Map<String, String>> list = ObjectCtl.getListMapStrStr(con, 1364 sql, null); 1365 String count = ObjectCtl.getStrRowValue(con, 1366 "select count(0) from ( " + sql + ")"); 1367 HttpServletResponse response = ActionContext.getContext() 1368 .getResponse(); 1369 ObjectCtl.sendListData(response, count, list); 1370 }catch (Exception e) { 1371 e.printStackTrace(); 1372 } 1373 finally 1374 { 1375 DBConnector.freecon(con); //释放数据库连接 1376 } 1377 return module.findPage("jsonxml"); 1378 } 1379 1380 private Page gnsqAdd(WebForm form, Module module, T_sys_user user) { 1381 String groupid=StringUtil.null2String(form.get("groupid")).trim(); 1382 form.addResult("groupid", groupid); 1383 return module.findPage("gnsqAdd"); 1384 } 1385 1386 1387 1388 /** 1389 * 勾选取消插件实例 1390 * @param form 1391 * @param module 1392 * @param user 1393 * @return 1394 */ 1395 private Page delcjsl(WebForm form, Module module, T_sys_user user) { 1396 Connection con = DBConnector.getconecttion(); 1397 String pluginid = StringUtil.null2String(form.get("pluginid")).trim(); 1398 String groupid = StringUtil.null2String(form.get("groupid")).trim(); 1399 1400 ArrayList sqlList=new ArrayList(); 1401 try{ 1402 String roleSql="delete from SXT_SYS_PluginInstRole where PluginInstID in (select PluginInstID from SXT_SYS_PluginInst where PluginID=‘"+pluginid+"‘ and groupid=‘"+groupid+"‘)"; 1403 String menuSql="delete from SXT_SYS_PluginInstMenu where PluginInstID in (select PluginInstID from SXT_SYS_PluginInst where PluginID=‘"+pluginid+"‘ and groupid=‘"+groupid+"‘)"; 1404 String userplugininstSql="delete from SXT_SYS_UserPluginInst where PluginInstID in (select PluginInstID from SXT_SYS_PluginInst where PluginID=‘"+pluginid+"‘ and groupid=‘"+groupid+"‘)"; 1405 String plugininstSql="delete from SXT_SYS_PluginInst where PluginID=‘"+pluginid+"‘ and groupid=‘"+groupid+"‘"; 1406 sqlList.add(roleSql); 1407 sqlList.add(menuSql); 1408 sqlList.add(userplugininstSql); 1409 sqlList.add(plugininstSql); 1410 1411 boolean result=ObjectCtl.executeMulSql(con, sqlList); 1412 if(result){ 1413 form.addResult("result", "true"); 1414 }else{ 1415 form.addResult("result", "false"); 1416 } 1417 } catch (Exception e) { 1418 e.printStackTrace(); 1419 } finally { 1420 DBConnector.freecon(con); 1421 } 1422 return module.findPage("jsonxml"); 1423 } 1424 1425 /** 1426 * 判断是否已经生成过实例插件 1427 * @param form 1428 * @param module 1429 * @param user 1430 * @return 1431 */ 1432 private Page iscjsl(WebForm form, Module module, T_sys_user user) { 1433 Connection con = DBConnector.getconecttion(); 1434 String pluginid = StringUtil.null2String(form.get("pluginid")).trim(); 1435 String groupid = StringUtil.null2String(form.get("groupid")).trim(); 1436 1437 try{ 1438 String sql="select * from SXT_SYS_PluginInst where pluginid=‘"+pluginid+"‘ and groupid=‘"+groupid+"‘"; 1439 int count=DBHelper.getTotalCount(con, sql, null); 1440 if(count>0){ 1441 form.addResult("result", "true"); 1442 }else{ 1443 form.addResult("result", "false"); 1444 } 1445 1446 } catch (Exception e) { 1447 e.printStackTrace(); 1448 } finally { 1449 DBConnector.freecon(con); 1450 } 1451 return module.findPage("jsonxml"); 1452 } 1453 /** 1454 * 插件实例添加页面 1455 * @param form 1456 * @param module 1457 * @param user 1458 * @return 1459 */ 1460 private Page Addcjsl(WebForm form, Module module, T_sys_user user) { 1461 Connection con = DBConnector.getconecttion(); 1462 String pluginid = StringUtil.null2String(form.get("pluginid")).trim(); 1463 String groupid = StringUtil.null2String(form.get("groupid")).trim(); 1464 try{ 1465 StringBuffer sqlBuffer = new StringBuffer(); 1466 sqlBuffer.append(" SELECT plugininstname, plugininsticon, plugininsticonbgcolor "); 1467 sqlBuffer.append(" FROM sxt_sys_plugininst "); 1468 sqlBuffer.append(" WHERE pluginid = ? AND groupid = ? "); 1469 List<DBean> instList = DBHelper.getDBeanList(con, sqlBuffer.toString(), new Object[]{ 1470 pluginid, groupid 1471 }); 1472 form.addResult("instObj", instList.get(0)); 1473 } catch (Exception e) { 1474 e.printStackTrace(); 1475 } finally { 1476 DBConnector.freecon(con); 1477 } 1478 return module.findPage("cjslAdd"); 1479 1480 } 1481 1482 /** 1483 * 插件实例信息保存 1484 * @param form 1485 * @param module 1486 * @param user 1487 * @return 1488 */ 1489 private Page cjslAdd(WebForm form, Module module, T_sys_user user) { 1490 Connection con = DBConnector.getconecttion(); 1491 String PluginIcon = StringUtil.null2String(form.get("PluginIcon")).trim(); 1492 String groupid=StringUtil.null2String(form.get("groupid")).trim(); 1493 String pluginid=StringUtil.null2String(form.get("pluginid")).trim(); 1494 String plugininstname = StringUtil.null2String(form.get("PluginInstName")).trim(); 1495 String plugininsticonbgcolor = StringUtil.null2String(form.get("plugininsticonbgcolor")).trim(); 1496 1497 try { 1498 String PluginInstID=DBHelper.getRowStr(con, "select PluginInstID from sxT_SYS_PluginInst where GroupID=‘"+groupid+"‘ and PluginID=‘"+pluginid+"‘", null); 1499 String sql="update sxT_SYS_PluginInst set PluginInstName=‘" + plugininstname 1500 + "‘ , PluginInstIcon=‘" + PluginIcon + "‘,PluginInstIconBgColor=‘" 1501 + plugininsticonbgcolor + "‘ where PluginInstID=‘" + PluginInstID 1502 + "‘ and GroupID=‘" + groupid + "‘"; 1503 DBHelper.update(con, sql, null); 1504 form.addResult("msg", "保存成功"); 1505 } catch (Exception e) { 1506 form.addResult("msg", "保存失败"); 1507 e.printStackTrace(); 1508 } finally { 1509 DBConnector.freecon(con); 1510 } 1511 return module.findPage("cjslAdd"); 1512 } 1513 1514 //检查管理员帐号是否重复 1515 private Page checkadminloginno(WebForm form, Module module, T_sys_user user) { 1516 Connection con=DBConnector.getconecttion(); 1517 try { 1518 Boolean result=false; 1519 String groupfullname=StringUtil.null2String(form.get("adminloginno")).trim(); 1520 1521 String sql="select LoginNo from T_SYS_LoginNo "; 1522 ArrayList list= ObjectCtl.getMulRowValue2(con,sql); 1523 if(list!=null&&list.size()>0){ 1524 result=true; 1525 } 1526 form.addResult("result", result); 1527 1528 } 1529 catch (Exception e) { 1530 e.printStackTrace(); 1531 }finally{ 1532 DBConnector.freecon(con); 1533 } 1534 return module.findPage("jsonxml"); 1535 } 1536 1537 1538 private Page checkFullname(WebForm form, Module module, T_sys_user user) { 1539 Connection con=DBConnector.getconecttion(); 1540 try { 1541 Boolean result=false; 1542 String groupfullname=StringUtil.null2String(form.get("groupfullname")).trim(); 1543 String oldgroupfullname=StringUtil.null2String(form.get("oldgroupfullname")).trim();// 1544 String newgroupfullname=StringUtil.null2String(form.get("newgroupfullname")).trim();// 1545 String sql="select groupfullname from T_BS_Group where 1=1 "; 1546 if(!groupfullname.equals("")){ 1547 sql +=" and groupfullname=‘"+groupfullname+"‘"; 1548 } 1549 if(!oldgroupfullname.equals("")&&!newgroupfullname.equals("")){//修改 1550 sql +=" and groupfullname=‘"+newgroupfullname+"‘and groupfullname <> ‘"+oldgroupfullname+"‘"; 1551 } 1552 ArrayList list= ObjectCtl.getMulRowValue2(con,sql); 1553 if(list!=null&&list.size()>0){ 1554 result=true; 1555 } 1556 1557 form.addResult("result", result); 1558 1559 } 1560 catch (Exception e) { 1561 e.printStackTrace(); 1562 }finally{ 1563 DBConnector.freecon(con); 1564 } 1565 return module.findPage("jsonxml"); 1566 } 1567 /** 1568 * 检查类别代码是否有重 1569 * @param form 1570 * @param module 1571 * @param user 1572 * @return 1573 */ 1574 private Page checkClassCode(WebForm form, Module module, T_sys_user user) { 1575 Connection con=DBConnector.getconecttion(); 1576 try { 1577 String pluginids=StringUtil.null2String(form.get("pluginids")).trim(); 1578 String ids=StringUtil.getStrsplit(pluginids.split(",")); 1579 Hashtable ht=new Hashtable(); 1580 String plugincodeArr=""; 1581 ArrayList alllist=ObjectCtl.getMulRowValue2(con, "select pluginclasscode,PluginCode,PluginNameDisplay from T_SYS_Plugin where pluginid in "+ids+""); 1582 for (int i = 0; i < alllist.size(); i++) { 1583 ArrayList<String> list1=(ArrayList<String>)alllist.get(i); 1584 String pluginclasscode=list1.get(0); 1585 String plugincode=list1.get(1); 1586 for (int j = i+1; j < alllist.size(); j++) { 1587 ArrayList<String> list2=(ArrayList<String>)alllist.get(j); 1588 if(list2.contains(pluginclasscode)) 1589 { 1590 plugincodeArr+=plugincode+","+list2.get(1)+","; 1591 } 1592 } 1593 1594 } 1595 1596 if(!plugincodeArr.equals("")){ 1597 //数组专为list 1598 List plugincodelist = new ArrayList(Arrays.asList(plugincodeArr.split(","))); 1599 //将List转换为Set去重 1600 Set<String> plugincodeset=new HashSet(plugincodelist); 1601 plugincodeArr=""; 1602 for (String plugincode : plugincodeset) { 1603 plugincodeArr+=plugincode+","; 1604 } 1605 String zfplugincodes=StringUtil.getStrsplit(plugincodeArr.split(",")); 1606 ArrayList list=ObjectCtl.getMulRowValue2(con, "select wm_concat( PluginNameDisplay ) as PluginNameDisplays from T_SYS_Plugin where PluginCode in "+zfplugincodes+" group by PluginClassCode ") ; 1607 ht.put("result", true); 1608 ht.put("list", list); 1609 }else { 1610 ht.put("result", false); 1611 } 1612 form.addResult("result", net.sf.json.JSONObject.fromObject(ht)); 1613 } 1614 catch (Exception e) { 1615 e.printStackTrace(); 1616 }finally{ 1617 DBConnector.freecon(con); 1618 } 1619 return module.findPage("jsonxml"); 1620 } 1621 1622 /** 1623 * 去详情页面 1624 * @param form 1625 * @param module 1626 * @param user 1627 * @return 1628 */ 1629 private Page jtktDetail(WebForm form, Module module, T_sys_user user) { 1630 Connection con=DBConnector.getconecttion(); 1631 try { 1632 String groupid=StringUtil.null2String(form.get("groupid")).trim(); 1633 ArrayList list=(ArrayList) getJtobj(groupid); 1634 if(list!=null&&list.size()>0){ 1635 form.addResult("obj", list.get(0)); 1636 } 1637 String pluginids=ObjectCtl.getStrRowValue(con, " select wm_concat(Pluginid) as Pluginida from T_SYS_GroupPlugin where groupid=‘"+groupid+"‘"); 1638 Hashtable ht = comUtil.getZDHt(con, "0001", user.getGroupid()); 1639 ArrayList hyList = comUtil.getZDList(con, "0001", user.getGroupid()); 1640 form.addResult("hyList", hyList); 1641 form.addResult("ht", ht); 1642 form.addResult("pluginids", pluginids); 1643 } catch (Exception e) { 1644 e.printStackTrace(); 1645 }finally{ 1646 DBConnector.freecon(con); 1647 } 1648 1649 return module.findPage("jtktDetail"); 1650 } 1651 1652 1653 /** 1654 * 修改集团名称方法 1655 * @param form 1656 * @param module 1657 * @param user 1658 * @return 1659 */ 1660 private Page jtktmcUpdate(WebForm form, Module module, T_sys_user user) { 1661 Connection con=DBConnector.getconecttion(); 1662 int result=-1; 1663 try { 1664 String groupid=StringUtil.null2String(form.get("groupid")).trim(); 1665 String groupfullname=StringUtil.null2String(form.get("groupfullname")).trim(); 1666 String groupshortname=StringUtil.null2String(form.get("groupshortname")).trim(); 1667 String industrycode=StringUtil.null2String(form.get("industrycode")).trim(); 1668 1669 String groupfullnamefirstpy=StringUtil.null2String(ConverPinyin2.getHanziJianpin(groupfullname)); //集团全称简拼 1670 String groupfullnameallpy=StringUtil.null2String(ConverPinyin2.getHanzipinyin(groupfullname)); //集团全称全拼 1671 String groupshortnamefirstpy=StringUtil.null2String(ConverPinyin2.getHanziJianpin(groupshortname)); //集团简称简拼 1672 String groupshortnameallpy=StringUtil.null2String(ConverPinyin2.getHanzipinyin(groupshortname)); // 集团简称全拼 1673 1674 String sql=" update T_BS_Group " + 1675 "set groupfullname=‘"+groupfullname+"‘, " + 1676 " groupshortname=‘"+groupshortname+"‘," + 1677 " industrycode=‘"+industrycode+"‘, " + 1678 " groupfullnamefirstpy=‘"+groupfullnamefirstpy+"‘, " + 1679 " groupfullnameallpy=‘"+groupfullnameallpy+"‘, " + 1680 " groupshortnamefirstpy=‘"+groupshortnamefirstpy+"‘, " + 1681 " groupshortnameallpy=‘"+groupshortnameallpy+"‘ " + 1682 " where groupid=‘"+groupid+"‘"; 1683 result=ObjectCtl.executeUpdateBySql(con, sql); 1684 if(result!=-1){ 1685 form.addResult("msg", "修改成功!"); 1686 }else{ 1687 form.addResult("msg", "修改失败!"); 1688 } 1689 1690 } catch (Exception e) { 1691 e.printStackTrace(); 1692 }finally{ 1693 DBConnector.freecon(con); 1694 } 1695 return module.findPage("jtktmcUpdate"); 1696 } 1697 1698 1699 /** 1700 * 修改集团名称页面 1701 * @param form 1702 * @param module 1703 * @param user 1704 * @return 1705 */ 1706 private Page toJtktmcUpdate(WebForm form, Module module, T_sys_user user) { 1707 Connection con=DBConnector.getconecttion(); 1708 1709 try { 1710 String groupid=StringUtil.null2String(form.get("groupid")).trim(); 1711 ArrayList list=(ArrayList) getJtobj(groupid); 1712 ArrayList hyList = comUtil.getZDList(con, "0001", user.getGroupid()); 1713 form.addResult("hyList", hyList); 1714 if(list!=null&&list.size()>0){ 1715 form.addResult("obj", list.get(0)); 1716 } 1717 1718 } catch (Exception e) { 1719 e.printStackTrace(); 1720 }finally{ 1721 DBConnector.freecon(con); 1722 } 1723 return module.findPage("jtktmcUpdate"); 1724 } 1725 1726 /** 1727 * 获取集团对象 1728 * @param groupid 1729 * @return 1730 */ 1731 private List getJtobj(String groupid) { 1732 Connection con=DBConnector.getconecttion(); 1733 ArrayList list=new ArrayList(); 1734 try { 1735 String sql=" select groupid,groupfullname,groupshortname,effectdate,failuredate,licenseusercount,licensemobileusercount ,licensestatus,industrycode from T_BS_Group where groupid=‘"+groupid+"‘"; 1736 list=ObjectCtl.getMulRowValue2(con, sql); 1737 } catch (Exception e) { 1738 e.printStackTrace(); 1739 }finally{ 1740 DBConnector.freecon(con); 1741 } 1742 1743 return list; 1744 } 1745 1746 /** 1747 * 集团注销 1748 * @param form 1749 * @param module 1750 * @param user 1751 * @return 1752 */ 1753 private Page jtktDelete(WebForm form, Module module, T_sys_user user) { 1754 Connection con=DBConnector.getconecttion(); 1755 int result=-1; 1756 try { 1757 String groupid=StringUtil.null2String(form.get("groupid")).trim(); 1758 String sql=" update T_BS_Group set LicenseStatus=99 where groupid=‘"+groupid+"‘"; 1759 result=ObjectCtl.executeUpdateBySql(con, sql); 1760 if(result!=-1){ 1761 form.addResult("result", true); 1762 }else { 1763 form.addResult("result", false); 1764 } 1765 1766 } catch (Exception e) { 1767 e.printStackTrace(); 1768 }finally{ 1769 DBConnector.freecon(con); 1770 } 1771 return module.findPage("jsonxml"); 1772 } 1773 1774 1775 1776 /** 1777 * 许可授权 1778 * @param form 1779 * @param module 1780 * @param user 1781 * @return 1782 */ 1783 private Page jtktUpdate(WebForm form, Module module, T_sys_user user) { 1784 Connection con = DBConnector.getconecttion(); //取得一个数据库连接 1785 boolean result = false; 1786 try 1787 { ArrayList<String> sqlList= new ArrayList<String>(); 1788 String groupid = StringUtil.null2String(form.get("groupid")).trim(); 1789 String licensestatus=StringUtil.null2String(form.get("licensestatus")).trim(); 1790 String effectdate=StringUtil.null2String(form.get("effectdate")).trim(); 1791 String failuredate=StringUtil.null2String(form.get("failuredate")).trim(); 1792 String licenseusercount=StringUtil.null2String(form.get("licenseusercount")).trim(); 1793 String licensemobileusercount=StringUtil.null2String(form.get("licensemobileusercount")).trim(); 1794 // String checkids=StringUtil.null2String(form.get("checkids")).trim(); 1795 String industrycode=StringUtil.null2String(form.get("industrycode")).trim(); 1796 // String[] pluginids=checkids.split(","); 1797 1798 /* if(pluginids!=null&&pluginids.length>0){ 1799 String delsql=" delete from T_SYS_GroupPlugin where groupid =‘"+groupid+"‘";//删除 1800 sqlList.add(delsql); 1801 //取系统行业插件 1802 ArrayList XTHyPlugini=ObjectCtl.getMulRowValue2(con, "select pluginid from T_SYS_Plugin where plugincode like ‘XT%999%99999999‘ and PluginType = ‘02‘ and IndustryCode =‘"+industrycode+"‘"); 1803 1804 if(XTHyPlugini.size()>0){//插入系统插件 1805 1806 for (int i = 0; i < XTHyPlugini.size(); i++) { 1807 String insql="insert into T_SYS_GroupPlugin (groupid,pluginid)" + 1808 " values (‘"+groupid+"‘,‘"+XTHyPlugini.get(i)+"‘ )"; 1809 sqlList.add(insql); 1810 } 1811 }else{//取系统标准插件 1812 ArrayList XTBzPluginid=ObjectCtl.getMulRowValue2(con, "select pluginid from T_SYS_Plugin where plugincode like ‘XT%999%99999999‘ and PluginType = ‘01‘"); 1813 1814 if(XTBzPluginid.size()>0){ 1815 for (int i = 0; i < XTBzPluginid.size(); i++) { 1816 String insql="insert into T_SYS_GroupPlugin (groupid,pluginid)" + 1817 " values (‘"+groupid+"‘,‘"+XTBzPluginid.get(i)+"‘ )"; 1818 sqlList.add(insql); 1819 } 1820 } 1821 } 1822 1823 1824 1825 ArrayList<String> pluginidlist=new ArrayList<String>(Arrays.asList(pluginids)); 1826 for (int i = 0; i < pluginidlist.size(); i++) { 1827 String insql="insert into T_SYS_GroupPlugin (groupid,pluginid)" + 1828 " values (‘"+groupid+"‘,‘"+pluginidlist.get(i)+"‘ )"; 1829 sqlList.add(insql); 1830 1831 } 1832 1833 } 1834 */ 1835 String mainsql=" update T_BS_Group set " + 1836 "effectdate=‘"+effectdate+"‘," + 1837 "failuredate=‘"+failuredate+"‘," + 1838 "licenseusercount=‘"+licenseusercount+"‘," + 1839 "licensemobileusercount=‘"+licensemobileusercount+"‘," + 1840 "industrycode=‘"+industrycode+"‘," + 1841 " licensestatus=‘"+licensestatus+"‘" + 1842 " where groupid=‘"+groupid+"‘"; 1843 1844 sqlList.add(mainsql); 1845 1846 result =ObjectCtl.executeMulSql(con, sqlList); 1847 1848 //最后插件结果去重复 1849 /* String distinctSql="delete from T_SYS_GroupPlugin " 1850 + "where rowid not in " 1851 + "(select min(rowid) from T_SYS_GroupPlugin " 1852 + "where groupid=‘"+groupid+"‘ group by PLUGINID) and groupid = ‘"+groupid+"‘"; 1853 DBHelper.update(con, distinctSql, null);*/ 1854 1855 if (result) 1856 { 1857 form.addResult("msg", "保存成功!"); 1858 delFile(Globals.APP_BASE_DIR+"WEB-INF\\temp\\" + groupid + ".zip" ); 1859 } 1860 else 1861 { 1862 form.addResult("msg", "保存失败!"); 1863 } 1864 }catch(Exception e){ 1865 e.printStackTrace(); 1866 } 1867 finally 1868 { 1869 DBConnector.freecon(con); //释放数据库连接 1870 } 1871 return module.findPage("jtktUpdate"); 1872 } 1873 1874 1875 1876 1877 /** 1878 * 许可授权页面 1879 * @param form 1880 * @param module 1881 * @param user 1882 * @return 1883 */ 1884 private Page toJtktUpdate(WebForm form, Module module, T_sys_user user) { 1885 Connection con=DBConnector.getconecttion(); 1886 try { 1887 String groupid=StringUtil.null2String(form.get("groupid")).trim(); 1888 1889 ArrayList list=(ArrayList) getJtobj(groupid); 1890 if(list!=null&&list.size()>0){ 1891 form.addResult("obj", list.get(0)); 1892 } 1893 String pluginids=ObjectCtl.getStrRowValue(con, " select wm_concat(Pluginid) as Pluginida from T_SYS_GroupPlugin where groupid=‘"+groupid+"‘"); 1894 Hashtable ht = comUtil.getZDHt(con, "0001", user.getGroupid()); 1895 ArrayList hyList = comUtil.getZDList(con, "0001", user.getGroupid()); 1896 form.addResult("hyList", hyList); 1897 form.addResult("ht", ht); 1898 form.addResult("groupid", groupid); 1899 form.addResult("pluginids", pluginids); 1900 1901 List list1=DBHelper.getDBeanList(con,"select ADMINLOGINNO,ADMINUSERID from t_bs_group where groupid =‘"+groupid+"‘",null); 1902 form.addResult("list1", list1.get(0)); 1903 } catch (Exception e) { 1904 e.printStackTrace(); 1905 }finally{ 1906 1907 DBConnector.freecon(con); 1908 } 1909 1910 return module.findPage("jtktUpdate"); 1911 } 1912 1913 1914 1915 private void delFile(String path) { 1916 try { 1917 File f = new File(path); // 输入要删除的文件位置 1918 if(f.exists()) 1919 f.delete(); 1920 } catch (Exception e) { 1921 e.printStackTrace(); 1922 } 1923 1924 1925 1926 } 1927 1928 /** 1929 * 插件列表 1930 * @param form 1931 * @param module 1932 * @param user 1933 * @return 1934 */ 1935 private Page pluginListJson(WebForm form, Module module, T_sys_user user) { 1936 Connection con = DBConnector.getconecttion(); //取得一个数据库连接 1937 try 1938 { String groupid=StringUtil.null2String(form.get("groupid")).trim(); 1939 String sshy=StringUtil.null2String(form.get("sshy")).trim(); 1940 String cshsshy=StringUtil.null2String(form.get("cshsshy")).trim();//初始化所属行业 1941 String biaoshi=StringUtil.null2String(form.get("biaoshi")).trim(); 1942 String pluginids=StringUtil.null2String(form.get("pluginids")).trim(); 1943 1944 String sql=" select pluginid,plugincode,pluginnamedisplay,plugintype,industrycode,groupid,groupfullname,pluginclasscode,ismutibui from (select a.pluginid ,a.plugincode,a.plugintype,a.pluginnamedisplay,a.industrycode ,a.groupid,a.pluginclasscode,a.ismutibui, b.GroupFullName from t_sys_plugin a left outer join T_BS_Group b on a.groupid=b.groupid where 1=1 and a.pluginstatus=1 ) " + 1945 " where plugincode in ( " + 1946 "select plugincode from " + 1947 "(select plugincode from T_SYS_Plugin where PluginType=‘01‘ Union " + //取所有标准插件 1948 "select plugincode from T_SYS_Plugin where PluginType=‘02‘ "; 1949 if(!sshy.equals("")&&!sshy.equals("999")){//所属行业 1950 sql+= " and industrycode =‘"+sshy+"‘"; 1951 1952 } 1953 if(sshy.equals("")&&!cshsshy.equals("")&&!cshsshy.equals("999")){ 1954 sql+= "and industrycode =‘"+cshsshy+"‘"; 1955 } 1956 1957 sql +="Union " + //取所有行业插件 1958 " select plugincode from T_SYS_Plugin where PluginType=‘03‘ and groupid=‘"+groupid+"‘ " ; 1959 1960 1961 if(!pluginids.equals("")&&biaoshi.equals("xq")){ 1962 //sql +=" )) and plugincode not like ‘XT_%‘ and plugincode not like ‘BS_%‘ and pluginid in "+StringUtil.null2String(StringUtil.getStrsplit(pluginids.split(",")))+"" ; // 过滤系统插件和运营插件 1963 sql +=" )) and plugincode not like ‘BS_%‘ and pluginid in "+StringUtil.null2String(StringUtil.getStrsplit(pluginids.split(",")))+"" ; // 过滤系统插件和运营插件 1964 }else if(pluginids.equals("")&&biaoshi.equals("xq")) { 1965 1966 //sql +=" )) and plugincode not like ‘XT_%‘ and plugincode not like ‘BS_%‘ and 1=2 "; 1967 sql +=" )) and plugincode not like ‘BS_%‘ and 1=2 "; 1968 1969 }else if("".equals(biaoshi)) { 1970 1971 sql +=" )) and plugincode not like ‘XT_%‘ and plugincode not like ‘BS_%‘"; 1972 //sql +=" )) and plugincode not like ‘BS_%‘ and 1=2 "; 1973 1974 } 1975 else { 1976 //sql +=" )) and plugincode not like ‘XT_%‘ and plugincode not like ‘BS_%‘ "; 1977 sql +=" )) and plugincode not like ‘BS_%‘ "; 1978 } 1979 1980 1981 1982 String limitSql=""; 1983 String orderSql=" "; 1984 int limit = StringUtil.StringToInt(StringUtil.null2String(form.get("rows")));//每页数据量 1985 int start = StringUtil.StringToInt(StringUtil.null2String(form.get("page")));//开始位置 1986 String sort = StringUtil.null2String(form.get("sort"));//排序字段 1987 String dir = StringUtil.null2String(form.get("order"));//DESC 1988 1989 if(!sort.equals("")){ 1990 orderSql +=" order by "+sort+" "+dir+""; 1991 } 1992 String sqlQuery = ObjectCtl.getPageSql(sql + limitSql + orderSql, start, limit); 1993 List<Map<String, String>> list = ObjectCtl.getListMapStrStr(con,sql + limitSql + orderSql,null); 1994 Hashtable<String, Object> sshyht=comUtil.getZDHt(con, "0001", user.getGroupid()); 1995 for(int i=0;i<list.size();i++){ 1996 Map<String, String> map=list.get(i); 1997 map.put("plugintype", StringUtil.null2String(CjglMemo.cjlxMap.get(StringUtil.null2String(map.get("plugintype"))))); 1998 map.put("industrycode", StringUtil.null2String(sshyht.get(StringUtil.null2String(map.get("industrycode"))))); 1999 } 2000 2001 2002 String count = ObjectCtl.getStrRowValue(con, "select count(0) from ( "+sql + limitSql + orderSql+")" ); 2003 HttpServletResponse response = ActionContext.getContext().getResponse(); 2004 ObjectCtl.sendListData(response, count, list); 2005 2006 }catch (Exception e) { 2007 e.printStackTrace(); 2008 } 2009 finally 2010 { 2011 DBConnector.freecon(con); //释放数据库连接 2012 } 2013 return module.findPage("jsonxml"); 2014 } 2015 2016 2017 /** 2018 * 初始化添加页面 2019 * @param form 2020 * @param module 2021 * @param user 2022 * @return 2023 */ 2024 private Page toJtktAdd(WebForm form, Module module, T_sys_user user) { 2025 Connection con=DBConnector.getconecttion(); 2026 try { 2027 form.addResult("today", DateUtil.getToday()); 2028 ArrayList hyList = comUtil.getZDList(con, "0001", user.getGroupid()); 2029 String sql=" select pluginid ,pluginname ,pluginstatus from t_sys_plugin where 1=1"; 2030 ArrayList pluglist=ObjectCtl.getMulRowValue2(con, sql); 2031 form.addResult("pluglist", pluglist); 2032 form.addResult("hyList", hyList); 2033 String mainpluginid=ObjectCtl.getStrRowValue(con, "select pluginid from T_SYS_Plugin where plugincode =‘XT-001-999-99999999‘"); 2034 String adminpluginid=ObjectCtl.getStrRowValue(con, "select pluginid from T_SYS_Plugin where plugincode =‘XT-002-999-99999999‘"); 2035 String pluginids=mainpluginid+","+adminpluginid; 2036 form.addResult("pluginids", pluginids); 2037 } catch (Exception e) { 2038 e.printStackTrace(); 2039 }finally{ 2040 DBConnector.freecon(con); 2041 } 2042 2043 return module.findPage("jtktAdd"); 2044 } 2045 /** 2046 * easyUI列表 2047 * @param form 2048 * @param module 2049 * @param user 2050 * @return 2051 */ 2052 private Page jtktListJson(WebForm form, Module module, T_sys_user user) { 2053 Connection con = DBConnector.getconecttion(); //取得一个数据库连接 2054 try 2055 { 2056 String groupname=StringUtil.null2String(form.get("groupname")).trim(); 2057 String industrycode=StringUtil.null2String(form.get("industrycode")).trim(); 2058 String licensestatus=StringUtil.null2String(form.get("licensestatus")).trim(); 2059 String sql="select t.groupid, t.groupfullname,t.groupshortname, t.licensestatus,t.effectdate,t.failuredate, t.licenseusercount, t.licensemobileusercount from T_BS_Group t " + 2060 " where 1=1 and t.groupfullname is not null and t.groupid<>‘00000000‘ "; 2061 String limitSql=""; 2062 String orderSql=" "; 2063 if(!groupname.equals("")){ 2064 limitSql+=" and t.groupfullname like ‘%"+groupname+"%‘"; 2065 } 2066 if(!industrycode.equals("")){ 2067 limitSql+=" and t.industrycode = ‘"+industrycode+"‘"; 2068 } 2069 if(!licensestatus.equals("")){ 2070 limitSql+=" and t.licensestatus = ‘"+licensestatus+"‘"; 2071 } 2072 2073 int limit = StringUtil.StringToInt(StringUtil.null2String(form.get("rows")));//每页数据量 2074 int start = StringUtil.StringToInt(StringUtil.null2String(form.get("page")));//开始位置 2075 String sort = StringUtil.null2String(form.get("sort"));//排序字段 2076 String dir = StringUtil.null2String(form.get("order"));//DESC 2077 2078 if(!sort.equals("")){ 2079 orderSql +=" order by "+sort+" "+dir+""; 2080 }else{ 2081 orderSql +=" order by licensestatus asc "; 2082 } 2083 2084 String sqlQuery = ObjectCtl.getPageSql(sql + limitSql + orderSql, start, limit); 2085 List<Map<String, String>> list = ObjectCtl.getListMapStrStr(con,sqlQuery,null); 2086 2087 String count = ObjectCtl.getStrRowValue(con, "select count(0) from ( "+sql + limitSql + orderSql+")" ); 2088 HttpServletResponse response = ActionContext.getContext().getResponse(); 2089 ObjectCtl.sendListData(response, count, list); 2090 2091 }catch (Exception e) { 2092 e.printStackTrace(); 2093 } 2094 finally 2095 { 2096 DBConnector.freecon(con); //释放数据库连接 2097 } 2098 return module.findPage("jsonxml"); 2099 } 2100 2101 2102 /** 2103 * 执行新增数据 2104 */ 2105 private Page jtktAdd(WebForm form, Module module, T_sys_user user) 2106 { 2107 2108 Connection con = DBConnector.getconecttion(); //取得一个数据库连接 2109 boolean result = false; 2110 try 2111 2112 { 2113 String groupid = ObjectCtl.getSubMenuIdZD(con, "T_BS_Group", "groupid", "", 8); 2114 String groupfullname=StringUtil.null2String(form.get("groupfullname")).trim(); 2115 String groupshortname=StringUtil.null2String(form.get("groupshortname")).trim(); 2116 String licensestatus=StringUtil.null2String(form.get("licensestatus")).trim(); 2117 String effectdate=StringUtil.null2String(form.get("effectdate")).trim(); 2118 String failuredate=StringUtil.null2String(form.get("failuredate")).trim(); 2119 String licenseusercount=StringUtil.null2String(form.get("licenseusercount")).trim(); 2120 String licensemobileusercount=StringUtil.null2String(form.get("licensemobileusercount")).trim(); 2121 String industrycode=StringUtil.null2String(form.get("industrycode")).trim(); 2122 String adminloginno=StringUtil.null2String(form.get("adminloginno")).trim();//管理员帐号 2123 2124 String groupfullnamefirstpy=StringUtil.null2String(ConverPinyin2.getHanziJianpin(groupfullname)); //集团全称简拼 2125 String groupfullnameallpy=StringUtil.null2String(ConverPinyin2.getHanzipinyin(groupfullname)); //集团全称全拼 2126 String groupshortnamefirstpy=StringUtil.null2String(ConverPinyin2.getHanziJianpin(groupshortname)); //集团简称简拼 2127 String groupshortnameallpy=StringUtil.null2String(ConverPinyin2.getHanzipinyin(groupshortname)); // 集团简称全拼 2128 if(licenseusercount.equals("")){ 2129 licenseusercount="-1"; 2130 } 2131 if(licensemobileusercount.equals("")){ 2132 licensemobileusercount="-1"; 2133 } 2134 String checkids=StringUtil.null2String(form.get("checkids")).trim(); 2135 String[] pluginids=checkids.split(","); 2136 ArrayList<String> sqlList=new ArrayList<String>(); 2137 //插入集团与插件关联(T_SYS_GroupPlugin) 2138 if(pluginids!=null&&pluginids.length>=0){ 2139 //PluginType 01-标准插件 02-行业插件 03-定制插件 2140 //取系统行业插件 2141 ArrayList XTHyPlugini=ObjectCtl.getMulRowValue2(con, "select pluginid from T_SYS_Plugin where plugincode like ‘XT%999%99999999‘ and PluginType = ‘02‘ and IndustryCode =‘"+industrycode+"‘"); 2142 2143 if(XTHyPlugini.size()>0){//插入系统插件 2144 2145 for (int i = 0; i < XTHyPlugini.size(); i++) { 2146 String insql="insert into T_SYS_GroupPlugin (groupid,pluginid)" + 2147 " values (‘"+groupid+"‘,‘"+XTHyPlugini.get(i)+"‘ )"; 2148 sqlList.add(insql); 2149 } 2150 }else{//取系统标准插件 2151 ArrayList XTBzPluginid=ObjectCtl.getMulRowValue2(con, "select pluginid from T_SYS_Plugin where plugincode like ‘XT%999%99999999‘ and PluginType = ‘01‘"); 2152 2153 if(XTBzPluginid.size()>0){ 2154 for (int i = 0; i < XTBzPluginid.size(); i++) { 2155 String insql="insert into T_SYS_GroupPlugin (groupid,pluginid)" + 2156 " values (‘"+groupid+"‘,‘"+XTBzPluginid.get(i)+"‘ )"; 2157 sqlList.add(insql); 2158 } 2159 } 2160 2161 } 2162 2163 ArrayList<String> pluginidlist=new ArrayList<String>(Arrays.asList(pluginids)); 2164 for (int i = 0; i < pluginidlist.size(); i++) { 2165 String insql="insert into T_SYS_GroupPlugin (groupid,pluginid)" + 2166 " values (‘"+groupid+"‘,‘"+pluginidlist.get(i)+"‘ )"; 2167 sqlList.add(insql); 2168 2169 } 2170 2171 } 2172 String adminuserid = BhGenerator.getBh(); 2173 String mainsql=" insert into T_BS_Group " + 2174 "( GroupID,GroupFullName,GroupShortName,LicenseStatus,EffectDate,FailureDate," + 2175 "LicenseUserCount,LicenseMobileUserCount,industrycode," + 2176 "groupfullnamefirstpy,groupfullnameallpy,groupshortnamefirstpy,groupshortnameallpy,ADMINLOGINNO,ADMINUSERID)" + 2177 " values "+ 2178 "(‘"+groupid+"‘,‘"+groupfullname+"‘,‘"+groupshortname+"‘,‘"+licensestatus+"‘,‘"+effectdate+"‘,‘"+failuredate+"‘,‘" + 2179 ""+licenseusercount+"‘,‘"+licensemobileusercount+"‘,‘"+industrycode+"‘," + 2180 "‘"+groupfullnamefirstpy+"‘,‘"+groupfullnameallpy+"‘,‘"+groupshortnamefirstpy+"‘,‘"+groupshortnameallpy+"‘,‘"+adminloginno+"‘,‘"+adminuserid+"‘)"; 2181 2182 sqlList.add(mainsql); 2183 result=ObjectCtl.executeMulSql(con, sqlList); 2184 if (result) 2185 { 2186 form.addResult("msg", "开户成功!"); 2187 2188 comUtil.countProc(con, "PRO_INIT_SYSDATA(‘"+groupid+"‘,‘"+adminloginno+"‘,‘"+adminuserid+"‘)"); 2189 //生成实例插件 2190 String sql1="select pluginID from T_SYS_GroupPlugin where GroupID="+groupid; 2191 List<DBean> list=DBHelper.getDBeanList(con, sql1, null); 2192 for(int i=0;i<list.size();i++){ 2193 String IsMutiBui=DBHelper.getRowStr(con, "select IsMutiBui from T_SYS_Plugin where pluginID =‘"+list.get(i).getString("pluginid")+"‘", null); 2194 2195 if(!IsMutiBui.equals("1")){ 2196 String plugininstid = BhGenerator.getBh();//实例插件id 2197 comUtil.countProc(con, "pro_plugin_instantiation(‘"+groupid+"‘,‘"+list.get(i).getString("pluginid")+"‘,‘‘,‘"+adminuserid+"‘,‘"+plugininstid+"‘)"); 2198 } 2199 } 2200 } 2201 else 2202 { 2203 form.addResult("msg", "开户失败!"); 2204 } 2205 } catch (Exception e) { 2206 e.printStackTrace(); 2207 } 2208 finally 2209 { 2210 DBConnector.freecon(con); //释放数据库连接 2211 } 2212 return module.findPage("jtktAdd"); 2213 } 2214 /** 2215 2216 2217 /** 2218 * 列表页面 2219 */ 2220 private Page jtktList(WebForm form, Module module, T_sys_user user) 2221 { 2222 Connection con=DBConnector.getconecttion();//取得一个数据库连接 2223 try 2224 { 2225 2226 ArrayList hyList = comUtil.getZDList(con, "0001", user.getGroupid()); 2227 form.addResult("hyList", hyList); 2228 } 2229 catch (Exception e) { 2230 e.printStackTrace(); 2231 } 2232 finally 2233 { 2234 DBConnector.freecon(con); //释放数据库连接 2235 } 2236 return module.findPage("jtktList"); 2237 } 2238 2239 2240 }
主页面包含3个tab页面
1 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> 2 <html xmlns="http://www.w3.org/1999/xhtml"> 3 <head> 4 <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /> 5 <title>$!globals_sys_name</title> 6 <!-- EasyUi --> 7 <link rel="stylesheet" type="text/css" href="/$!globals_sys_basename/web/common/component/easyui/themes/$!easyui_css_path/easyui.css"></link> 8 <link rel="stylesheet" type="text/css" href="/$!globals_sys_basename/web/common/component/easyui/themes/icon.css"></link> 9 <link rel="stylesheet" type="text/css" href="/$!globals_sys_basename/web/common/component/easyui/themes/demo.css"></link> 10 <link rel="stylesheet" type="text/css" href="/$!globals_sys_basename/web/common/component/easyui/themes/icon-all.css"></link> 11 <link rel="stylesheet" type="text/css" href="/$!globals_sys_basename/web/common/component/easyui/themes/$!easyui_css_path/easyui.sx.css"></link> 12 <!-- EasyUi --> 13 14 15 <!-- 框架 --> 16 <link rel="stylesheet" type="text/css" href="/$!globals_sys_basename/web/common/css/$!css_path/main.css"></link> 17 <script language=javascript src="/$!globals_sys_basename/web/common/component/easyui/jquery-1.11.1.js"></script> 18 <script language=javascript src="/$!globals_sys_basename/web/common/js/framepage.js"></script> 19 <!--easyui--> 20 <script type="text/javascript" src="/$!globals_sys_basename/web/common/component/easyui/jquery.easyui.util.js"></script> 21 <script type="text/javascript" src="/$!globals_sys_basename/web/common/component/easyui/jquery.easyui.min.js"></script> 22 <script type="text/javascript" src="/$!globals_sys_basename/web/common/component/easyui/easyui-lang-zh_CN.js"></script> 23 <!-- 扩充 jquery 框架基础功能的函数库 --> 24 <script language=javascript src="/$!globals_sys_basename/web/common/component/easyui/jquery.jdirk.js"></script> 25 <script language=javascript src="/$!globals_sys_basename/web/common/component/easyui/jeasyui-extensions/jeasyui.extensions.js"></script> 26 <script language=javascript src="/$!globals_sys_basename/web/common/component/easyui/jeasyui-extensions/jeasyui.extensions.tabs.js"></script> 27 <script language=javascript src="/$!globals_sys_basename/web/common/component/easyui/jeasyui-extensions/jeasyui.extensions.tree.js"></script> 28 <script language=javascript src="/$!globals_sys_basename/web/common/component/easyui/jeasyui-extensions/jeasyui.extensions.form.js"></script> 29 <script language=javascript src="/$!globals_sys_basename/web/common/component/easyui/jeasyui-extensions/jeasyui.extensions.panel.js"></script> 30 <script language=javascript src="/$!globals_sys_basename/web/common/component/easyui/jeasyui-extensions/jeasyui.extensions.window.js"></script> 31 <script language=javascript src="/$!globals_sys_basename/web/common/component/easyui/jeasyui-extensions/jeasyui.extensions.dialog.js"></script> 32 <!--easyui--> 33 <script language=‘javascript‘ src=‘/$!globals_sys_basename/web/common/component/Date/WdatePicker.js‘></script> 34 <script language=‘javascript‘ src=‘/$!globals_sys_basename/web/common/component/zdialog/zDialog.js‘></script> 35 <script language=‘javascript‘ src=‘/$!globals_sys_basename/web/common/component/zdialog/zDialog.sunshion.js‘></script> 36 <script type="text/javascript" src="/$!globals_sys_basename/web/common/js/ajax.sunshion.js"></script> 37 <script type="text/javascript" src="/$!globals_sys_basename/web/common/js/xml.sunshion.js"></script> 38 <style> 39 .panel-body{border: 0px solid #DFDFDF !important;} 40 #leftDiv{border: 1px solid #DFDFDF !important;border-top: 0px !important;} 41 .ok{ color:green;} 42 .error{ color:red;} 43 </style> 44 45 <script type="text/javascript"> 46 #if ($msg) 47 top.Dialog.alert("$!msg",function(){ 48 top.Dialog.close(); 49 top.ppag.dosearch(); 50 }); 51 #end 52 </script> 53 <head> 54 55 <body> 56 <input type="hidden" name="adminlogin" id="adminlogin" value="$!adminlogin" /> 57 <input type="hidden" name="groupid" id="groupid" value="$!groupid" /> 58 <input type="hidden" name="pluginid" id="pluginid" value="$!pluginid" /> 59 <div> 60 <div class="topwhitefix" style="position:relative;"> 61 <div class="tab_center"> 62 <div class="tab_left"> 63 <div class="tab_right"> 64 <div class="tab_title"> 65 <ul id="tabUl"> 66 <li> 67 <a href="javascript:void(0);" id="tab_title_0" onclick="tabselect(this, 3);searchByCjlb(‘01‘);" class="on" >基本信息 68 </a> 69 </li> 70 <li><a href="javascript:void(0);" id="tab_title_1" onclick="tabselect(this, 3);searchByCjlb(‘02‘);" >插件实例菜单</a></li> 71 <li><a href="javascript:void(0);" id="tab_title_2" onclick="tabselect(this, 3);searchByCjlb(‘03‘);" >插件实例角色</a></li> 72 </ul> 73 </div> 74 </div> 75 </div> 76 </div> 77 </div> 78 79 <div id="tab_content_0" style=""> 80 81 <iframe id="ifrm" src="" style="border: 0px;width: 100%;background-color:transparent;" allowTransparency="true" scrolling="auto" frameborder="0"></iframe> 82 83 </div> 84 </div> 85 86 </body> 87 </html> 88 89 <script type="text/javascript"> 90 91 $(document).ready(function(){ 92 searchByCjlb("01"); 93 94 var otherH = $(".topwhitefix").outerHeight(); 95 $("#ifrm").height(document.documentElement.clientHeight-otherH) 96 //$("#gncj").height(document.documentElement.clientHeight-otherH) 97 //$("#zd").height(document.documentElement.clientHeight-otherH) 98 window.onresize= function(){ 99 customHeightSet(); 100 } 101 window.onload = function(){ 102 customHeightSet(); 103 } 104 105 }) 106 107 108 function searchByCjlb(NoticeType){ 109 var plugid = $("#pluginid").val(); 110 var groid = $("#groupid").val(); 111 var adlog = $("#adminlogin").val(); 112 if(NoticeType==1){ 113 $(‘#ifrm‘).attr("src", ‘/xszs/web/plugins/bs/yygl/dz/g00000000/jtkt.xp?doAction=Addcjsl&pluginid=‘+plugid+ ‘&groupid=‘ +groid+‘&adminlogin=‘ +adlog); 114 }else if(NoticeType==2){ 115 $(‘#ifrm‘).attr(‘src‘, ‘/xszs/web/plugins/bs/yygl/dz/g00000000/jtkt.xp?doAction=plugList&pluginid=‘+plugid +‘&groupid=‘ +groid+‘&adminlogin=‘ +adlog); 116 117 }else if(NoticeType==3){ 118 $(‘#ifrm‘).attr(‘src‘, ‘/xszs/web/plugins/bs/yygl/dz/g00000000/jtkt.xp?doAction=cjjsList&pluginid=‘+plugid +‘&groupid=‘ +groid+‘&adminlogin=‘ +adlog); 119 } 120 121 } 122 123 </script>
第一个tab页面
1 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> 2 <html xmlns="http://www.w3.org/1999/xhtml"> 3 <head> 4 <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /> 5 <title>$!globals_sys_name</title> 6 <!-- EasyUi --> 7 <link rel="stylesheet" type="text/css" href="/$!globals_sys_basename/web/common/component/easyui/themes/$!easyui_css_path/easyui.css"></link> 8 <link rel="stylesheet" type="text/css" href="/$!globals_sys_basename/web/common/component/easyui/themes/icon.css"></link> 9 <link rel="stylesheet" type="text/css" href="/$!globals_sys_basename/web/common/component/easyui/themes/demo.css"></link> 10 <link rel="stylesheet" type="text/css" href="/$!globals_sys_basename/web/common/component/easyui/themes/icon-all.css"></link> 11 <link rel="stylesheet" type="text/css" href="/$!globals_sys_basename/web/common/component/easyui/themes/$!easyui_css_path/easyui.sx.css"></link> 12 <!-- EasyUi --> 13 14 <!-- 框架 --> 15 <link rel="stylesheet" type="text/css" href="/$!globals_sys_basename/web/common/css/$!css_path/main.css"></link> 16 <script language=javascript src="/$!globals_sys_basename/web/common/component/easyui/jquery-1.11.1.js"></script> 17 <!--easyui--> 18 <script type="text/javascript" src="/$!globals_sys_basename/web/common/component/easyui/jquery.easyui.util.js"></script> 19 <script type="text/javascript" src="/$!globals_sys_basename/web/common/component/easyui/jquery.easyui.min.js"></script> 20 <script type="text/javascript" src="/$!globals_sys_basename/web/common/component/easyui/easyui-lang-zh_CN.js"></script> 21 <!-- 扩充 jquery 框架基础功能的函数库 --> 22 <script language=javascript src="/$!globals_sys_basename/web/common/component/easyui/jquery.jdirk.js"></script> 23 <script language=javascript src="/$!globals_sys_basename/web/common/component/easyui/jeasyui-extensions/jeasyui.extensions.js"></script> 24 <script language=javascript src="/$!globals_sys_basename/web/common/component/easyui/jeasyui-extensions/jeasyui.extensions.tabs.js"></script> 25 <script language=javascript src="/$!globals_sys_basename/web/common/component/easyui/jeasyui-extensions/jeasyui.extensions.tree.js"></script> 26 <script language=javascript src="/$!globals_sys_basename/web/common/component/easyui/jeasyui-extensions/jeasyui.extensions.form.js"></script> 27 <script language=javascript src="/$!globals_sys_basename/web/common/component/easyui/jeasyui-extensions/jeasyui.extensions.panel.js"></script> 28 <script language=javascript src="/$!globals_sys_basename/web/common/component/easyui/jeasyui-extensions/jeasyui.extensions.window.js"></script> 29 <script language=javascript src="/$!globals_sys_basename/web/common/component/easyui/jeasyui-extensions/jeasyui.extensions.dialog.js"></script> 30 <!--easyui--> 31 <script language=‘javascript‘ src=‘/$!globals_sys_basename/web/common/component/Date/WdatePicker.js‘></script> 32 <script language=‘javascript‘ src=‘/$!globals_sys_basename/web/common/component/zdialog/zDialog.js‘></script> 33 <script language=‘javascript‘ src=‘/$!globals_sys_basename/web/common/component/zdialog/zDialog.sunshion.js‘></script> 34 <script type="text/javascript" src="/$!globals_sys_basename/web/common/js/ajax.sunshion.js"></script> 35 <script type="text/javascript" src="/$!globals_sys_basename/web/common/js/xml.sunshion.js"></script> 36 <style> 37 .panel-body{border: 0px solid #DFDFDF !important;} 38 #leftDiv{border: 1px solid #DFDFDF !important;border-top: 0px !important;} 39 .ok{ color:green;} 40 .error{ color:red;} 41 </style> 42 43 <script type="text/javascript"> 44 #if ($msg) 45 top.Dialog.alert("$!msg",function(){ 46 top.Dialog.close(); 47 top.ppag.dosearch(); 48 }); 49 #end 50 </script> 51 <head> 52 53 <body> 54 <div class="zdialog"> 55 <form name=‘form1‘ method=‘post‘ action="/$!globals_sys_basename/web/plugins/bs/yygl/dz/g00000000/jtkt.xp?doAction=cjslAdd"> 56 <input type="hidden" name="doAction" id="doAction" value="cjslAdd" /> 57 <input type="hidden" name="groupid" id="groupid" value="$!groupid" /> 58 <input type="hidden" name="pluginid" id="pluginid" value="$!pluginid" /> 59 <input type="hidden" name="PluginIcon" id="PluginIcon" value="$!instObj.plugininsticon" /> 60 61 62 <!-- 附件开始 --> 63 <input name="fj" id="fj" type="hidden" value="" /> 64 <!-- 附件结束 --> 65 <table class="table-nl-sx" style="margin-top: 15px;"> 66 67 <tr> 68 <th width="110" align="right">插件实例名称:</th> 69 <td width="*"><input class="easyui-textbox input_sx" type="text" name="PluginInstName" id="PluginInstName" value="$!instObj.plugininstname" maxlength="13" style="width: 200px;" onblur="checkMail(this);"/><font color=red>*</font></td> 70 </tr> 71 <tr> 72 <th width="110" align="right">插件实例图标:</th> 73 <td colspan="3"> 74 75 <img id="pluginicon" name="pluginicon" src="/$!globals_sys_basename/web/common/page/downloadFile.jsp?path=$!instObj.plugininsticon&type=images" style="cursor:pointer;width:26px;height:26px;background-color: grey"/> 76 <div class="btn_sx" class="btn_4word_sx" style="vertical-align: top;" onclick="selectUpload(‘fj‘,‘getFJS‘)"">上传图标</div> 77 </td> 78 </tr> 79 80 <tr> 81 <th width="110" align="right">插件实例背景色:</th> 82 <td width="*"><input class="easyui-textbox input_sx" type="text" name="plugininsticonbgcolor" id="plugininsticonbgcolor" value="$!instObj.plugininsticonbgcolor" style="width: 200px;"/></td> 83 </tr> 84 </table> 85 <!-- 上传附件开始 --> 86 <iframe src="/$!globals_sys_basename/web/plugins/sys/admin/bz/upload.xp?upfiletype=images&backobj=form1.fj&backmethod=getFJS" name="ifrobj" id="ifrobj" frameborder="0" 87 scrolling="no" width="0" height="0" style="display: none;"></iframe> 88 <!-- 上传附件结束 --> 89 90 <div id="toolbarDiv_license" style="width:100%;"> 91 <table cell-spacing="0" style="width:100%;margin-top: 30px;"> 92 <tr> 93 <td style="text-align:right;"> 94 <div class="btn_sx btn_2word_sx" style="width: 50px;float: right;margin: 0 30px 0 0;" onclick="doSubmit()">保存</div> 95 </td> 96 </tr> 97 </table> 98 </div> 99 100 </form> 101 </div> 102 </body> 103 </html> 104 105 <script type="text/javascript"> 106 function doSubmit(){ 107 if($(‘#PluginInstName‘).val()==""){ 108 Dialog.alert("插件实例名称不能为空!"); 109 return; 110 } 111 form1.submit(); 112 } 113 function doSubmit_temp() 114 { 115 if(checkMail(PluginInstName)){ 116 form1.submit(); 117 } 118 } 119 function checkMail(t){ 120 var v=t.value; 121 var next=t.nextSibling; 122 if(v==""){ 123 next.className="error"; 124 next.innerHTML="插件实例名称不能为空"; 125 return false; 126 } 127 next.className="ok"; 128 next.innerHTML=" ?"; 129 return true; 130 } 131 132 function selectUpload(name,backMothd){ 133 ifrobj.form1.upfile.click(); 134 top.afterSelectFile = function(){ 135 //获取上传路径 136 filepath = ifrobj.form1.upfile.value; 137 //当文件不等于空时执行的操作 138 if (filepath != ‘‘){ 139 //执行附件上传 140 ifrobj.doaction(); 141 } 142 } 143 } 144 145 146 function getFJS(backName) {//附件添加 147 $(‘#PluginIcon‘).val(form1.fj.value); 148 form1.pluginicon.src = "/$!globals_sys_basename/web/common/page/downloadFile.jsp?path=" + form1.fj.value+"&type=images"; 149 setTimeout(function(){ 150 $(‘#ifrobj‘).attr(‘src‘, ‘/$!globals_sys_basename/web/plugins/sys/admin/bz/upload.xp?upfiletype=images&backobj=form1.fj&backmethod=getFJS‘) 151 }, 10); 152 } 153 </script>
第二个tab页面
1 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> 2 <html xmlns="http://www.w3.org/1999/xhtml"> 3 <head> 4 <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /> 5 <title>$!globals_sys_name</title> 6 7 <!-- EasyUi --> 8 <link rel="stylesheet" type="text/css" href="/$!globals_sys_basename/web/common/component/easyui/themes/$!easyui_css_path/easyui.css"></link> 9 <link rel="stylesheet" type="text/css" href="/$!globals_sys_basename/web/common/component/easyui/themes/icon.css"></link> 10 <link rel="stylesheet" type="text/css" href="/$!globals_sys_basename/web/common/component/easyui/themes/demo.css"></link> 11 <link rel="stylesheet" type="text/css" href="/$!globals_sys_basename/web/common/component/easyui/themes/icon-all.css"></link> 12 <link rel="stylesheet" type="text/css" href="/$!globals_sys_basename/web/common/component/easyui/themes/$!easyui_css_path/easyui.sx.css"></link> 13 <!-- EasyUi --> 14 15 <!-- 框架 --> 16 <link rel="stylesheet" type="text/css" href="/$!globals_sys_basename/web/common/css/$!css_path/main.css"></link> 17 <!-- 框架 --> 18 19 <script language=javascript src="/$!globals_sys_basename/web/common/component/easyui/jquery-1.11.1.js"></script> 20 <!--easyui--> 21 <script type="text/javascript" src="/$!globals_sys_basename/web/common/component/easyui/jquery.easyui.util.js"></script> 22 <script type="text/javascript" src="/$!globals_sys_basename/web/common/component/easyui/jquery.easyui.min.js"></script> 23 <script type="text/javascript" src="/$!globals_sys_basename/web/common/component/easyui/easyui-lang-zh_CN.js"></script> 24 <!-- 扩充 jquery 框架基础功能的函数库 --> 25 <script language=javascript src="/$!globals_sys_basename/web/common/component/easyui/jquery.jdirk.js"></script> 26 <script language=javascript src="/$!globals_sys_basename/web/common/component/easyui/jeasyui-extensions/jeasyui.extensions.js"></script> 27 <script language=javascript src="/$!globals_sys_basename/web/common/component/easyui/jeasyui-extensions/jeasyui.extensions.tabs.js"></script> 28 <script language=javascript src="/$!globals_sys_basename/web/common/component/easyui/jeasyui-extensions/jeasyui.extensions.tree.js"></script> 29 <script language=javascript src="/$!globals_sys_basename/web/common/component/easyui/jeasyui-extensions/jeasyui.extensions.form.js"></script> 30 <script language=javascript src="/$!globals_sys_basename/web/common/component/easyui/jeasyui-extensions/jeasyui.extensions.panel.js"></script> 31 <script language=javascript src="/$!globals_sys_basename/web/common/component/easyui/jeasyui-extensions/jeasyui.extensions.window.js"></script> 32 <script language=javascript src="/$!globals_sys_basename/web/common/component/easyui/jeasyui-extensions/jeasyui.extensions.dialog.js"></script> 33 <script language=javascript src="/$!globals_sys_basename/web/common/component/easyui/jeasyui-extensions/datagrid-groupview.js"></script> 34 <!--easyui--> 35 <script language=‘javascript‘ src=‘/$!globals_sys_basename/web/common/component/Date/WdatePicker.js‘></script> 36 <script language=‘javascript‘ src=‘/$!globals_sys_basename/web/common/component/zdialog/zDialog.js‘></script> 37 </head> 38 39 40 <body> 41 <div id="mainLayout" class="easyui-layout hidden" data-options="fit: true"> 42 <div id="toolbarDiv_license" style="width:100%;"> 43 <form id="form_license" name="form_license" class="easyui-form"> 44 45 <input type="hidden" id="groupid" name="groupid" value="$!groupid" /> 46 <input type="hidden" id="pluginid" name="pluginid" value="$!pluginid" /> 47 <input type="hidden" name="adminlogin" id="adminlogin" value="$!adminlogin" /> 48 49 <table cell-spacing="0" style="width:100%;margin-top: 0px;"> 50 <tr> 51 <td style="width:50px;"><div style="width: 50px;float: right;margin: 0 5px 0 0;" onclick="dosearch_license()"></div></td> 52 <td style="text-align:right;"> 53 <div class="btn_sx btn_4word_sx" style="width: 50px;float: right;margin: 0 5px 0 0;" onclick="toDel(‘1‘)">删除菜单</div> 54 <div class="btn_sx btn_4word_sx" style="width: 50px;float: right;margin: 0 5px 0 0;" onclick="toaddSl()">增加菜单</div> 55 </td> 56 </tr> 57 </table> 58 </form> 59 </div> 60 <div data-options="region: ‘center‘" style="padding: 0px; position: relative;"> 61 62 <table id="dg_license" border="0" class="easyui-datagrid" title="" 63 loadMsg="正在加载..." 64 toolbar="#toolbarDiv_license" 65 data-options="fitColumns:true, fit: true,rownumbers:true,singleSelect:false,url:‘/$!globals_sys_basename/web/plugins/bs/yygl/dz/g00000000/jtkt.xp?doAction=plugListJson&groupid=$groupid&pluginid=$pluginid‘,method:‘post‘, pagination:true, pageSize:20"> 66 <thead> 67 <tr> 68 <th data-options="field:‘menuid‘, align:‘center‘, checkbox:true"></th> 69 <th data-options="field:‘menuname‘,align:‘center‘,halign:‘center‘, sortable:‘true‘, width:100">菜单别名</th> 70 <th data-options="field:‘menuicon‘,align:‘center‘,halign:‘center‘, sortable:‘true‘,width:100">菜单图标</th> 71 <th data-options="field:‘menuiconbgcolor‘,align:‘center‘,halign:‘center‘, sortable:‘true‘,width:100">菜单图标背景色</th> 72 <th data-options="field:‘caozuo‘,align:‘center‘,halign:‘center‘, sortable:‘true‘,width:100,formatter:caozuoFmat">操作</th> 73 </tr> 74 </thead> 75 </table> 76 </div> 77 78 </div> 79 </body> 80 </html> 81 <script type="text/javascript"> 82 83 //刷新的功能 84 function dosearch_license(){ 85 var data = $("#form_license").form("getData"); 86 searchNormalFun("dg_license", data); 87 top.ppage=null; 88 } 89 90 //添加菜单 91 function toaddSl(){ 92 var adminloginstr = $("#adminlogin").val(); 93 var plugid = $("#pluginid").val(); 94 var groid = $("#groupid").val(); 95 //alert("====plugid=====" + plugid); 96 top.ppage=window; 97 var url = "/$!globals_sys_basename/web/plugins/bs/yygl/dz/g00000000/jtkt.xp?doAction=toAddCd&pluginid="+plugid+"&groupid="+groid +"&adminlogin="+adminloginstr; 98 var diag = new Dialog(); 99 diag.Width = 460; 100 diag.Height = 460; 101 diag.Title = "添加菜单"; 102 diag.URL = url; 103 diag.OkButtonText="保存"; 104 diag.CancelButtonText="取 消"; 105 diag.OKEvent = function(){ diag.innerFrame.contentWindow.doSubmit();}; 106 diag.show(); 107 } 108 109 //操作栏中的按钮 110 function caozuoFmat(caozuo,row,index){ 111 var str; 112 str = ‘<a href=\"javascript:void(0);\" class=\"abtn_sx\" onclick="toupdateSl(\‘‘+row.menuid+‘\‘)">修改</a>‘; 113 str+="<span class=\"text-explode\">|</span><a href=\"javascript:void(0);\" class=\"abtn_sx\" onclick=\"toDel(‘"+row.menuid+"‘)\" title=‘删除‘>删除</a>" 114 return str; 115 } 116 117 //修改菜单 118 function toupdateSl(menuid){ 119 //alert("========menuid========" + menuid); 120 var groupid = $(‘#groupid‘).val(); 121 var plugid = $(‘#pluginid‘).val(); 122 top.ppage=window; 123 var url = "/$!globals_sys_basename/web/plugins/bs/yygl/dz/g00000000/jtkt.xp?doAction=toUpdateCd&menuid="+menuid+"&groupid="+groupid+"&pluginid="+plugid; 124 var diag = new Dialog(); 125 diag.Width = 680; 126 diag.Height = 400; 127 diag.Title = "修改菜单"; 128 diag.URL = url; 129 diag.OkButtonText="保存"; 130 diag.OKEvent = function(){ diag.innerFrame.contentWindow.doSubmit();}; 131 diag.CancelButtonText="取 消"; 132 diag.CancelEvent = function(){diag.close();}; 133 diag.show(); 134 } 135 136 137 138 //批量删除 139 function toDel(menuid) { 140 var groupid = $(‘#groupid‘).val(); 141 var pluginid = $(‘#pluginid‘).val(); 142 var spids = ""; 143 if(menuid == "1"){//批量删除 144 //alert("======menuid11======" + menuid); 145 var rows = $(‘#dg_license‘).datagrid(‘getSelections‘); 146 for (var i = 0; i < rows.length; i++) { 147 var array_element = rows[i]; 148 spids += array_element.menuid + ","; 149 } 150 151 if(spids == ""){ 152 Dialog.alert("请至少选择一条需要删除的数据!"); 153 return; 154 } 155 }else{//删除 156 spids=menuid; 157 } 158 159 160 Dialog.confirm(‘确定删除吗?‘,function() { 161 jQuery.post("/$!globals_sys_basename/web/plugins/bs/yygl/dz/g00000000/jtkt.xp?doAction=deleteCd",{menuid:spids,pluginid:pluginid,groupid:groupid}, function(date) { 162 var rest = eval("‘(" + date+ ")‘");//json对象 163 if (rest) { 164 dosearch_license(); 165 Dialog.alert("删除成功!"); 166 } else { 167 Dalog.alert("删除失败!"); 168 } 169 }); 170 }); 171 } 172 173 174 </script>
第三个tab页面
1 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> 2 <html xmlns="http://www.w3.org/1999/xhtml"> 3 <head> 4 <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /> 5 <title>$!globals_sys_name</title> 6 7 <!-- EasyUi --> 8 <link rel="stylesheet" type="text/css" href="/$!globals_sys_basename/web/common/component/easyui/themes/$!easyui_css_path/easyui.css"></link> 9 <link rel="stylesheet" type="text/css" href="/$!globals_sys_basename/web/common/component/easyui/themes/icon.css"></link> 10 <link rel="stylesheet" type="text/css" href="/$!globals_sys_basename/web/common/component/easyui/themes/demo.css"></link> 11 <link rel="stylesheet" type="text/css" href="/$!globals_sys_basename/web/common/component/easyui/themes/icon-all.css"></link> 12 <link rel="stylesheet" type="text/css" href="/$!globals_sys_basename/web/common/component/easyui/themes/$!easyui_css_path/easyui.sx.css"></link> 13 <!-- EasyUi --> 14 15 <!-- 框架 --> 16 <link rel="stylesheet" type="text/css" href="/$!globals_sys_basename/web/common/css/$!css_path/main.css"></link> 17 <!-- 框架 --> 18 19 <script language=javascript src="/$!globals_sys_basename/web/common/component/easyui/jquery-1.11.1.js"></script> 20 <!--easyui--> 21 <script type="text/javascript" src="/$!globals_sys_basename/web/common/component/easyui/jquery.easyui.util.js"></script> 22 <script type="text/javascript" src="/$!globals_sys_basename/web/common/component/easyui/jquery.easyui.min.js"></script> 23 <script type="text/javascript" src="/$!globals_sys_basename/web/common/component/easyui/easyui-lang-zh_CN.js"></script> 24 <!-- 扩充 jquery 框架基础功能的函数库 --> 25 <script language=javascript src="/$!globals_sys_basename/web/common/component/easyui/jquery.jdirk.js"></script> 26 <script language=javascript src="/$!globals_sys_basename/web/common/component/easyui/jeasyui-extensions/jeasyui.extensions.js"></script> 27 <script language=javascript src="/$!globals_sys_basename/web/common/component/easyui/jeasyui-extensions/jeasyui.extensions.tabs.js"></script> 28 <script language=javascript src="/$!globals_sys_basename/web/common/component/easyui/jeasyui-extensions/jeasyui.extensions.tree.js"></script> 29 <script language=javascript src="/$!globals_sys_basename/web/common/component/easyui/jeasyui-extensions/jeasyui.extensions.form.js"></script> 30 <script language=javascript src="/$!globals_sys_basename/web/common/component/easyui/jeasyui-extensions/jeasyui.extensions.panel.js"></script> 31 <script language=javascript src="/$!globals_sys_basename/web/common/component/easyui/jeasyui-extensions/jeasyui.extensions.window.js"></script> 32 <script language=javascript src="/$!globals_sys_basename/web/common/component/easyui/jeasyui-extensions/jeasyui.extensions.dialog.js"></script> 33 <script language=javascript src="/$!globals_sys_basename/web/common/component/easyui/jeasyui-extensions/datagrid-groupview.js"></script> 34 <!--easyui--> 35 <script language=‘javascript‘ src=‘/$!globals_sys_basename/web/common/component/Date/WdatePicker.js‘></script> 36 <script language=‘javascript‘ src=‘/$!globals_sys_basename/web/common/component/zdialog/zDialog.js‘></script> 37 </head> 38 39 40 <body> 41 <div id="mainLayout" class="easyui-layout hidden" data-options="fit: true"> 42 <div id="toolbarDiv_license" style="width:100%;"> 43 <form id="form_license" name="form_license" class="easyui-form"> 44 <input type="hidden" id="groupid" name="groupid" value="$!groupid" /> 45 <input type="hidden" id="pluginid" name="pluginid" value="$!pluginid" /> 46 <input type="hidden" name="adminlogin" id="adminlogin" value="$!adminlogin" /> 47 48 <table cell-spacing="0" style="width:100%;margin-top: 0px;"> 49 <tr> 50 <td style="width:50px;"><div style="width: 50px;float: right;margin: 0 5px 0 0;" onclick="dosearch_license()"></div></td> 51 <td style="text-align:right;"> 52 <div class="btn_sx btn_4word_sx" style="width: 50px;float: right;margin: 0 5px 0 0;" onclick="toDel(‘1‘)">删除角色</div> 53 <div class="btn_sx btn_4word_sx" style="width: 50px;float: right;margin: 0 5px 0 0;" onclick="toAddJs()">增加角色</div> 54 </td> 55 </tr> 56 </table> 57 </form> 58 </div> 59 60 <div data-options="region: ‘center‘" style="padding: 0px; position: relative;"> 61 62 <table id="dg_license" border="0" class="easyui-datagrid" title="" 63 loadMsg="正在加载..." 64 toolbar="#toolbarDiv_license" 65 data-options="fitColumns:true, fit: true,rownumbers:true,singleSelect:false,url:‘/$!globals_sys_basename/web/plugins/bs/yygl/dz/g00000000/jtkt.xp?doAction=cjjsListJson&groupid=$groupid&pluginid=$pluginid‘,method:‘post‘, pagination:true, pageSize:20"> 66 <thead> 67 <tr> 68 <th data-options="field:‘roleid‘, align:‘center‘, checkbox:true"></th> 69 <th data-options="field:‘rolename‘,align:‘center‘,halign:‘center‘, sortable:‘true‘, width:100">角色别名</th> 70 <th data-options="field:‘caozuo‘,align:‘center‘,halign:‘center‘, sortable:‘true‘,width:100,formatter:caozuoFmat">操作</th> 71 </tr> 72 </thead> 73 </table> 74 </div> 75 76 </div> 77 </body> 78 </html> 79 <script type="text/javascript"> 80 81 //刷新的功能 82 function dosearch_license(){ 83 var data = $("#form_license").form("getData"); 84 searchNormalFun("dg_license", data); 85 top.ppage=null; 86 } 87 88 //添加角色 89 function toAddJs(){ 90 var adminloginstr = $("#adminlogin").val(); 91 var plugid = $("#pluginid").val(); 92 var groid = $("#groupid").val(); 93 //alert("====plugid=====" + plugid); 94 top.ppage=window; 95 var url = "/$!globals_sys_basename/web/plugins/bs/yygl/dz/g00000000/jtkt.xp?doAction=toAddJs&pluginid="+plugid+"&groupid="+groid +"&adminlogin="+adminloginstr; 96 var diag = new Dialog(); 97 diag.Width = 680; 98 diag.Height = 300; 99 diag.Title = "添加菜单"; 100 diag.URL = url; 101 diag.OkButtonText="保存"; 102 diag.CancelButtonText="取 消"; 103 diag.OKEvent = function(){ diag.innerFrame.contentWindow.doSubmit();}; 104 diag.show(); 105 } 106 107 //操作栏中的按钮 108 function caozuoFmat(caozuo,row,index){ 109 var str; 110 str = ‘<a href=\"javascript:void(0);\" class=\"abtn_sx\" onclick="toupdateSl(\‘‘+row.roleid+‘\‘)">修改</a>‘; 111 str+="<span class=\"text-explode\">|</span><a href=\"javascript:void(0);\" class=\"abtn_sx\" onclick=\"toDel(‘"+row.roleid+"‘)\" title=‘删除‘>删除</a>" 112 return str; 113 } 114 115 //修改角色 116 function toupdateSl(roleid){ 117 //alert("========roleid========" + roleid); 118 var groupid = $(‘#groupid‘).val(); 119 var plugid = $(‘#pluginid‘).val(); 120 top.ppage=window; 121 var url = "/$!globals_sys_basename/web/plugins/bs/yygl/dz/g00000000/jtkt.xp?doAction=toUpdateJs&roleid="+roleid+"&groupid="+groupid+"&pluginid="+plugid; 122 var diag = new Dialog(); 123 diag.Width = 680; 124 diag.Height = 400; 125 diag.Title = "修改角色"; 126 diag.URL = url; 127 diag.OkButtonText="保存"; 128 diag.OKEvent = function(){ diag.innerFrame.contentWindow.doSubmit();}; 129 diag.CancelButtonText="取 消"; 130 diag.CancelEvent = function(){diag.close();}; 131 diag.show(); 132 } 133 134 135 136 //批量删除 137 function toDel(roleid) { 138 var groupid = $(‘#groupid‘).val(); 139 var pluginid = $(‘#pluginid‘).val(); 140 var spids = ""; 141 if(roleid == "1"){//批量删除 142 //alert("======menuid11======" + menuid); 143 var rows = $(‘#dg_license‘).datagrid(‘getSelections‘); 144 for (var i = 0; i < rows.length; i++) { 145 var array_element = rows[i]; 146 spids += array_element.roleid + ","; 147 } 148 149 if(spids == ""){ 150 Dialog.alert("请至少选择一条需要删除的数据!"); 151 return; 152 } 153 }else{//删除 154 spids=roleid; 155 } 156 157 Dialog.confirm(‘确定删除吗?‘,function() { 158 jQuery.post("/$!globals_sys_basename/web/plugins/bs/yygl/dz/g00000000/jtkt.xp?doAction=deleteJs",{roleid:spids,pluginid:pluginid,groupid:groupid}, function(date) { 159 var rest = eval("‘(" + date+ ")‘");//json对象 160 if (rest) { 161 dosearch_license(); 162 Dialog.alert("删除成功!"); 163 } else { 164 Dalog.alert("删除失败!"); 165 } 166 }); 167 }); 168 } 169 170 171 </script>
第二个tab页面的新增页面
1 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> 2 <html xmlns="http://www.w3.org/1999/xhtml"> 3 <head> 4 <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /> 5 <title>$!globals_sys_name</title> 6 <!-- EasyUi --> 7 <link rel="stylesheet" type="text/css" href="/$!globals_sys_basename/web/common/component/easyui/themes/$!easyui_css_path/easyui.css"></link> 8 <link rel="stylesheet" type="text/css" href="/$!globals_sys_basename/web/common/component/easyui/themes/icon.css"></link> 9 <link rel="stylesheet" type="text/css" href="/$!globals_sys_basename/web/common/component/easyui/themes/demo.css"></link> 10 <link rel="stylesheet" type="text/css" href="/$!globals_sys_basename/web/common/component/easyui/themes/icon-all.css"></link> 11 <link rel="stylesheet" type="text/css" href="/$!globals_sys_basename/web/common/component/easyui/themes/$!easyui_css_path/easyui.sx.css"></link> 12 <!-- EasyUi --> 13 14 <!-- 框架 --> 15 <link rel="stylesheet" type="text/css" href="/$!globals_sys_basename/web/common/css/$!css_path/main.css"></link> 16 <script language=javascript src="/$!globals_sys_basename/web/common/component/easyui/jquery-1.11.1.js"></script> 17 <!--easyui--> 18 <script type="text/javascript" src="/$!globals_sys_basename/web/common/component/easyui/jquery.easyui.util.js"></script> 19 <script type="text/javascript" src="/$!globals_sys_basename/web/common/component/easyui/jquery.easyui.min.js"></script> 20 <script type="text/javascript" src="/$!globals_sys_basename/web/common/component/easyui/easyui-lang-zh_CN.js"></script> 21 <!-- 扩充 jquery 框架基础功能的函数库 --> 22 <script language=javascript src="/$!globals_sys_basename/web/common/component/easyui/jquery.jdirk.js"></script> 23 <script language=javascript src="/$!globals_sys_basename/web/common/component/easyui/jeasyui-extensions/jeasyui.extensions.js"></script> 24 <script language=javascript src="/$!globals_sys_basename/web/common/component/easyui/jeasyui-extensions/jeasyui.extensions.tabs.js"></script> 25 <script language=javascript src="/$!globals_sys_basename/web/common/component/easyui/jeasyui-extensions/jeasyui.extensions.tree.js"></script> 26 <script language=javascript src="/$!globals_sys_basename/web/common/component/easyui/jeasyui-extensions/jeasyui.extensions.form.js"></script> 27 <script language=javascript src="/$!globals_sys_basename/web/common/component/easyui/jeasyui-extensions/jeasyui.extensions.panel.js"></script> 28 <script language=javascript src="/$!globals_sys_basename/web/common/component/easyui/jeasyui-extensions/jeasyui.extensions.window.js"></script> 29 <script language=javascript src="/$!globals_sys_basename/web/common/component/easyui/jeasyui-extensions/jeasyui.extensions.dialog.js"></script> 30 <!--easyui--> 31 <script language=‘javascript‘ src=‘/$!globals_sys_basename/web/common/component/Date/WdatePicker.js‘></script> 32 <script language=‘javascript‘ src=‘/$!globals_sys_basename/web/common/component/zdialog/zDialog.js‘></script> 33 <script language=‘javascript‘ src=‘/$!globals_sys_basename/web/common/component/zdialog/zDialog.sunshion.js‘></script> 34 <script type="text/javascript" src="/$!globals_sys_basename/web/common/js/ajax.sunshion.js"></script> 35 <script type="text/javascript" src="/$!globals_sys_basename/web/common/js/xml.sunshion.js"></script> 36 <style> 37 .panel-body{border: 0px solid #DFDFDF !important;} 38 #leftDiv{border: 1px solid #DFDFDF !important;border-top: 0px !important;} 39 .ok{ color:green;} 40 .error{ color:red;} 41 </style> 42 43 <script type="text/javascript"> 44 #if ($msg) 45 top.Dialog.alert("$!msg",function(){ 46 top.ppage.dosearch_license(); 47 top.Dialog.close(); 48 }); 49 #end 50 </script> 51 <head> 52 53 <body> 54 <div class="zdialog"> 55 <form name=‘form1‘ method=‘post‘ action="/$!globals_sys_basename/web/plugins/bs/yygl/dz/g00000000/jtkt.xp?doAction=AddCd"> 56 <input type="hidden" name="doAction" id="doAction" value="AddCd" /> 57 <input type="hidden" name="groupid" id="groupid" value="$!groupid" /> 58 <input type="hidden" name="pluginid" id="pluginid" value="$!pluginid" /> 59 <input type="hidden" name="adminlogin" id="adminlogin" value="$!adminlogin" /> 60 61 62 <!-- 附件开始 --> 63 <input name="fj" id="fj" type="hidden" value="" /> 64 <!-- 附件结束 --> 65 <table class="table-nl-sx" style="margin-top: 15px;"> 66 67 <tr> 68 <th width="110" align="right">菜单别名:</th> 69 <td width="*"><input class="easyui-textbox input_sx" type="text" name="menuName" id="menuName" maxlength="13" style="width: 200px;" onblur="checkMail(this);"/><font color=red>*</font></td> 70 </tr> 71 <tr> 72 <th width="110" align="right">菜单图标:</th> 73 <td colspan="3"> 74 75 <img id="menuIcon" name="menuIcon" style="cursor:pointer;width:26px;height:26px;background-color: grey"/> 76 <div class="btn_sx" class="btn_4word_sx" style="vertical-align: top;" onclick="selectUpload(‘fj‘,‘getFJS‘)"">上传图标</div> 77 </td> 78 </tr> 79 80 <tr> 81 <th width="110" align="right">菜单图标背景色:</th> 82 <td width="*"><input class="easyui-textbox input_sx" type="text" name="menuIconbgColor" id="menuIconbgColor" style="width: 200px;"/></td> 83 </tr> 84 </table> 85 <!-- 上传附件开始 --> 86 <iframe src="/$!globals_sys_basename/web/plugins/sys/admin/bz/upload.xp?upfiletype=images&backobj=form1.fj&backmethod=getFJS" name="ifrobj" id="ifrobj" frameborder="0" 87 scrolling="no" width="0" height="0" style="display: none;"></iframe> 88 <!-- 上传附件结束 --> 89 90 </form> 91 </div> 92 </body> 93 </html> 94 95 <script type="text/javascript"> 96 97 function doSubmit(){ 98 if($(‘#menuName‘).val()==""){ 99 Dialog.alert("菜单别名不能为空!"); 100 return; 101 } 102 form1.submit(); 103 } 104 function doSubmit_temp() 105 { 106 if(checkMail(MenuName)){ 107 form1.submit(); 108 } 109 } 110 111 function checkMail(t){ 112 var v=t.value; 113 var next=t.nextSibling; 114 if(v==""){ 115 next.className="error"; 116 next.innerHTML="菜单别名不能为空"; 117 return false; 118 } 119 next.className="ok"; 120 next.innerHTML=" ?"; 121 return true; 122 } 123 124 function selectUpload(name,backMothd){ 125 ifrobj.form1.upfile.click(); 126 top.afterSelectFile = function(){ 127 //获取上传路径 128 filepath = ifrobj.form1.upfile.value; 129 //当文件不等于空时执行的操作 130 if (filepath != ‘‘){ 131 //执行附件上传 132 ifrobj.doaction(); 133 } 134 } 135 } 136 137 138 function getFJS(backName) {//附件添加 139 $(‘#MenuIcon‘).val(form1.fj.value); 140 form1.pluginicon.src = "/$!globals_sys_basename/web/common/page/downloadFile.jsp?path=" + form1.fj.value+"&type=images"; 141 setTimeout(function(){ 142 $(‘#ifrobj‘).attr(‘src‘, ‘/$!globals_sys_basename/web/plugins/sys/admin/bz/upload.xp?upfiletype=images&backobj=form1.fj&backmethod=getFJS‘) 143 }, 10); 144 } 145 </script>
第二个tab页面的修改页面
1 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> 2 <html xmlns="http://www.w3.org/1999/xhtml"> 3 <head> 4 <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /> 5 <title>$!globals_sys_name</title> 6 <!-- EasyUi --> 7 <link rel="stylesheet" type="text/css" href="/$!globals_sys_basename/web/common/component/easyui/themes/$!easyui_css_path/easyui.css"></link> 8 <link rel="stylesheet" type="text/css" href="/$!globals_sys_basename/web/common/component/easyui/themes/icon.css"></link> 9 <link rel="stylesheet" type="text/css" href="/$!globals_sys_basename/web/common/component/easyui/themes/demo.css"></link> 10 <link rel="stylesheet" type="text/css" href="/$!globals_sys_basename/web/common/component/easyui/themes/icon-all.css"></link> 11 <link rel="stylesheet" type="text/css" href="/$!globals_sys_basename/web/common/component/easyui/themes/$!easyui_css_path/easyui.sx.css"></link> 12 <!-- EasyUi --> 13 14 <!-- 框架 --> 15 <link rel="stylesheet" type="text/css" href="/$!globals_sys_basename/web/common/css/$!css_path/main.css"></link> 16 <script language=javascript src="/$!globals_sys_basename/web/common/component/easyui/jquery-1.11.1.js"></script> 17 <!--easyui--> 18 <script type="text/javascript" src="/$!globals_sys_basename/web/common/component/easyui/jquery.easyui.util.js"></script> 19 <script type="text/javascript" src="/$!globals_sys_basename/web/common/component/easyui/jquery.easyui.min.js"></script> 20 <script type="text/javascript" src="/$!globals_sys_basename/web/common/component/easyui/easyui-lang-zh_CN.js"></script> 21 <!-- 扩充 jquery 框架基础功能的函数库 --> 22 <script language=javascript src="/$!globals_sys_basename/web/common/component/easyui/jquery.jdirk.js"></script> 23 <script language=javascript src="/$!globals_sys_basename/web/common/component/easyui/jeasyui-extensions/jeasyui.extensions.js"></script> 24 <script language=javascript src="/$!globals_sys_basename/web/common/component/easyui/jeasyui-extensions/jeasyui.extensions.tabs.js"></script> 25 <script language=javascript src="/$!globals_sys_basename/web/common/component/easyui/jeasyui-extensions/jeasyui.extensions.tree.js"></script> 26 <script language=javascript src="/$!globals_sys_basename/web/common/component/easyui/jeasyui-extensions/jeasyui.extensions.form.js"></script> 27 <script language=javascript src="/$!globals_sys_basename/web/common/component/easyui/jeasyui-extensions/jeasyui.extensions.panel.js"></script> 28 <script language=javascript src="/$!globals_sys_basename/web/common/component/easyui/jeasyui-extensions/jeasyui.extensions.window.js"></script> 29 <script language=javascript src="/$!globals_sys_basename/web/common/component/easyui/jeasyui-extensions/jeasyui.extensions.dialog.js"></script> 30 <!--easyui--> 31 <script language=‘javascript‘ src=‘/$!globals_sys_basename/web/common/component/Date/WdatePicker.js‘></script> 32 <script language=‘javascript‘ src=‘/$!globals_sys_basename/web/common/component/zdialog/zDialog.js‘></script> 33 <script language=‘javascript‘ src=‘/$!globals_sys_basename/web/common/component/zdialog/zDialog.sunshion.js‘></script> 34 <script type="text/javascript" src="/$!globals_sys_basename/web/common/js/ajax.sunshion.js"></script> 35 <script type="text/javascript" src="/$!globals_sys_basename/web/common/js/xml.sunshion.js"></script> 36 <style> 37 .panel-body{border: 0px solid #DFDFDF !important;} 38 #leftDiv{border: 1px solid #DFDFDF !important;border-top: 0px !important;} 39 .ok{ color:green;} 40 .error{ color:red;} 41 </style> 42 43 <script type="text/javascript"> 44 #if ($msg) 45 top.Dialog.alert("$!msg",function(){ 46 top.ppage.dosearch_license(); 47 top.Dialog.close(); 48 }); 49 #end 50 </script> 51 <head> 52 53 <body> 54 <div class="zdialog"> 55 <form name=‘form1‘ method=‘post‘ action="/$!globals_sys_basename/web/plugins/bs/yygl/dz/g00000000/jtkt.xp?doAction=updateCd"> 56 <input type="hidden" name="doAction" id="doAction" value="updateCd" /> 57 <input type="hidden" name="menuid" id="menuid" value="$!menuid" /> 58 <input type="hidden" name="groupid" id="groupid" value="$!groupid" /> 59 <input type="hidden" name="pluginid" id="pluginid" value="$!pluginid" /> 60 <input type="hidden" name="adminlogin" id="adminlogin" value="$!adminlogin" /> 61 62 63 <!-- 附件开始 --> 64 <input name="fj" id="fj" type="hidden" value="" /> 65 <!-- 附件结束 --> 66 <table class="table-nl-sx" style="margin-top: 15px;"> 67 68 <tr> 69 <th width="110" align="right">菜单别名:</th> 70 <td width="*"><input class="easyui-textbox input_sx" type="text" name="menuName" id="menuName" value="$!slcdObj.menuname" maxlength="13" style="width: 200px;" onblur="checkMail(this);"/><font color=red>*</font></td> 71 </tr> 72 <tr> 73 <th width="110" align="right">菜单图标:</th> 74 <td colspan="3"> 75 <img id="menuIcon" name="menuIcon" src="/$!globals_sys_basename/web/common/page/downloadFile.jsp?path=$!slcdObj.menuicon&type=images" style="cursor:pointer;width:26px;height:26px;background-color: grey"/> 76 <div class="btn_sx" class="btn_4word_sx" style="vertical-align: top;" onclick="selectUpload(‘fj‘,‘getFJS‘)"">上传图标</div> 77 </td> 78 </tr> 79 80 <tr> 81 <th width="110" align="right">菜单图标背景色:</th> 82 <td width="*"><input class="easyui-textbox input_sx" type="text" name="menuIconbgColor" id="menuIconbgColor" value="$!slcdObj.menuiconbgcolor" style="width: 200px;"/></td> 83 </tr> 84 </table> 85 <!-- 上传附件开始 --> 86 <iframe src="/$!globals_sys_basename/web/plugins/sys/admin/bz/upload.xp?upfiletype=images&backobj=form1.fj&backmethod=getFJS" name="ifrobj" id="ifrobj" frameborder="0" 87 scrolling="no" width="0" height="0" style="display: none;"></iframe> 88 <!-- 上传附件结束 --> 89 90 </form> 91 </div> 92 </body> 93 </html> 94 95 <script type="text/javascript"> 96 97 function doSubmit(){ 98 if($(‘#MenuName‘).val()==""){ 99 Dialog.alert("菜单别名不能为空!"); 100 return; 101 } 102 form1.submit(); 103 } 104 function doSubmit_temp() 105 { 106 if(checkMail(MenuName)){ 107 form1.submit(); 108 } 109 } 110 111 function checkMail(t){ 112 var v=t.value; 113 var next=t.nextSibling; 114 if(v==""){ 115 next.className="error"; 116 next.innerHTML="菜单别名不能为空"; 117 return false; 118 } 119 next.className="ok"; 120 next.innerHTML=" ?"; 121 return true; 122 } 123 124 function selectUpload(name,backMothd){ 125 ifrobj.form1.upfile.click(); 126 top.afterSelectFile = function(){ 127 //获取上传路径 128 filepath = ifrobj.form1.upfile.value; 129 //当文件不等于空时执行的操作 130 if (filepath != ‘‘){ 131 //执行附件上传 132 ifrobj.doaction(); 133 } 134 } 135 } 136 137 138 function getFJS(backName) {//附件添加 139 $(‘#MenuIcon‘).val(form1.fj.value); 140 form1.pluginicon.src = "/$!globals_sys_basename/web/common/page/downloadFile.jsp?path=" + form1.fj.value+"&type=images"; 141 setTimeout(function(){ 142 $(‘#ifrobj‘).attr(‘src‘, ‘/$!globals_sys_basename/web/plugins/sys/admin/bz/upload.xp?upfiletype=images&backobj=form1.fj&backmethod=getFJS‘) 143 }, 10); 144 } 145 </script>
第三个tab页面的新增页面
1 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> 2 <html xmlns="http://www.w3.org/1999/xhtml"> 3 <head> 4 <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /> 5 <title>$!globals_sys_name</title> 6 <!-- EasyUi --> 7 <link rel="stylesheet" type="text/css" href="/$!globals_sys_basename/web/common/component/easyui/themes/$!easyui_css_path/easyui.css"></link> 8 <link rel="stylesheet" type="text/css" href="/$!globals_sys_basename/web/common/component/easyui/themes/icon.css"></link> 9 <link rel="stylesheet" type="text/css" href="/$!globals_sys_basename/web/common/component/easyui/themes/demo.css"></link> 10 <link rel="stylesheet" type="text/css" href="/$!globals_sys_basename/web/common/component/easyui/themes/icon-all.css"></link> 11 <link rel="stylesheet" type="text/css" href="/$!globals_sys_basename/web/common/component/easyui/themes/$!easyui_css_path/easyui.sx.css"></link> 12 <!-- EasyUi --> 13 14 <!-- 框架 --> 15 <link rel="stylesheet" type="text/css" href="/$!globals_sys_basename/web/common/css/$!css_path/main.css"></link> 16 <script language=javascript src="/$!globals_sys_basename/web/common/component/easyui/jquery-1.11.1.js"></script> 17 <!--easyui--> 18 <script type="text/javascript" src="/$!globals_sys_basename/web/common/component/easyui/jquery.easyui.util.js"></script> 19 <script type="text/javascript" src="/$!globals_sys_basename/web/common/component/easyui/jquery.easyui.min.js"></script> 20 <script type="text/javascript" src="/$!globals_sys_basename/web/common/component/easyui/easyui-lang-zh_CN.js"></script> 21 <!-- 扩充 jquery 框架基础功能的函数库 --> 22 <script language=javascript src="/$!globals_sys_basename/web/common/component/easyui/jquery.jdirk.js"></script> 23 <script language=javascript src="/$!globals_sys_basename/web/common/component/easyui/jeasyui-extensions/jeasyui.extensions.js"></script> 24 <script language=javascript src="/$!globals_sys_basename/web/common/component/easyui/jeasyui-extensions/jeasyui.extensions.tabs.js"></script> 25 <script language=javascript src="/$!globals_sys_basename/web/common/component/easyui/jeasyui-extensions/jeasyui.extensions.tree.js"></script> 26 <script language=javascript src="/$!globals_sys_basename/web/common/component/easyui/jeasyui-extensions/jeasyui.extensions.form.js"></script> 27 <script language=javascript src="/$!globals_sys_basename/web/common/component/easyui/jeasyui-extensions/jeasyui.extensions.panel.js"></script> 28 <script language=javascript src="/$!globals_sys_basename/web/common/component/easyui/jeasyui-extensions/jeasyui.extensions.window.js"></script> 29 <script language=javascript src="/$!globals_sys_basename/web/common/component/easyui/jeasyui-extensions/jeasyui.extensions.dialog.js"></script> 30 <!--easyui--> 31 <script language=‘javascript‘ src=‘/$!globals_sys_basename/web/common/component/Date/WdatePicker.js‘></script> 32 <script language=‘javascript‘ src=‘/$!globals_sys_basename/web/common/component/zdialog/zDialog.js‘></script> 33 <script language=‘javascript‘ src=‘/$!globals_sys_basename/web/common/component/zdialog/zDialog.sunshion.js‘></script> 34 <script type="text/javascript" src="/$!globals_sys_basename/web/common/js/ajax.sunshion.js"></script> 35 <script type="text/javascript" src="/$!globals_sys_basename/web/common/js/xml.sunshion.js"></script> 36 <style> 37 .panel-body{border: 0px solid #DFDFDF !important;} 38 #leftDiv{border: 1px solid #DFDFDF !important;border-top: 0px !important;} 39 .ok{ color:green;} 40 .error{ color:red;} 41 </style> 42 43 <script type="text/javascript"> 44 #if ($msg) 45 top.Dialog.alert("$!msg",function(){ 46 top.ppage.dosearch_license(); 47 top.Dialog.close(); 48 }); 49 #end 50 </script> 51 <head> 52 53 <body> 54 <div class="zdialog"> 55 <form name=‘form1‘ method=‘post‘ action="/$!globals_sys_basename/web/plugins/bs/yygl/dz/g00000000/jtkt.xp?doAction=AddJs"> 56 <input type="hidden" name="doAction" id="doAction" value="AddJs" /> 57 <input type="hidden" name="groupid" id="groupid" value="$!groupid" /> 58 <input type="hidden" name="pluginid" id="pluginid" value="$!pluginid" /> 59 <input type="hidden" name="adminlogin" id="adminlogin" value="$!adminlogin" /> 60 61 <table class="table-nl-sx" style="margin-top: 15px;"> 62 63 <tr> 64 <th width="110" align="right">角色别名:</th> 65 <td width="*"><input class="easyui-textbox input_sx" type="text" name="roleName" id="roleName" maxlength="13" style="width: 200px;" onblur="checkMail(this);"/><font color=red>*</font></td> 66 </tr> 67 68 </table> 69 70 71 </form> 72 </div> 73 </body> 74 </html> 75 76 <script type="text/javascript"> 77 78 function doSubmit(){ 79 if($(‘#roleName‘).val()==""){ 80 Dialog.alert("角色别名不能为空!"); 81 return; 82 } 83 form1.submit(); 84 } 85 function doSubmit_temp() 86 { 87 if(checkMail(MenuName)){ 88 form1.submit(); 89 } 90 } 91 92 function checkMail(t){ 93 var v=t.value; 94 var next=t.nextSibling; 95 if(v==""){ 96 next.className="error"; 97 next.innerHTML="角色别名不能为空"; 98 return false; 99 } 100 next.className="ok"; 101 next.innerHTML=" ?"; 102 return true; 103 } 104 105 106 </script>
第三个tab页面的修改页面
1 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> 2 <html xmlns="http://www.w3.org/1999/xhtml"> 3 <head> 4 <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /> 5 <title>$!globals_sys_name</title> 6 <!-- EasyUi --> 7 <link rel="stylesheet" type="text/css" href="/$!globals_sys_basename/web/common/component/easyui/themes/$!easyui_css_path/easyui.css"></link> 8 <link rel="stylesheet" type="text/css" href="/$!globals_sys_basename/web/common/component/easyui/themes/icon.css"></link> 9 <link rel="stylesheet" type="text/css" href="/$!globals_sys_basename/web/common/component/easyui/themes/demo.css"></link> 10 <link rel="stylesheet" type="text/css" href="/$!globals_sys_basename/web/common/component/easyui/themes/icon-all.css"></link> 11 <link rel="stylesheet" type="text/css" href="/$!globals_sys_basename/web/common/component/easyui/themes/$!easyui_css_path/easyui.sx.css"></link> 12 <!-- EasyUi --> 13 14 <!-- 框架 --> 15 <link rel="stylesheet" type="text/css" href="/$!globals_sys_basename/web/common/css/$!css_path/main.css"></link> 16 <script language=javascript src="/$!globals_sys_basename/web/common/component/easyui/jquery-1.11.1.js"></script> 17 <!--easyui--> 18 <script type="text/javascript" src="/$!globals_sys_basename/web/common/component/easyui/jquery.easyui.util.js"></script> 19 <script type="text/javascript" src="/$!globals_sys_basename/web/common/component/easyui/jquery.easyui.min.js"></script> 20 <script type="text/javascript" src="/$!globals_sys_basename/web/common/component/easyui/easyui-lang-zh_CN.js"></script> 21 <!-- 扩充 jquery 框架基础功能的函数库 --> 22 <script language=javascript src="/$!globals_sys_basename/web/common/component/easyui/jquery.jdirk.js"></script> 23 <script language=javascript src="/$!globals_sys_basename/web/common/component/easyui/jeasyui-extensions/jeasyui.extensions.js"></script> 24 <script language=javascript src="/$!globals_sys_basename/web/common/component/easyui/jeasyui-extensions/jeasyui.extensions.tabs.js"></script> 25 <script language=javascript src="/$!globals_sys_basename/web/common/component/easyui/jeasyui-extensions/jeasyui.extensions.tree.js"></script> 26 <script language=javascript src="/$!globals_sys_basename/web/common/component/easyui/jeasyui-extensions/jeasyui.extensions.form.js"></script> 27 <script language=javascript src="/$!globals_sys_basename/web/common/component/easyui/jeasyui-extensions/jeasyui.extensions.panel.js"></script> 28 <script language=javascript src="/$!globals_sys_basename/web/common/component/easyui/jeasyui-extensions/jeasyui.extensions.window.js"></script> 29 <script language=javascript src="/$!globals_sys_basename/web/common/component/easyui/jeasyui-extensions/jeasyui.extensions.dialog.js"></script> 30 <!--easyui--> 31 <script language=‘javascript‘ src=‘/$!globals_sys_basename/web/common/component/Date/WdatePicker.js‘></script> 32 <script language=‘javascript‘ src=‘/$!globals_sys_basename/web/common/component/zdialog/zDialog.js‘></script> 33 <script language=‘javascript‘ src=‘/$!globals_sys_basename/web/common/component/zdialog/zDialog.sunshion.js‘></script> 34 <script type="text/javascript" src="/$!globals_sys_basename/web/common/js/ajax.sunshion.js"></script> 35 <script type="text/javascript" src="/$!globals_sys_basename/web/common/js/xml.sunshion.js"></script> 36 <style> 37 .panel-body{border: 0px solid #DFDFDF !important;} 38 #leftDiv{border: 1px solid #DFDFDF !important;border-top: 0px !important;} 39 .ok{ color:green;} 40 .error{ color:red;} 41 </style> 42 43 <script type="text/javascript"> 44 #if ($msg) 45 top.Dialog.alert("$!msg",function(){ 46 top.ppage.dosearch_license(); 47 top.Dialog.close(); 48 }); 49 #end 50 </script> 51 <head> 52 53 <body> 54 <div class="zdialog"> 55 <form name=‘form1‘ method=‘post‘ action="/$!globals_sys_basename/web/plugins/bs/yygl/dz/g00000000/jtkt.xp?doAction=updateJs"> 56 <input type="hidden" name="doAction" id="doAction" value="updateJs" /> 57 <input type="hidden" name="roleid" id="roleid" value="$!roleid" /> 58 <input type="hidden" name="groupid" id="groupid" value="$!groupid" /> 59 <input type="hidden" name="pluginid" id="pluginid" value="$!pluginid" /> 60 <input type="hidden" name="adminlogin" id="adminlogin" value="$!adminlogin" /> 61 62 <table class="table-nl-sx" style="margin-top: 15px;"> 63 64 <tr> 65 <th width="110" align="right">角色别名:</th> 66 <td width="*"><input class="easyui-textbox input_sx" type="text" name="roleName" id="roleName" value="$!sljsObj.rolename" maxlength="13" style="width: 200px;" onblur="checkMail(this);"/><font color=red>*</font></td> 67 </tr> 68 69 </table> 70 71 72 </form> 73 </div> 74 </body> 75 </html> 76 77 <script type="text/javascript"> 78 79 function doSubmit(){ 80 if($(‘#roleName‘).val()==""){ 81 Dialog.alert("角色别名不能为空!"); 82 return; 83 } 84 form1.submit(); 85 } 86 function doSubmit_temp() 87 { 88 if(checkMail(MenuName)){ 89 form1.submit(); 90 } 91 } 92 93 function checkMail(t){ 94 var v=t.value; 95 var next=t.nextSibling; 96 if(v==""){ 97 next.className="error"; 98 next.innerHTML="角色别名不能为空"; 99 return false; 100 } 101 next.className="ok"; 102 next.innerHTML=" ?"; 103 return true; 104 } 105 106 107 </script>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<title>$!globals_sys_name</title>
<!-- EasyUi -->
<link rel="stylesheet" type="text/css" href="/$!globals_sys_basename/web/common/component/easyui/themes/$!easyui_css_path/easyui.css"></link>
<link rel="stylesheet" type="text/css" href="/$!globals_sys_basename/web/common/component/easyui/themes/icon.css"></link>
<link rel="stylesheet" type="text/css" href="/$!globals_sys_basename/web/common/component/easyui/themes/demo.css"></link>
<link rel="stylesheet" type="text/css" href="/$!globals_sys_basename/web/common/component/easyui/themes/icon-all.css"></link>
<link rel="stylesheet" type="text/css" href="/$!globals_sys_basename/web/common/component/easyui/themes/$!easyui_css_path/easyui.sx.css"></link>
<!-- EasyUi -->
<!-- 框架 -->
<link rel="stylesheet" type="text/css" href="/$!globals_sys_basename/web/common/css/$!css_path/main.css"></link>
<script language=javascript src="/$!globals_sys_basename/web/common/component/easyui/jquery-1.11.1.js"></script>
<!--easyui-->
<script type="text/javascript" src="/$!globals_sys_basename/web/common/component/easyui/jquery.easyui.util.js"></script>
<script type="text/javascript" src="/$!globals_sys_basename/web/common/component/easyui/jquery.easyui.min.js"></script>
<script type="text/javascript" src="/$!globals_sys_basename/web/common/component/easyui/easyui-lang-zh_CN.js"></script>
<!-- 扩充 jquery 框架基础功能的函数库 -->
<script language=javascript src="/$!globals_sys_basename/web/common/component/easyui/jquery.jdirk.js"></script>
<script language=javascript src="/$!globals_sys_basename/web/common/component/easyui/jeasyui-extensions/jeasyui.extensions.js"></script>
<script language=javascript src="/$!globals_sys_basename/web/common/component/easyui/jeasyui-extensions/jeasyui.extensions.tabs.js"></script>
<script language=javascript src="/$!globals_sys_basename/web/common/component/easyui/jeasyui-extensions/jeasyui.extensions.tree.js"></script>
<script language=javascript src="/$!globals_sys_basename/web/common/component/easyui/jeasyui-extensions/jeasyui.extensions.form.js"></script>
<script language=javascript src="/$!globals_sys_basename/web/common/component/easyui/jeasyui-extensions/jeasyui.extensions.panel.js"></script>
<script language=javascript src="/$!globals_sys_basename/web/common/component/easyui/jeasyui-extensions/jeasyui.extensions.window.js"></script>
<script language=javascript src="/$!globals_sys_basename/web/common/component/easyui/jeasyui-extensions/jeasyui.extensions.dialog.js"></script>
<!--easyui-->
<script language=‘javascript‘ src=‘/$!globals_sys_basename/web/common/component/Date/WdatePicker.js‘></script>
<script language=‘javascript‘ src=‘/$!globals_sys_basename/web/common/component/zdialog/zDialog.js‘></script>
<script language=‘javascript‘ src=‘/$!globals_sys_basename/web/common/component/zdialog/zDialog.sunshion.js‘></script>
<script type="text/javascript" src="/$!globals_sys_basename/web/common/js/ajax.sunshion.js"></script>
<script type="text/javascript" src="/$!globals_sys_basename/web/common/js/xml.sunshion.js"></script>
<style>
.panel-body{border: 0px solid #DFDFDF !important;}
#leftDiv{border: 1px solid #DFDFDF !important;border-top: 0px !important;}
.ok{ color:green;}
.error{ color:red;}
</style>
<script type="text/javascript">
#if ($msg)
top.Dialog.alert("$!msg",function(){
top.Dialog.close();
top.ppag.dosearch();
});
#end
</script>
<head>
<body>
<div class="zdialog">
<form name=‘form1‘ method=‘post‘ action="/$!globals_sys_basename/web/plugins/bs/yygl/dz/g00000000/jtkt.xp?doAction=cjslAdd">
<input type="hidden" name="doAction" id="doAction" value="cjslAdd" />
<input type="hidden" name="groupid" id="groupid" value="$!groupid" />
<input type="hidden" name="pluginid" id="pluginid" value="$!pluginid" />
<input type="hidden" name="PluginIcon" id="PluginIcon" value="$!instObj.plugininsticon" />
<!-- 附件开始 -->
<input name="fj" id="fj" type="hidden" value="" />
<!-- 附件结束 -->
<table class="table-nl-sx" style="margin-top: 15px;">
<tr>
<th width="110" align="right">插件实例名称:</th>
<td width="*"><input class="easyui-textbox input_sx" type="text" name="PluginInstName" id="PluginInstName" value="$!instObj.plugininstname" maxlength="13" style="width: 200px;" onblur="checkMail(this);"/><font color=red>*</font></td>
</tr>
<tr>
<th width="110" align="right">插件实例图标:</th>
<td colspan="3">
<img id="pluginicon" name="pluginicon" src="/$!globals_sys_basename/web/common/page/downloadFile.jsp?path=$!instObj.plugininsticon&type=images" style="cursor:pointer;width:26px;height:26px;background-color: grey"/>
<div class="btn_sx" class="btn_4word_sx" style="vertical-align: top;" onclick="selectUpload(‘fj‘,‘getFJS‘)"">上传图标</div>
</td>
</tr>
<tr>
<th width="110" align="right">插件实例背景色:</th>
<td width="*"><input class="easyui-textbox input_sx" type="text" name="plugininsticonbgcolor" id="plugininsticonbgcolor" value="$!instObj.plugininsticonbgcolor" style="width: 200px;"/></td>
</tr>
</table>
<!-- 上传附件开始 -->
<iframe src="/$!globals_sys_basename/web/plugins/sys/admin/bz/upload.xp?upfiletype=images&backobj=form1.fj&backmethod=getFJS" name="ifrobj" id="ifrobj" frameborder="0"
scrolling="no" width="0" height="0" style="display: none;"></iframe>
<!-- 上传附件结束 -->
<div id="toolbarDiv_license" style="width:100%;">
<table cell-spacing="0" style="width:100%;margin-top: 30px;">
<tr>
<td style="text-align:right;">
<div class="btn_sx btn_2word_sx" style="width: 50px;float: right;margin: 0 30px 0 0;" onclick="doSubmit()">保存</div>
</td>
</tr>
</table>
</div>
</form>
</div>
</body>
</html>
<script type="text/javascript">
function doSubmit(){
if($(‘#PluginInstName‘).val()==""){
Dialog.alert("插件实例名称不能为空!");
return;
}
form1.submit();
}
function doSubmit_temp()
{
if(checkMail(PluginInstName)){
form1.submit();
}
}
function checkMail(t){
var v=t.value;
var next=t.nextSibling;
if(v==""){
next.className="error";
next.innerHTML="插件实例名称不能为空";
return false;
}
next.className="ok";
next.innerHTML=" ?";
return true;
}
function selectUpload(name,backMothd){
ifrobj.form1.upfile.click();
top.afterSelectFile = function(){
//获取上传路径
filepath = ifrobj.form1.upfile.value;
//当文件不等于空时执行的操作
if (filepath != ‘‘){
//执行附件上传
ifrobj.doaction();
}
}
}
function getFJS(backName) {//附件添加
$(‘#PluginIcon‘).val(form1.fj.value);
form1.pluginicon.src = "/$!globals_sys_basename/web/common/page/downloadFile.jsp?path=" + form1.fj.value+"&type=images";
setTimeout(function(){
$(‘#ifrobj‘).attr(‘src‘, ‘/$!globals_sys_basename/web/plugins/sys/admin/bz/upload.xp?upfiletype=images&backobj=form1.fj&backmethod=getFJS‘)
}, 10);
}
</script>
标签:
原文地址:http://www.cnblogs.com/ljf4830/p/5136767.html