Quellcode durchsuchen

Merge branch 'http_mock' of git.xiaojukeji.com:pu_qa_tool/thoth-frontend into http_mock

qinzhipeng_v@didiglobal.com vor 4 Jahren
Ursprung
Commit
e8e7fbbeb3

+ 8 - 0
src/api/workSchedule.js

@@ -286,3 +286,11 @@ export function getStaffByUsername(name) {
     method: 'get'
   })
 }
+
+// 通过id获取组织架构
+export function getStaffByDeptId(deptId) {
+  return request({
+    url: teamWorkbenchUrl + `/api/department/getDeptArch?deptId=${deptId}`,
+    method: 'get'
+  })
+}

+ 3 - 10
src/components/searchHeader/searchForm.vue

@@ -1,5 +1,5 @@
 <template>
-  <div class="searchForm">
+  <div class="searchForm" :style="styles">
     <div v-for="l in data" :key="l.key" class="Layout" style="display: inline-flex;padding-left: 15px; width:270px;" :style="l.styles">
       <div class="name" :style="l.nameStyles">{{ l.name }}</div>
       <el-select
@@ -121,7 +121,7 @@
         tree-default-expand-all
         :tree-checkable="l.treeCheckable"
         :tree-data="l.option"
-        @change="(e) => test(l, e)"
+        @change="(e) => $emit('change', l.key, e || '')"
       />
       <el-input
         v-else
