import React from 'react'; import {Modal, Grid, Divider} from 'semantic-ui-react'; function randomColor() { var colors = [ 'red', 'orange', 'yellow', 'olive', 'green', 'teal', 'blue', 'violet', 'purple', 'pink', 'brown', 'grey' ]; colors.sort(function () { return 0.5 - Math.random(); }); return colors.shift(); } function ParseTree(props) { let {root, ln, lc} = props; let ops = { "0": "等於", "1": "大於", "2": "小於", "3": "大於等於", "4": "小於等於", "5": "不等於", "8": "AND", "9": "OR" }; function GenLN(props) { let {data, isRoot} = props; return (
{`ID:${data.jcioclntuid || ''} / Name:${data.lnname || ''} / Action:${data.lnaction || ''}`}
{ops[data.lnlcop]}
) } function GenLC(props) { let {data} = props; return (
{`ID:${data.jcioclctuid || ''} / Name:${data.lcname || ''} / Action:${data.lcaction || ''}`}

{`${data.lcioid} ${ops[data.lcioop]} ${data.lciovalue}`}
) } function GenNode(props) { let {ids} = props; let isRoot = ids.length == 1 && ids[0].substr(2) == root ? true : false; let arr = []; for (let i in ids) { let id = ids[i]; if (/^ln/.test(id)) { let idn = id.match(/^ln(\d+)$/); if (!idn || idn.length < 1) continue; let num = idn[1]; for (let j in ln) { if (ln[j].jcioclntuid == num) { arr.push() } } } else if (/^lc/.test(id)) { let idn = id.match(/^lc(\d+)$/); if (!idn || idn.length < 1) continue; let num = idn[1]; for (let j in lc) { if (lc[j].jcioclctuid == num) { arr.push() } } } } return ( {arr.map(t => t) } ) } return } const LinkInfo = ({ i18n, open, root, ln, lc, onClose }) => { return ( { onClose() }}> ) } export default LinkInfo;