xlp_algo_flow

算法流程工具[algo-flow]采用Vue+ElementUI

Usage no npm install needed!

<script type="module">
  import xlpAlgoFlow from 'https://cdn.skypack.dev/xlp_algo_flow';
</script>

README

Algo_Flow

一个算法工具

Project setup

npm install xlp_algo_flow
cnpm install xlp_algo_flow

How to use

<template>
    <div id="app" v-cloak style="background: white;color:black ">
        <algo-flow
                id="algo"
                :getDataSourceListFun="getDataSourceListFun"
                :getDatasetListFun="getDatasetListFun"
                :getAlgoListFun="getAlgoListFun"
                :outputDatasetFun="outputDatasetFun"
                :algoParamsFun="algoParamsFun"
                :algoInputsFun="algoInputsFun"
                :algoOutputsFun="algoOutputsFun"
                :getDataSourceTabNamesFun="getDataSourceTabNamesFun"
                :getDataSourceTabFieldsFun="getDataSourceTabFieldsFun"
                :getNodeOutputDataFun="getNodeOutputDataFun"
                :saveFlowFun="saveFlowFun"
                :deleteFlowFun="deleteFlowFun"
                :listFlowFun="listFlowFun"
                :getFlowFun="getFlowFun"
                :runFlowFun="runFlowFun"
        ></algo-flow>
    </div>
</template>

<script>
  import AlgoFlow from 'xlp_algo_flow';
  import apis from "../../apis/apis";

  export default {
    name:"AlgoScene",
    components:{AlgoFlow},
    methods:
      {
        //FlowBootstrap
        getDataSourceListFun()
        {
          return apis.databridge.getDataSourceList();
        },
        getDatasetListFun()
        {
          return apis.dataalgo.listDataset();
        },
        getAlgoListFun()
        {
          return apis.dataalgo.algoList();
        },
        //FlowAttrArea
        outputDatasetFun(id)
        {
          return apis.dataalgo.outputDataset(id);
        },
        algoParamsFun(algoName)
        {
          return apis.dataalgo.algoParams(algoName);
        },
        algoInputsFun(algoName)
        {
          return apis.dataalgo.algoInputs(algoName);
        },
        algoOutputsFun(algoName)
        {
          return apis.dataalgo.algoOutputs(algoName);
        },
        getDataSourceTabNamesFun(dsId,dbName)
        {
          return apis.databridge.getDataSourceTabNames(dsId,dbName);
        },
        getDataSourceTabFieldsFun(dsId,tabName)
        {
          return apis.databridge.getDataSourceTabFields(dsId,tabName);
        },
        //FlowMainArea/NodeData
        getNodeOutputDataFun(flowId,nodeId,start,size)
        {
          return apis.dataalgo.getNodeOutputData(flowId,nodeId,start,size);
        },
        //FlowDesignerArea
        saveFlowFun(data)
        {
          return apis.dataalgo.saveFlow(data);
        },
        deleteFlowFun(ids)
        {
          return apis.dataalgo.deleteFlow(ids);
        },
        listFlowFun()
        {
          return apis.dataalgo.listFlow();
        },
        getFlowFun(id)
        {
          return apis.dataalgo.getFlow(id);
        },
        runFlowFun(id)
        {
          return apis.dataalgo.runFlow(id);
        },
      }
  };
</script>