226 lines
10 KiB
HTML
Executable File
226 lines
10 KiB
HTML
Executable File
<!Doctype html><html xmlns=http://www.w3.org/1999/xhtml>
|
||
<head>
|
||
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
|
||
<title>Welcome to AWSUI Index Page.</title>
|
||
<link rel="stylesheet" href="../commons/css/awsui.css"/>
|
||
<link rel="stylesheet" href="../commons/js/jquery/themes/default/ui/reference/jquery-ui.css">
|
||
<link type="text/css" rel="stylesheet" href="../commons/js/jquery/themes/default/demo/shCoreDefault.css"/>
|
||
<link type="text/css" rel="stylesheet" href="../apps/_bpm.platform/css/amc/console.admin.amc.public.css" />
|
||
<script src="../commons/js/jquery/scripts/jquery.js"></script>
|
||
<script src="../commons/js/awsui.js"></script>
|
||
<style type="text/css">
|
||
.head_height{
|
||
height:40px;
|
||
}
|
||
.treecls{
|
||
color:red;
|
||
}
|
||
body{
|
||
margin:0px;
|
||
overflow-y:hidden;
|
||
}
|
||
.awsui-layout-left-title {
|
||
text-align: center;
|
||
}
|
||
.trBackgroud{
|
||
background-color: #E0EEFF;
|
||
}
|
||
th div{
|
||
padding: 4px 5px;
|
||
}
|
||
#innerTable td {
|
||
white-space:pre-line;
|
||
}
|
||
.listTable{
|
||
min-width:300px;
|
||
}
|
||
#listTable th {
|
||
border-bottom: 0px solid #fff;
|
||
}
|
||
</style>
|
||
<script type="text/javascript">
|
||
function addCssToTr(obj){
|
||
$(obj).addClass("trBackgroud");
|
||
}
|
||
function removeCssFromTr(obj){
|
||
$(obj).removeClass("trBackgroud");
|
||
}
|
||
//切换为输入框
|
||
function changeInput(obj) {
|
||
$(obj).css("cursor", "pointer");
|
||
}
|
||
//移除输入框
|
||
function removeInput(obj) {
|
||
}
|
||
|
||
var opt;
|
||
var opt1;
|
||
var opt2;
|
||
var switchs;
|
||
var jsonShape;
|
||
//点击-修改
|
||
function updateAttr(obj) {
|
||
//回填值
|
||
var attrCode = $(obj).children("td").eq(1).children("div").text();
|
||
var attrName = $(obj).children("td").eq(2).children("div").text();
|
||
var attrType = $(obj).children("td").eq(3).children("div").children("span").text();
|
||
var attrValue = $(obj).children("td").eq(4).children("div").children("span").text();
|
||
var readOnly = $(obj).children("td").eq(5).children("div").children("span").text();
|
||
var groupPath = $(obj).children("td").eq(6).children("div").children("span").attr("name");
|
||
var scope = $(obj).children("td").eq(7).children("div").children("span").text();
|
||
var isValid = $(obj).children("td").eq(8).children("div").text();
|
||
|
||
var dlg = parent.FrmDialog.open({
|
||
title : "修改属性",
|
||
width : 780,
|
||
height : 440,
|
||
url : "./w",
|
||
data : {
|
||
sid : "<#sid>",
|
||
cmd : 'com.actionsoft.apps.coe.pal_pl_manage_attr_dialog_page',
|
||
methodId : "<#methodId>",
|
||
attrCode : attrCode,
|
||
attrName : attrName,
|
||
attrType : attrType,
|
||
attrValue : attrValue,
|
||
readOnly : readOnly,
|
||
groupPath : groupPath,
|
||
isValid : isValid,
|
||
scope : scope,
|
||
type : "update"
|
||
},
|
||
id : "updateAttribute",
|
||
buttons : [{
|
||
text : '确定',
|
||
cls : "blue",
|
||
handler : function() {
|
||
var attrDialog = dlg.win();
|
||
var dialogData = attrDialog.getData();
|
||
console.log("dialogData", dialogData);
|
||
var attrCode = dialogData.attrCode;
|
||
var attrName = dialogData.attrName;
|
||
var fileCkb = dialogData.fileCkb;
|
||
var shapeCkb = dialogData.shapeCkb;
|
||
var selectShape = dialogData.selectShape;
|
||
var type = dialogData.type;
|
||
var value = dialogData.value;
|
||
var readOnly = dialogData.readOnly;
|
||
var groupPath = dialogData.groupPath;
|
||
var isValid = dialogData.isValid;
|
||
//对于必填项的判断
|
||
if (attrCode.trim().length <= 0){
|
||
parent.$.simpleAlert("[属性代码]不允许为空","info",1500);
|
||
return;
|
||
}
|
||
if (attrName.trim().length <= 0) {
|
||
parent.$.simpleAlert("[属性名称]不允许为空", 'info', 1500);
|
||
return;
|
||
}
|
||
if (!(fileCkb || shapeCkb || selectShape != null)) {
|
||
parent.$.simpleAlert("[作用范围]不允许为空", "info", 1500);
|
||
return;
|
||
}
|
||
if (readOnly) {
|
||
readOnly = "true";
|
||
} else {
|
||
readOnly = "false";
|
||
}
|
||
if (isValid) {
|
||
isValid = "true";
|
||
} else {
|
||
isValid = "false";
|
||
}
|
||
var scope = new Array();
|
||
if (fileCkb == true) {
|
||
scope.push("%");
|
||
}
|
||
if (shapeCkb == true) {
|
||
if (selectShape == null) {
|
||
scope.push("*");
|
||
} else {
|
||
//将多选选中的图形变为name值,而不是tit
|
||
scope.push(selectShape);
|
||
}
|
||
}
|
||
scope = scope.join(",");
|
||
//向后端请求(methodId, key, title, type, value, readOnly, groupPath, isValid, scope)
|
||
awsui.ajax.post("./jd?sid=<#sid>&cmd=com.actionsoft.apps.coe.pal_pl_manage_update_attr", { methodId: "<#methodId>", key: attrCode, title: attrName, type: type, value: value, readOnly: readOnly, groupPath: groupPath, isValid: isValid, scope: scope}, function(data) {
|
||
dlg.close();
|
||
if (data.msg == "参数不完整") {
|
||
parent.$.simpleAlert("必填项不允许为空","error",1000);
|
||
return;
|
||
}
|
||
if (data.msg == "修改成功") {
|
||
parent.$.simpleAlert("修改成功", "ok", 1500);
|
||
window.location.reload();
|
||
} else {
|
||
parent.$.simpleAlert("修改失败!","error",1000);
|
||
}
|
||
}, 'json');
|
||
}
|
||
}, {
|
||
text : '取消',
|
||
handler : function() {
|
||
dlg.close();
|
||
}
|
||
}]
|
||
});
|
||
}
|
||
|
||
$(function(){
|
||
$(window).trigger('resize');
|
||
})
|
||
|
||
$(window).resize(function(){
|
||
$('#mainDiv').height($(window).height());
|
||
$('#listDiv').width($('#mainDiv').width() + 20).height($('#mainDiv').height() - 98);
|
||
$("#number").width(Math.round($('#mainDiv').width()*0.03));
|
||
$("#attrId").width(Math.round($('#mainDiv').width()*0.15));
|
||
$("#attrName").width(Math.round($('#mainDiv').width()*0.15));
|
||
$("#attrType").width(Math.round($('#mainDiv').width()*0.08));
|
||
$("#attrValue").width(Math.round($('#mainDiv').width()*0.09));
|
||
$("#readOnly").width(Math.round($('#mainDiv').width()*0.07));
|
||
$("#schema").width(Math.round($('#mainDiv').width()*0.09));
|
||
$("#scope").width(Math.round($('#mainDiv').width()*0.265));
|
||
$("#valid").width(Math.round($('#mainDiv').width()*0.075));
|
||
if ($(window).width() < 1000) {
|
||
$("#secondDiv").css("height", "91%");
|
||
} else {
|
||
$("#secondDiv").css("height", "100%");
|
||
}
|
||
})
|
||
</script>
|
||
</head>
|
||
<body style='background:url("../apps/com.actionsoft.apps.coe.pal/img/noise-dark_195x195.png") repeat scroll 0 0 #FFFFFF'>
|
||
|
||
<div id="mainDiv" style="width:100%;overflow-y:hidden;">
|
||
<div style="height:100%">
|
||
<div id="secondDiv" style="height:100%;margin-left:0px;margin-right:0px;margin-top:0px; overflow-y:hidden;">
|
||
<table id="listTable" class="listTable awsui-table awsui-table-thin" style="margin-top: -8px;">
|
||
<tr>
|
||
<th id="number" style="width:5%;text-align:center;"><div>序号</div></th>
|
||
<th id="attrId" style="width:14%;text-align:center;"><div>属性代码</div></th>
|
||
<th id="attrName" style="width:15%;text-align:center;"><div>属性名称</div></th>
|
||
<th id="attrType" style="width:8%;text-align:center;"><div>属性类型</div></th>
|
||
<th id="attrValue" style="width:8%;text-align:center;"><div>默认值</div></th>
|
||
<th id="readOnly" style="width:8%;text-align:center;"><div>是否只读</div></th>
|
||
<th id="schema" style="width:9%;text-align:center;"><div>所属目录</div></th>
|
||
<th id="scope" style="width:25%;text-align:center;"><div>作用范围</div></th>
|
||
<th id="valid" style="width:8%;text-align:center;"><div style="margin-right: 20px;">是否有效</div></th>
|
||
</tr>
|
||
<tr>
|
||
<td colspan="12" style="padding: 0px;">
|
||
<div id="listDiv" style="overflow:auto;">
|
||
<table style="width:100%;" cellspacing=0 cellpadding=0 id='innerTable'>
|
||
<#content>
|
||
</table>
|
||
</div>
|
||
<td>
|
||
</tr>
|
||
</table>
|
||
</div>
|
||
</div>
|
||
</div>
|
||
|
||
</body>
|
||
</html> |