pal小组角色权限支持流程清单应用,且流程清单数据受小组权限控制

This commit is contained in:
446052889@qq.com 2022-11-10 11:12:09 +08:00
parent a991288c31
commit daf762aeeb
21 changed files with 96 additions and 76 deletions

View File

@ -34,6 +34,8 @@
</properties>
<modelAdministrator/>
<icon code="&amp;#xe87f;" color="#009b52"/>
<requires/>
<requires>
<require appId="com.actionsoft.apps.coe.pal.cooperation" notActiveHandler="none" res="false"/>
</requires>
<processlist:config>{"f391f672-100b-4d4b-89d1-ba1b4b3d0132":{"wsId":"f391f672-100b-4d4b-89d1-ba1b4b3d0132","createUser":"admin","customColumns":[{"columnType":"default","showOverflow":false,"prop":"no_serialNumber","dataType":"default","name":"序号","width":"78","minWidth":"78","id":"no_serialNumber","label":"序号"},{"columnType":"default","showOverflow":false,"prop":"no_default","dataType":"default","name":"编号","width":"100","minWidth":"100","id":"no_default","label":"编号"},{"columnType":"default","showOverflow":false,"prop":"name","dataType":"name","name":"流程名称","width":"250","minWidth":"250","id":"name","label":"流程名称"},{"columnType":"default","showOverflow":false,"prop":"type","dataType":"selectType","name":"类型","width":"150","minWidth":"150","id":"type","label":"类型","filters":[{"text":"文件夹","value":"default"},{"text":"过程链图","value":"process.epc"},{"text":"流程图","value":"process.flowchart"},{"text":"BPMN图","value":"process.bpmn2"},{"text":"价值链图","value":"process.evc"}]},{"columnType":"default","showOverflow":false,"prop":"status","dataType":"selectStatus","name":"状态","width":"150","minWidth":"150","id":"status","label":"状态","filters":[{"text":"已发布","value":"publish"},{"text":"已停用","value":"stop"},{"text":"设计中","value":"designer"}]},{"columnType":"extendAttr","showOverflow":false,"prop":"bpm_department","dataType":"default","name":"责任部门","width":"150","minWidth":"150","id":"bpm_department","label":"责任部门"},{"columnType":"extendAttr","showOverflow":false,"prop":"bpm_person","dataType":"default","name":"责任人","width":"150","minWidth":"150","id":"bpm_person","label":"责任人"}],"createDate":"2021-07-05 17:03:58"}}</processlist:config>
</app>

View File

