表单模型新建权限
This commit is contained in:
parent
34435cfcf4
commit
c67c3a77dd
@ -8881,6 +8881,7 @@ public class CoeProcessLevelWeb extends ActionWeb {
|
|||||||
*/
|
*/
|
||||||
public String relationFindSameRole(String uuid,String methodId){
|
public String relationFindSameRole(String uuid,String methodId){
|
||||||
ResponseObject ro = ResponseObject.newOkResponse();
|
ResponseObject ro = ResponseObject.newOkResponse();
|
||||||
|
|
||||||
List data=new ArrayList();
|
List data=new ArrayList();
|
||||||
data.add(0,methodId);
|
data.add(0,methodId);
|
||||||
data.add(1,uuid);
|
data.add(1,uuid);
|
||||||
|
|||||||
@ -981,12 +981,11 @@ function openRelationDialog(obj, callback) {
|
|||||||
var methodName="";
|
var methodName="";
|
||||||
if(title=="支持文件"){
|
if(title=="支持文件"){
|
||||||
methodName="新建表单模型";
|
methodName="新建表单模型";
|
||||||
//data.form
|
|
||||||
method="data.form";
|
method="data.form";
|
||||||
}else if(method=="control.kpi"){
|
}else if(method=="control.kpi"){
|
||||||
methodName="新建绩效模型";
|
methodName="新建绩效模型";
|
||||||
}
|
}
|
||||||
if(title=="支持文件" || method=="control.kpi"){
|
if(method=="control.kpi") {
|
||||||
//根据角色
|
//根据角色
|
||||||
$.ajax({
|
$.ajax({
|
||||||
type: "POST",
|
type: "POST",
|
||||||
@ -1001,10 +1000,10 @@ function openRelationDialog(obj, callback) {
|
|||||||
if (msg.data.result == "ok") {
|
if (msg.data.result == "ok") {
|
||||||
var relationDlg = parent.FrmDialog.open({
|
var relationDlg = parent.FrmDialog.open({
|
||||||
title: title,
|
title: title,
|
||||||
width:710,
|
width: 710,
|
||||||
height: 400,
|
height: 400,
|
||||||
url:"./w",
|
url: "./w",
|
||||||
data:{
|
data: {
|
||||||
sid: $("#sid").val(),
|
sid: $("#sid").val(),
|
||||||
cmd: "com.actionsoft.apps.coe.pal_pl_repository_designer_shapes_tree",
|
cmd: "com.actionsoft.apps.coe.pal_pl_repository_designer_shapes_tree",
|
||||||
wsId: $("#wsid").val(),
|
wsId: $("#wsid").val(),
|
||||||
@ -1016,10 +1015,11 @@ function openRelationDialog(obj, callback) {
|
|||||||
modelId: $("#id").val(),
|
modelId: $("#id").val(),
|
||||||
ruuid: uuid
|
ruuid: uuid
|
||||||
},
|
},
|
||||||
id:"relationDialog",
|
id: "relationDialog",
|
||||||
|
|
||||||
buttons: [
|
buttons: [
|
||||||
{text:'确定',cls:"blue",handler:function(){
|
{
|
||||||
|
text: '确定', cls: "blue", handler: function () {
|
||||||
var attrId = obj.attr("id");
|
var attrId = obj.attr("id");
|
||||||
var relationFileId = "";
|
var relationFileId = "";
|
||||||
var relationShapeId = "";
|
var relationShapeId = "";
|
||||||
@ -1028,15 +1028,15 @@ function openRelationDialog(obj, callback) {
|
|||||||
var isRequired = obj.attr('isRequired')
|
var isRequired = obj.attr('isRequired')
|
||||||
if (isRequired == 'true' && relations.length == 0) {
|
if (isRequired == 'true' && relations.length == 0) {
|
||||||
obj.val('');
|
obj.val('');
|
||||||
obj.attr('placeholder',title +'不能为空')
|
obj.attr('placeholder', title + '不能为空')
|
||||||
obj.addClass("required_input_css");
|
obj.addClass("required_input_css");
|
||||||
parent.FrmDialog.close("relationDialog");
|
parent.FrmDialog.close("relationDialog");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if (relations != undefined && relations.length > 0) {
|
if (relations != undefined && relations.length > 0) {
|
||||||
for(var i = 0; i < relations.length; i++) {
|
for (var i = 0; i < relations.length; i++) {
|
||||||
var relationShape = relations[i];
|
var relationShape = relations[i];
|
||||||
if(i == relations.length -1) {
|
if (i == relations.length - 1) {
|
||||||
relationFileId += relationShape.relationFileId;
|
relationFileId += relationShape.relationFileId;
|
||||||
relationShapeId += relationShape.relationShapeId;
|
relationShapeId += relationShape.relationShapeId;
|
||||||
relationShapeText += relationShape.relationShapeText;
|
relationShapeText += relationShape.relationShapeText;
|
||||||
@ -1055,19 +1055,22 @@ function openRelationDialog(obj, callback) {
|
|||||||
saveContent(obj);
|
saveContent(obj);
|
||||||
}
|
}
|
||||||
parent.FrmDialog.close("relationDialog");
|
parent.FrmDialog.close("relationDialog");
|
||||||
}},
|
}
|
||||||
{text:'取消',handler:function(){
|
},
|
||||||
|
{
|
||||||
|
text: '取消', handler: function () {
|
||||||
parent.FrmDialog.close("relationDialog");
|
parent.FrmDialog.close("relationDialog");
|
||||||
}}
|
}
|
||||||
|
}
|
||||||
]
|
]
|
||||||
});
|
});
|
||||||
}else{
|
} else {
|
||||||
var relationDlg = parent.FrmDialog.open({
|
var relationDlg = parent.FrmDialog.open({
|
||||||
title: title,
|
title: title,
|
||||||
width:710,
|
width: 710,
|
||||||
height: 400,
|
height: 400,
|
||||||
url:"./w",
|
url: "./w",
|
||||||
data:{
|
data: {
|
||||||
sid: $("#sid").val(),
|
sid: $("#sid").val(),
|
||||||
cmd: "com.actionsoft.apps.coe.pal_pl_repository_designer_shapes_tree",
|
cmd: "com.actionsoft.apps.coe.pal_pl_repository_designer_shapes_tree",
|
||||||
wsId: $("#wsid").val(),
|
wsId: $("#wsid").val(),
|
||||||
@ -1079,57 +1082,56 @@ function openRelationDialog(obj, callback) {
|
|||||||
modelId: $("#id").val(),
|
modelId: $("#id").val(),
|
||||||
ruuid: uuid
|
ruuid: uuid
|
||||||
},
|
},
|
||||||
id:"relationDialog",
|
id: "relationDialog",
|
||||||
buttons: [
|
buttons: [
|
||||||
{
|
{
|
||||||
text : '刷新',
|
text: '刷新',
|
||||||
cls : "yellow",
|
cls: "yellow",
|
||||||
handler : function() {
|
handler: function () {
|
||||||
// 刷新页面
|
// 刷新页面
|
||||||
parent.document.getElementById("id-awsui-win-frm-2013-frmrelationDialog").contentWindow.location.reload(true);
|
parent.document.getElementById("id-awsui-win-frm-2013-frmrelationDialog").contentWindow.location.reload(true);
|
||||||
}
|
}
|
||||||
},{
|
}, {
|
||||||
text : methodName,
|
text: methodName,
|
||||||
cls : "green",
|
cls: "green",
|
||||||
handler : function() {
|
handler: function () {
|
||||||
|
|
||||||
//根据角色
|
//根据角色
|
||||||
$.ajax({
|
$.ajax({
|
||||||
type : "POST",
|
type: "POST",
|
||||||
url : "./jd?sid="
|
url: "./jd?sid="
|
||||||
+ $("#sid").val()
|
+ $("#sid").val()
|
||||||
+ "&cmd=com.actionsoft.apps.coe.pal_pl_repository_designer_relation_find_same_role",
|
+ "&cmd=com.actionsoft.apps.coe.pal_pl_repository_designer_relation_find_same_role",
|
||||||
data : {
|
data: {
|
||||||
uuid:uuid,
|
uuid: uuid,
|
||||||
methodId:method
|
methodId: method
|
||||||
},
|
},
|
||||||
success : function(msg) {
|
success: function (msg) {
|
||||||
if (msg.data.result== "ok") {
|
if (msg.data.result == "ok") {
|
||||||
window.top.$.simpleAlert("请勿重复"+methodName+"!!!");
|
window.top.$.simpleAlert("请勿重复" + methodName + "!!!");
|
||||||
}else{
|
} else {
|
||||||
//跳转表单/绩效模型
|
//跳转表单/绩效模型
|
||||||
$.ajax({
|
$.ajax({
|
||||||
type : "POST",
|
type: "POST",
|
||||||
url : "./jd?sid="
|
url: "./jd?sid="
|
||||||
+ $("#sid").val()
|
+ $("#sid").val()
|
||||||
+ "&cmd=com.actionsoft.apps.coe.pal_pl_repository_designer_relation_shape_createDialogModel",
|
+ "&cmd=com.actionsoft.apps.coe.pal_pl_repository_designer_relation_shape_createDialogModel",
|
||||||
data : {
|
data: {
|
||||||
uuid:uuid,
|
uuid: uuid,
|
||||||
methodId:method,
|
methodId: method,
|
||||||
wsId:$("#wsid").val(),
|
wsId: $("#wsid").val(),
|
||||||
teamId : $('#teamId').val()
|
teamId: $('#teamId').val()
|
||||||
},
|
},
|
||||||
success : function(msg) {
|
success: function (msg) {
|
||||||
if (msg.result == "ok") {
|
if (msg.result == "ok") {
|
||||||
//关闭新建按钮
|
//关闭新建按钮
|
||||||
var dlgButton=parent.$(".dlg-button button");
|
var dlgButton = parent.$(".dlg-button button");
|
||||||
for(var i=0;i<dlgButton.length;i++){
|
for (var i = 0; i < dlgButton.length; i++) {
|
||||||
var text=dlgButton.eq(i).text();
|
var text = dlgButton.eq(i).text();
|
||||||
if(text=="新建绩效模型" || text=="新建表单模型"){
|
if (text == "新建绩效模型") {
|
||||||
dlgButton.eq(i).hide();
|
dlgButton.eq(i).hide();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
window.open("./w?uuid=" + msg.data.uuid+"&teamId"
|
window.open("./w?uuid=" + msg.data.uuid + "&teamId"
|
||||||
+ "&cmd=com.actionsoft.apps.coe.pal_pl_repository_designer&sid=" + encodeURIComponent($('#sid').val()));
|
+ "&cmd=com.actionsoft.apps.coe.pal_pl_repository_designer&sid=" + encodeURIComponent($('#sid').val()));
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1141,7 +1143,8 @@ function openRelationDialog(obj, callback) {
|
|||||||
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{text:'确定',cls:"blue",handler:function(){
|
{
|
||||||
|
text: '确定', cls: "blue", handler: function () {
|
||||||
var attrId = obj.attr("id");
|
var attrId = obj.attr("id");
|
||||||
var relationFileId = "";
|
var relationFileId = "";
|
||||||
var relationShapeId = "";
|
var relationShapeId = "";
|
||||||
@ -1150,15 +1153,15 @@ function openRelationDialog(obj, callback) {
|
|||||||
var isRequired = obj.attr('isRequired')
|
var isRequired = obj.attr('isRequired')
|
||||||
if (isRequired == 'true' && relations.length == 0) {
|
if (isRequired == 'true' && relations.length == 0) {
|
||||||
obj.val('');
|
obj.val('');
|
||||||
obj.attr('placeholder',title +'不能为空')
|
obj.attr('placeholder', title + '不能为空')
|
||||||
obj.addClass("required_input_css");
|
obj.addClass("required_input_css");
|
||||||
parent.FrmDialog.close("relationDialog");
|
parent.FrmDialog.close("relationDialog");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if (relations != undefined && relations.length > 0) {
|
if (relations != undefined && relations.length > 0) {
|
||||||
for(var i = 0; i < relations.length; i++) {
|
for (var i = 0; i < relations.length; i++) {
|
||||||
var relationShape = relations[i];
|
var relationShape = relations[i];
|
||||||
if(i == relations.length -1) {
|
if (i == relations.length - 1) {
|
||||||
relationFileId += relationShape.relationFileId;
|
relationFileId += relationShape.relationFileId;
|
||||||
relationShapeId += relationShape.relationShapeId;
|
relationShapeId += relationShape.relationShapeId;
|
||||||
relationShapeText += relationShape.relationShapeText;
|
relationShapeText += relationShape.relationShapeText;
|
||||||
@ -1177,19 +1180,120 @@ function openRelationDialog(obj, callback) {
|
|||||||
saveContent(obj);
|
saveContent(obj);
|
||||||
}
|
}
|
||||||
parent.FrmDialog.close("relationDialog");
|
parent.FrmDialog.close("relationDialog");
|
||||||
}},
|
}
|
||||||
{text:'取消',handler:function(){
|
},
|
||||||
|
{
|
||||||
|
text: '取消', handler: function () {
|
||||||
parent.FrmDialog.close("relationDialog");
|
parent.FrmDialog.close("relationDialog");
|
||||||
}}
|
}
|
||||||
|
}
|
||||||
]
|
]
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
}else if(title=="支持文件"){
|
||||||
|
var relationDlg = parent.FrmDialog.open({
|
||||||
|
title: title,
|
||||||
|
width: 710,
|
||||||
|
height: 400,
|
||||||
|
url: "./w",
|
||||||
|
data: {
|
||||||
|
sid: $("#sid").val(),
|
||||||
|
cmd: "com.actionsoft.apps.coe.pal_pl_repository_designer_shapes_tree",
|
||||||
|
wsId: $("#wsid").val(),
|
||||||
|
ref: ref,
|
||||||
|
shapeId: "",
|
||||||
|
attrId: obj.attr("id"),
|
||||||
|
relationShapeIds: obj.attr("relationShapeId"),
|
||||||
|
relationFileIds: obj.attr("relationFileId"),
|
||||||
|
modelId: $("#id").val(),
|
||||||
|
ruuid: uuid
|
||||||
|
},
|
||||||
|
id: "relationDialog",
|
||||||
|
buttons: [
|
||||||
|
{
|
||||||
|
text: '刷新',
|
||||||
|
cls: "yellow",
|
||||||
|
handler: function () {
|
||||||
|
// 刷新页面
|
||||||
|
parent.document.getElementById("id-awsui-win-frm-2013-frmrelationDialog").contentWindow.location.reload(true);
|
||||||
|
}
|
||||||
|
}, {
|
||||||
|
text: methodName,
|
||||||
|
cls: "green",
|
||||||
|
handler: function () {
|
||||||
|
//跳转表单/绩效模型
|
||||||
|
$.ajax({
|
||||||
|
type: "POST",
|
||||||
|
url: "./jd?sid="
|
||||||
|
+ $("#sid").val()
|
||||||
|
+ "&cmd=com.actionsoft.apps.coe.pal_pl_repository_designer_relation_shape_createDialogModel",
|
||||||
|
data: {
|
||||||
|
uuid: uuid,
|
||||||
|
methodId: method,
|
||||||
|
wsId: $("#wsid").val(),
|
||||||
|
teamId: $('#teamId').val()
|
||||||
|
},
|
||||||
|
success: function (msg) {
|
||||||
|
if (msg.result == "ok") {
|
||||||
|
window.open("./w?uuid=" + msg.data.uuid + "&teamId"
|
||||||
|
+ "&cmd=com.actionsoft.apps.coe.pal_pl_repository_designer&sid=" + encodeURIComponent($('#sid').val()));
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
text: '确定', cls: "blue", handler: function () {
|
||||||
|
var attrId = obj.attr("id");
|
||||||
|
var relationFileId = "";
|
||||||
|
var relationShapeId = "";
|
||||||
|
var relationShapeText = "";
|
||||||
|
var relations = relationDlg.win().getRelationShapeInfos();
|
||||||
|
var isRequired = obj.attr('isRequired')
|
||||||
|
if (isRequired == 'true' && relations.length == 0) {
|
||||||
|
obj.val('');
|
||||||
|
obj.attr('placeholder', title + '不能为空')
|
||||||
|
obj.addClass("required_input_css");
|
||||||
|
parent.FrmDialog.close("relationDialog");
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
if (relations != undefined && relations.length > 0) {
|
||||||
|
for (var i = 0; i < relations.length; i++) {
|
||||||
|
var relationShape = relations[i];
|
||||||
|
if (i == relations.length - 1) {
|
||||||
|
relationFileId += relationShape.relationFileId;
|
||||||
|
relationShapeId += relationShape.relationShapeId;
|
||||||
|
relationShapeText += relationShape.relationShapeText;
|
||||||
|
} else {
|
||||||
|
relationFileId += relationShape.relationFileId + ",";
|
||||||
|
relationShapeId += relationShape.relationShapeId + ",";
|
||||||
|
relationShapeText += relationShape.relationShapeText + ",";
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
obj.attr("attrId", attrId);
|
||||||
|
obj.attr("relationFileId", relationFileId);
|
||||||
|
obj.attr("relationShapeId", relationShapeId);
|
||||||
|
obj.val(relationShapeText);
|
||||||
|
if (callback && callback == "saveContent") {
|
||||||
|
saveContent(obj);
|
||||||
|
}
|
||||||
|
parent.FrmDialog.close("relationDialog");
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
text: '取消', handler: function () {
|
||||||
|
parent.FrmDialog.close("relationDialog");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
]
|
||||||
|
});
|
||||||
}else{
|
}else{
|
||||||
var relationDlg = parent.FrmDialog.open({
|
var relationDlg = parent.FrmDialog.open({
|
||||||
title: title,
|
title: title,
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user