From 919fc710d93c16538a9edd42dd67d3e393fb7ae8 Mon Sep 17 00:00:00 2001 From: Zzm0809 Date: Tue, 17 Sep 2024 06:13:42 +0000 Subject: [PATCH] Spotless Apply --- .../src/components/TableLineage/function.ts | 33 +- .../src/components/TableLineage/index.tsx | 264 ++-- dinky-web/src/pages/Test/index.tsx | 1168 +++++++++-------- dinky-web/src/types/DevOps/data.d.ts | 2 +- 4 files changed, 745 insertions(+), 722 deletions(-) diff --git a/dinky-web/src/components/TableLineage/function.ts b/dinky-web/src/components/TableLineage/function.ts index c29322a241..d840cefd72 100644 --- a/dinky-web/src/components/TableLineage/function.ts +++ b/dinky-web/src/components/TableLineage/function.ts @@ -1,7 +1,6 @@ -import {LineageDetailInfo} from "@/types/DevOps/data"; -import {EdgeData, NodeData} from "@antv/g6"; -import {ComboData, GraphData} from "@antv/g6/src/spec/data"; - +import { LineageDetailInfo } from '@/types/DevOps/data'; +import { EdgeData, NodeData } from '@antv/g6'; +import { ComboData, GraphData } from '@antv/g6/src/spec/data'; /** * { "nodes": [ { "id": "node1", "combo": "combo-1", "style": { "x": 100, "y": 100 } }, { "id": "node2", "style": { "x": 200, "y": 200 } } ], "edges": [{ "source": "node1", "target": "node2" }], "combos": [{ "id": "combo-1", "style": { "x": 100, "y": 100 } }] } @@ -12,13 +11,13 @@ const lineageDataTransformToGraphData = (data: LineageDetailInfo): GraphData => const edges: EdgeData[] = []; // 边 const combos: ComboData[] = []; // 分组 - data.tables.forEach(item => { - item.columns.forEach(column => { + data.tables.forEach((item) => { + item.columns.forEach((column) => { nodes.push({ id: item.name + '.' + column.name, label: column.name, fullDbName: item.name, - column: column, + column: column }); }); // nodes.push({ @@ -40,11 +39,11 @@ const lineageDataTransformToGraphData = (data: LineageDetailInfo): GraphData => // label: item.name, // style: {fill: '#e70606', stroke: '#1060d9', lineWidth: 1} // }); - }) - data.relations.forEach(item => { + }); + data.relations.forEach((item) => { // 拿出 表的 name 和 字段的 name - const source = data.tables.findLast(table => table.id === item.srcTableId); - const target = data.tables.findLast(table => table.id === item.tgtTableId); + const source = data.tables.findLast((table) => table.id === item.srcTableId); + const target = data.tables.findLast((table) => table.id === item.tgtTableId); if (!source || !target) { return; } @@ -55,13 +54,11 @@ const lineageDataTransformToGraphData = (data: LineageDetailInfo): GraphData => target: target.name + '.' + item.tgtTableColName, targetNode: item.tgtTableColName, label: item.relationship, - style: {stroke: '#1060d9', lineWidth: 1} + style: { stroke: '#1060d9', lineWidth: 1 } }); - }) - - - return {nodes: nodes, edges: edges, combos: combos}; -} + }); + return { nodes: nodes, edges: edges, combos: combos }; +}; -export {lineageDataTransformToGraphData}; +export { lineageDataTransformToGraphData }; diff --git a/dinky-web/src/components/TableLineage/index.tsx b/dinky-web/src/components/TableLineage/index.tsx index a19f915134..b019eae5e2 100644 --- a/dinky-web/src/components/TableLineage/index.tsx +++ b/dinky-web/src/components/TableLineage/index.tsx @@ -17,21 +17,21 @@ * */ -import {Slider, Tooltip, Typography, Badge, Flex, Input, Tag,} from 'antd'; -import {useCallback, useEffect, useRef, useState} from 'react'; +import { Slider, Tooltip, Typography, Badge, Flex, Input, Tag } from 'antd'; +import { useCallback, useEffect, useRef, useState } from 'react'; import * as G6 from '@antv/g6'; -import {GNode, Group, Image, ReactNode} from '@antv/g6-extension-react'; -import {getLocalTheme} from "@/utils/function"; +import { GNode, Group, Image, ReactNode } from '@antv/g6-extension-react'; +import { getLocalTheme } from '@/utils/function'; -import {THEME} from "@/types/Public/data"; -import * as G6Options from "@antv/g6/src/spec"; -import {ErrorMessage, SuccessMessage, WarningMessage} from "@/utils/messages"; -import {Loading} from "@/pages/Other/Loading"; -import './index.css' -import {LineageDetailInfo} from "@/types/DevOps/data"; -import {ComboData, GraphData} from "@antv/g6/src/spec/data"; -import {EdgeData, NodeData} from "@antv/g6"; -import {DatabaseFilled} from "@ant-design/icons"; +import { THEME } from '@/types/Public/data'; +import * as G6Options from '@antv/g6/src/spec'; +import { ErrorMessage, SuccessMessage, WarningMessage } from '@/utils/messages'; +import { Loading } from '@/pages/Other/Loading'; +import './index.css'; +import { LineageDetailInfo } from '@/types/DevOps/data'; +import { ComboData, GraphData } from '@antv/g6/src/spec/data'; +import { EdgeData, NodeData } from '@antv/g6'; +import { DatabaseFilled } from '@ant-design/icons'; const STEP = 0.25; const MAX_ZOOM = 1; @@ -40,14 +40,13 @@ const MIN_ZOOM = 0.25; interface TableLineageProps extends G6Options.GraphOptions { dataRefreshCallback?: () => void; refreshLoading: boolean; -}; - -const {Text} = Typography; +} -const TableLinageNode = ({data, onChange}) => { +const { Text } = Typography; +const TableLinageNode = ({ data, onChange }) => { console.log('TableLinageNode data: ', data); - const {id, label, fullDbName, column} = data; + const { id, label, fullDbName, column } = data; return ( { // background: '#fff', padding: 10, borderRadius: 5, - border: '1px solid gray', + border: '1px solid gray' }} vertical > - + - + Name: {label} - {id} - - - *Label: + {id} + + + *Label: {label} @@ -81,13 +80,12 @@ const TableLinageNode = ({data, onChange}) => { G6.register(G6.ExtensionCategory.NODE, 'react', ReactNode); - const TableLineage = (props: TableLineageProps) => { const graphRef = useRef(null); const [zoom, setZoom] = useState(MIN_ZOOM); const [toolbarId, setTollbarId] = useState({ id: '', - count: 0,// 由于点击每次并不会重新执行,所以需要一个变量来判断是否重新执行 + count: 0 // 由于点击每次并不会重新执行,所以需要一个变量来判断是否重新执行 }); /** @@ -106,64 +104,69 @@ const TableLineage = (props: TableLineageProps) => { zoomRange: [0.25, 1], // 缩放范围 plugins: [...pluginsConfig], // 插件 // todo: 'lasso-select' 不能和 'drag-canvas' 一起使用, 会有冲突 - behaviors: ['drag-canvas', 'zoom-canvas', 'drag-element', 'focus-element', 'collapse-expand', + behaviors: [ + 'drag-canvas', + 'zoom-canvas', + 'drag-element', + 'focus-element', + 'collapse-expand', { type: 'click-select', multiple: false, trigger: ['shift'] }, { - type: 'hover-activate', - enable: (event) => event.targetType === 'node', - degree: 1, // 👈🏻 Activate relations. - state: 'highlight', - inactiveState: 'dim', - onHover: (event) => { - event.view.setCursor('pointer'); - }, - onHoverEnd: (event) => { - event.view.setCursor('default'); - }, - },], // 交互行为 + type: 'hover-activate', + enable: (event) => event.targetType === 'node', + degree: 1, // 👈🏻 Activate relations. + state: 'highlight', + inactiveState: 'dim', + onHover: (event) => { + event.view.setCursor('pointer'); + }, + onHoverEnd: (event) => { + event.view.setCursor('default'); + } + } + ], // 交互行为 layout: { type: 'antv-dagre', rankdir: 'LR', nodesep: 100, ranksep: 70, - controlPoints: true, + controlPoints: true }, combo: { type: 'rect', style: { - padding: 20, - - }, + padding: 20 + } }, node: { type: 'react', style: { size: [240, 100], - component: (data) => , + component: (data) => , // fill: '#e70606', // stroke: '#1060d9', // lineWidth: 1, labelPlacement: 'center', port: true, - ports: [{placement: 'left'}, {placement: 'right'}], + ports: [{ placement: 'left' }, { placement: 'right' }] }, state: { highlight: { fill: '#D580FF', halo: true, - lineWidth: 0, + lineWidth: 0 }, dim: { - fill: '#99ADD1', - }, - }, + fill: '#99ADD1' + } + } }, edge: { type: 'cubic-horizontal', state: { highlight: { - stroke: '#D580FF', - }, + stroke: '#D580FF' + } }, style: { labelPlacement: 'center', @@ -186,12 +189,11 @@ const TableLineage = (props: TableLineageProps) => { labelPadding: [15, 10], labelBackgroundRadius: 4, labelWordWrap: true, - labelMaxWidth: '40%', - - }, + labelMaxWidth: '40%' + } }, theme: getLocalTheme() === THEME.light ? THEME.light : THEME.darkShort, - ...props, + ...props }); return graph; }; @@ -199,7 +201,6 @@ const TableLineage = (props: TableLineageProps) => { // 调用了 initGraph() 初始化 graphInstance 必须在 useEffect 中执行 const [graphInstance, setGraphInstance] = useState(initGraph()); - /** 对应插件的点击事件 * { id: 'zoom-in', value: 'zoom-in' }, * { id: 'zoom-out', value: 'zoom-out' }, @@ -217,32 +218,35 @@ const TableLineage = (props: TableLineageProps) => { case 'zoom-in': // 放大 // 如果大于 1 或者小于 0 则不再放大了 if (zoom >= MAX_ZOOM) { - WarningMessage("已经放大到最大比例了, 不能再放大了!", 2); - new Promise((resolve) => setZoom(prevState => MAX_ZOOM)).then(() => resolve()); + WarningMessage('已经放大到最大比例了, 不能再放大了!', 2); + new Promise((resolve) => setZoom((prevState) => MAX_ZOOM)).then(() => resolve()); graphInstance?.zoomTo?.(zoom, true); } else { - new Promise((resolve) => setZoom(prevState => prevState + STEP)).then(() => resolve()); + new Promise((resolve) => setZoom((prevState) => prevState + STEP)).then(() => resolve()); graphInstance?.zoomTo?.(zoom + STEP, true); } break; case 'zoom-out': // 缩小 // 如果小于 0.25 则不再缩小了, 否则继续缩小 if (zoom <= MIN_ZOOM) { - WarningMessage("已经缩小到最小比例了, 不能再缩小了!", 2); - new Promise((resolve) => setZoom(prevState => MIN_ZOOM)).then(() => resolve()); + WarningMessage('已经缩小到最小比例了, 不能再缩小了!', 2); + new Promise((resolve) => setZoom((prevState) => MIN_ZOOM)).then(() => resolve()); graphInstance?.zoomTo?.(MIN_ZOOM, true); } else { - new Promise((resolve) => setZoom(prevState => prevState - STEP)).then(() => resolve()); + new Promise((resolve) => setZoom((prevState) => prevState - STEP)).then(() => resolve()); graphInstance?.zoomTo?.(zoom - STEP, true); } break; case 'auto-fit': // 自动适配 SuccessMessage('根据当前比例自动居中...', 2); graphInstance?.render?.(); - graphInstance?.fitView?.({ - direction: 'both', - when: 'always' - }, true) + graphInstance?.fitView?.( + { + direction: 'both', + when: 'always' + }, + true + ); break; case 'reset': // 重置 虽然名字是 reset, 但当前场景 写为刷新 if (!props.dataRefreshCallback) { @@ -255,11 +259,11 @@ const TableLineage = (props: TableLineageProps) => { } break; } - }, [toolbarId]) + }, [toolbarId]); -// [ 'tooltip', 'minimap', 'edge-tooltip', 'drag-node', 'brush-select', 'collapse-expand', 'edge-filter','timebar'], + // [ 'tooltip', 'minimap', 'edge-tooltip', 'drag-node', 'brush-select', 'collapse-expand', 'edge-filter','timebar'], const pluginsConfig = [ - {key: 'grid-line', type: 'grid-line', follow: false}, + { key: 'grid-line', type: 'grid-line', follow: false }, // 提示插件 { key: 'tooltip', @@ -267,7 +271,7 @@ const TableLineage = (props: TableLineageProps) => { trigger: 'hover', enable: 'always', position: 'top-left', - enterable: false, + enterable: false }, // 缩略图插件 { @@ -276,7 +280,7 @@ const TableLineage = (props: TableLineageProps) => { // 'left' | 'right' | 'top' | 'bottom' | 'left-top' | 'left-bottom' | // 'right-top' | 'right-bottom' | 'top-left' | 'top-right' | 'bottom-left' | 'bottom-right' | 'center' Default: 'right-bottom' position: 'bottom-left', - size: [200, 150], + size: [200, 150] }, // 工具栏插件 { @@ -287,18 +291,18 @@ const TableLineage = (props: TableLineageProps) => { onClick: (value, target) => { // 如果当次 点击的插件id 和 上次点击的插件id 相同,则初始化 count 置为0 if (value === toolbarId.id && toolbarId.count > 0) { - setTollbarId(prevState => ({id: value, count: 0})); + setTollbarId((prevState) => ({ id: value, count: 0 })); } - setTollbarId(prevState => ({id: value, count: prevState.count + 1})); + setTollbarId((prevState) => ({ id: value, count: prevState.count + 1 })); }, className: 'table-lineage-toolbar', // 渲染菜单项 getItems: () => { return [ - {id: 'zoom-in', value: 'zoom-in'}, // 放大 - {id: 'zoom-out', value: 'zoom-out'}, // 缩小 - {id: 'auto-fit', value: 'auto-fit'}, // 自适应 - {id: 'reset', value: 'reset'}, // 刷新 + { id: 'zoom-in', value: 'zoom-in' }, // 放大 + { id: 'zoom-out', value: 'zoom-out' }, // 缩小 + { id: 'auto-fit', value: 'auto-fit' }, // 自适应 + { id: 'reset', value: 'reset' } // 刷新 // { id: 'redo', value: 'redo' }, // { id: 'undo', value: 'undo' }, // { id: 'delete', value: 'delete' }, @@ -317,17 +321,16 @@ const TableLineage = (props: TableLineageProps) => { // borderStyle: 'rgba(0, 255, 136, 0.4)', // 边框样式 follow: true, // 是否跟随视口移动 lineWidth: 1, // 网格线宽度 - stroke: '#e70606', // 网格线颜色 + stroke: '#e70606' // 网格线颜色 } - ] - + ]; useEffect(() => { const graph = initGraph(); setGraphInstance(graph); graph?.render?.(); graphRef.current = graph; - setZoom(1) + setZoom(1); return () => { setGraphInstance(undefined); graph?.clear?.(); @@ -335,74 +338,81 @@ const TableLineage = (props: TableLineageProps) => { }; }, [props, getLocalTheme()]); - useEffect(() => { // 注册双击事件, 双击画图时 将视图居中 if (!graphInstance) return; graphInstance?.once?.(G6.GraphEvent.AFTER_RENDER, () => { - graphInstance?.fitView?.({ - direction: 'both', - when: 'always' - }, true); + graphInstance?.fitView?.( + { + direction: 'both', + when: 'always' + }, + true + ); }); console.log('register dblclick event'); graphInstance?.once?.('canvas:dblclick', () => { console.debug('canvas dblclick , to fitView and fitCenter'); - graphInstance?.fitView?.({ - direction: 'both', - when: 'always' - }, true) + graphInstance?.fitView?.( + { + direction: 'both', + when: 'always' + }, + true + ); }); }, [graphInstance]); - useEffect(() => { if (graphInstance) { graphInstance?.fitView?.({ direction: 'both', when: 'always' - }) + }); graphInstance?.zoomTo?.(zoom, true); console.debug('current zoom: ', zoom); } }, [zoom, graphInstance !== undefined]); - return <> -
- +
`${value * 100}%`}} - // dots={true} - marks={{0.25: '25%', 0.5: '50%', 0.75: '75%', 1: '100%'}} - step={STEP} - onChange={setZoom} - /> -
- { - props.refreshLoading ? : -
- } - - ; + > + `${value * 100}%` }} + // dots={true} + marks={{ 0.25: '25%', 0.5: '50%', 0.75: '75%', 1: '100%' }} + step={STEP} + onChange={setZoom} + /> +
+ {props.refreshLoading ? ( + + ) : ( +
+ )} + + ); }; export default TableLineage; diff --git a/dinky-web/src/pages/Test/index.tsx b/dinky-web/src/pages/Test/index.tsx index 48f98475bc..5daa974870 100644 --- a/dinky-web/src/pages/Test/index.tsx +++ b/dinky-web/src/pages/Test/index.tsx @@ -1,959 +1,970 @@ -import TableLineage from "@/components/TableLineage" -import type {GraphData} from "@antv/g6/src/spec/data"; -import {useState} from 'react'; -import {lineageDataTransformToGraphData} from "@/components/TableLineage/function" - +import TableLineage from '@/components/TableLineage'; +import type { GraphData } from '@antv/g6/src/spec/data'; +import { useState } from 'react'; +import { lineageDataTransformToGraphData } from '@/components/TableLineage/function'; export default () => { - const lineageData = { - "tables": [ + tables: [ { - "id": "5", - "name": "default_catalog.default_database.ods_order_sale_goods_snapshot_r", - "columns": [ + id: '5', + name: 'default_catalog.default_database.ods_order_sale_goods_snapshot_r', + columns: [ { - "name": "category_code", - "title": "category_code" + name: 'category_code', + title: 'category_code' }, { - "name": "category_des", - "title": "category_des" + name: 'category_des', + title: 'category_des' }, { - "name": "purchase_kind_code", - "title": "purchase_kind_code" + name: 'purchase_kind_code', + title: 'purchase_kind_code' }, { - "name": "purchase_kind_des", - "title": "purchase_kind_des" + name: 'purchase_kind_des', + title: 'purchase_kind_des' }, { - "name": "is_unmember_goods", - "title": "is_unmember_goods" + name: 'is_unmember_goods', + title: 'is_unmember_goods' }, { - "name": "retail_price", - "title": "retail_price" + name: 'retail_price', + title: 'retail_price' }, { - "name": "member_price", - "title": "member_price" + name: 'member_price', + title: 'member_price' }, { - "name": "is_unfree_goods", - "title": "is_unfree_goods" + name: 'is_unfree_goods', + title: 'is_unfree_goods' }, { - "name": "proc_time", - "title": "proc_time" + name: 'proc_time', + title: 'proc_time' } ] }, { - "id": "3", - "name": "default_catalog.default_database.dwd_sd_so_ordr_detl_r", - "columns": [ + id: '3', + name: 'default_catalog.default_database.dwd_sd_so_ordr_detl_r', + columns: [ { - "name": "stsc_date", - "title": "stsc_date" + name: 'stsc_date', + title: 'stsc_date' }, { - "name": "sale_ordr_doc", - "title": "sale_ordr_doc" + name: 'sale_ordr_doc', + title: 'sale_ordr_doc' }, { - "name": "ordr_sour_code", - "title": "ordr_sour_code" + name: 'ordr_sour_code', + title: 'ordr_sour_code' }, { - "name": "sale_order_proc_time", - "title": "sale_order_proc_time" + name: 'sale_order_proc_time', + title: 'sale_order_proc_time' }, { - "name": "ordr_sale_time", - "title": "ordr_sale_time" + name: 'ordr_sale_time', + title: 'ordr_sale_time' }, { - "name": "prmn_prog_type_code", - "title": "prmn_prog_type_code" + name: 'prmn_prog_type_code', + title: 'prmn_prog_type_code' }, { - "name": "ordr_type_code", - "title": "ordr_type_code" + name: 'ordr_type_code', + title: 'ordr_type_code' }, { - "name": "ordr_cate_code", - "title": "ordr_cate_code" + name: 'ordr_cate_code', + title: 'ordr_cate_code' }, { - "name": "prmn_prog_code", - "title": "prmn_prog_code" + name: 'prmn_prog_code', + title: 'prmn_prog_code' }, { - "name": "coup_type", - "title": "coup_type" + name: 'coup_type', + title: 'coup_type' }, { - "name": "coup_code", - "title": "coup_code" + name: 'coup_code', + title: 'coup_code' }, { - "name": "line_item", - "title": "line_item" + name: 'line_item', + title: 'line_item' }, { - "name": "refn_ordr_type_code", - "title": "refn_ordr_type_code" + name: 'refn_ordr_type_code', + title: 'refn_ordr_type_code' }, { - "name": "refn_ordr_doc", - "title": "refn_ordr_doc" + name: 'refn_ordr_doc', + title: 'refn_ordr_doc' }, { - "name": "refn_ordr_item", - "title": "refn_ordr_item" + name: 'refn_ordr_item', + title: 'refn_ordr_item' }, { - "name": "memb_disc_mode", - "title": "memb_disc_mode" + name: 'memb_disc_mode', + title: 'memb_disc_mode' }, { - "name": "goods_code", - "title": "goods_code" + name: 'goods_code', + title: 'goods_code' }, { - "name": "sale_order_details_proc_time", - "title": "sale_order_details_proc_time" + name: 'sale_order_details_proc_time', + title: 'sale_order_details_proc_time' }, { - "name": "cate_clas_code", - "title": "cate_clas_code" + name: 'cate_clas_code', + title: 'cate_clas_code' }, { - "name": "cate_clas_name", - "title": "cate_clas_name" + name: 'cate_clas_name', + title: 'cate_clas_name' }, { - "name": "purc_clas_code_new", - "title": "purc_clas_code_new" + name: 'purc_clas_code_new', + title: 'purc_clas_code_new' }, { - "name": "purc_clas_name_new", - "title": "purc_clas_name_new" + name: 'purc_clas_name_new', + title: 'purc_clas_name_new' }, { - "name": "lotn", - "title": "lotn" + name: 'lotn', + title: 'lotn' }, { - "name": "sale_tax", - "title": "sale_tax" + name: 'sale_tax', + title: 'sale_tax' }, { - "name": "memb_id", - "title": "memb_id" + name: 'memb_id', + title: 'memb_id' }, { - "name": "memb_point", - "title": "memb_point" + name: 'memb_point', + title: 'memb_point' }, { - "name": "chk_out_id", - "title": "chk_out_id" + name: 'chk_out_id', + title: 'chk_out_id' }, { - "name": "casr_id", - "title": "casr_id" + name: 'casr_id', + title: 'casr_id' }, { - "name": "is_memb_goods", - "title": "is_memb_goods" + name: 'is_memb_goods', + title: 'is_memb_goods' }, { - "name": "retail_pric", - "title": "retail_pric" + name: 'retail_pric', + title: 'retail_pric' }, { - "name": "memb_pric", - "title": "memb_pric" + name: 'memb_pric', + title: 'memb_pric' }, { - "name": "exec_pric_type", - "title": "exec_pric_type" + name: 'exec_pric_type', + title: 'exec_pric_type' }, { - "name": "divid_pric", - "title": "divid_pric" + name: 'divid_pric', + title: 'divid_pric' }, { - "name": "acnt_pric", - "title": "acnt_pric" + name: 'acnt_pric', + title: 'acnt_pric' }, { - "name": "exec_pric", - "title": "exec_pric" + name: 'exec_pric', + title: 'exec_pric' }, { - "name": "dct_amt", - "title": "dct_amt" + name: 'dct_amt', + title: 'dct_amt' }, { - "name": "gift_dct_amt", - "title": "gift_dct_amt" + name: 'gift_dct_amt', + title: 'gift_dct_amt' }, { - "name": "other_free_amt", - "title": "other_free_amt" + name: 'other_free_amt', + title: 'other_free_amt' }, { - "name": "amt1", - "title": "amt1" + name: 'amt1', + title: 'amt1' }, { - "name": "amt2", - "title": "amt2" + name: 'amt2', + title: 'amt2' }, { - "name": "sale_amt", - "title": "sale_amt" + name: 'sale_amt', + title: 'sale_amt' }, { - "name": "sale_qty", - "title": "sale_qty" + name: 'sale_qty', + title: 'sale_qty' }, { - "name": "china_med_qty", - "title": "china_med_qty" + name: 'china_med_qty', + title: 'china_med_qty' }, { - "name": "is_n_surd_prof", - "title": "is_n_surd_prof" + name: 'is_n_surd_prof', + title: 'is_n_surd_prof' }, { - "name": "cost_pric", - "title": "cost_pric" + name: 'cost_pric', + title: 'cost_pric' }, { - "name": "cost_amt", - "title": "cost_amt" + name: 'cost_amt', + title: 'cost_amt' }, { - "name": "is_effe_ordr", - "title": "is_effe_ordr" + name: 'is_effe_ordr', + title: 'is_effe_ordr' }, { - "name": "order_code", - "title": "order_code" + name: 'order_code', + title: 'order_code' }, { - "name": "stat_date", - "title": "stat_date" + name: 'stat_date', + title: 'stat_date' }, { - "name": "proj_cate_code", - "title": "proj_cate_code" + name: 'proj_cate_code', + title: 'proj_cate_code' }, { - "name": "purchase_kind_code", - "title": "purchase_kind_code" + name: 'purchase_kind_code', + title: 'purchase_kind_code' }, { - "name": "sale_goods_snapshot_proc_time", - "title": "sale_goods_snapshot_proc_time" + name: 'sale_goods_snapshot_proc_time', + title: 'sale_goods_snapshot_proc_time' }, { - "name": "casr_code", - "title": "casr_code" + name: 'casr_code', + title: 'casr_code' }, { - "name": "service_charge", - "title": "service_charge" + name: 'service_charge', + title: 'service_charge' }, { - "name": "sale_pers_id", - "title": "sale_pers_id" + name: 'sale_pers_id', + title: 'sale_pers_id' }, { - "name": "phmc_code", - "title": "phmc_code" + name: 'phmc_code', + title: 'phmc_code' }, { - "name": "out_phmc_code", - "title": "out_phmc_code" + name: 'out_phmc_code', + title: 'out_phmc_code' }, { - "name": "is_ydch_flag", - "title": "is_ydch_flag" + name: 'is_ydch_flag', + title: 'is_ydch_flag' }, { - "name": "coup_prog_code", - "title": "coup_prog_code" + name: 'coup_prog_code', + title: 'coup_prog_code' } ] }, { - "id": "4", - "name": "default_catalog.default_database.ods_order_sale_order_r", - "columns": [ + id: '4', + name: 'default_catalog.default_database.ods_order_sale_order_r', + columns: [ { - "name": "order_from", - "title": "order_from" + name: 'order_from', + title: 'order_from' }, { - "name": "proc_time", - "title": "proc_time" + name: 'proc_time', + title: 'proc_time' }, { - "name": "bill_type", - "title": "bill_type" + name: 'bill_type', + title: 'bill_type' }, { - "name": "bill_kind", - "title": "bill_kind" + name: 'bill_kind', + title: 'bill_kind' }, { - "name": "coupon_type", - "title": "coupon_type" + name: 'coupon_type', + title: 'coupon_type' }, { - "name": "coupon_code", - "title": "coupon_code" + name: 'coupon_code', + title: 'coupon_code' }, { - "name": "member_id", - "title": "member_id" + name: 'member_id', + title: 'member_id' }, { - "name": "point_number", - "title": "point_number" + name: 'point_number', + title: 'point_number' }, { - "name": "cashdesk_id", - "title": "cashdesk_id" + name: 'cashdesk_id', + title: 'cashdesk_id' }, { - "name": "casher_code", - "title": "casher_code" + name: 'casher_code', + title: 'casher_code' }, { - "name": "cash_free_money", - "title": "cash_free_money" + name: 'cash_free_money', + title: 'cash_free_money' }, { - "name": "gift_free_money", - "title": "gift_free_money" + name: 'gift_free_money', + title: 'gift_free_money' }, { - "name": "other_free_money", - "title": "other_free_money" + name: 'other_free_money', + title: 'other_free_money' }, { - "name": "pair_count", - "title": "pair_count" + name: 'pair_count', + title: 'pair_count' }, { - "name": "order_code", - "title": "order_code" + name: 'order_code', + title: 'order_code' }, { - "name": "sale_order_code", - "title": "sale_order_code" + name: 'sale_order_code', + title: 'sale_order_code' }, { - "name": "coupon_plan_code", - "title": "coupon_plan_code" + name: 'coupon_plan_code', + title: 'coupon_plan_code' } ] }, { - "id": "7", - "name": "default_catalog.default_database.ods_zt_ord_order_r", - "columns": [ + id: '7', + name: 'default_catalog.default_database.ods_zt_ord_order_r', + columns: [ { - "name": "from_warehouse_code", - "title": "from_warehouse_code" + name: 'from_warehouse_code', + title: 'from_warehouse_code' }, { - "name": "warehouse_code", - "title": "warehouse_code" + name: 'warehouse_code', + title: 'warehouse_code' }, { - "name": "pos_code", - "title": "pos_code" + name: 'pos_code', + title: 'pos_code' } ] }, { - "id": "2", - "name": "default_catalog.default_database.ods_order_sale_order_details_r", - "columns": [ + id: '2', + name: 'default_catalog.default_database.ods_order_sale_order_details_r', + columns: [ { - "name": "sale_time", - "title": "sale_time" + name: 'sale_time', + title: 'sale_time' }, { - "name": "sale_order_code", - "title": "sale_order_code" + name: 'sale_order_code', + title: 'sale_order_code' }, { - "name": "promotionbill_plan_type", - "title": "promotionbill_plan_type" + name: 'promotionbill_plan_type', + title: 'promotionbill_plan_type' }, { - "name": "row_num", - "title": "row_num" + name: 'row_num', + title: 'row_num' }, { - "name": "refer_bill_type", - "title": "refer_bill_type" + name: 'refer_bill_type', + title: 'refer_bill_type' }, { - "name": "refer_bill_code", - "title": "refer_bill_code" + name: 'refer_bill_code', + title: 'refer_bill_code' }, { - "name": "refer_bill_row_num", - "title": "refer_bill_row_num" + name: 'refer_bill_row_num', + title: 'refer_bill_row_num' }, { - "name": "member_coupon_type", - "title": "member_coupon_type" + name: 'member_coupon_type', + title: 'member_coupon_type' }, { - "name": "good_code", - "title": "good_code" + name: 'good_code', + title: 'good_code' }, { - "name": "proc_time", - "title": "proc_time" + name: 'proc_time', + title: 'proc_time' }, { - "name": "lot_num", - "title": "lot_num" + name: 'lot_num', + title: 'lot_num' }, { - "name": "output_tax", - "title": "output_tax" + name: 'output_tax', + title: 'output_tax' }, { - "name": "perform_price_type", - "title": "perform_price_type" + name: 'perform_price_type', + title: 'perform_price_type' }, { - "name": "apportion_price", - "title": "apportion_price" + name: 'apportion_price', + title: 'apportion_price' }, { - "name": "account_price", - "title": "account_price" + name: 'account_price', + title: 'account_price' }, { - "name": "perform_price", - "title": "perform_price" + name: 'perform_price', + title: 'perform_price' }, { - "name": "perform_profit_margin", - "title": "perform_profit_margin" + name: 'perform_profit_margin', + title: 'perform_profit_margin' }, { - "name": "account_price_gross_money", - "title": "account_price_gross_money" + name: 'account_price_gross_money', + title: 'account_price_gross_money' }, { - "name": "account_money", - "title": "account_money" + name: 'account_money', + title: 'account_money' }, { - "name": "quantity", - "title": "quantity" + name: 'quantity', + title: 'quantity' }, { - "name": "cost_price", - "title": "cost_price" + name: 'cost_price', + title: 'cost_price' }, { - "name": "item_type", - "title": "item_type" + name: 'item_type', + title: 'item_type' }, { - "name": "service_charge", - "title": "service_charge" + name: 'service_charge', + title: 'service_charge' }, { - "name": "store_code", - "title": "store_code" + name: 'store_code', + title: 'store_code' } ] }, { - "id": "6", - "name": "default_catalog.default_database.ods_order_sales_ordersalesman_r", - "columns": [ + id: '6', + name: 'default_catalog.default_database.ods_order_sales_ordersalesman_r', + columns: [ { - "name": "sales_job_number", - "title": "sales_job_number" + name: 'sales_job_number', + title: 'sales_job_number' } ] } ], - "relations": [ + relations: [ { - "id": "2", - "srcTableId": "2", - "tgtTableId": "3", - "srcTableColName": "sale_time", - "tgtTableColName": "stsc_date" + id: '2', + srcTableId: '2', + tgtTableId: '3', + srcTableColName: 'sale_time', + tgtTableColName: 'stsc_date' }, { - "id": "3", - "srcTableId": "2", - "tgtTableId": "3", - "srcTableColName": "sale_order_code", - "tgtTableColName": "sale_ordr_doc" + id: '3', + srcTableId: '2', + tgtTableId: '3', + srcTableColName: 'sale_order_code', + tgtTableColName: 'sale_ordr_doc' }, { - "id": "4", - "srcTableId": "4", - "tgtTableId": "3", - "srcTableColName": "order_from", - "tgtTableColName": "ordr_sour_code" + id: '4', + srcTableId: '4', + tgtTableId: '3', + srcTableColName: 'order_from', + tgtTableColName: 'ordr_sour_code' }, { - "id": "5", - "srcTableId": "4", - "tgtTableId": "3", - "srcTableColName": "proc_time", - "tgtTableColName": "sale_order_proc_time" + id: '5', + srcTableId: '4', + tgtTableId: '3', + srcTableColName: 'proc_time', + tgtTableColName: 'sale_order_proc_time' }, { - "id": "6", - "srcTableId": "2", - "tgtTableId": "3", - "srcTableColName": "sale_time", - "tgtTableColName": "ordr_sale_time" + id: '6', + srcTableId: '2', + tgtTableId: '3', + srcTableColName: 'sale_time', + tgtTableColName: 'ordr_sale_time' }, { - "id": "7", - "srcTableId": "2", - "tgtTableId": "3", - "srcTableColName": "promotionbill_plan_type", - "tgtTableColName": "prmn_prog_type_code" + id: '7', + srcTableId: '2', + tgtTableId: '3', + srcTableColName: 'promotionbill_plan_type', + tgtTableColName: 'prmn_prog_type_code' }, { - "id": "8", - "srcTableId": "4", - "tgtTableId": "3", - "srcTableColName": "bill_type", - "tgtTableColName": "ordr_type_code" + id: '8', + srcTableId: '4', + tgtTableId: '3', + srcTableColName: 'bill_type', + tgtTableColName: 'ordr_type_code' }, { - "id": "9", - "srcTableId": "4", - "tgtTableId": "3", - "srcTableColName": "bill_kind", - "tgtTableColName": "ordr_cate_code" + id: '9', + srcTableId: '4', + tgtTableId: '3', + srcTableColName: 'bill_kind', + tgtTableColName: 'ordr_cate_code' }, { - "id": "10", - "srcTableId": "2", - "tgtTableId": "3", - "srcTableColName": "promotionbill_plan_type", - "tgtTableColName": "prmn_prog_code" + id: '10', + srcTableId: '2', + tgtTableId: '3', + srcTableColName: 'promotionbill_plan_type', + tgtTableColName: 'prmn_prog_code' }, { - "id": "11", - "srcTableId": "4", - "tgtTableId": "3", - "srcTableColName": "coupon_type", - "tgtTableColName": "coup_type" + id: '11', + srcTableId: '4', + tgtTableId: '3', + srcTableColName: 'coupon_type', + tgtTableColName: 'coup_type' }, { - "id": "12", - "srcTableId": "4", - "tgtTableId": "3", - "srcTableColName": "coupon_code", - "tgtTableColName": "coup_code" + id: '12', + srcTableId: '4', + tgtTableId: '3', + srcTableColName: 'coupon_code', + tgtTableColName: 'coup_code' }, { - "id": "13", - "srcTableId": "2", - "tgtTableId": "3", - "srcTableColName": "row_num", - "tgtTableColName": "line_item" + id: '13', + srcTableId: '2', + tgtTableId: '3', + srcTableColName: 'row_num', + tgtTableColName: 'line_item' }, { - "id": "14", - "srcTableId": "2", - "tgtTableId": "3", - "srcTableColName": "refer_bill_type", - "tgtTableColName": "refn_ordr_type_code" + id: '14', + srcTableId: '2', + tgtTableId: '3', + srcTableColName: 'refer_bill_type', + tgtTableColName: 'refn_ordr_type_code' }, { - "id": "15", - "srcTableId": "2", - "tgtTableId": "3", - "srcTableColName": "refer_bill_code", - "tgtTableColName": "refn_ordr_doc" + id: '15', + srcTableId: '2', + tgtTableId: '3', + srcTableColName: 'refer_bill_code', + tgtTableColName: 'refn_ordr_doc' }, { - "id": "16", - "srcTableId": "2", - "tgtTableId": "3", - "srcTableColName": "refer_bill_row_num", - "tgtTableColName": "refn_ordr_item" + id: '16', + srcTableId: '2', + tgtTableId: '3', + srcTableColName: 'refer_bill_row_num', + tgtTableColName: 'refn_ordr_item' }, { - "id": "17", - "srcTableId": "2", - "tgtTableId": "3", - "srcTableColName": "member_coupon_type", - "tgtTableColName": "memb_disc_mode" + id: '17', + srcTableId: '2', + tgtTableId: '3', + srcTableColName: 'member_coupon_type', + tgtTableColName: 'memb_disc_mode' }, { - "id": "18", - "srcTableId": "2", - "tgtTableId": "3", - "srcTableColName": "good_code", - "tgtTableColName": "goods_code" + id: '18', + srcTableId: '2', + tgtTableId: '3', + srcTableColName: 'good_code', + tgtTableColName: 'goods_code' }, { - "id": "19", - "srcTableId": "2", - "tgtTableId": "3", - "srcTableColName": "proc_time", - "tgtTableColName": "sale_order_details_proc_time" + id: '19', + srcTableId: '2', + tgtTableId: '3', + srcTableColName: 'proc_time', + tgtTableColName: 'sale_order_details_proc_time' }, { - "id": "20", - "srcTableId": "5", - "tgtTableId": "3", - "srcTableColName": "category_code", - "tgtTableColName": "cate_clas_code" + id: '20', + srcTableId: '5', + tgtTableId: '3', + srcTableColName: 'category_code', + tgtTableColName: 'cate_clas_code' }, { - "id": "21", - "srcTableId": "5", - "tgtTableId": "3", - "srcTableColName": "category_des", - "tgtTableColName": "cate_clas_name" + id: '21', + srcTableId: '5', + tgtTableId: '3', + srcTableColName: 'category_des', + tgtTableColName: 'cate_clas_name' }, { - "id": "22", - "srcTableId": "5", - "tgtTableId": "3", - "srcTableColName": "purchase_kind_code", - "tgtTableColName": "purc_clas_code_new" + id: '22', + srcTableId: '5', + tgtTableId: '3', + srcTableColName: 'purchase_kind_code', + tgtTableColName: 'purc_clas_code_new' }, { - "id": "23", - "srcTableId": "5", - "tgtTableId": "3", - "srcTableColName": "purchase_kind_des", - "tgtTableColName": "purc_clas_name_new" + id: '23', + srcTableId: '5', + tgtTableId: '3', + srcTableColName: 'purchase_kind_des', + tgtTableColName: 'purc_clas_name_new' }, { - "id": "24", - "srcTableId": "2", - "tgtTableId": "3", - "srcTableColName": "lot_num", - "tgtTableColName": "lotn" + id: '24', + srcTableId: '2', + tgtTableId: '3', + srcTableColName: 'lot_num', + tgtTableColName: 'lotn' }, { - "id": "25", - "srcTableId": "2", - "tgtTableId": "3", - "srcTableColName": "output_tax", - "tgtTableColName": "sale_tax" + id: '25', + srcTableId: '2', + tgtTableId: '3', + srcTableColName: 'output_tax', + tgtTableColName: 'sale_tax' }, { - "id": "26", - "srcTableId": "4", - "tgtTableId": "3", - "srcTableColName": "member_id", - "tgtTableColName": "memb_id" + id: '26', + srcTableId: '4', + tgtTableId: '3', + srcTableColName: 'member_id', + tgtTableColName: 'memb_id' }, { - "id": "27", - "srcTableId": "4", - "tgtTableId": "3", - "srcTableColName": "point_number", - "tgtTableColName": "memb_point" + id: '27', + srcTableId: '4', + tgtTableId: '3', + srcTableColName: 'point_number', + tgtTableColName: 'memb_point' }, { - "id": "28", - "srcTableId": "4", - "tgtTableId": "3", - "srcTableColName": "cashdesk_id", - "tgtTableColName": "chk_out_id" + id: '28', + srcTableId: '4', + tgtTableId: '3', + srcTableColName: 'cashdesk_id', + tgtTableColName: 'chk_out_id' }, { - "id": "29", - "srcTableId": "4", - "tgtTableId": "3", - "srcTableColName": "casher_code", - "tgtTableColName": "casr_id" + id: '29', + srcTableId: '4', + tgtTableId: '3', + srcTableColName: 'casher_code', + tgtTableColName: 'casr_id' }, { - "id": "30", - "srcTableId": "5", - "tgtTableId": "3", - "srcTableColName": "is_unmember_goods", - "tgtTableColName": "is_memb_goods" + id: '30', + srcTableId: '5', + tgtTableId: '3', + srcTableColName: 'is_unmember_goods', + tgtTableColName: 'is_memb_goods' }, { - "id": "31", - "srcTableId": "5", - "tgtTableId": "3", - "srcTableColName": "retail_price", - "tgtTableColName": "retail_pric" + id: '31', + srcTableId: '5', + tgtTableId: '3', + srcTableColName: 'retail_price', + tgtTableColName: 'retail_pric' }, { - "id": "32", - "srcTableId": "5", - "tgtTableId": "3", - "srcTableColName": "member_price", - "tgtTableColName": "memb_pric" + id: '32', + srcTableId: '5', + tgtTableId: '3', + srcTableColName: 'member_price', + tgtTableColName: 'memb_pric' }, { - "id": "33", - "srcTableId": "2", - "tgtTableId": "3", - "srcTableColName": "perform_price_type", - "tgtTableColName": "exec_pric_type" + id: '33', + srcTableId: '2', + tgtTableId: '3', + srcTableColName: 'perform_price_type', + tgtTableColName: 'exec_pric_type' }, { - "id": "34", - "srcTableId": "2", - "tgtTableId": "3", - "srcTableColName": "apportion_price", - "tgtTableColName": "divid_pric" + id: '34', + srcTableId: '2', + tgtTableId: '3', + srcTableColName: 'apportion_price', + tgtTableColName: 'divid_pric' }, { - "id": "35", - "srcTableId": "2", - "tgtTableId": "3", - "srcTableColName": "account_price", - "tgtTableColName": "acnt_pric" + id: '35', + srcTableId: '2', + tgtTableId: '3', + srcTableColName: 'account_price', + tgtTableColName: 'acnt_pric' }, { - "id": "36", - "srcTableId": "2", - "tgtTableId": "3", - "srcTableColName": "perform_price", - "tgtTableColName": "exec_pric" + id: '36', + srcTableId: '2', + tgtTableId: '3', + srcTableColName: 'perform_price', + tgtTableColName: 'exec_pric' }, { - "id": "37", - "srcTableId": "4", - "tgtTableId": "3", - "srcTableColName": "cash_free_money", - "tgtTableColName": "dct_amt" + id: '37', + srcTableId: '4', + tgtTableId: '3', + srcTableColName: 'cash_free_money', + tgtTableColName: 'dct_amt' }, { - "id": "38", - "srcTableId": "4", - "tgtTableId": "3", - "srcTableColName": "gift_free_money", - "tgtTableColName": "gift_dct_amt" + id: '38', + srcTableId: '4', + tgtTableId: '3', + srcTableColName: 'gift_free_money', + tgtTableColName: 'gift_dct_amt' }, { - "id": "39", - "srcTableId": "4", - "tgtTableId": "3", - "srcTableColName": "other_free_money", - "tgtTableColName": "other_free_amt" + id: '39', + srcTableId: '4', + tgtTableId: '3', + srcTableColName: 'other_free_money', + tgtTableColName: 'other_free_amt' }, { - "id": "40", - "srcTableId": "2", - "tgtTableId": "3", - "srcTableColName": "perform_profit_margin", - "tgtTableColName": "amt1" + id: '40', + srcTableId: '2', + tgtTableId: '3', + srcTableColName: 'perform_profit_margin', + tgtTableColName: 'amt1' }, { - "id": "41", - "srcTableId": "2", - "tgtTableId": "3", - "srcTableColName": "account_price_gross_money", - "tgtTableColName": "amt2" + id: '41', + srcTableId: '2', + tgtTableId: '3', + srcTableColName: 'account_price_gross_money', + tgtTableColName: 'amt2' }, { - "id": "42", - "srcTableId": "2", - "tgtTableId": "3", - "srcTableColName": "account_money", - "tgtTableColName": "sale_amt" + id: '42', + srcTableId: '2', + tgtTableId: '3', + srcTableColName: 'account_money', + tgtTableColName: 'sale_amt' }, { - "id": "43", - "srcTableId": "2", - "tgtTableId": "3", - "srcTableColName": "quantity", - "tgtTableColName": "sale_qty" + id: '43', + srcTableId: '2', + tgtTableId: '3', + srcTableColName: 'quantity', + tgtTableColName: 'sale_qty' }, { - "id": "44", - "srcTableId": "4", - "tgtTableId": "3", - "srcTableColName": "pair_count", - "tgtTableColName": "china_med_qty" + id: '44', + srcTableId: '4', + tgtTableId: '3', + srcTableColName: 'pair_count', + tgtTableColName: 'china_med_qty' }, { - "id": "45", - "srcTableId": "5", - "tgtTableId": "3", - "srcTableColName": "is_unfree_goods", - "tgtTableColName": "is_n_surd_prof" + id: '45', + srcTableId: '5', + tgtTableId: '3', + srcTableColName: 'is_unfree_goods', + tgtTableColName: 'is_n_surd_prof' }, { - "id": "46", - "srcTableId": "2", - "tgtTableId": "3", - "srcTableColName": "cost_price", - "tgtTableColName": "cost_pric" + id: '46', + srcTableId: '2', + tgtTableId: '3', + srcTableColName: 'cost_price', + tgtTableColName: 'cost_pric' }, { - "id": "47", - "srcTableId": "2", - "tgtTableId": "3", - "srcTableColName": "cost_price", - "tgtTableColName": "cost_amt" + id: '47', + srcTableId: '2', + tgtTableId: '3', + srcTableColName: 'cost_price', + tgtTableColName: 'cost_amt' }, { - "id": "48", - "srcTableId": "2", - "tgtTableId": "3", - "srcTableColName": "quantity", - "tgtTableColName": "cost_amt" + id: '48', + srcTableId: '2', + tgtTableId: '3', + srcTableColName: 'quantity', + tgtTableColName: 'cost_amt' }, { - "id": "49", - "srcTableId": "4", - "tgtTableId": "3", - "srcTableColName": "bill_kind", - "tgtTableColName": "is_effe_ordr" + id: '49', + srcTableId: '4', + tgtTableId: '3', + srcTableColName: 'bill_kind', + tgtTableColName: 'is_effe_ordr' }, { - "id": "50", - "srcTableId": "4", - "tgtTableId": "3", - "srcTableColName": "order_code", - "tgtTableColName": "order_code" + id: '50', + srcTableId: '4', + tgtTableId: '3', + srcTableColName: 'order_code', + tgtTableColName: 'order_code' }, { - "id": "51", - "srcTableId": "4", - "tgtTableId": "3", - "srcTableColName": "sale_order_code", - "tgtTableColName": "order_code" + id: '51', + srcTableId: '4', + tgtTableId: '3', + srcTableColName: 'sale_order_code', + tgtTableColName: 'order_code' }, { - "id": "52", - "srcTableId": "2", - "tgtTableId": "3", - "srcTableColName": "sale_time", - "tgtTableColName": "stat_date" + id: '52', + srcTableId: '2', + tgtTableId: '3', + srcTableColName: 'sale_time', + tgtTableColName: 'stat_date' }, { - "id": "53", - "srcTableId": "2", - "tgtTableId": "3", - "srcTableColName": "item_type", - "tgtTableColName": "proj_cate_code" + id: '53', + srcTableId: '2', + tgtTableId: '3', + srcTableColName: 'item_type', + tgtTableColName: 'proj_cate_code' }, { - "id": "54", - "srcTableId": "5", - "tgtTableId": "3", - "srcTableColName": "purchase_kind_code", - "tgtTableColName": "purchase_kind_code" + id: '54', + srcTableId: '5', + tgtTableId: '3', + srcTableColName: 'purchase_kind_code', + tgtTableColName: 'purchase_kind_code' }, { - "id": "55", - "srcTableId": "5", - "tgtTableId": "3", - "srcTableColName": "proc_time", - "tgtTableColName": "sale_goods_snapshot_proc_time" + id: '55', + srcTableId: '5', + tgtTableId: '3', + srcTableColName: 'proc_time', + tgtTableColName: 'sale_goods_snapshot_proc_time' }, { - "id": "56", - "srcTableId": "4", - "tgtTableId": "3", - "srcTableColName": "casher_code", - "tgtTableColName": "casr_code" + id: '56', + srcTableId: '4', + tgtTableId: '3', + srcTableColName: 'casher_code', + tgtTableColName: 'casr_code' }, { - "id": "57", - "srcTableId": "2", - "tgtTableId": "3", - "srcTableColName": "service_charge", - "tgtTableColName": "service_charge" + id: '57', + srcTableId: '2', + tgtTableId: '3', + srcTableColName: 'service_charge', + tgtTableColName: 'service_charge' }, { - "id": "58", - "srcTableId": "6", - "tgtTableId": "3", - "srcTableColName": "sales_job_number", - "tgtTableColName": "sale_pers_id" + id: '58', + srcTableId: '6', + tgtTableId: '3', + srcTableColName: 'sales_job_number', + tgtTableColName: 'sale_pers_id' }, { - "id": "59", - "srcTableId": "7", - "tgtTableId": "3", - "srcTableColName": "from_warehouse_code", - "tgtTableColName": "phmc_code" + id: '59', + srcTableId: '7', + tgtTableId: '3', + srcTableColName: 'from_warehouse_code', + tgtTableColName: 'phmc_code' }, { - "id": "60", - "srcTableId": "2", - "tgtTableId": "3", - "srcTableColName": "store_code", - "tgtTableColName": "phmc_code" + id: '60', + srcTableId: '2', + tgtTableId: '3', + srcTableColName: 'store_code', + tgtTableColName: 'phmc_code' }, { - "id": "61", - "srcTableId": "7", - "tgtTableId": "3", - "srcTableColName": "warehouse_code", - "tgtTableColName": "out_phmc_code" + id: '61', + srcTableId: '7', + tgtTableId: '3', + srcTableColName: 'warehouse_code', + tgtTableColName: 'out_phmc_code' }, { - "id": "62", - "srcTableId": "2", - "tgtTableId": "3", - "srcTableColName": "store_code", - "tgtTableColName": "out_phmc_code" + id: '62', + srcTableId: '2', + tgtTableId: '3', + srcTableColName: 'store_code', + tgtTableColName: 'out_phmc_code' }, { - "id": "63", - "srcTableId": "7", - "tgtTableId": "3", - "srcTableColName": "pos_code", - "tgtTableColName": "is_ydch_flag" + id: '63', + srcTableId: '7', + tgtTableId: '3', + srcTableColName: 'pos_code', + tgtTableColName: 'is_ydch_flag' }, { - "id": "64", - "srcTableId": "4", - "tgtTableId": "3", - "srcTableColName": "coupon_plan_code", - "tgtTableColName": "coup_prog_code" + id: '64', + srcTableId: '4', + tgtTableId: '3', + srcTableColName: 'coupon_plan_code', + tgtTableColName: 'coup_prog_code' } ] }; const data: GraphData = { - nodes: [{ id: 'node1' }, { id: 'node2' }, { id: 'node3' }, { id: 'node4' }, { id: 'node5' }, { id: 'node6' }], + nodes: [ + { id: 'node1' }, + { id: 'node2' }, + { id: 'node3' }, + { id: 'node4' }, + { id: 'node5' }, + { id: 'node6' } + ], edges: [ { source: 'node1', target: 'node2' }, { source: 'node1', target: 'node3' }, - { source: 'node1', target: 'node4', text: 'cubic-horizontal-dhgsjagdhjsagdhjskabxhjsvaghjdahjsvxhjsfagdhjsahjdga' }, + { + source: 'node1', + target: 'node4', + text: 'cubic-horizontal-dhgsjagdhjsagdhjskabxhjsvaghjdahjsvxhjsfagdhjsahjdga' + }, { source: 'node1', target: 'node5' }, - { source: 'node1', target: 'node6' }, - ], + { source: 'node1', target: 'node6' } + ] }; - const [graphData, setGraphData] = useState(lineageDataTransformToGraphData(lineageData)); + const [graphData, setGraphData] = useState( + lineageDataTransformToGraphData(lineageData) + ); const [refreshLoading, setRefreshLoading] = useState(false); const refresh = () => { @@ -962,9 +973,14 @@ export default () => { setRefreshLoading(false); }, 2000); setGraphData(lineageDataTransformToGraphData(lineageData)); - }; - - return ; -} + return ( + + ); +}; diff --git a/dinky-web/src/types/DevOps/data.d.ts b/dinky-web/src/types/DevOps/data.d.ts index 5ec1a58f81..33e0c7194a 100644 --- a/dinky-web/src/types/DevOps/data.d.ts +++ b/dinky-web/src/types/DevOps/data.d.ts @@ -293,7 +293,7 @@ export interface LineageRelations { id: string; srcTableId: string; tgtTableId: string; - relationship: string ; + relationship: string; srcTableColName: string; tgtTableColName: string; }