Răsfoiți Sursa

项目管理bug更改

wsx 1 an în urmă
părinte
comite
1e036a7d2e

+ 0 - 0
src/components/linkParentDialog/components/search.vue


+ 169 - 0
src/components/linkParentDialog/components/tree.vue

@@ -0,0 +1,169 @@
+<template>
+  <div class="tree-wrapper">
+    <el-tree
+      :data="treeList"
+      :props="defaultProps"
+      v-loading="treeLoading"
+      :node-key="nodeKey"
+      ref="tree"
+      :highlight-current="true"
+      :expand-on-click-node="false"
+      @node-click="handleNodeClick"
+      v-bind="$attrs"
+      :default-expand-all="defaultExpandAll"
+    >
+    </el-tree>
+  </div>
+</template>
+
+<script>
+  import { listOrganizations } from '@/api/system/organization';
+  // let originId = '';
+  // let originType = '';
+  export default {
+    props: {
+      // treeList私有化处理
+      treeList: {
+        type: Array,
+        default: () => []
+      },
+      treeFormate: {
+        type: Function,
+        default: null
+      },
+      defaultProps: {
+        type: Object,
+        default: function () {
+          return {
+            children: 'children',
+            value: 'id',
+            label: 'name'
+          };
+        }
+      },
+      defaultExpandAll: {
+        type: Boolean,
+        default: function () {
+          return true;
+        }
+      },
+      // 初始请求treeList
+      init: {
+        type: Boolean,
+        default: true
+      },
+
+      isFirstRefreshTable: {
+        type: Boolean,
+        default: true
+      },
+      id: {
+        type: String,
+        default: '0'
+      },
+      nodeKey: {
+        type: String,
+        default: 'id'
+      }
+      // appendRoot: {
+      //   type: Boolean,
+      //   default: false
+      // },
+    },
+    data() {
+      return {
+        // treeList: [],
+        treeLoading: false,
+        parentName: '',
+        parentId: '',
+        currentKey: ''
+      };
+    },
+    mounted() {
+      if (this.init) {
+        // this.getTreeData();
+      }
+    },
+    methods: {
+      getInstance() {
+        return this.$refs.tree;
+      },
+      // 获取树结构数据
+    //   async getTreeData(params = {}) {
+    //     try {
+    //       this.treeLoading = true;
+
+    //       const data = await listOrganizations(params);
+    //       this.treeLoading = false;
+    //       this.$emit('setRootId', data[0].id);
+    //       this.treeList = this.$util.toTreeData({
+    //         data: data || [],
+    //         idField: 'id',
+    //         parentIdField: 'parentId'
+    //       });
+    //       this.$nextTick(() => {
+    //         // 默认高亮第一级树节点
+    //         if (this.treeList[0] && this.isFirstRefreshTable) {
+    //           this.setCurrentKey(this.treeList[0].id);
+    //           this.handleNodeClick(
+    //             this.treeList[0],
+    //             this.$refs.tree.getCurrentNode()
+    //           );
+    //         }
+    //       });
+    //       return this.treeList;
+    //     } catch (error) {
+    //       console.error(error);
+    //     }
+    //     this.treeLoading = false;
+    //   },
+      // 递归 - 往树children里面添加parentName
+      // _setParentName (tree) {
+      //   let data = tree;
+      //   for (let i = 0; i < data.length; i++) {
+      //     if (data[i].parentId === '0') {
+      //       this.parentName = data[i].name;
+      //       originId = data[i].id;
+      //       originType = data[i].type;
+      //     }
+
+      //     data[i]['originId'] = originId;
+      //     data[i]['originType'] = originType;
+      //     data[i]['parentId'] = data[i]['parentId'];
+      //     if (data[i].children && data[i].children.length > 0) {
+      //       this._setParentName(data[i].children);
+      //     }
+      //   }
+      //   return data;
+      // },
+
+      handleNodeClick(data, node) {
+        this.$emit('handleNodeClick', data, node);
+      },
+      // 设置默认高亮行
+      setCurrentKey(id) {
+        this.currentKey = id;
+        this.$refs.tree.setCurrentKey(this.currentKey);
+      },
+
+      // 获取树的选中状态
+      getSelectList() {
+        const selectList = this.$refs.tree.getCurrentNode();
+        return selectList;
+      }
+    }
+  };
+</script>
+
+<style lang="scss" scoped>
+  .tree-wrapper {
+    width: 100%;
+    height: 100%;
+    overflow: auto;
+
+    :deep(.el-tree) {
+      display: inline-block;
+      min-width: 100%;
+    }
+  }
+</style>