@@ -149,7 +149,7 @@ export default {
     loading: {
       type: Boolean,
       default: false,
-      required: true
+      required: false
     },
     styles: {
       type: Object,
@@ -204,14 +204,9 @@ export default {
     }
   },
   mounted() {
-    console.log()
     this.setDate(this.showItemDataPickerItem, 'showItemDataPicker')
   },
   methods: {
-    test(l, v) {
-      console.log(v || '')
-      this.$emit('change', l.key, v || '')
-    },
     setDate(type, key) { // 日期筛选
       let startDate = null
       let endDate = null
@@ -232,13 +227,11 @@ export default {
           // this.bugCountTimeType = this.timeTypeList[2].code
           break
       }
-      console.log(startDate, endDate)
       this.showItemDataPickerItem = type
       this.data.map(g => {
         // data[g.key] = g.value
         if (g.type === key) g.value = [startDate, endDate]
       })
-      console.log(startDate, endDate)
       this.showItemDataPickerStratAndEnd = [startDate, endDate]
       this.$emit('change', key, [startDate, endDate])
     }

+ 7 - 3
src/components/select/searchPeople.vue

@@ -5,7 +5,7 @@
     :clearable="clearable"
     remote
     :multiple="multiple"
-    :remote-method="remoteMethod"
+    :remote-method="searchPeople"
     :loading="loading"
     :size="size"
     :placeholder="placeholder"
@@ -85,10 +85,9 @@ export default {
         } else {
           this.searchValue = newV
         }
-        console.log(this.searchValue)
         const type = Object.prototype.toString.call(this.searchValue)
         if (type.indexOf('Array') < 0) {
-          this.remoteMethod(this.searchValue)
+          this.searchPeople(this.searchValue)
         } else if (type.indexOf('Array') > 0 && this.searchValue.length > 0 && this.firstGetArr) {
           this.initMore(this.searchValue)
           this.firstGetArr = false
@@ -104,6 +103,10 @@ export default {
     remoteMethod: _.debounce(function(query) {
       query !== '' ? this.getMember(query) : this.options = []
     }, 2000),
+    searchPeople(query) {
+      this.loading = true
+      this.remoteMethod(query)
+    },
     initMore(arr) { // 当多人时候,对数组每一个人员进行搜索
       if (this.multiple) {
         // for (const item of arr) {
@@ -124,6 +127,7 @@ export default {
       if (res.data === null) {
         return
       }
+      this.loading = false
       const weakMap = new Map()
       for (const item of res.data) {
         if (!weakMap.has(item.idap)) {

+ 16 - 15
src/router/newRouter.js

@@ -355,21 +355,22 @@ const layout = [
       }
     ]
   },
-  // {
-  //   path: '/dataBigManage',
-  //   name: '数据大盘',
-  //   component: Layout,
-  //   icon: 'data-big',
-  //   redirect: '/dataBigManage/index',
-  //   children: [
-  //     {
-  //       path: 'index',
-  //       name: '数据大盘',
-  //       component: () => import('@/views/dataBigManage/index.vue'),
-  //       meta: { title: '数据大盘' }
-  //     }
-  //   ]
-  // },
+  {
+    path: '/dataBigManage',
+    name: '数据大盘',
+    component: Layout,
+    icon: 'data-big',
+    key: 'data_market',
+    redirect: '/dataBigManage/index',
+    children: [
+      {
+        path: 'index',
+        name: '数据大盘',
+        component: () => import('@/views/dataBigManage/index.vue'),
+        meta: { title: '数据大盘' }
+      }
+    ]
+  },
   {
     path: '/monthlyReport',
     name: '质量月报',

+ 96 - 47
src/views/dataBigManage/components/drawerModal/index.vue

@@ -23,7 +23,6 @@
     >
       <div ref="timeline1" class="qz-drawer-scll">
         <timeline
-
           :num="timelineData.firstActive"
           bgmargin
           :data="timelineData.first"
@@ -106,6 +105,7 @@
 <script>
 // import { mapGetters } from 'vuex'
 import { bugList } from '@/api/defectManage'
+import _ from 'lodash'
 import { getReportList } from '@/api/reportTemplate'
 import dmTable from './components/table.vue'
 import timeline from './components/timeline'
@@ -187,9 +187,7 @@ export default {
 
   watch: {
     drawerData() {
-      if (this.openDrawer) {
-        this.init()
-      }
+      this.init()
     },
     openDrawer(value) {
       this.drawer = value
@@ -209,23 +207,37 @@ export default {
       console.log(slotProp)
     },
     init() {
-      console.log(this.drawerData)
-      this.pagingInit()
-      this.column = []
-      this.tableList = []
-      this.drawer = this.openDrawer
       this.headerTitle = this.drawerData.headerTitle
-      this.setTitle()
-      this.setIds() // 设置ids
-      this.setTimeLineData()
-      this.setTitleHeight()
-      this.setTimeLine()
-      this.setColumn()
-      this.setTableList()
+      this.title = this.headerTitle.search(/质量|效率/) > -1 ? this.drawerData.label || '' : this.drawerData.activeLabel
+      if (this.headerTitle && this.title) {
+        // console.log(this.drawerData)
+        this.pagingInit()
+        this.setPageSize()
+        this.column = []
+        this.tableList = []
+        this.drawer = this.openDrawer
+        this.setTitle()
+        this.setIds() // 设置ids
+        this.setTimeLineData()
+        this.setTitleHeight()
+        this.setTimeLine()
+        this.setColumn()
+        this.setTableList()
+      } else {
+        this.handleClose()
+      }
+    },
+    // 设置页数
+    setPageSize() {
+      const pageSize = window.localStorage.getItem('pageSize') || 10
+      // this.paging.pageSize = pageSize
+      const paging = _.cloneDeep(this.paging)
+      paging.pageSize = Number.parseInt(pageSize)
+      this.paging = _.cloneDeep(paging)
     },
     // 设置标题
     setTitle() {
-      this.title = this.headerTitle.search(/质量|效率/) > -1 ? this.drawerData.label : this.drawerData.activeLabel
+      // this.title = this.headerTitle.search(/质量|效率/) > -1 ? this.drawerData.label : this.drawerData.activeLabel
       if (this.headerTitle === '质量') {
         if (this.drawerData.label === '提测打回率') {
           this.title = '提测报告'
@@ -250,7 +262,7 @@ export default {
         }
       }
       this.sourceData = this.drawerData.list
-      if (this.headerTitle === '效率' && this.title.search(/延期准出率|延期提测率/) < 0) {
+      if (this.headerTitle === '效率' && this.title && this.title.search(/延期准出率|延期提测率/) < 0) {
         this.sourceData = [
           {
             label: this.drawerData.label === '缺陷24小时修复率' ? '全部' : this.drawerData.label,
@@ -356,15 +368,23 @@ export default {
     },
     handleSizeChange(value) {
       this.paging.pageSize = value
-      if (this.headerTitle === '效率') {
+      const paging = _.cloneDeep(this.paging)
+      paging.pageSize = value
+      this.paging = _.cloneDeep(paging)
+      window.localStorage.setItem('pageSize', value)
+      if (this.headerTitle === '效率' && this.title !== '需求人力') {
         this.tableListPagination()
       } else {
         this.setTableList()
       }
     },
     handleCurrentChange(value) {
-      this.paging.curIndex = value
-      if (this.headerTitle === '效率') {
+      // this.paging.curIndex = value
+      const paging = _.cloneDeep(this.paging)
+      paging.curIndex = value
+      this.paging = _.cloneDeep(paging)
+      // console.log(this.title)
+      if (this.headerTitle === '效率' && this.title !== '需求人力') {
         this.tableListPagination()
       } else {
         this.setTableList()
@@ -454,20 +474,26 @@ export default {
     },
     // 设置列表数据
     setTableList() {
-      console.log(439)
+      // console.log(439)
       this.tableList = []
       if (this.headerTitle === '质量') {
         if (this.title.search(/新增缺陷|reopen/) > -1) {
-          this.loading = true
-          this.getBugStatisticData()
+          if (this.ids.length) {
+            this.loading = true
+            this.getBugStatisticData()
+          }
         }
         if (this.title.search(/新增问题/) > -1) {
-          this.loading = true
-          this.setStarFlowerList()
+          if (this.ids.length) {
+            this.loading = true
+            this.setStarFlowerList()
+          }
         }
         if (this.title.search(/提测报告|准出记录/) > -1) {
-          this.loading = true
-          this.setReportList()
+          if (this.ids.length) {
+            this.loading = true
+            this.setReportList()
+          }
         }
       }
       if (this.headerTitle === '吞吐量') {
@@ -492,32 +518,48 @@ export default {
       }
       if (this.headerTitle === '效率') {
         if (this.title === '需求周期') {
-          this.loading = true
-          this.setRequireAvgData()
+          if (this.sourceData[0].IdList.length) {
+            this.loading = true
+            this.setRequireAvgData()
+          }
         }
         if (this.title === '任务周期') {
           this.loading = true
           this.setTaskData()
+          if (this.sourceData[0].IdList.length) {
+            this.loading = true
+            this.setTaskData()
+          }
         }
         if (this.title === '需求人力') {
-          this.loading = true
-          this.setRequirePeopleData()
+          if (this.sourceData[0].IdList.length) {
+            this.loading = true
+            this.setRequirePeopleData()
+          }
         }
         if (this.title === '缺陷修复时长') {
-          this.loading = true
-          this.setbugRepair2Data()
+          if (this.sourceData[0].IdList.length) {
+            this.loading = true
+            this.setbugRepair2Data()
+          }
         }
         if (this.title === '缺陷24小时修复率') {
-          this.loading = true
-          this.setbugRepairData()
+          if (this.sourceData[0].IdList.length) {
+            this.loading = true
+            this.setbugRepairData()
+          }
         }
         if (this.title === '延期提测率') {
-          this.loading = true
-          this.setDelayLaunchData()
+          if (this.drawerData.idList.length) {
+            this.loading = true
+            this.setDelayLaunchData()
+          }
         }
         if (this.title === '延期准出率') {
-          this.loading = true
-          this.setDelayReleaseData()
+          if (this.drawerData.idList.length) {
+            this.loading = true
+            this.setDelayReleaseData()
+          }
         }
       }
     },
@@ -580,7 +622,7 @@ export default {
       const res = await getProjectList({
         idList: this.ids.length ? this.ids : [],
         curIndex: this.paging.curIndex,
-        pageSize: 15
+        pageSize: this.paging.pageSize
       })
       if (res.code === 200) {
         // console.log(res)
@@ -673,10 +715,11 @@ export default {
       delete params.pageTotal
       const res = await getRequirePeopleData(params)
       if (res.code === 200) {
-        // this.tableList = res.data
-        this.tableListOld = res.data.length && res.data.map(e => e)
-        this.tableListPagination()
-        paging.pageTotal = this.tableListOld.length
+        // console.log(res.data)
+        this.tableList = res.data
+        // this.tableListOld = res.data.length && res.data.map(e => e)
+        // this.tableListPagination()
+        paging.pageTotal = this.sourceData[0].IdList.length
         this.paging = { ...paging }
         this.loading = false
       }
@@ -761,16 +804,22 @@ export default {
     // 分页
     tableListPagination() {
       if (this.tableListOld.length) {
-        this.tableList = this.tableListOld.map(e => e).splice(this.paging.curIndex - 1 || 0, this.paging.pageSize)
+        this.tableList = this.tableListOld.map(e => e).splice((this.paging.curIndex - 1 || 0) * this.paging.pageSize, this.paging.pageSize)
+        // if (this.paging.curIndex - 1 || this.tableListOld.length > this.paging.pageSize.length) {
+        //   this.tableList = this.tableListOld.map(e => e).splice((this.paging.curIndex - 1 || 0) * this.paging.pageSize, this.paging.pageSize)
+        // } else {
+        //   this.tableList = this.tableListOld.map(e => e) || []
+        // }
       }
     },
     /* E 效率:半浮层数据接口 */
     // 分页数据初始化
     pagingInit() {
+      const pageSize = window.localStorage.getItem('pageSize') || 10
       this.paging = {
         curIndex: 1,
         pageTotal: 0,
-        pageSize: 10
+        pageSize: Number.parseInt(pageSize)
       }
     },
     // 设置表格高度

+ 1 - 0
src/views/dataBigManage/components/efficiencyModule/index.vue

@@ -1,6 +1,7 @@
 <template>
   <el-row
     v-loading="loading"
+    :gutter="10"
     class="qualityModule"
   >
     <el-col :span="7">

+ 18 - 14
src/views/dataBigManage/components/qualityModule/index.vue

@@ -1,10 +1,10 @@
 <template>
   <el-row
     v-loading="loading"
-    :gutter="20"
+    :gutter="10"
     class="qualityModule"
   >
-    <el-col :span="8">
+    <el-col :span="9">
       <div class="itemBox onlineProblem" style="height: 470px">
         <div class="titleLevel3 mb10">线上问题</div>
         <el-row :gutter="10">
@@ -41,7 +41,7 @@
         </div>
       </div>
     </el-col>
-    <el-col :span="8">
+    <el-col :span="9">
       <div class="itemBox quality" style="height: 470px">
         <div class="titleLevel3 mb10">线下质量</div>
         <el-row :gutter="10">
@@ -73,7 +73,7 @@
         </div>
       </div>
     </el-col>
-    <el-col :span="8">
+    <el-col :span="6">
       <div class="itemBox progress" style="min-height: 328px">
         <div class="titleLevel3 mb10">上线过程</div>
         <el-row v-if="mainData.onlineProcessList" :gutter="10">
@@ -404,7 +404,10 @@ export default {
     },
     // 移动端发布质量数据
     getMobilePublishQualityList() {
-      const { hotpacth, addIssue } = this.datas.mobilePublishQualityList
+      const {
+        hotpacth
+        // addIssue // 增发
+      } = this.datas.mobilePublishQualityList
       return [
         {
           'innerColor': '#3F9DFE',
@@ -414,16 +417,17 @@ export default {
           'title': hotpacth.countStr,
           'titleUnit': '次',
           'IdList': hotpacth.IdList
-        },
-        {
-          'innerColor': '#F5222D',
-          'outColor': '#F5DDE2',
-          'padding': '8px 0px',
-          'label': addIssue.label,
-          'title': addIssue.countStr,
-          'titleUnit': '次',
-          'IdList': addIssue.IdList
         }
+        // 增发次数暂时隐藏
+        // {
+        //   'innerColor': '#F5222D',
+        //   'outColor': '#F5DDE2',
+        //   'padding': '8px 0px',
+        //   'label': addIssue.label,
+        //   'title': addIssue.countStr,
+        //   'titleUnit': '次',
+        //   'IdList': addIssue.IdList
+        // }
       ]
     },
     changeList() {}

+ 2 - 1
src/views/dataBigManage/components/throughputModule/index.vue

@@ -1,7 +1,7 @@
 <template>
   <el-row
     v-loading="loading"
-    :gutter="20"
+    :gutter="10"
     class="throughputModule"
   >
     <el-col :span="6">
@@ -235,6 +235,7 @@ export default {
       .list {
         margin-top: 8px;
         .listItem {
+          cursor: pointer;
           height: 38px;
           line-height: 38px;
           width: 100%;

+ 513 - 59
src/views/dataBigManage/index.vue

@@ -1,14 +1,41 @@
 <template>
   <div class="page-wrap data-big-wrapper" style="min-width: 1320px" @click="openDrawer=false">
     <div class="page-header detial">
-      <searchHeader
+      <!-- <searchHeader
         :is-mt5="false"
         :data="listSearch"
         :is-hidden-time="true"
         @search="search"
         @moreReset="moreReset"
         @changeShowMore="changeShowMore"
-      />
+      /> -->
+      <div class="select-group teamDrop">
+        <el-dropdown placement="top-start" trigger="click">
+          <span class="el-dropdown-link">
+          {{ departmentName && departmentName.length > 6 ? departmentName.substring(0, 11) + '...' : departmentName }}
+          <i class="el-icon-arrow-down el-icon--right" />
+          </span>
+          <el-dropdown-menu slot="dropdown" class="dropTeam">
+            <div class="team-val">组织结构</div>
+            <div class="deptCodesClass">
+              <el-cascader-panel v-model="params.deptCodes" :props="{ multiple: true }" :options="department" @change="changeArchitecture" />
+            </div>
+            <div class="team-val">自定义团队</div>
+            <el-cascader-panel v-model="teamData.teamNames" :props="{ multiple: true }" :options="options" @change="changeTeam" />
+          </el-dropdown-menu>
+        </el-dropdown>
+        <div class="cascaderBox">
+          <el-cascader ref="cascader" v-model="bizIdCode" collapse-tags :options="searchEnum.businesslines" :props="propsBizId" class="cascader" @change="handleBizIdChange(bizIdCode, searchEnum.businesslines)" />
+          <span class="el-dropdown-link" style="margin: 0 20px;" @click="setCascader">{{ bizName.length > 11 ? bizName.substring(0, 11) + '...' : bizName }} <i class="el-icon-arrow-down" /></span>
+        </div>
+        <div style="margin-left: 30px; display: inline-block">
+          <searchForm
+            :data="searchFormList"
+            :styles="{ display: 'inline-block' }"
+            @change="dateChange"
+          />
+        </div>
+      </div>
     </div>
     <div class="page-content detial">
       <header class="header mb10">
@@ -43,8 +70,6 @@
       />
     </div>
     <div>
-<!--      <drawer-modal v-if="openDrawer" :drawer="openDrawer" :data="requireList" />-->
-<!--      <el-button @click="openDrawer = true">触发</el-button>-->
       <drawer-modal
         :open-drawer.sync="openDrawer"
         :drawer-data="requireList"
@@ -55,7 +80,7 @@
 </template>
 
 <script>
-import _ from 'lodash'
+// import _ from 'lodash'
 import { listSearchData } from './data'
 import {
   // 质量
@@ -74,10 +99,12 @@ import {
   getEfficiencyDataRequest
 } from '@/api/dataMarket'
 import {
+  settingQueryBizAndTeamInfo,
   getStaffByUsername
 } from '@/api/workSchedule'
-import { teamQueryTeamInfoList } from '@/api/configure'
-import searchHeader from '@/components/searchHeader'
+import { getReportBizInfo, getDeptSetting } from '@/api/qualityMonthlyReport'
+// import { teamQueryTeamInfoList } from '@/api/configure'
+import searchForm from '@/components/searchHeader/searchForm'
 import headTitle from '@/components/headTitle'
 import throughputModule from './components/throughputModule/index.vue'
 import qualityModule from './components/qualityModule/index.vue'
@@ -85,7 +112,7 @@ import efficiencyModule from './components/efficiencyModule/index.vue'
 import drawerModal from './components/drawerModal/index.vue'
 export default {
   components: {
-    searchHeader,
+    searchForm,
     headTitle,
     throughputModule,
     qualityModule,
@@ -95,6 +122,17 @@ export default {
   data() {
     return {
       // enum
+      searchFormList: [{
+        name: '时间',
+        value: '',
+        key: 'time',
+        valueFormat: 'yyyy-MM-dd HH:mm:ss',
+        type: 'showItemDataPicker',
+        placeholder: '请选择时间',
+        boxStyles: { display: 'inline-block' },
+        styles: { minWidth: '270px', width: 'auto' },
+        nameStyles: { minWidth: '53px', lineHeight: '32px' }
+      }],
       listSearch: listSearchData,
       showMore: false,
       openDrawer: false,
@@ -105,7 +143,10 @@ export default {
         onlineProblemViweType: '日期',
         wholeTab: '需求',
         verTab: '青桔端',
-        requirementBacklogType: '研发积压'
+        requirementBacklogType: '研发积压',
+        teamIds: [],
+        monthlyReportSettingIds: [],
+        deptCodes: []
       },
       mainData: {
         quality: {},
@@ -118,69 +159,313 @@ export default {
       throughputLoading: false,
       throughputListLoading: false,
       throughputBacklogLoading: false,
-      efficiencyLoading: false
+      efficiencyLoading: false,
+      // 自定义团队
+      // searchForm: {
+      //   teamIds: [],
+      //   monthlyReportSettingIds: [],
+      //   deptCodes: []
+      // },
+      teamData: { // 筛选团队
+        teamBizName: '团队',
+        teamNames: [],
+        teamCode: 0
+      },
+      departmentName: '团队',
+      department: [],
+      departmentData: [],
+      options: [],
+      depdObj: [],
+      searchEnum: {
+        businesslines: []
+      },
+      bizIdCode: [],
+      propsBizId: {
+        multiple: true,
+        value: 'code',
+        label: 'name',
+        children: 'children'
+      },
+      bizName: '业务线', // 业务线名字
+      optionData: [],
+      bizCode: 0,
+      isFirstDate: true
     }
   },
-  mounted() {
-    // this.init()
-    // localStorage.getItem('username')
-    this.getSearchOptios()
+  created() {
+    this.getProvence()
+    this.settingGetBizList(false)
+    window.log({ c: 'data_market', d: 'get_data_market_page' })
   },
   methods: {
-    search() {
-      const data = {}
-      // 因为高级筛选不自动搜索,所以每次出发搜索都map renderList就好。
-      this.listSearch.default.map(t => t.map(g => {
-        data[g.key] = g.value
-      }))
-      if (this.showMore) {
-        this.listSearch.adv.map(t => t.map(g => {
-          data[g.key] = g.value
-        }))
+    // 业务线与团队架构互斥
+    paramsReset(type) {
+      // monthlyReportSettingIds=[-1000] 业务线全不选
+      // deptCodes 为[] 清空
+      // teamIds 为[] 清空 同时 teamData.teamNames 也要为空
+      const { monthlyReportSettingIds, deptCodes, teamIds } = this.params
+      if (type === '业务线') {
+        if (monthlyReportSettingIds[0] !== -1000) {
+          // 业务线有值
+          this.params = {
+            ...this.params,
+            deptCodes: [],
+            teamIds: []
+          }
+          this.teamData = { // 筛选团队
+            teamBizName: '团队',
+            teamNames: [],
+            teamCode: 0
+          }
+          this.departmentName = '团队'
+        }
+      } else if (type === '团队') {
+        // 如果团队和组织有选择项, 则业务线清空
+        if (deptCodes.length > 0 || teamIds.length > 0) {
+          this.bizIdCode = null
+          this.bizName = '业务线'
+          this.bizCode = 0
+          this.handleBizId([-1000])
+        }
       }
+    },
+    dateChange(e, date) {
+      // const { monthlyReportSettingIds, deptCodes, teamIds } = this.params
       this.params = {
         ...this.params,
-        ...data,
-        startTime: data.time[0],
-        endTime: data.time[1]
+        startTime: date[0],
+        endTime: date[1]
       }
-      if (
-        this.params.deptCode ||
-        (this.params.teamIds && this.params.teamIds.length > 0)
-      ) {
+      if (this.isFirstDate) {
+        this.isFirstDate = false
+      } else {
         this.getList()
+      }
+    },
+    setCascader() {
+      this.$refs.cascader.$el.click()
+    },
+    // 组织团队
+    changeArchitecture(command) { // 组织架构名称
+      this.departmentName = this.department[0].label
+      this.paramsReset('团队')
+      this.getList()
+    },
+    changeTeam(command) {
+      if (command.length > 0) {
+        let [a, b, stop] = ['', '', true]
+        command.map(e => {
+          this.options.map(item => {
+            if (item.value === e[0]) a = item.label
+            if (item.children && stop) {
+              item.children.map(item => {
+                // this.params.teamIds.push(item.value)
+                if (item.value === e[1]) {
+                  b = item.label
+                  stop = false
+                }
+              })
+            }
+          })
+        })
+        const arr = command[0]
+        if (this.teamData.teamCode === 0 && arr[0] === -1) { // 默认全选
+          this.teamData = { teamBizName: '团队', teamNames: [...this.datas], teamCode: 1 }
+          const list = this.datas.slice(1)
+          this.params.teamIds = list.map(item => { return item[1] })
+        } else if (arr[0] !== -1 && this.teamData.teamCode === 1) {
+          this.teamData = { teamBizName: '团队', teamNames: null, teamCode: 0 }
+          this.params.teamIds = []
+        } else {
+          if (arr[0] === -1 && command.length < this.datas.length) { // 点击全部以外,取消全选
+            const data = command.filter(item => { return item[0] })
+            data.splice(0, 1)
+            this.teamData = { teamBizName: a + (b ? ' / ' + b : ''), teamNames: data, teamCode: 0 }
+            this.params.teamIds = data.map(item => { return item[1] })
+          } else if (arr[0] !== -1 && command.length === (this.datas.length - 1)) { // 点击全部,触发全选
+            const data = command.filter(item => { return item[0] })
+            data.unshift([-1])
+            this.teamData = { teamBizName: '团队', teamNames: data, teamCode: 1 }
+            const list = this.datas.slice(1)
+            this.params.teamIds = list.map(item => { return item[1] })
+          } else if (arr[0] !== -1) { // 基础多选
+            this.teamData.teamNames = command
+            const data = command.map(i => { return i[1] })
+            this.teamData.teamBizName = a + (b ? ' / ' + b : '')
+            this.params.teamIds = data
+          }
+        }
       } else {
-        this.$message({ message: '部门和更多筛选中的团队筛选项必须选一个。', type: 'warning', duration: 1000, offset: 150 })
+        this.params.teamIds = []
+        this.teamData = { teamBizName: '团队' }
       }
+      this.paramsReset('团队')
+      this.getList()
     },
-    getSearchOptios() {
-      getStaffByUsername(localStorage.getItem('username')).then(async res => {
-        if (res.code === 200 && res.data.deptArch) {
-          const copySearchData = _.clone(this.listSearch)
-          const resdata = this.resetData([res.data.deptArch])
-          copySearchData.default[0][0].option = resdata
-          copySearchData.default[0][0].value = res.data.deptArch.value
-          this.listSearch = copySearchData
-          this.search()
+    async settingGetBizList() { // 获取业务线
+      const res1 = await settingQueryBizAndTeamInfo()
+      if (res1.code === 200) {
+        this.options = res1.data.map(item => ({
+          value: item.bizId,
+          label: item.bizName,
+          children: item.teamInfos ? this.setTeamChildren(item.teamInfos) : null
+        }))
+        this.options[0].value = -1
+        this.datas = []
+        this.options.map(item => {
+          if (item.children) {
+            item.children.map(i => {
+              this.datas.push([item.value, i.value])
+            })
+          } else {
+            this.datas.push([item.value])
+          }
+        })
+      }
+      const res = await getReportBizInfo({})
+      if (res.code === 200 && res.data.bizList) {
+        const data = res.data.bizList.map(t => ({
+          code: t.id,
+          name: t.bizName
+        }))
+        data.unshift({ code: -1, name: '全部' })
+        this.searchEnum.businesslines = data
+        // this.handleBizIdChange([], this.searchEnum.businesslines)
+      }
+    },
+    resetDepartmentList(list) {
+      return list.map(t => ({
+        ...t,
+        value: t.deptCode.toString(),
+        label: t.deptName,
+        children: t.children && t.children.length > 0 ? this.resetDepartmentList(t.children) : null
+      }))
+    },
+    getProvence(hot = true) { // 获取组织架构
+      this.efficiencyLoading = true
+      this.throughputLoading = true
+      this.qualityLoading = true
+      getDeptSetting().then(res => {
+        if (res.code === 200 && res.data) {
+          this.depdShow = true
+          const newDepartmentList = this.resetDepartmentList([res.data])
+          this.department = newDepartmentList
+          getStaffByUsername(localStorage.getItem('username')).then(async res1 => {
+            if (res1.code === 200 && res1.data && res1.data.deptPath) {
+              // 获取id
+              const deptId = res.data.deptCode
+              // idlist
+              const depyList = res1.data.deptPath
+              // 获取id在list中的位置
+              const idPos = depyList.indexOf(deptId.toString())
+              // 截取当前部门的path
+              const nowdepyList = depyList.slice(idPos, depyList.length)
+              this.params = {
+                ...this.params,
+                deptCodes: [nowdepyList]
+              }
+              this.changeArchitecture([nowdepyList])
+            }
+          })
         } else {
           this.depdShow = false
         }
       })
-      this.getTeamOption()
     },
-    async getTeamOption() {
-      const myRes = await teamQueryTeamInfoList({ type: 0 })// 我的团队
-      const allRes = await teamQueryTeamInfoList({ type: 1 })// 所有团队
-      const copySearchData = _.clone(this.listSearch)
-      copySearchData.adv[0][0].option = [
-        { label: '我的团队', options: [...myRes.data.list] },
-        { label: '全部团队', options: [...allRes.data.list] }
-      ]
-      this.listSearch = copySearchData
+    setTeamChildren(data) {
+      const arr = data.map(item => ({ value: item.code, label: item.name }))
+      return arr
     },
+    handleBizIdChange(val, option) {
+      if (val.length > 0) {
+        const one = val[0]
+        const tow = val[1] || ''
+        let [name, nameTow] = ['', '']
+        option.map(item => {
+          this.optionData.push(item.code)
+          if (one[0] !== -1 && item.code === one[0]) name = item.name
+          if (val[1] && item.code === tow[0]) nameTow = item.name
+        })
+        this.optionData = Array.from(new Set(this.optionData))
+        if (this.bizCode === 0 && one[0] === -1) { // 默认全选
+          this.bizName = '业务线'
+          this.bizIdCode = this.optionData
+          const data = this.optionData.filter(item => item !== -1)
+          this.bizCode = 1
+          this.handleBizId(data)
+        } else {
+          const data = val.join().split(',')
+          if (one[0] !== -1 && this.bizCode === 1) { // 取消全选
+            this.bizIdCode = null
+            this.bizName = '业务线'
+            this.bizCode = 0
+            this.handleBizId([-1000])
+          } else if (one[0] === -1 && val.length < option.length) { // 点击全选以外的,取消全选
+            data.splice(0, 1)
+            this.bizIdCode = data
+            this.bizName = (name ? name + '/' : '') + (nameTow ? '' + nameTow : '')
+            this.bizCode = 0
+            this.handleBizId(data)
+          } else if (one[0] !== -1 && val.length === (option.length - 1)) { // 点击其余的全部,触发全选
+            this.bizIdCode = [...data]
+            this.bizIdCode.unshift([-1])
+            this.bizName = '业务线'
+            this.bizCode = 1
+            this.handleBizId(data)
+          } else if (one[0] !== -1) { // 基础多选
+            this.bizIdCode = data
+            this.bizName = name + (nameTow ? '/' + nameTow : '')
+            this.handleBizId(data)
+          }
+        }
+      } else { // 取消全选
+        this.handleBizId([-1000])
+        this.bizName = '业务线'
+      }
+      this.paramsReset('业务线')
+      this.getList()
+    },
+    handleBizId(e) { // 业务线变动
+      this.params.monthlyReportSettingIds = e
+    },
+    // search() {
+    //   const data = {}
+    //   // 因为高级筛选不自动搜索,所以每次出发搜索都map renderList就好。
+    //   this.listSearch.default.map(t => t.map(g => {
+    //     data[g.key] = g.value
+    //   }))
+    //   if (this.showMore) {
+    //     this.listSearch.adv.map(t => t.map(g => {
+    //       data[g.key] = g.value
+    //     }))
+    //   }
+    //   this.params = {
+    //     ...this.params,
+    //     ...data,
+    //     startTime: data.time[0],
+    //     endTime: data.time[1]
+    //   }
+    //   if (
+    //     this.params.deptCode ||
+    //     (this.params.teamIds && this.params.teamIds.length > 0)
+    //   ) {
+    //     this.getList()
+    //   } else {
+    //     this.$message({ message: '部门和更多筛选中的团队筛选项必须选一个。', type: 'warning', duration: 1000, offset: 150 })
+    //   }
+    // },
+    // async getTeamOption() {
+    //   const myRes = await teamQueryTeamInfoList({ type: 0 })// 我的团队
+    //   const allRes = await teamQueryTeamInfoList({ type: 1 })// 所有团队
+    //   const copySearchData = _.clone(this.listSearch)
+    //   copySearchData.adv[0][0].option = [
+    //     { label: '我的团队', options: [...myRes.data.list] },
+    //     { label: '全部团队', options: [...allRes.data.list] }
+    //   ]
+    //   this.listSearch = copySearchData
+    // },
     resetData(data) {
       const _this = this
-      // console.log(data)
       return data.map(t => ({
         ...t,
         key: t.value,
@@ -243,7 +528,6 @@ export default {
         getOnlineProcessDataRequest(params), // 上线过程
         getMobilePublishQualityDataRequest(params) // 移动端发布质量
       ]).then((result) => {
-        // console.log(result)
         const titleKeyList = [
           'onlineProblemList',
           'onlineProblemChart',
@@ -261,8 +545,7 @@ export default {
           quality: { ...this.mainData.quality, ...objData }
         }
         this.qualityLoading = false
-      }).catch((error) => {
-        console.log(error)
+      }).catch(() => {
         this.qualityLoading = false
       })
     },
@@ -284,7 +567,6 @@ export default {
           extensionType: params.verTab
         }) // 需求版本
       ]).then((result) => {
-        // console.log(result)
         const titleKeyList = [
           'throughputList',
           'requirementDirectionChart',
@@ -300,8 +582,7 @@ export default {
           throughput: { ...this.mainData.throughput, ...objData }
         }
         this.throughputLoading = false
-      }).catch((error) => {
-        console.log(error)
+      }).catch(() => {
         this.throughputLoading = false
       })
     },
@@ -335,7 +616,6 @@ export default {
       } else {
         this.qualityLoading = true
       }
-
       //  offlineProblemChart
       getOfflineProblemChartDataRequest({
         ...params,
@@ -417,5 +697,179 @@ export default {
 <style lang="less">
 .data-big-wrapper {
   padding: 0 10px;
+  .teamDrop {
+    padding-left: 15px;
+  }
+  .deptCodesClass {
+    display: inline-block;
+  }
+}
+</style>
+
+<style scoped lang="less">
+@import '@/styles/detail-pages.less';
+.dropTeam {
+  /deep/.el-scrollbar__wrap {
+    margin: 0!important;
+  }
+}
+
+/deep/.el-cascader-menu__wrap {
+      overflow: inherit;
+      height: 100%;
+    }
+
+/deep/.el-cascader-panel.is-bordered {
+      border: none;
+      border-radius: 0px;
+    }
+
+.el-container{
+  width: 100%;
+}
+
+.icon-style-i {
+  color: #F5222D;
+  font-size: 53px;
+}
+
+.scheduleTip{
+  font-size: 16px;
+  font-family: MicrosoftYaHei;
+  line-height: 19px;
+  color: #333B4A;
+  opacity: 1;
+}
+
+.schedulePeople{
+  display: flex;
+  justify-content:space-between;
+  margin: 20px 0 0;
+}
+
+.scheduleLabel{
+  font-size: 12px;
+  font-family: MicrosoftYaHei;
+  line-height: 14px;
+  color: #666;
+  opacity: 1;
+}
+.hide-open-header();
+.bg-team {
+  .bg-project();
+  padding-right: 10px;
+}
+.no-sidebar .main-header {
+  .normal-main-header()
+}
+.main-header::after {
+  .main-header-after();
+}
+.main-header {
+  .main-header();
+  margin-bottom: 0;
+  margin-right: 0;
+  border-bottom: 1px solid rgba(155, 155, 155, .2);
+  /deep/.el-tabs__nav-wrap::after {
+    height: 0;
+  }
+  .top-tabs {
+    position: absolute;
+    left: 50%;
+    transform: translate(-50%, 0);
+  }
+  .tips {
+    height: 8px;
+    width: 8px;
+    background-color: #E02020;
+    border-radius: 50%;
+    position: absolute;
+    top: 18px;
+    right: 14px;
+  }
+  .tips-last {
+    height: 8px;
+    width: 8px;
+    background-color: #E02020;
+    border-radius: 50%;
+    position: absolute;
+    top: 18px;
+    right: 0;
+  }
+}
+.main-section {
+  .main-section();
+  margin-right: 0;
+  width: calc(100% - 10px);
+  .title-name {
+    font-size:20px;
+    font-family:PingFangSC-Medium;
+    color:rgba(51,59,74,1);
+  }
+  .detail-info {
+    padding: 0 30px 20px 30px;
+  }
+  .tabs-change {
+    margin: 10px 35px 0 35px;
+  }
+}
+.my-fullCalendar {
+  padding-bottom: 150px;
+}
+.el-dropdown-link {
+  color: #333B4A;
+  font-weight: 600;
+  cursor: pointer;
+}
+/deep/.el-dropdown-menu__item {
+  max-width: 20vw;
+  overflow: scroll;
+}
+/deep/.schedule1 {
+  margin: 4px;
+  padding: 2px 10px;
+  border: none;
+}
+/deep/.schedule2 {
+  margin: 4px;
+  padding: 2px 10px;
+  border: none;
+}
+/deep/.fc-content{
+  transform: scale(1) !important;
+  margin-left: 0 !important;
+  width: auto !important;
+}
+/deep/.fc-content span{
+  bottom: 0 !important;
+}
+.icon-close {
+  z-index: 999999;
+  margin-right: 20px;
+  cursor: pointer;
+}
+.team-val {
+  color: #333333;
+  font-weight: 500;
+  margin-left: 20px;
+}
+</style>
+<style lang="less" scoped>
+.cascaderBox {
+  display: inline-block;
+  position: relative;
+  .cascader {
+    position: absolute;
+    width: 7%;
+    /deep/.el-input__inner {
+      opacity: 0;
+    }
+    /deep/.el-input__icon {
+      display: none;
+    }
+    /deep/.el-cascader__tags .el-tag {
+      display: none;
+    }
+  }
 }
 </style>

+ 2 - 2
src/views/projectManage/bugList/details/index.vue

@@ -693,8 +693,8 @@ export default {
       showWordLimit: false,
       showRule: false,
       rules: {
-        assigner: [{ required: true, message: '责任人不可为空', trigger: 'change' }],
-        currentHandler: [{ required: true, message: '修复人不可为空', trigger: 'change' }],
+        assigner: [{ required: true, message: '责任人不可为空', trigger: 'blur' }],
+        currentHandler: [{ required: true, message: '修复人不可为空', trigger: 'blur' }],
         bugName: [{ required: true, message: '标题不可为空', trigger: 'blur' }]
       },
       showCopyFile: false, // 复制文件对话框

+ 1 - 1
src/views/projectManage/bugList/file/createdBug.vue

@@ -60,7 +60,7 @@
                       </div>
                     </el-option>
                   </el-select> -->
-                  <searchPeople :value.sync="formInline.assigner" :multiple="true" :size="'medium'" style="width: 100%;" />
+                  <searchPeople :value.sync="formInline.assigner" :multiple="true" :size="'medium'" style="width: 100%;" @change="getcurrentHandler(formInline.assigner)" />
                 </el-form-item>
               </div>
               <div style="width:100%; margin: 0 4%;">

+ 8 - 1
src/views/projectManage/version/components/taskList.vue

@@ -343,7 +343,14 @@ export default {
     },
     link_task(id) { // 跳转到任务详情页
       const bizId_id = EncryptId(`${this.bizId}_${id}`)
-      this.$router.push({ name: '任务详情', query: { bizId_id: bizId_id }})
+      // this.$router.push({ name: '任务详情', query: { bizId_id: bizId_id }})
+      const { href } = this.$router.resolve({
+        name: '任务详情',
+        query: {
+          bizId_id
+        }
+      })
+      window.open(href, '_blank')
     },
     // 分页pageSize选择
     handleSizeChange(pageSize) {

+ 8 - 1
src/views/projectManage/version/list/index.vue

@@ -348,7 +348,14 @@ export default {
     },
     getToRequirementDetails(id) {
       const bizId_id = EncryptId(`${this.bizId}_${id}`)
-      this.$router.push({ name: '需求详情', query: { bizId_id: bizId_id }})
+      // this.$router.push({ name: '需求详情', query: { bizId_id: bizId_id }})
+      const { href } = this.$router.resolve({
+        name: '需求详情',
+        query: {
+          bizId_id
+        }
+      })
+      window.open(href, '_blank')
     },
     // 分页pageSize选择
     handleSizeChange(pageSize) {

+ 5 - 4
src/views/workbench/person/components/calenderDetail.vue

@@ -18,7 +18,7 @@
             <div class="label">所属需求:</div>
             <div class="require-list">
               <span v-for="(item, index) in nowDetailData.requireList" :key="index">
-                <span class="blockSpan" @click="Jump('需求详情', item.id)">{{ item.name }}</span>
+                <span class="blockSpan" @click="Jump('需求详情', item)">{{ item.name }}</span>
                 <span v-if="index < nowDetailData.requireList.length - 1"> , </span>
               </span>
             </div>
@@ -28,7 +28,7 @@
             <div class="label">关联任务:</div>
             <div class="task-list">
               <span v-for="(item, index) in nowDetailData.taskList" :key="index">
-                <span class="blockSpan" @click="Jump('任务详情', item.id)">{{ item.name }}</span>
+                <span class="blockSpan" @click="Jump('任务详情', item)">{{ item.name }}</span>
                 <span v-if="index < nowDetailData.taskList.length - 1"> , </span>
               </span>
             </div>
@@ -148,8 +148,9 @@ export default {
         }
       }
     },
-    Jump(name, id) { // 详情页跳转
-      const bizId_id = EncryptId(`${this.bizId}_${id}`)
+    Jump(name, item) { // 详情页跳转
+      const { id, bizId } = item
+      const bizId_id = EncryptId(`${bizId}_${id}`)
       const newTab = this.$router.resolve({ name: name, query: { bizId_id: bizId_id }})
       window.open(newTab.href, '_blank')
     },

+ 1 - 0
src/views/workbench/team/index.vue

@@ -454,6 +454,7 @@ export default {
           if (one[0] !== -1 && item.code === one[0]) name = item.name
           if (val[1] && item.code === tow[0]) nameTow = item.name
         })
+        this.optionData = Array.from(new Set(this.optionData))
         if (this.bizCode === 0 && one[0] === -1) { // 默认全选
           this.bizName = '业务线'
           this.bizIdCode = this.optionData