|
@@ -1,3 +1,138 @@
|
|
<template>
|
|
<template>
|
|
- <div>5555555555</div>
|
|
|
|
-</template>
|
|
|
|
|
|
+ <div class="container-box">
|
|
|
|
+ <el-row :gutter="20" class="h-100">
|
|
|
|
+ <el-col :span="6" class="h-100">
|
|
|
|
+ <div class="h-100">
|
|
|
|
+ <el-card class="box-card h-100">
|
|
|
|
+ <div class="tree-container">
|
|
|
|
+ <el-scrollbar>
|
|
|
|
+ <el-tree
|
|
|
|
+ lazy
|
|
|
|
+ :load="loadNode"
|
|
|
|
+ @node-click="handleNodeClick"
|
|
|
|
+ :props="defaultProps"
|
|
|
|
+ :expand-on-click-node="false"
|
|
|
|
+ highlight-current
|
|
|
|
+ node-key="id"
|
|
|
|
+ ref="tree"
|
|
|
|
+ ></el-tree>
|
|
|
|
+ </el-scrollbar>
|
|
|
|
+ </div>
|
|
|
|
+ </el-card>
|
|
|
|
+ </div>
|
|
|
|
+ </el-col>
|
|
|
|
+ <el-col :span="18" class="h-100">
|
|
|
|
+ <div class="h-100">
|
|
|
|
+
|
|
|
|
+ <el-card class="box-card h-100">
|
|
|
|
+ <div slot="header" class="clearfix">
|
|
|
|
+ <i class="el-icon-arrow-left" style="margin-right: 5px; cursor: pointer;" @click="goBack"></i>
|
|
|
|
+ <span>退出</span>
|
|
|
|
+ <div style="float: right;">
|
|
|
|
+ <el-button
|
|
|
|
+ icon="el-icon-plus"
|
|
|
|
+ size="small"
|
|
|
|
+ style="background-color:#2550A2;color:white;font-weight:bold;"
|
|
|
|
+ plain
|
|
|
|
+ >新增
|
|
|
|
+ </el-button>
|
|
|
|
+ <el-button
|
|
|
|
+ icon="el-icon-document-copy"
|
|
|
|
+
|
|
|
|
+ size="small"
|
|
|
|
+ style="background-color:#FFA042;color:white;font-weight:bold;"
|
|
|
|
+ plain
|
|
|
|
+ >管理
|
|
|
|
+ </el-button>
|
|
|
|
+
|
|
|
|
+
|
|
|
|
+ </div>
|
|
|
|
+ </div>
|
|
|
|
+ <div>
|
|
|
|
+
|
|
|
|
+ </div>
|
|
|
|
+ </el-card>
|
|
|
|
+ </div>
|
|
|
|
+ </el-col>
|
|
|
|
+ </el-row>
|
|
|
|
+ </div>
|
|
|
|
+</template>
|
|
|
|
+<script>
|
|
|
|
+import {getLazytree} from "@/api/manager/wbsprivate";
|
|
|
|
+ export default {
|
|
|
|
+
|
|
|
|
+ data() {
|
|
|
|
+ return {
|
|
|
|
+ id: '',
|
|
|
|
+ parentId: '',
|
|
|
|
+ tenant_id:'',
|
|
|
|
+ projectid:'',
|
|
|
|
+
|
|
|
|
+ defaultProps: {
|
|
|
|
+ children: "children",
|
|
|
|
+ label: "title",
|
|
|
|
+ isLeaf: function (data) {
|
|
|
|
+ return !data.hasChildren || (data.isExistForm==1);
|
|
|
|
+ },
|
|
|
|
+ }
|
|
|
|
+ };
|
|
|
|
+ },
|
|
|
|
+ created(){
|
|
|
|
+ console.log(this.$route.query,'this.$route.query;');
|
|
|
|
+
|
|
|
|
+ const { id, tenant_id,projectid,parentId } = this.$route.query;
|
|
|
|
+ console.log(tenant_id,'tenant_id');
|
|
|
|
+
|
|
|
|
+ this.id = id;
|
|
|
|
+ this.parentId = 0;
|
|
|
|
+ this.tenant_id = tenant_id;
|
|
|
|
+ this.projectid = projectid;
|
|
|
|
+ },
|
|
|
|
+ methods: {
|
|
|
|
+ handleNodeClick(data) {
|
|
|
|
+ console.log(data);
|
|
|
|
+ },
|
|
|
|
+ loadNode(node, resolve) {
|
|
|
|
+ let pid = 0;
|
|
|
|
+ if (node.level != 0) {
|
|
|
|
+ pid = node.data.id;
|
|
|
|
+ }
|
|
|
|
+ const type = this.wbsType;
|
|
|
|
+ getLazytree(this.id, pid, this.tenant_id, this.projectid, {
|
|
|
|
+ wbsType: 2,
|
|
|
|
+ }).then((res) => {
|
|
|
|
+ let arr = [];
|
|
|
|
+ if (Array.isArray(res.data.data)) {
|
|
|
|
+ arr = res.data.data;
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ return resolve(arr);
|
|
|
|
+ });
|
|
|
|
+ },
|
|
|
|
+ goBack() {
|
|
|
|
+ this.$router.go(-1)
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ };
|
|
|
|
+</script>
|
|
|
|
+
|
|
|
|
+<style scoped>
|
|
|
|
+.container-box {
|
|
|
|
+ height: calc(100vh - 120px);
|
|
|
|
+
|
|
|
|
+ box-sizing: border-box;
|
|
|
|
+}
|
|
|
|
+
|
|
|
|
+.h-100 {
|
|
|
|
+ height: 100%;
|
|
|
|
+}
|
|
|
|
+.tree-container {
|
|
|
|
+ height: calc(100vh - 120px);
|
|
|
|
+ overflow-y: auto;
|
|
|
|
+}
|
|
|
|
+
|
|
|
|
+.box-card {
|
|
|
|
+ display: flex;
|
|
|
|
+ flex-direction: column;
|
|
|
|
+}
|
|
|
|
+</style>
|