|
@@ -38,7 +38,7 @@ export function getNodeMsg(xmlObj) {
|
|
|
let prefix = getProcessEngine();
|
|
|
let { attributes, childNodes } = xmlObj
|
|
|
.getElementsByTagName("bpmn:process")[0];
|
|
|
- let bpmProcessConfigurationList = [], bpmNodeHandleUserList = [], bpmNodeScriptRelevanceList = [], attributeArray = ['nodeKey', 'nodeFormKey', 'nodeFormType', 'nodeProcessKey', 'nodeRolePremission', 'spare1', 'spare2', 'spare3', 'createBy', 'updateBy', 'remark', 'nodeExecuteType'];
|
|
|
+ let bpmProcessConfigurationList = [], bpmNodeHandleUserList = [], bpmNodeScriptRelevanceList = [], bpmTableNameList = [], attributeArray = ['nodeKey', 'nodeFormKey', 'nodeFormType', 'nodeProcessKey', 'nodeRolePremission', 'spare1', 'spare2', 'spare3', 'createBy', 'updateBy', 'remark', 'nodeExecuteType'];
|
|
|
childNodes.forEach((node) => {
|
|
|
// let uuid = uuidv4();
|
|
|
|
|
@@ -64,6 +64,8 @@ export function getNodeMsg(xmlObj) {
|
|
|
if (nodeObj.nodeType == "sequenceFlow") return;
|
|
|
let nodeExceptionList = getNodeException(node, nodeObj)
|
|
|
let bpmNodeHandleUser = getBpmNodeHandleUser(node, nodeObj)
|
|
|
+ let tableNameList = getTableNameList(node, nodeObj)
|
|
|
+ bpmTableNameList = [...bpmTableNameList, ...tableNameList]
|
|
|
bpmNodeScriptRelevanceList = [...bpmNodeScriptRelevanceList, ...nodeExceptionList];//获取节点脚本数据
|
|
|
bpmNodeHandleUserList = [...bpmNodeHandleUserList, ...bpmNodeHandleUser]
|
|
|
attributeArray.forEach(attr => {
|
|
@@ -83,10 +85,12 @@ export function getNodeMsg(xmlObj) {
|
|
|
}
|
|
|
bpmProcessConfigurationList.push(nodeObj)
|
|
|
})
|
|
|
+ bpmTableNameList = [...new Set(bpmTableNameList)];
|
|
|
return {
|
|
|
bpmProcessConfigurationList,
|
|
|
bpmNodeHandleUserList,
|
|
|
- bpmNodeScriptRelevanceList
|
|
|
+ bpmNodeScriptRelevanceList,
|
|
|
+ tableNameList: bpmTableNameList
|
|
|
};
|
|
|
}
|
|
|
|
|
@@ -170,6 +174,27 @@ function getBpmNodeHandleUser(node, nodeObj) {
|
|
|
return [res]
|
|
|
}
|
|
|
|
|
|
+function getTableNameList(node, nodeObj) {
|
|
|
+ console.dir(node, nodeObj);
|
|
|
+ let prefix = getProcessEngine();
|
|
|
+ let res = [];
|
|
|
+ // 获取正常节点的tableName
|
|
|
+ let tableNameArr = node.getAttribute(prefix + ':tableName')
|
|
|
+ tableNameArr && (res = res.concat(tableNameArr.split(',')));
|
|
|
+
|
|
|
+ // 获取异常节点的tableName
|
|
|
+ node.childNodes[0]?.childNodes.forEach(item => {
|
|
|
+ if (item.localName == 'unusualTask') {
|
|
|
+ let tableNameArrUn = item.getAttribute('tableName')
|
|
|
+ tableNameArrUn && (res = res.concat(tableNameArrUn.split(',')));
|
|
|
+ }
|
|
|
+ })
|
|
|
+ console.log(res);
|
|
|
+ return res;
|
|
|
+}
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
// 处理节点数据更新
|
|
|
export function filterNodeMsg(oldMsg, newMsg) {
|
|
|
let keys = ['bpmProcessConfigurationList', 'bpmNodeScriptRelevanceList', 'bpmNodeHandleUserList', 'removeNodeIds']
|
|
@@ -199,7 +224,7 @@ export function filterNodeMsg(oldMsg, newMsg) {
|
|
|
})
|
|
|
}).map(item => item.id)
|
|
|
|
|
|
-
|
|
|
+ newMsg.tableNameList = oldMsg.tableNameList
|
|
|
|
|
|
return newMsg;
|
|
|
}
|