+ 127 - 0
src/components/linkParentDialog/index.vue

@@ -0,0 +1,127 @@
+<template>
+  <el-dialog
+    :title="title"
+    :visible.sync="linkParentDialogFlag"
+    :before-close="handleClose"
+    :close-on-click-modal="false"
+    top="5vh"
+    :close-on-press-escape="false"
+    append-to-body
+    width="70%"
+  >
+    <el-card shadow="never">
+      <ele-split-layout
+        width="244px"
+        allow-collapse
+        :right-style="{ overflow: 'hidden' }"
+      >
+        <div class="ele-border-lighter split-layout-right-content">
+          <tree
+            @handleNodeClick="handleNodeClick"
+            :isFirstRefreshTable="false"
+            ref="treeListRef"
+            :treeList="treeList"
+          />
+        </div>
+        <!-- 表格 -->
+        <template v-slot:content>
+          <user-select-search @search="reload"></user-select-search>
+          <ele-pro-table
+            ref="table"
+            :columns="columns"
+            :datasource="datasource"
+            row-key="id"
+            height="calc(100vh - 430px)"
+            class="dict-table"
+            @cell-click="cellClick"
+            cache-key="systemRoleTable3"
+            :selection.sync="selection"
+          >
+            <!-- 表头工具栏 -->
+            <template v-slot:action="{ row }">
+              <el-radio class="radio" v-model="radio" :label="row.id"
+                ><i></i
+              ></el-radio>
+            </template>
+          </ele-pro-table>
+        </template>
+      </ele-split-layout>
+    </el-card>
+
+    <div slot="footer" class="dialog-footer">
+      <el-button type="primary" size="small" @click="selected">选择</el-button>
+      <el-button size="small" @click="handleClose">关闭</el-button>
+    </div>
+  </el-dialog>
+</template>
+
+<script>
+  // import DepartmentTree from '@/components/departmentTree';
+  import tree from './components/tree.vue';
+  import selectPersonDialog from '@/BIZComponents/user-select/user-select.vue';
+  import userSelectSearch from '@/BIZComponents/user-select/user-select-search.vue';
+
+  export default {
+    components: {
+      tree,
+      selectPersonDialog,
+      userSelectSearch
+    },
+    props: {
+      linkParentDialogFlag: {
+        type: Boolean,
+        default: false
+      },
+      multiple: {
+        type: Boolean,
+        default: false
+      },
+      treeApi: {
+        type: Function,
+        require: true
+      },
+      treeApiCode: {
+        default: () => ''
+      },
+      columns: { default: () => [] },
+      tableDataApi: {
+        type: Function,
+        require: true
+      },
+      tableDataParams: {
+        default: () => {}
+      }
+    },
+    data() {
+      return {
+        title: '关联项目',
+        selection: [],
+        columns: [],
+        treeList: []
+      };
+    },
+
+    methods: {
+      handleClose() {
+        this.$emit('update:linkParentDialogFlag', false);
+      },
+      selected() {},
+      reload() {},
+      handleNodeClick() {},
+      cellClick() {},
+      datasource() {},
+      async getTreeList() {
+        const res = await this.treeApi(this.treeApiCode);
+        console.log(res);
+        this.treeList = res;
+      }
+    },
+
+    created() {
+      this.getTreeList();
+    },
+    mounted() {}
+  };
+</script>
+
+<style lang="scss" scoped></style>

+ 171 - 155
src/views/project-manage/planManage/components/addOrEditDialog.vue

@@ -7,180 +7,196 @@
     append-to-body
     :close-on-click-modal="false"
     width="70%"
-    :before-close="cancel">
+    :before-close="cancel"
+  >
     <headerTitle title="计划信息"></headerTitle>
-    <plan-form ref="planForm" :dialog-type.sync="dialogType" :dialogForm="dialogForm" :deptList="deptList"
-               :deptTreeList="deptTreeList" :userList="userList" @changeProject="changeProject"></plan-form>
+    <plan-form
+      ref="planForm"
+      :dialog-type.sync="dialogType"
+      :dialogForm="dialogForm"
+      :deptList="deptList"
+      :deptTreeList="deptTreeList"
+      :userList="userList"
+      @changeProject="changeProject"
+    ></plan-form>
     <headerTitle title="计划节点"></headerTitle>
