Source/UBCS-WEB/src/views/modeling/cycle.vue
@@ -1,22 +1,23 @@
<template>
  <el-container>
  <el-aside width="240px">
    <el-button @click="addHandlers"></el-button>
    <basic-container style="margin-top: 10px">
      <avue-tree id="basic" :data="treeData" :option="treeOption" @node-click="nodeClick"  >
      <avue-tree id="basic" :data="treeData" :option="treeOption"  >
      </avue-tree>
    </basic-container>
  </el-aside>
  <basic-container >
    <el-button type="primary" @click="dialogTableVisible=true" size="small">创建模板</el-button>
    <el-button type="primary"  size="small">编辑模板</el-button>
    <el-button type="primary" size="small" @click="$refs.flow.addNode('测试节点')">添加节点</el-button>
    <el-button type="primary"  size="small" @click="addHandlers">编辑模板</el-button>
    <el-button type="primary" size="small" @click="$refs.flow.addNode('ffff')">添加节点</el-button>
    <br/><br/>
    <avue-flow ref="flow" v-model="form" :height="703" :option="option" :width="1500">
      <template slot="header" slot-scope="scope">
        <i class="el-icon-delete" @click="$refs.flow.deleteNode(scope.node.id)" style="margin-top: 8px"></i>
      </template>
      <div slot-scope="{node}">
        <span>自定义{{ (node || {}).name }}</span>
        <span>{{ (node || {}).name }}</span>
      </div>
    </avue-flow>
    <!--    创建对话框-->
@@ -47,7 +48,7 @@
  name: "cycle.vue",
  data() {
    return {
      //模板对话框
      //模板对话框,
      dialogTableVisible:false,
      forms:{
        select:""
@@ -69,21 +70,6 @@
            prop:"filetype",
            formslot: true,
            span:24
            // type:"select",
            // dicData:[
            //   {
            //     label:"测试1",
            //     value:0
            //   },
            //   {
            //     label:"测试2",
            //     value:1
            //   },
            //   {
            //     label:"测试3",
            //     value:2
            //   },
            // ]
          },
          {
            label: "描述",
@@ -125,7 +111,7 @@
        defaultExpandAll: true,
      },
      option: {
        "nodeList": [
        nodeList: [
          {
            "id": "nodeA",
            "name": "流程A-节点A",
@@ -151,7 +137,7 @@
            "top": 20,
          }
        ],
        "lineList": [
        lineList: [
          {
            "from": "nodeA",
            "to": "nodeB"
@@ -182,10 +168,13 @@
        addHandler(){
          this.dialogTableVisible=true
          console.log(1)
        },
        deleteNode(id){
          console.log(id)
        handelLife(){
          console.log("点击成功")
        },
        addHandlers(){
          console.log(111)
        }
      }
    }