Browse Source

Merge remote-tracking branch 'origin/http_test' into http_test

洪海涛 4 years ago
parent
commit
45535e7ad0

+ 22 - 4
src/views/dataBigManage/index.vue

@@ -189,7 +189,8 @@ export default {
       bizName: '业务线', // 业务线名字
       optionData: [],
       bizCode: 0,
-      isFirstDate: true
+      isFirstDate: true,
+      depyResetList: []
     }
   },
   created() {
@@ -341,6 +342,15 @@ export default {
         children: t.children && t.children.length > 0 ? this.resetDepartmentList(t.children) : null
       }))
     },
+    resetdepyPath(path, data) {
+      data.map(t => {
+        if (t.children && t.children.length > 0) {
+          this.resetdepyPath([...path, t.value], t.children)
+        } else {
+          this.depyResetList.push([...path, t.value])
+        }
+      })
+    },
     getProvence(hot = true) { // 获取组织架构
       this.efficiencyLoading = true
       this.throughputLoading = true
@@ -359,12 +369,20 @@ export default {
               // 获取id在list中的位置
               const idPos = depyList.indexOf(deptId.toString())
               // 截取当前部门的path
-              const nowdepyList = depyList.slice(idPos, depyList.length)
+              let nowdepyList = []
+              const defaultPath = depyList.slice(idPos, depyList.length)
+              // 判断是否有子层级
+              if (res1.data.deptArch.children && res1.data.deptArch.children.length > 0) {
+                this.resetdepyPath(defaultPath, res1.data.deptArch.children)
+                nowdepyList = this.depyResetList
+              } else {
+                nowdepyList = [defaultPath]
+              }
               this.params = {
                 ...this.params,
-                deptCodes: [nowdepyList]
+                deptCodes: nowdepyList
               }
-              this.changeArchitecture([nowdepyList])
+              this.changeArchitecture(nowdepyList)
             }
           })
         } else {

+ 5 - 0
src/views/projectManage/bugList/details/bugTableDialog.vue

@@ -166,6 +166,10 @@ export default {
     }
   },
   props: {
+    searchBiz: {
+      type: Boolean,
+      default: true
+    },
     noShow: {
       type: String,
       default: '',
@@ -329,6 +333,7 @@ export default {
       this.data.pageSize = this.pageSize
       this.data.curIndex = this.curIndex
       const query = Object.assign(this.data, this.eleId)
+      if (!this.searchBiz) delete query.bizId
       bugList(query).then(res => {
         if (res.code === 200) {
           this.tableData = res.data.map(item => { return { ...item, isSelected: false } })

+ 1 - 1
src/views/projectManage/requirement/requirementDetail.vue

@@ -248,7 +248,7 @@
       <!-- 缺陷 -->
       <el-container v-if="activeName === '3'" class="is-vertical">
         <section class="main-section contain">
-          <bug-table-dialog ref="bugTableDialog" :show-hide="true" no-show="requoirementName" :obj-id="bugListQuery" />
+          <bug-table-dialog ref="bugTableDialog" :search-biz="false" :show-hide="true" no-show="requoirementName" :obj-id="bugListQuery" />
         </section>
       </el-container>
       <!-- 缺陷 -->