田源
2024-09-27 a5f2dad996fcdb22a670743102b9fd08370738cd
Source/plt-web/plt-web-ui/src/views/modelingMenu/ui/uiDefine/rightRegion/bottomTable/components/action.vue
@@ -1,15 +1,23 @@
<template>
  <el-dialog
    v-dialogDrag
    :visible.sync="btnActionVisible"
    append-to-body="true"
    class="avue-dialog"
    title="选择Action"
    width="70%"
    @close="dialogClose">
  <el-container>
    <el-aside>
      <basic-container>
        <!-- 左侧树 -->
        <div style="height:580px">
          <div>
          <avue-tree
            ref="tree"
            v-model="treeForm"
            :data="treeData"
            :option="treeOption"
              node-key="value"
            @node-click="nodeClick">
          <span slot-scope="{ node, data }" class="el-tree-node__label">
           <span style="font-size: 15px">
@@ -50,6 +58,11 @@
  </el-container>
    <span slot="footer" class="dialog-footer">
        <el-button @click="btnActionVisible = false">取 消</el-button>
        <el-button type="primary" @click="actionSaveHandler">确 定</el-button>
      </span>
  </el-dialog>
</template>
<script>
@@ -75,6 +88,7 @@
  name: "index",
  data() {
    return {
      btnActionVisible: false,
      currenRow: {}, // action当前行信息
      topMethodsObj: {
        select: true,
@@ -126,7 +140,7 @@
      option: {
        ...basicOption,
        addBtn: false,
        height: 'auto',
        height: 500,
        highlightCurrentRow: true,
        column: [
          {
@@ -334,9 +348,6 @@
          this.selectList = [];
        }
      );
      // 请求action下方参数列表数据
      this.getBottomList(row);
    },
    // 搜索
@@ -368,6 +379,22 @@
      this.getRightTableList(this.treeNodeRow);
    },
    // 保存action
    actionSaveHandler() {
      if (this.selectList.length != 1) {
        this.$message.error('只能选择一条数据');
        return;
      }
      this.$emit('updataAction', this.selectList[0]);
      this.dialogClose();
    },
    dialogClose(){
      this.btnActionVisible = false;
      this.data = [];
      this.$refs.tree.setCurrentKey(null);
    }
  }
}
</script>