-    <plan-info-table ref="planInfoTable" :dialog-type.sync="dialogType" :dialogForm="dialogForm" :deptList="deptList"
-                     :deptTreeList="deptTreeList" :userList="userList"></plan-info-table>
+    <plan-info-table
+      ref="planInfoTable"
+      :dialog-type.sync="dialogType"
+      :dialogForm="dialogForm"
+      :deptList="deptList"
+      :deptTreeList="deptTreeList"
+      :userList="userList"
+    ></plan-info-table>
     <div slot="footer">
       <el-button type="primary" size="small" @click="submit">保 存</el-button>
-<!--      <el-button type="primary" size="small" @click="submit('sub')">提 交</el-button>-->
+      <!--      <el-button type="primary" size="small" @click="submit('sub')">提 交</el-button>-->
       <el-button size="small" @click="cancel">关 闭</el-button>
     </div>
-
-
   </ele-modal>
 </template>
 
-
 <script>
-import projectForm from "./project-form.vue";
-import planForm from "./plan-form.vue";
-import planInfoTable from "./planInfoTable.vue";
-import {
-  getTargetPlanCode,
-  projectsPlanGetByIdAPI,
-  projectsPlanSaveAPI,
-  projectsPlanUpdateAPI,
-  submit
-} from "@/api/project-manage/plan";
-import {deepClone} from "@/utils";
-import {getUserPage, listOrganizations} from "@/api/system/organization";
-import {projectsTeamGetByIdAPI} from "@/api/project-manage/team";
-import {projectsGetByIdAPI} from "@/api/project-manage";
-
-export default {
-  name: "addOrEditDialog",
-  components: {
-    projectForm,
-    planForm,
-    planInfoTable
-  },
-  props: {
-    addOrEditDialogFlag: {
-      type: Boolean,
-      default: false,
-    }
-  },
-  data() {
-    return {
-      title: '',
-      dialogType: '',
-      dialogForm: {},
-      userList: [],
-      deptList: [],
-      deptTreeList: [],
-      allUserList: [],
-    }
-  },
-  async created() {
-    this.getDeptList();
-    let {list} = await getUserPage({pageNum: 1, size: -1});
-    this.allUserList = list
-  },
-  methods: {
-    async init(row = {}, type) {
-      this.title = type === 'add' ? '新增' : '编辑';
-      this.dialogType = type;
-      if (type !== 'add') {
-        await this.getProjectPlanInfo(row.id)
-      } else {
-        this.dialogForm = {
-          projectId: row.projectId,
-          projectBomId: row.projectBomId,
-          projectStageId: row.projectStageId,
-          parentId: row.parentPlanId,
-          code: await getTargetPlanCode()
-        };
-
-        if (this.dialogForm.projectId && !row.teamId) {
-          const data = await projectsGetByIdAPI(this.dialogForm.projectId)
-          if (data.teamId) this.getUserList(data.teamId);
-        }else {
-          if (row.teamId) this.getUserList(row.teamId);
-        }
+  import projectForm from './project-form.vue';
+  import planForm from './plan-form.vue';
+  import planInfoTable from './planInfoTable.vue';
+  import {
+    getTargetPlanCode,
+    projectsPlanGetByIdAPI,
+    projectsPlanSaveAPI,
+    projectsPlanUpdateAPI,
+    submit
+  } from '@/api/project-manage/plan';
+  import { deepClone } from '@/utils';
+  import { getUserPage, listOrganizations } from '@/api/system/organization';
+  import { projectsTeamGetByIdAPI } from '@/api/project-manage/team';
+  import { projectsGetByIdAPI } from '@/api/project-manage';
 
-        //从项目直接新建计划,则获取项目团队
-
-      }
-
-    },
-    async changeProject(id) {
-      let projectInfo = await projectsGetByIdAPI(id)
-      this.getUserList(projectInfo.teamId)
+  export default {
+    name: 'addOrEditDialog',
+    components: {
+      projectForm,
+      planForm,
+      planInfoTable
     },
-    // 获取项目团队下团队人员集合
-    getUserList(val) {
-      if (!val) {
-        this.userList = []
-        return
+    props: {
+      addOrEditDialogFlag: {
+        type: Boolean,
+        default: false
       }
-      projectsTeamGetByIdAPI(
-        val
-      ).then((list) => {
-        this.userList = deepClone(list.teamUserList)
-      });
     },
-    // 获取部门数据
-    getDeptList() {
-      listOrganizations().then((list) => {
-        this.deptList = list;
-        this.deptTreeList = this.$util.toTreeData({
-          data: list,
-          idField: 'id',
-          parentIdField: 'parentId'
-        });
-      });
+    data() {
+      return {
+        title: '',
+        dialogType: '',
+        dialogForm: {},
+        userList: [],
+        deptList: [],
+        deptTreeList: [],
+        allUserList: []
+      };
     },
-    // 获取计划信息
-    async getProjectPlanInfo(id = '') {
-      let res = await projectsPlanGetByIdAPI(id)
-      this.dialogForm = deepClone(res)
-      this.dialogForm.responsibleUserIds = this.dialogForm.responsibleUserList.map(i => i.userId) || []
-      this.dialogForm.planStageList.forEach((item, index) => {
-        let userIds = item.responsibleUserList.map(i => i.userId) || []
-        this.$set(item, 'responsibleUserIds', userIds)
-      })
-      if (this.dialogForm.projectId) await this.changeProject(this.dialogForm.projectId)
+    async created() {
+      this.getDeptList();
+      let { list } = await getUserPage({ pageNum: 1, size: -1 });
+      this.allUserList = list;
     },
-    async submit(type = '') {
-      let form = await this.$refs.planForm.validForm();
-      form.planStageList = await this.$refs.planInfoTable.getTableValidate() || [];
-      form.realStartDate = null
-      form.realEndDate = null
-      for (const item of form.planStageList) {
-        item.responsibleUserList = await this.getResponsibleUserList(item.responsibleUserIds)
-      }
-      form.responsibleUserList = await this.getResponsibleUserList(form.responsibleUserIds)
-      const API = this.dialogType === 'add' ? projectsPlanSaveAPI : projectsPlanUpdateAPI;
-      const id = await API(form)
-      if (type === 'sub') {
-        this.processSubmit(id);
-        return
-      }
-      this.$message.success('操作成功');
-      this.cancel()
-      this.$emit('reload');
-    },
-    async getResponsibleUserList(list = []) {
-      return list.map(
-        i => {
-          return {
-            userId: i,
-            userName: this.allUserList?.find(u => u.id === i).name
+    methods: {
+      async init(row = {}, type) {
+        this.title = type === 'add' ? '新增' : '编辑';
+        this.dialogType = type;
+        if (type !== 'add') {
+          await this.getProjectPlanInfo(row.id);
+        } else {
+          console.log(row)
+          this.dialogForm = {
+            projectId: row.projectId,
+            projectBomId: row.projectBomId,
+            projectStageId: row.projectStageId,
+            parentId: row.parentPlanId,
+            code: await getTargetPlanCode()
+          };
+
+          if (this.dialogForm.projectId && !row.teamId) {
+            const data = await projectsGetByIdAPI(this.dialogForm.projectId);
+            if (data.teamId) this.getUserList(data.teamId);
+          } else {
+            if (row.teamId) this.getUserList(row.teamId);
           }
+
+          //从项目直接新建计划,则获取项目团队
+        }
+      },
+      async changeProject(id) {
+        let projectInfo = await projectsGetByIdAPI(id);
+        this.getUserList(projectInfo.teamId);
+      },
+      // 获取项目团队下团队人员集合
+      getUserList(val) {
+        if (!val) {
+          this.userList = [];
+          return;
+        }
+        projectsTeamGetByIdAPI(val).then((list) => {
+          this.userList = deepClone(list.teamUserList);
         });
-    },
-    //流程提交
-    processSubmit(id = '') {
-      submit({
-        planId: id || this.dialogForm.id
-      }).then((res) => {
-        this.$message.success('提交成功');
+      },
+      // 获取部门数据
+      getDeptList() {
+        listOrganizations().then((list) => {
+          this.deptList = list;
+          this.deptTreeList = this.$util.toTreeData({
+            data: list,
+            idField: 'id',
+            parentIdField: 'parentId'
+          });
+        });
+      },
+      // 获取计划信息
+      async getProjectPlanInfo(id = '') {
+        let res = await projectsPlanGetByIdAPI(id);
+        this.dialogForm = deepClone(res);
+        this.dialogForm.parentId =
+          this.dialogForm.parentId == 0 ? '' : this.dialogForm.parentId;
+        this.dialogForm.responsibleUserIds =
+          this.dialogForm.responsibleUserList.map((i) => i.userId) || [];
+        this.dialogForm.planStageList.forEach((item, index) => {
+          let userIds = item.responsibleUserList.map((i) => i.userId) || [];
+          this.$set(item, 'responsibleUserIds', userIds);
+        });
+        if (this.dialogForm.projectId)
+          await this.changeProject(this.dialogForm.projectId);
+      },
+      async submit(type = '') {
+        let form = await this.$refs.planForm.validForm();
+        form.planStageList =
+          (await this.$refs.planInfoTable.getTableValidate()) || [];
+        form.realStartDate = null;
+        form.realEndDate = null;
+        for (const item of form.planStageList) {
+          item.responsibleUserList = await this.getResponsibleUserList(
+            item.responsibleUserIds
+          );
+        }
+        form.responsibleUserList = await this.getResponsibleUserList(
+          form.responsibleUserIds
+        );
+        const API =
+          this.dialogType === 'add'
+            ? projectsPlanSaveAPI
+            : projectsPlanUpdateAPI;
+        const id = await API(form);
+        if (type === 'sub') {
+          this.processSubmit(id);
+          return;
+        }
+        this.$message.success('操作成功');
         this.cancel();
         this.$emit('reload');
-      });
-    },
-    cancel() {
-      this.$emit('update:addOrEditDialogFlag', false);
-    },
-  }
-}
+      },
+      async getResponsibleUserList(list = []) {
+        return list.map((i) => {
+          return {
+            userId: i,
+            userName: this.allUserList?.find((u) => u.id === i).name
+          };
+        });
+      },
+      //流程提交
+      processSubmit(id = '') {
+        submit({
+          planId: id || this.dialogForm.id
+        }).then((res) => {
+          this.$message.success('提交成功');
+          this.cancel();
+          this.$emit('reload');
+        });
+      },
+      cancel() {
+        this.$emit('update:addOrEditDialogFlag', false);
+      }
+    }
+  };
 </script>
 
-
-<style scoped lang="scss">
-
-</style>
+<style scoped lang="scss"></style>

+ 73 - 12
src/views/project-manage/project-initiation/components/project-form.vue

@@ -21,6 +21,7 @@
               placeholder="请选择"
               @change="changeType"
               default-expand-all
+              expand-on-click-node
             />
           </el-form-item>
         </el-col>
@@ -42,7 +43,7 @@
           </el-form-item>
         </el-col>
 
-        <el-col :span="8">
+        <!-- <el-col :span="8">
           <el-form-item label="从属项目">
             <ele-tree-select
               :disabled="dialogType == 'view'"
@@ -57,7 +58,28 @@
               default-expand-all
             />
           </el-form-item>
+        </el-col> -->
+
+        <el-col :span="8">
+          <el-form-item label="从属项目">
+            <el-select
+              ref="selectRef"
+              v-model="form.parentId"
+              placeholder="请选择"
+              clearable
+              @focus.prevent="openLinkParent('f')"
+              @visible-change="openLinkParent('v')"
+            >
+              <el-option
+                :key="form.parentId"
+                :label="form.parentName"
+                :value="form.parentId"
+              >
+              </el-option>
+            </el-select>
+          </el-form-item>
         </el-col>
+
         <el-col :span="8">
           <el-form-item label="负责部门" prop="responsibleDeptId">
             <ele-tree-select
@@ -311,6 +333,19 @@
       ref="orderListRef"
       @changeParent="getOrderDialog"
     ></orderListDialog>
+
+    <!-- 从属项目打开弹窗 -->
+    <linkParentDialog
+      :linkParentDialogFlag.sync="linkParentDialogFlag"
+      :multiple="true"
+      ref="linkParentDialogRef"
+      v-if="linkParentDialogFlag"
+      @linkParent="linkParentFn"
+      @close="close"
+      :treeApi="getProduceTreeByCode"
+      :treeApiCode="'XM1'"
+      tableDataApi="projectsPageAPI"
+    ></linkParentDialog>
   </div>
 </template>
 
@@ -318,10 +353,13 @@
   import {
     getProjectCode,
     projectsToTreeAPI,
-    getProjectCodeG
+    getProjectCodeG,
+    projectsPageAPI
   } from '@/api/project-manage';
   import { projectsTeamPageAPI } from '@/api/project-manage/team';
 
+  import linkParentDialog from '@/components/linkParentDialog';
+
   import PersonSelect from '@/components/CommomSelect/person-select.vue';
   import customDialog from '../../components/custom-dialog.vue';
   import fileUpload from '@/BIZComponents/addDoc/index.vue';
@@ -340,7 +378,8 @@
       PersonSelect,
       customDialog,
       contractListDialog,
-      orderListDialog
+      orderListDialog,
+      linkParentDialog
     },
     props: {
       code: {
@@ -399,6 +438,11 @@
     },
     data() {
       return {
+        projectsPageAPI:'',
+        getProduceTreeByCode: '',
+        linkParentDialogFlag: false,
+        rootId: [],
+        // 编码规则要传的参数
         ruleCode: '',
         cityData,
         typeOptions: [
@@ -507,28 +551,45 @@
         processStatus: '2',
         treeType: '0'
       });
-      this.typeTreeList = await getProduceTreeByCode('XM1');
-      let res = await projectsTeamPageAPI({ pageNum: 1, size: 10 });
-      this.grouplist = res;
-      // console.log(res.list);
-
+      console.log(this.projectList);
+      this.getProduceTreeByCode = getProduceTreeByCode;
+      const res1 = await getProduceTreeByCode('XM1');
+      this.typeTreeList = res1;
+      // 根id为了tree不能选择树节点
+      this.rootId = res1.map((item) => item.id);
+      let res2 = await projectsTeamPageAPI({ pageNum: 1, size: 10 });
+      this.grouplist = res2;
       this.ruleCode = this.typeTreeList[0].ruleCode;
     },
 
     methods: {
+      close() {
+        this.linkParentDialogFlag = false;
+      },
+      openLinkParent(...arg) {
+        console.log(arg);
+        let _this = this;
+        _this.$refs.selectRef.blur();
+        this.linkParentDialogFlag = true;
+      },
+      linkParentFn() {},
       setCycleValue(val, prop) {
         if (!this.form[prop] || !val) return (this.form.cycle = '');
         const a = moment(this.form.planEndDate);
         const b = moment(this.form.planStartDate);
         this.form.cycle = a.diff(b, 'days') + 1 + ' 天'; // 1
       },
-      async changeType() {
+      async changeType(e) {
+        if (this.rootId.includes(e)) {
+          console.log('不饿能');
+          return;
+        }
         this.form.code = await getProjectCodeG(this.ruleCode);
       },
       async teamChange(val) {
-        // let find = this.teamList.find((e) => e.id == val) || {};
-        // this.form.teamName = find.name;
-        // this.$emit('teamChange', val);
+        let find = this.teamList.find((e) => e.id == val) || {};
+        this.form.teamName = find.name;
+        this.$emit('teamChange', val);
       },
       // 选择负责人部门
       changeDeptInfo(id) {

+ 6 - 0
src/views/project-manage/project-initiation/index.vue

@@ -520,6 +520,7 @@
         projectsPauseAPI: projectsPauseAPI,
         projectsStartupAPI: projectsStartupAPI,
         projectsTerminationAPI: projectsTerminationAPI,
+        parentId:'',
         selection: [],
         dictList: [],
         // 表格列配置
@@ -580,6 +581,8 @@
       },
       /* 表格数据源 */
       async datasource({ page, limit, where, parent }) {
+        console.log(parent);
+        
         await this.getDictList('pro_projects_status');
         await this.getDictList('pro_projects_type');
         await this.getDictList('pro_projects_budget_unit');
@@ -592,6 +595,7 @@
           pageNum: page,
           size: limit,
           parentId: parent?.id ?? '0',
+          // parentId:this.parentId,
           ...where,
           type: this.treeId
         });
@@ -605,6 +609,7 @@
         this.$refs.table.reRenderTable();
       },
       handleNodeClick(data, node) {
+        this.parentId=data.parentId
         this.treeId = data.id;
         this.reload();
       },
@@ -622,6 +627,7 @@
         });
       },
       handleAddPlan(row) {
+        console.log(row);
         this.addPlanDialogFLag = true;
         this.$nextTick(() => {
           row.projectId = row.id;