|
@@ -1,4 +1,4 @@
|
|
-type ModelContentConfig = {
|
|
+type ChildNodeCommon = {
|
|
nodeKey: string
|
|
nodeKey: string
|
|
nodeName: string
|
|
nodeName: string
|
|
|
|
|
|
@@ -8,15 +8,6 @@ type ModelContentConfig = {
|
|
p_nodeNames?: string[]
|
|
p_nodeNames?: string[]
|
|
p_nodeKeys?: string[]
|
|
p_nodeKeys?: string[]
|
|
childNode: ModelContentConfig | null
|
|
childNode: ModelContentConfig | null
|
|
-
|
|
|
|
- conditionNodes?: {
|
|
|
|
- nodeKey: string
|
|
|
|
- nodeName: string
|
|
|
|
-
|
|
|
|
- local_status?: string
|
|
|
|
- conditionList: any[]
|
|
|
|
- childNode: ModelContentConfig
|
|
|
|
- }[]
|
|
|
|
|
|
|
|
nodeCandidate?: {
|
|
nodeCandidate?: {
|
|
|
|
|
|
@@ -24,6 +15,35 @@ type ModelContentConfig = {
|
|
assignees?: { name: string; id: string }[]
|
|
assignees?: { name: string; id: string }[]
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
+type ModelContentConfig = ChildNodeCommon & {
|
|
|
|
+
|
|
|
|
+ nodeName: string
|
|
|
|
+
|
|
|
|
+ type: number
|
|
|
|
+
|
|
|
|
+ local_status?: string
|
|
|
|
+ p_nodeNames?: string[]
|
|
|
|
+ p_nodeKeys?: string[]
|
|
|
|
+ childNode: ModelContentConfig | null
|
|
|
|
+
|
|
|
|
+
|
|
|
|
+ conditionNodes?: (ChildNodeCommon & {
|
|
|
|
+
|
|
|
|
+
|
|
|
|
+
|
|
|
|
+
|
|
|
|
+
|
|
|
|
+ conditionList?: any[]
|
|
|
|
+ })[]
|
|
|
|
+
|
|
|
|
+ parallelNodes?: (ChildNodeCommon & {
|
|
|
|
+
|
|
|
|
+ })[]
|
|
|
|
+
|
|
|
|
+ inclusiveNodes?: (ChildNodeCommon & {
|
|
|
|
+
|
|
|
|
+ })[]
|
|
|
|
+}
|
|
type RenderNodes = {
|
|
type RenderNodes = {
|
|
[key: string]: 0 | 1
|
|
[key: string]: 0 | 1
|
|
}
|
|
}
|
|
@@ -31,7 +51,7 @@ export const package_modelContentConfig = (data: ModelContentConfig, renderNodes
|
|
|
|
|
|
|
|
|
|
const nodeKeyObj: { [nodeKey: string]: ModelContentConfig } = {}
|
|
const nodeKeyObj: { [nodeKey: string]: ModelContentConfig } = {}
|
|
- const fn = (data: ModelContentConfig, p_nodeKeys: string[] = []) => {
|
|
+ const fn = (data: ModelContentConfig | null, p_nodeKeys: string[] = []) => {
|
|
if (!data) return
|
|
if (!data) return
|
|
data.p_nodeKeys = p_nodeKeys
|
|
data.p_nodeKeys = p_nodeKeys
|
|
|
|
|
|
@@ -43,7 +63,6 @@ export const package_modelContentConfig = (data: ModelContentConfig, renderNodes
|
|
|
|
|
|
data.conditionNodes.forEach(v => {
|
|
data.conditionNodes.forEach(v => {
|
|
fn(v.childNode, _p_nodeKeys)
|
|
fn(v.childNode, _p_nodeKeys)
|
|
-
|
|
|
|
})
|
|
})
|
|
}
|
|
}
|
|
if (data.childNode) {
|
|
if (data.childNode) {
|