@ -17,9 +17,9 @@ public class CoEProcessListController {
// 流程清单-入口
@Mapping("com.actionsoft.apps.coe.pal.processlist_home")
public String processlistHome(UserContext me, String wsid) {
public String processlistHome(UserContext me, String wsId, String teamId) {
PALRepositoryListWeb proc = new PALRepositoryListWeb(me);
return proc.mainPage(me, wsid);
return proc.mainPage(me, wsId, teamId);
}
/**
@ -32,9 +32,9 @@ public class CoEProcessListController {
* @return
*/
@Mapping("com.actionsoft.apps.coe.pal.processlist_header_query")
public String getProcessListHeader (UserContext me, String wsId, String searchInput, String levelValue, String tableFilter) {
public String getProcessListHeader (UserContext me, String wsId, String teamId, String searchInput, String levelValue, String tableFilter) {
PALRepositoryListWeb web = new PALRepositoryListWeb(me);
return web.getProcessListHeader(wsId, searchInput, levelValue, tableFilter);
return web.getProcessListHeader(wsId, teamId, searchInput, levelValue, tableFilter);
}
/**
@ -50,9 +50,9 @@ public class CoEProcessListController {
* @return
*/
@Mapping("com.actionsoft.apps.coe.pal.processlist_data_query")
public String getProcessListTableData(UserContext me, String wsId, String searchInput, String levelValue, int currentPage, int pageStep, String tableHead, String tableFilter) {
public String getProcessListTableData(UserContext me, String wsId, String teamId, String searchInput, String levelValue, int currentPage, int pageStep, String tableHead, String tableFilter) {
PALRepositoryListWeb web = new PALRepositoryListWeb(me);
return web.getProcessListTableData(wsId, searchInput, levelValue, currentPage, pageStep, tableHead, tableFilter);
return web.getProcessListTableData(wsId, teamId, searchInput, levelValue, currentPage, pageStep, tableHead, tableFilter);
}
/**
@ -78,9 +78,9 @@ public class CoEProcessListController {
* @return
*/
@Mapping("com.actionsoft.apps.coe.pal.processlist_data_export")
public String processListExportExcel(UserContext me, String wsId, String searchInput, String levelValue, String tableFilter) {
public String processListExportExcel(UserContext me, String wsId, String teamId, String searchInput, String levelValue, String tableFilter) {
PALRepositoryListWeb web = new PALRepositoryListWeb(me);
return web.processListExportExcel(wsId, searchInput, levelValue, tableFilter);
return web.processListExportExcel(wsId, teamId, searchInput, levelValue, tableFilter);
}
}

View File

@ -30,6 +30,12 @@ public class Plugins implements PluginListener {
params0.put("mainClass", PALRepositoryListWeb.class.getName());
params0.put("deletedClass", "");
list.add(new AppExtensionProfile("PAL流程资产库->流程清单", "aslp://com.actionsoft.apps.coe.pal/registerExtendsApp", params0));
// 注册应用扩展点
Map<String, Object> params1 = new HashMap<String, Object>();
params1.put("title", "流程清单");
params1.put("desc", "流程清单");
list.add(new AppExtensionProfile("PAL小组->流程清单", "aslp://com.actionsoft.apps.coe.pal.cooperation/registerApp", params1));
return list;
}

View File

@ -67,14 +67,9 @@ public class PALRepositoryListWeb extends ActionWeb {
_uc = uc;
}
public String mainPage(UserContext context, String wsId) {
_uc = context;
return getVuePortal(context, wsId);
}
public String mainPage(UserContext context, String wsId, String teamId) {
_uc = context;
return getVuePortal(context, wsId);
return getVuePortal(context, wsId, teamId);
}
/**
@ -83,7 +78,7 @@ public class PALRepositoryListWeb extends ActionWeb {
* @param wsId
* @return
*/
public String getVuePortal(UserContext context, String wsId) {
public String getVuePortal(UserContext context, String wsId, String teamId) {
Map<String, Object> macroLibraries = new HashMap<String, Object>();
macroLibraries.put("sessionId", context.getSessionId());
macroLibraries.put("wsId", wsId);
@ -98,6 +93,7 @@ public class PALRepositoryListWeb extends ActionWeb {
}
}
macroLibraries.put("defaultSelectVal", defaultSelectVal);
macroLibraries.put("teamId", teamId);
macroLibraries.put("settingParam", JSON.toJSON(macroLibraries));
// 操作行为日志记录
if (SDK.getAppAPI().getPropertyBooleanValue(CoEConstant.APP_ID, "IS_RECORD_OP_LOG", false)) {
@ -482,7 +478,7 @@ public class PALRepositoryListWeb extends ActionWeb {
* @param tableFilter 表格表头筛选条件
* @return
*/
public String getProcessListHeader(String wsId, String searchInput, String levelValue, String tableFilter) {
public String getProcessListHeader(String wsId, String teamId, String searchInput, String levelValue, String tableFilter) {
String category = "process";
ResponseObject ro = ResponseObject.newOkResponse();
// 获取默认的表格列
@ -547,7 +543,7 @@ public class PALRepositoryListWeb extends ActionWeb {
ro.put("customTableUncheckedData", customTableUncheckedData);// 未选中表项
}
List<PALRepositoryModel> palList = getFilteredPalRepositoryList(wsId, category, searchInput, levelValue, tableFilter);
List<PALRepositoryModel> palList = getFilteredPalRepositoryList(wsId, teamId, category, searchInput, levelValue, tableFilter);
ro.put("totalCount", palList.size());
return ro.toString();
}
@ -558,7 +554,7 @@ public class PALRepositoryListWeb extends ActionWeb {
* @param category
* @return
*/
private List<PALRepositoryModel> getFilteredPalRepositoryList(String wsId, String category, String searchInput, String levelValue, String tableFilter) {
private List<PALRepositoryModel> getFilteredPalRepositoryList(String wsId, String teamId, String category, String searchInput, String levelValue, String tableFilter) {
// type,status
JSONObject tableFilterObj = JSONObject.parseObject(tableFilter);
// 类型
@ -583,6 +579,13 @@ public class PALRepositoryListWeb extends ActionWeb {
levelSet.add(selectValueArr[i]);
}
}
// 小组权限筛选
Set<String> permVerIds = new HashSet<>();
if (UtilString.isNotEmpty(teamId)) {
// 获取权限versionIds
permVerIds = CoeProcessLevelUtil.getPermRepositoryVersionIds(wsId, teamId, _uc.getUID(), null, null);
}
for (PALRepositoryModel model: palList) {
if (!model.isUse()) {// 非设计中状态过滤
continue;
@ -613,6 +616,11 @@ public class PALRepositoryListWeb extends ActionWeb {
continue;
}
}
if (UtilString.isNotEmpty(teamId)) {// 小组权限判断
if (!permVerIds.contains(model.getVersionId())) {
continue;
}
}
// 追加
tmpPalList.add(model);
}
@ -760,11 +768,11 @@ public class PALRepositoryListWeb extends ActionWeb {
* @param tableFilter
* @return
*/
public String getProcessListTableData(String wsId, String searchInput, String levelValue, int currentPage, int pageStep, String tableHead, String tableFilter) {
public String getProcessListTableData(String wsId, String teamId, String searchInput, String levelValue, int currentPage, int pageStep, String tableHead, String tableFilter) {
String category = "process";
ResponseObject ro = ResponseObject.newOkResponse();
// 获取流程信息
List<PALRepositoryModel> palList = getFilteredPalRepositoryList(wsId, category, searchInput, levelValue, tableFilter);
List<PALRepositoryModel> palList = getFilteredPalRepositoryList(wsId, teamId, category, searchInput, levelValue, tableFilter);
int startPoint = 0;
int endPoint = 0;
if (currentPage <= 0) {
@ -911,7 +919,7 @@ public class PALRepositoryListWeb extends ActionWeb {
* @param tableFilter
* @return
*/
public String processListExportExcel(String wsId, String searchInput, String levelValue, String tableFilter) {
public String processListExportExcel(String wsId, String teamId, String searchInput, String levelValue, String tableFilter) {
JSONObject conditions = new JSONObject();
conditions.put("searchInput", searchInput);
conditions.put("levelValue", levelValue);
@ -920,7 +928,7 @@ public class PALRepositoryListWeb extends ActionWeb {
HSSFSheet sheet = wb.createSheet(I18nRes.findValue(ProcessListConstant.PROCESSLIST, ("流程清单")));
// 模板标题
short rowIndex = 0;
exportSheetData2(wb, sheet, rowIndex, (short) 0, wsId, conditions);
exportSheetData2(wb, sheet, rowIndex, (short) 0, wsId, teamId, conditions);
DCUtil.getInstance();
DCContext dcContext = DCUtil.createTempFileContext(AppsConst.SYS_APP_PLATFORM, "Form", "Sheet", "xls");
FileOutputStream out = null;
@ -953,7 +961,7 @@ public class PALRepositoryListWeb extends ActionWeb {
* @param wsId
* @param conditions
*/
private void exportSheetData2(HSSFWorkbook wb, HSSFSheet sheet, int rowIndex, short columnIndex, String wsId, JSONObject conditions) {
private void exportSheetData2(HSSFWorkbook wb, HSSFSheet sheet, int rowIndex, short columnIndex, String wsId, String teamId, JSONObject conditions) {
HSSFFont font = wb.createFont();
HSSFCellStyle styleHead = wb.createCellStyle();
styleHead.setFillForegroundColor(HSSFColor.BLUE_GREY.index);
@ -983,7 +991,7 @@ public class PALRepositoryListWeb extends ActionWeb {
String searchInput = conditions.getString("searchInput");
String levelValue = conditions.getString("levelValue");
String tableFilter = conditions.getString("tableFilter");
List<PALRepositoryModel> palList = getFilteredPalRepositoryList(wsId, category, searchInput, levelValue, tableFilter);
List<PALRepositoryModel> palList = getFilteredPalRepositoryList(wsId, teamId, category, searchInput, levelValue, tableFilter);
// 获取配置信息
JSONArray tableHeadConfigArr = getProcessListTableHeaderData(wsId, category);
// 获取展现到Excel的扩展字段

View File

@ -1,6 +1,7 @@
<!DOCTYPE html><html lang=en><head><meta charset=utf-8><meta http-equiv=X-UA-Compatible content="IE=edge"><meta name=viewport content="width=device-width,initial-scale=1"><link rel=icon href=../apps/com.actionsoft.apps.coe.pal.processlist/main/favicon.ico><title>com.actionsoft.apps.coe.pal.processlist</title><script>const settingParam = <#settingParam>;
const axiosBaseUrl = "./";
const production = true;</script><script>var wsId = "<#wsId>";
var teamId = "<#teamId>";
var levelSelect = <#levelSelect>;
var defaultSelectVal = <#defaultSelectVal>;
var wHref = "./w";</script><link href=../apps/com.actionsoft.apps.coe.pal.processlist/main/css/chunk-6e39575d.431c8ce0.css rel=prefetch><link href=../apps/com.actionsoft.apps.coe.pal.processlist/main/js/chunk-2d224ef1.43774eae.js rel=prefetch><link href=../apps/com.actionsoft.apps.coe.pal.processlist/main/js/chunk-3a9b7577.9d1f1636.js rel=prefetch><link href=../apps/com.actionsoft.apps.coe.pal.processlist/main/js/chunk-6e39575d.40cb27de.js rel=prefetch><link href=../apps/com.actionsoft.apps.coe.pal.processlist/main/css/app.cc849ee7.css rel=preload as=style><link href=../apps/com.actionsoft.apps.coe.pal.processlist/main/js/app.238f44f1.js rel=preload as=script><link href=../apps/com.actionsoft.apps.coe.pal.processlist/main/js/chunk-vendors.7670095f.js rel=preload as=script><link href=../apps/com.actionsoft.apps.coe.pal.processlist/main/css/app.cc849ee7.css rel=stylesheet></head><body style=margin:0;><div id=app></div><script src=../apps/com.actionsoft.apps.coe.pal.processlist/main/js/chunk-vendors.7670095f.js></script><script src=../apps/com.actionsoft.apps.coe.pal.processlist/main/js/app.238f44f1.js></script></body></html>
var wHref = "./w";</script><link href=../apps/com.actionsoft.apps.coe.pal.processlist/main/css/chunk-ced74f8c.079f8c54.css rel=prefetch><link href=../apps/com.actionsoft.apps.coe.pal.processlist/main/js/chunk-2004eb4d.47f80d5d.js rel=prefetch><link href=../apps/com.actionsoft.apps.coe.pal.processlist/main/js/chunk-2d224ef1.f27d8dfa.js rel=prefetch><link href=../apps/com.actionsoft.apps.coe.pal.processlist/main/js/chunk-ced74f8c.fd10408c.js rel=prefetch><link href=../apps/com.actionsoft.apps.coe.pal.processlist/main/css/app.fba1b030.css rel=preload as=style><link href=../apps/com.actionsoft.apps.coe.pal.processlist/main/js/app.44056653.js rel=preload as=script><link href=../apps/com.actionsoft.apps.coe.pal.processlist/main/js/chunk-vendors.dfef4ec2.js rel=preload as=script><link href=../apps/com.actionsoft.apps.coe.pal.processlist/main/css/app.fba1b030.css rel=stylesheet></head><body style=margin:0;><div id=app></div><script src=../apps/com.actionsoft.apps.coe.pal.processlist/main/js/chunk-vendors.dfef4ec2.js></script><script src=../apps/com.actionsoft.apps.coe.pal.processlist/main/js/app.44056653.js></script></body></html>

View File

@ -1,16 +1,19 @@
<?xml version="1.0" encoding="utf-8"?>
<aws-actions>
<cmd-bean name="com.actionsoft.apps.coe.pal.processlist_home">
<param name="wsid"/>
<param name="wsId"/>
<param name="teamId"/>
</cmd-bean>
<cmd-bean name="com.actionsoft.apps.coe.pal.processlist_header_query">
<param name="wsId"/>
<param name="teamId"/>
<param name="searchInput"/>
<param name="levelValue"/>
<param name="tableFilter"/>
</cmd-bean>
<cmd-bean name="com.actionsoft.apps.coe.pal.processlist_data_query">
<param name="wsId"/>
<param name="teamId"/>
<param name="searchInput"/>
<param name="levelValue"/>
<param name="currentPage"/>
@ -24,6 +27,7 @@
</cmd-bean>
<cmd-bean name="com.actionsoft.apps.coe.pal.processlist_data_export">
<param name="wsId"/>
<param name="teamId"/>
<param name="searchInput"/>
<param name="levelValue"/>
<param name="tableFilter"/>

View File

@ -1 +0,0 @@
.el-select--medium{float:left}a,button,div,i,input,span{outline:none}.grid-content[data-v-4573c24d]{border-radius:4px;min-height:36px}.custom_table_dlg_icon[data-v-4573c24d]{color:#4e7ff9;font-size:20px;cursor:pointer;position:relative;top:5px}.custom-table-dlg-li[data-v-4573c24d]{text-align:left;padding-left:20px;height:30px;line-height:30px;vertical-align:middle;cursor:move}.custom-table-dlg-li[data-v-4573c24d]:hover{background-color:#f5f7fa}.custom-table-dlg-li-item[data-v-4573c24d]{display:inline-block;width:88%}.custom-table-dlg-li-item-icon[data-v-4573c24d]{width:10%;text-align:center}.icon-display[data-v-4573c24d]{display:none}.custom-table-dlg-li:hover .icon-display[data-v-4573c24d]{display:inline-block}.custom-table-dlg-footer[data-v-4573c24d]{height:40px;text-align:right;padding:10px}.draggable-title[data-v-4573c24d]{text-align:left;padding-left:20px;height:30px;line-height:30px;font-size:12px;color:#95a2b2}.head-title[data-v-4573c24d]{display:inline-block}.button_fixed_width[data-v-4573c24d]{width:80px}#customTableDlg[data-v-4573c24d] .awsui-sidebar__header{padding:10px 10px 10px 20px}#processlistMain[data-v-4573c24d] .el-table__row:hover .processlist-title,#processlistMain[data-v-4573c24d] .el-table__row:hover .processlist-title-version{color:#4e7ff9!important}.processlist-title-version[data-v-4573c24d]{display:inline-block;-webkit-transform:scale(.9);font-size:12px;color:#aaa}.btn-more-data[data-v-4573c24d]:hover{color:#4e7ff9}.btn-more-data[data-v-4573c24d]{cursor:pointer}

View File

@ -0,0 +1 @@
.el-select--medium{float:left}a,button,div,i,input,span{outline:none}.grid-content[data-v-73d834fa]{border-radius:4px;min-height:36px}.custom_table_dlg_icon[data-v-73d834fa]{color:#4e7ff9;font-size:20px;cursor:pointer;position:relative;top:5px}.custom-table-dlg-li[data-v-73d834fa]{text-align:left;padding-left:20px;height:30px;line-height:30px;vertical-align:middle;cursor:move}.custom-table-dlg-li[data-v-73d834fa]:hover{background-color:#f5f7fa}.custom-table-dlg-li-item[data-v-73d834fa]{display:inline-block;width:88%}.custom-table-dlg-li-item-icon[data-v-73d834fa]{width:10%;text-align:center}.icon-display[data-v-73d834fa]{display:none}.custom-table-dlg-li:hover .icon-display[data-v-73d834fa]{display:inline-block}.custom-table-dlg-footer[data-v-73d834fa]{height:40px;text-align:right;padding:10px}.draggable-title[data-v-73d834fa]{text-align:left;padding-left:20px;height:30px;line-height:30px;font-size:12px;color:#95a2b2}.head-title[data-v-73d834fa]{display:inline-block}.button_fixed_width[data-v-73d834fa]{width:80px}#customTableDlg[data-v-73d834fa] .awsui-sidebar__header{padding:10px 10px 10px 20px}#processlistMain[data-v-73d834fa] .el-table__row:hover .processlist-title,#processlistMain[data-v-73d834fa] .el-table__row:hover .processlist-title-version{color:#4e7ff9!important}.processlist-title-version[data-v-73d834fa]{display:inline-block;-webkit-transform:scale(.9);font-size:12px;color:#aaa}.btn-more-data[data-v-73d834fa]:hover{color:#4e7ff9}.btn-more-data[data-v-73d834fa]{cursor:pointer}

File diff suppressed because one or more lines are too long

View File

@ -1 +0,0 @@
(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-2d224ef1"],{e1f5:function(e,s,t){"use strict";t.r(s);var n=function(){var e=this,s=e.$createElement,t=e._self._c||s;return t("div",{staticClass:"devGetSession"},[e._v(" 正在获取session ")])},a=[],o=t("a18c"),d=t("0f08"),i=t("4360");d["a"].post({url:"jd",data:{userid:devUserInfo.userid,pwd:devUserInfo.pwd,lang:"cn",cmd:"com.actionsoft.apps.getsession.get",deviceType:"pc"}}).then((function(e){"error"==e.result?alert("获取session错误"+e.msg):(i["a"].commit("edit",{sessionId:e.data.sid}),o["a"].replace("/"))}));var c={data:function(){return{dwList:[]}},methods:{},mounted:function(){}},r=c,u=t("2877"),l=Object(u["a"])(r,n,a,!1,null,null,null);s["default"]=l.exports}}]);

View File

@ -0,0 +1 @@
(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-2d224ef1"],{e1f5:function(e,s,t){"use strict";t.r(s);var n=function(){var e=this,s=e._self._c;return s("div",{staticClass:"devGetSession"},[e._v(" 正在获取session ")])},a=[],d=t("a18c"),o=t("0f08"),i=t("4360");o["a"].post({url:"jd",data:{userid:devUserInfo.userid,pwd:devUserInfo.pwd,lang:"cn",cmd:"com.actionsoft.apps.getsession.get",deviceType:"pc"}}).then((function(e){"error"==e.result?alert("获取session错误"+e.msg):(i["a"].commit("edit",{sessionId:e.data.sid}),d["a"].replace("/"))}));var r={data(){return{dwList:[]}},methods:{},mounted(){}},c=r,u=t("0b56"),l=Object(u["a"])(c,n,a,!1,null,null,null);s["default"]=l.exports}}]);