|
@@ -3,14 +3,17 @@ type ModelContentConfig = {
|
|
|
nodeName: string
|
|
|
|
|
|
type: number
|
|
|
- local_status?: string
|
|
|
+
|
|
|
+ local_status?: string
|
|
|
p_nodeNames?: string[]
|
|
|
p_nodeKeys?: string[]
|
|
|
childNode: ModelContentConfig | null
|
|
|
|
|
|
conditionNodes?: {
|
|
|
+ nodeKey: string
|
|
|
nodeName: string
|
|
|
- local_status?: string
|
|
|
+
|
|
|
+ local_status?: string
|
|
|
conditionList: any[]
|
|
|
childNode: ModelContentConfig
|
|
|
}[]
|
|
@@ -28,7 +31,7 @@ export const package_modelContentConfig = (data: ModelContentConfig, renderNodes
|
|
|
|
|
|
|
|
|
const nodeKeyObj: { [nodeKey: string]: ModelContentConfig } = {}
|
|
|
- const fn = (data: ModelContentConfig, p_nodeKeys = []) => {
|
|
|
+ const fn = (data: ModelContentConfig, p_nodeKeys: string[] = []) => {
|
|
|
if (!data) return
|
|
|
data.p_nodeKeys = p_nodeKeys
|
|
|
|
|
@@ -105,5 +108,14 @@ export const package_modelContentConfig = (data: ModelContentConfig, renderNodes
|
|
|
if (!node.local_status) {
|
|
|
node.local_status = 'info'
|
|
|
}
|
|
|
+
|
|
|
+ if (node.conditionNodes && Array.isArray(node.conditionNodes)) {
|
|
|
+ node.conditionNodes.forEach(v => {
|
|
|
+ const local_status = local_status_obj[renderNodes[v.nodeKey]]
|
|
|
+ if (local_status) {
|
|
|
+ v.local_status = local_status
|
|
|
+ }
|
|
|
+ })
|
|
|
+ }
|
|
|
})
|
|
|
}
|