You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
269 lines
8.4 KiB
269 lines
8.4 KiB
1 month ago
|
<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
|
||
|
<%@ page import="org.wdk.WDKConstant"%>
|
||
|
<%@ page import="org.wdk.WDKCore"%>
|
||
|
<%@ page import="org.wdk.WDK"%>
|
||
|
<%@ page import="com.noblelift.imp.platform.module.portal.source.SessionUser"%>
|
||
|
<%
|
||
|
String path = request.getContextPath();
|
||
|
String basePath = request.getScheme() + "://" + request.getServerName() + ":" + request.getServerPort() + path + "/";
|
||
|
String WDK_ROOT = WDKCore.WDK_ROOT;
|
||
|
SessionUser su = (SessionUser)WDK.getSessionUser(request, response);
|
||
|
WDK.writeSessionUser(out, su);
|
||
|
%>
|
||
|
<!DOCTYPE html>
|
||
|
<html>
|
||
|
<head>
|
||
|
<meta charset="utf-8">
|
||
|
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
||
|
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||
|
<!-- 上述3个meta标签*必须*放在最前面,任何其他内容都*必须*跟随其后! -->
|
||
|
|
||
|
<base href="<%=basePath%>" target="_self">
|
||
|
<title>应用云平台-应用注册(新增)</title>
|
||
|
<style type="text/css">
|
||
|
</style>
|
||
|
|
||
|
<script type="text/javascript" src="<%=WDK_ROOT%>/theme/je/core/js/wdk.js"></script>
|
||
|
<script type="text/javascript">
|
||
|
<% if(null==su){%>
|
||
|
$.timeout();
|
||
|
<%}%>
|
||
|
|
||
|
</script>
|
||
|
</head>
|
||
|
|
||
|
<body class="easyui-layout" data-options="fit:true">
|
||
|
<div data-options="region:'north',border:false,collapsed:false" class="page-title" style="overflow: hidden;height:40px;">
|
||
|
<div class="edit-page-toolbar">
|
||
|
<a href="javascript:void(0);" id="btnsave" class="easyui-linkbutton" data-options="iconCls:'fa fa-save'" onclick="opt_save()">复制</a>
|
||
|
<a href="javascript:void(0);" class="easyui-linkbutton" data-options="iconCls:'fa fa-close'" onclick="opt_close()">关闭</a>
|
||
|
</div>
|
||
|
</div>
|
||
|
|
||
|
<div data-options="region:'center',border:false,collapsed:false" >
|
||
|
<div class="edit-container">
|
||
|
<div class="form-title">
|
||
|
<span class="form-title-text">以此应用为准进行复制</span>
|
||
|
</div>
|
||
|
<div class="row">
|
||
|
<div class="formgroup">
|
||
|
<label>源应用</label>
|
||
|
<div>
|
||
|
<input type="text" class="easyui-validatebox nospaceinside" name="source_app_name" id="source_app_name" readonly="readonly">
|
||
|
</div>
|
||
|
</div>
|
||
|
</div>
|
||
|
|
||
|
<form id="edit_form">
|
||
|
<input type="hidden" id="source_app_uuid" name="source_app_uuid" class="txt">
|
||
|
<input type="hidden" id="app_uuid" name="app_uuid" value=""/>
|
||
|
<div class="form-title" style="margin-top:10px;">
|
||
|
<span class="form-title-text">新应用基础信息</span>
|
||
|
</div>
|
||
|
<div class="row">
|
||
|
<div class="formgroup">
|
||
|
<label class="required">应用名称</label>
|
||
|
<div>
|
||
|
<input type="text" class="easyui-validatebox nospaceinside" data-options="required:true,validType:'length[3,10]',tipPosition:'bottom'" name="app_name" id="app_name" placeholder="">
|
||
|
</div>
|
||
|
</div>
|
||
|
<div class="formgroup">
|
||
|
<label>应用简称</label>
|
||
|
<div>
|
||
|
<input type="text" class="easyui-validatebox nospaceinside" id="short_name" name="short_name" value=""/>
|
||
|
</div>
|
||
|
</div>
|
||
|
</div>
|
||
|
|
||
|
<div class="row">
|
||
|
<div class="formgroup">
|
||
|
<label class="required">应用代码</label>
|
||
|
<div>
|
||
|
<input type="text" class="easyui-validatebox nospaceinside" data-options="required:true,validType:'length[3,10]',tipPosition:'bottom'" id="app_code" name="app_code" value=""/>
|
||
|
</div>
|
||
|
</div>
|
||
|
</div>
|
||
|
|
||
|
<div class="row">
|
||
|
<div class="formgroup">
|
||
|
<label>数据权限级别</label>
|
||
|
<div>
|
||
|
<input type="text" class="easyui-validatebox nospaceinside" id="data_right_level_scode" name="data_right_level_scode" value=""/>
|
||
|
</div>
|
||
|
</div>
|
||
|
<div class="formgroup">
|
||
|
<label>图标序号</label>
|
||
|
<div>
|
||
|
<input type="text" class="easyui-validatebox nospaceinside" id="ico_index" name="ico_index" value=""/>
|
||
|
</div>
|
||
|
</div>
|
||
|
</div>
|
||
|
|
||
|
<div class="row">
|
||
|
<div class="formgroup">
|
||
|
<label>选中的图标序号</label>
|
||
|
<div>
|
||
|
<input type="text" class="easyui-validatebox nospaceinside" id="select_ico_index" name="select_ico_index" value=""/>
|
||
|
</div>
|
||
|
</div>
|
||
|
<div class="formgroup">
|
||
|
<label class="required">是否启用</label>
|
||
|
<div>
|
||
|
<input id="is_active" name="is_active" >
|
||
|
</div>
|
||
|
</div>
|
||
|
</div>
|
||
|
|
||
|
<div class="row">
|
||
|
<div class="formgroup">
|
||
|
<label>排序</label>
|
||
|
<div>
|
||
|
<input type="text" class="easyui-validatebox nospaceinside" id="display_order" name="display_order" onKeypress="javascript:if(event.keyCode == 32)event.returnValue = false;" pattern="[0-9]"/>
|
||
|
</div>
|
||
|
</div>
|
||
|
<div class="formgroup">
|
||
|
<label class="required">复制应用功能</label>
|
||
|
<div>
|
||
|
<input id="ifcopy" name="ifcopy" >
|
||
|
</div>
|
||
|
</div>
|
||
|
</div>
|
||
|
|
||
|
<div class="row" style="height:80px;">
|
||
|
<div class="formgroup col-12">
|
||
|
<label>描述</label>
|
||
|
<div>
|
||
|
<textarea name="remark" id="remark" ></textarea>
|
||
|
</div>
|
||
|
</div>
|
||
|
</div>
|
||
|
</form>
|
||
|
</div>
|
||
|
</div>
|
||
|
</body>
|
||
|
|
||
|
|
||
|
<script>
|
||
|
var param = $.getURLParam('param');
|
||
|
var jparam = $.str2json($.urlparam_decode(param));
|
||
|
var _actionflag = jparam.queryParams.actionflag; //操作标识:add-添加、mdf-修改、detail-明细
|
||
|
var _app_uuid=jparam.queryParams.app_uuid;//应用包系统标识
|
||
|
|
||
|
$(function() {
|
||
|
combo_box("data_right_level_scode","S_UC_ROLE_DATALEVEL");
|
||
|
$.wait_open();
|
||
|
$.cuajax({
|
||
|
url:'wdk?action=portal.app&method=detail&ajaxparam='+new Date().getTime()
|
||
|
,method:"post"
|
||
|
,data:{
|
||
|
app_uuid:_app_uuid
|
||
|
}
|
||
|
,success:function(result) {
|
||
|
$.wait_close();
|
||
|
var jres = $.str2json(result);
|
||
|
if(jres.code=='1'){
|
||
|
if(jres.rows[0]){
|
||
|
//源
|
||
|
$("#source_app_uuid").val(jres.rows[0].app_uuid);
|
||
|
$("#source_app_name").val(jres.rows[0].app_name);
|
||
|
$("#source_manage_unitname").val(jres.rows[0].manage_unit_uuidname);
|
||
|
|
||
|
//将数据填充到表单中
|
||
|
$.setFieldValue(jres.rows[0], "#edit_form");
|
||
|
$("input[type=radio][name='is_active'][value='"+jres.rows[0].is_active+"']").iCheck("check");//.attr("checked",true);
|
||
|
init_radio('is_active',jres.rows[0].is_active,false);
|
||
|
|
||
|
$('#app_uuid').val($.getUUID());
|
||
|
}
|
||
|
}else{
|
||
|
alert(jres.desc);
|
||
|
}
|
||
|
}
|
||
|
,error:function(result){
|
||
|
$.wait_close();
|
||
|
alert('网络错误!result='+result);
|
||
|
}
|
||
|
});
|
||
|
init_radio('ifcopy','1',false);
|
||
|
});
|
||
|
|
||
|
/**
|
||
|
* 下拉框
|
||
|
*/
|
||
|
function combo_box(id, moduleCode){
|
||
|
$.combobox({
|
||
|
id:id
|
||
|
,url:'wdk?action=wdk.pub&method=call_service&ajaxparam='+new Date().getTime()
|
||
|
,queryParams:{
|
||
|
_SRVNAME:'service.wdk.pub'
|
||
|
,_SRVMETHOD:'wql_queryCombobox'
|
||
|
,_DATA:$.json2str({
|
||
|
modulecode:moduleCode
|
||
|
,jparam:{
|
||
|
condition:''
|
||
|
}
|
||
|
})
|
||
|
,_RSFIELD:'result'
|
||
|
}
|
||
|
});
|
||
|
}
|
||
|
/**
|
||
|
* 初始化单选框
|
||
|
*/
|
||
|
function init_radio(id,initvalue,disabled){
|
||
|
$.radio({
|
||
|
id: id,
|
||
|
initvalue: initvalue,
|
||
|
disabled:disabled,
|
||
|
data:[{id:"1",text:"是"},
|
||
|
{id:"0",text:"否"}
|
||
|
]
|
||
|
});
|
||
|
}
|
||
|
|
||
|
//保存应用
|
||
|
function opt_save(){
|
||
|
//验证
|
||
|
var isok = $("#edit_form").form('validate');
|
||
|
if(!isok){
|
||
|
alert('尚有必填项未填或输入有误,请检查后提交');
|
||
|
return false;
|
||
|
}
|
||
|
//打开旋转
|
||
|
$.wait_open();
|
||
|
|
||
|
//获取所有input和textarea 的输入值
|
||
|
var mainFieldValues = $.getFieldValue({formid:'edit_form'});
|
||
|
mainFieldValues.is_active = $("input:radio[name='is_active']:checked").val();
|
||
|
mainFieldValues.ifcopy = $("input:radio[name='ifcopy']:checked").val();
|
||
|
|
||
|
var _param = {
|
||
|
_FILEDVALUE:$.json2str(mainFieldValues)
|
||
|
};
|
||
|
$.wait_open();
|
||
|
$.cuajax({
|
||
|
url:'wdk?action=portal.app&method=copysave&ajaxparam='+new Date().getTime(),
|
||
|
method:"post",
|
||
|
data:_param,
|
||
|
success:function(result) {
|
||
|
$.wait_close();
|
||
|
var jres = $.str2json(result);
|
||
|
alert(jres.desc);
|
||
|
if(jres.code=="1"){
|
||
|
$.notify("app_reg_edit");//触发用户添加成功消息
|
||
|
opt_close();
|
||
|
}
|
||
|
},
|
||
|
error:function(result){
|
||
|
$.wait_close();
|
||
|
alert('网络错误!result='+result);
|
||
|
}
|
||
|
});
|
||
|
}
|
||
|
|
||
|
//关闭当前页面
|
||
|
function opt_close() {
|
||
|
$.closeActiveTab();
|
||
|
}
|
||
|
</script>
|
||
|
</html>
|