wangting
2024-10-08 18715a9d20518abb1374408007759ab2988d1150
Source/plt-web/plt-web-ui/src/views/modelingMenu/ui/uiDefine/rightRegion/bottomTable/index.vue
@@ -26,6 +26,7 @@
        </el-button>
        <el-button icon="el-icon-delete" size="small" type="text" @click="rowDeleteHandler(scope.row)">删除
        </el-button>
        <el-button icon="el-icon-document-copy" size="small" type="text" @click="rowCloneHandler(scope.row)">克隆</el-button>
      </template>
      <!-- eventKey以及eventValue显示区域 -->
@@ -79,7 +80,7 @@
            </el-button>
            <el-button plain size="mini" type="primary">调整为下级按钮</el-button>
            <el-button plain size="mini" type="primary">调整为上级按钮</el-button>
            <el-button plain size="mini" type="primary">复制到其他组件</el-button>
            <el-button plain size="mini" type="primary"  @click="cloneClickBtnHandler">复制到其他组件</el-button>
          </div>
        </el-header>
        <el-container>
@@ -195,6 +196,7 @@
      </el-container>
    </el-dialog>
    <action-dialog ref="actionDialog" @updataAction="actionSaveHandler"></action-dialog>
    <clone-dialog ref="cloneDialog"></clone-dialog>
  </div>
</template>
@@ -213,6 +215,7 @@
  addPageDefination
} from "@/api/UI/uiDefine";
import actionDialog from '@/views/modelingMenu/ui/uiDefine/rightRegion/bottomTable/components/action';
import cloneDialog from "@/views/modelingMenu/ui/uiDefine/rightRegion/cloneDialog";
export default {
  props: {
@@ -227,7 +230,8 @@
    }
  },
  components: {
    actionDialog
    actionDialog,
    cloneDialog
  },
  name: "index",
  data() {
@@ -1105,6 +1109,7 @@
          this.treeData = [{
            label: this.selectList[0].name,
            oId: 'parentNode',
            disabled: true,
            children: data
          }];
          this.treeLoading = false;
@@ -1259,6 +1264,17 @@
      });
    },
    cloneClickBtnHandler(){
      if (func.isEmptyObject(this.nodeTreeRow)) {
        this.$message.error('请选择节点进行复制');
        return;
      }
      if (this.nodeTreeRow.oId === "parentNode") {
        this.$message.error('顶层节点不允许复制');
        return;
      }
      this.$refs.cloneDialog.openDialog(this.nodeTreeRow);
    },
    // 选择action
    actionFoucus() {
      this.$refs.actionDialog.btnActionVisible = true;
@@ -1268,7 +1284,10 @@
    actionSaveHandler(val) {
      this.$set(this.basicForm, 'actionName', val.plName);
      this.$set(this.basicForm, 'actionOId', val.plOId);
    }
    },
    rowCloneHandler(row) {
      this.$refs.cloneDialog.openDialog(row);
    },
  }
}
</script>