panxiandiao_i 5 лет назад
Родитель
Сommit
1559504cd7
1 измененных файлов с 26 добавлено и 13 удалено
  1. 26 13
      src/views/projectManage/taskList/taskListIndex.vue

+ 26 - 13
src/views/projectManage/taskList/taskListIndex.vue

@@ -111,6 +111,16 @@
           <div class="collapse">
             <span @click="isCollapsing = !isCollapsing">&lt;&lt; 收起</span>
           </div>
+          <el-tree
+            ref="treeBox"
+            icon-class="el-icon-caret-right"
+            :data="dealWithBusinessDate"
+            node-key="id"
+            highlight-current
+            :props="defaultProps"
+            style="margin-top:20px;min-width:100%;display:inline-block !important;"
+            @node-click="handleNodeClick"
+          />
         </div>
         <div v-show="!isCollapsing" class="collapse-navigation">
           <div class="expand-collapse">
@@ -195,6 +205,7 @@ import { bugGetEnum } from '@/api/defectManage' // 下拉菜单data
 import { deleteTaskData, listMap, updateTaskList } from '@/api/projectPage.js'
 import { updateComment, deleteComment, listComment, createComment } from '@/api/KanBan.js'
 import draggable from 'vuedraggable'
+import axios from 'axios'
 
 export default {
   components: {
@@ -205,6 +216,11 @@ export default {
     return {
       labelDrag: [],
       tableData: [],
+      dealWithBusinessDate: [],
+      defaultProps: {
+        children: 'child',
+        label: 'commentInfo.content'
+      },
       form: {},
       isCollapsing: true,
       formKanBan: {},
@@ -265,10 +281,6 @@ export default {
         // }, {})
         // console.log(this.tableData)
       })
-    },
-    // 收起
-    collapse() {
-
     },
     dataQuery(queryCode) {
       this.curIndex = 1
@@ -344,7 +356,6 @@ export default {
     },
     // 看板移动更新
     checkMove(evt) {
-      console.log(evt.draggedContext.element)
       this.pauseFromId = evt.draggedContext.element.id
     },
     targetRecording(e) {
@@ -365,13 +376,11 @@ export default {
     kanBanDrag() {
       this.loadingOnlineProcess = true
       const initValue = { bizId: this.bizJson }
-      listComment().then((res) => {
-        console.log(res)
-      })
-      listMap(initValue).then((res) => {
+      axios.all([listMap(initValue), listComment({ type: 1 })]).then(axios.spread((res, resNavigation) => {
         res.code === 200 ? this.labelDrag = this.bubble(res.data) : this.errorFun(res.msg)
+        resNavigation.code === 200 ? this.dealWithBusinessDate = resNavigation.data : this.errorFun(resNavigation.msg)
         this.loadingOnlineProcess = false
-      })
+      }))
     },
     // 冒泡数量从高到低 和 分组
     bubble(arr) {
@@ -392,7 +401,7 @@ export default {
           break
         }
       }
-      // 自己处理 不给后端处理
+      // 自己处理数组
       res = res.map(eachData => ({
         ...eachData,
         taskInfos: eachData.taskInfos.map(detail => ({
@@ -431,6 +440,10 @@ export default {
         this.loadingOnlineProcess = false
       })
     },
+    // tree
+    handleNodeClick(data) {
+      console.log(data)
+    },
     handleCurrentChange(curIndex) {
       this.curIndex = curIndex
       this.dataQueryInSearch()
@@ -598,8 +611,8 @@ export default {
               background-color #ECECEC
               box-shadow 0px 0px 11px 0px #ececec
               height fit-content
-              // max-height 200px
-              // overflow scroll
+              max-height 56.4vh
+              overflow scroll
               .inner-drag
                 width 89%
                 margin 10px auto 0 auto