Browse Source

Merge branch 'daily_0.4.0' into http_test

洪海涛 4 years ago
parent
commit
709d4b6ff4
23 changed files with 667 additions and 117 deletions
  1. 32 0
      src/api/qualityMonthlyReport/edit.js
  2. 3 0
      src/components/baseTable/table.vue
  3. 11 0
      src/components/formInput/index.vue
  4. 45 10
      src/components/select/selectCascader.vue
  5. 100 0
      src/components/select/selectCascaderInfo.vue
  6. 20 9
      src/store/modules/monthlyReport/baseMixin/actions.js
  7. 8 0
      src/store/modules/monthlyReport/baseMixin/mutations.js
  8. 2 0
      src/store/modules/monthlyReport/baseMixin/state.js
  9. 116 30
      src/views/dataBigManage/components/drawerModal/drawerModalData.js
  10. 19 11
      src/views/dataBigManage/components/drawerModal/index.vue
  11. 4 3
      src/views/dataBigManage/components/efficiencyModule/index.vue
  12. 86 31
      src/views/monthlyReport/childrenPage/editReport/components/MrTable/index.vue
  13. 1 1
      src/views/monthlyReport/childrenPage/editReport/components/ReadOnlyTable.vue
  14. 4 4
      src/views/monthlyReport/childrenPage/editReport/components/VarText.vue
  15. 7 4
      src/views/monthlyReport/childrenPage/editReport/components/core.vue
  16. 162 0
      src/views/monthlyReport/childrenPage/editReport/components/historyRecord.vue
  17. 1 1
      src/views/monthlyReport/childrenPage/editReport/components/markingIssues.vue
  18. 15 7
      src/views/monthlyReport/childrenPage/editReport/index.vue
  19. 1 1
      src/views/monthlyReport/childrenPage/setReport/components/nodeTreeSet.vue
  20. 1 1
      src/views/monthlyReport/index.vue
  21. 11 2
      src/views/projectManage/onlineproblem/create/component/renderBase.js
  22. 16 2
      src/views/projectManage/onlineproblem/detial/component/base.vue
  23. 2 0
      src/views/projectManage/onlineproblem/detial/index.vue

+ 32 - 0
src/api/qualityMonthlyReport/edit.js

@@ -232,3 +232,35 @@ export function pullSubTitle(data) {
     data
   })
 }
+
+// 月报历史记录列表
+export function getHistory(params) {
+  return request({
+    url: projectManagementUrl + '/monthlyReport/getHistory',
+    // url: 'http://127.0.0.1:4523/mock/368525/monthlyReport/getHistory',
+    method: 'get',
+    timeout: '100000',
+    params
+  })
+}
+// 月报历史记录详情
+export function getHistoryDetail(params) {
+  return request({
+    url: projectManagementUrl + '/monthlyReport/getHistoryDetail',
+    // url: 'http://127.0.0.1:4523/mock/368525/monthlyReport/getHistoryDetail',
+    method: 'get',
+    timeout: '100000',
+    params
+  })
+}
+
+// 月报历史记录详情
+export function getAnalyticFeedback(data) {
+  return request({
+    url: projectManagementUrl + '/monthlyReport/getAnalyticFeedback',
+    // url: 'http://127.0.0.1:4523/mock/368525/monthlyReport/getHistoryDetail',
+    method: 'post',
+    timeout: '100000',
+    data
+  })
+}

+ 3 - 0
src/components/baseTable/table.vue

@@ -156,4 +156,7 @@ export default {
   border-radius: 4px;
   padding: 2px 10px;
 }
+.ellipsis {
+  width: calc(100% - 5px);
+}
 </style>

+ 11 - 0
src/components/formInput/index.vue

@@ -76,10 +76,21 @@
       :style="itemStyles"
       @change="(e) => $emit('onChange', e)"
     />
+    <!-- 团队选择 -->
+    <selectCascader
+      v-else-if="type === 'cascader'"
+      v-model="val"
+      :size="size"
+      :placeholder="placeholder"
+      :style="itemStyles"
+      @change="(e) => $emit('onChange', e)"
+    />
   </div>
 </template>
 <script>
+import selectCascader from '@/components/select/selectCascader'
 export default {
+  components: { selectCascader },
   props: {
     value: defaultStatus,
     title: {

+ 45 - 10
src/views/monthlyReport/childrenPage/editReport/components/Cascader.vue → src/components/select/selectCascader.vue

@@ -4,11 +4,11 @@
     :multiple="multiple"
     filterable
     remote
-    size="small"
+    :size="size"
     clearable
     collapse-tags
-    style="width: 100%"
-    placeholder="请选择"
+    :style="itemStyles"
+    :placeholder="placeholder"
     :remote-method="remoteMethod"
     @change="changeCascader"
   >
@@ -19,9 +19,25 @@
 </template>
 
 <script>
-
+/**
+ * 提炼自月报的团队选择器
+ * 使用前,需要在组件渲染前,配合 vuex 中的获取部门数据的 actions 的方法来使页面自动获取数据
+ * 在 created 或者 mounted 中 放入下面这句函数即可
+ * 示例:获取部门数据
+ * this.$store.dispatch('monthlyReportEdit/setSelectEnum')
+ * 模版中的用法
+ *  <!-- 团队选择 -->
+ *  <selectCascader
+ *  v-else-if="type === 'cascader'"
+ *  v-model="val"
+ *  :size="size"
+ *  :placeholder="placeholder"
+ *  :style="itemStyles"
+ *  @change="(e) => $emit('onChange', e)"
+ *  />
+ */
 export default {
-  name: 'CascaderInfo',
+  name: 'SelectCascader',
   props: {
     multiple: {
       type: Boolean,
@@ -32,6 +48,21 @@ export default {
       type: [Array, String, Number],
       required: false,
       default: () => []
+    },
+    itemStyles: {
+      type: Object,
+      default: () => ({ width: '100%' }),
+      required: false
+    },
+    size: {
+      type: String,
+      required: false,
+      default: 'small'
+    },
+    placeholder: {
+      type: String,
+      required: false,
+      default: '请选择'
     }
   },
   data() {
@@ -45,11 +76,14 @@ export default {
       return this.$store.state.monthlyReportEdit.selectEnum
     }
   },
-  // watch: {
-  //   value() {
-  //     this.init()
-  //   }
-  // },
+  watch: {
+    value() {
+      this.init()
+    },
+    selectEnum() {
+      this.init()
+    }
+  },
   mounted() {
     // this.selectValue = this.value
     this.init()
@@ -107,6 +141,7 @@ export default {
     },
     changeCascader(value) {
       this.$emit('input', value)
+      console.log(141, value)
       this.$emit('change', value)
     }
   }

+ 100 - 0
src/components/select/selectCascaderInfo.vue

@@ -0,0 +1,100 @@
+<template>
+  <div v-if="teamData && teamData.length">
+    <span v-for="(item, index) in itemName" :key="index" style="margin-right: 10px">
+      <span>
+        <el-tooltip
+          class="item"
+          effect="dark"
+          :content="item.deptPath"
+          placement="top">
+          <span>{{ item.label }}</span>
+        </el-tooltip>
+        <span>{{ !(index >= itemName.length - 1) ? ',' : '' }}</span>
+      </span>
+    </span>
+  </div>
+</template>
+
+<script>
+// import _ from 'lodash'
+
+export default {
+  name: 'CascaderInfo',
+  props: {
+    teamData: {
+      type: [Array, String, Number],
+      required: false,
+      default: () => []
+    }
+  },
+  data() {
+    return {
+      itemName: []
+    }
+  },
+  computed: {
+    tabsActive() {
+      return this.$store.state.monthlyReportEdit.tabsActive
+    },
+    selectEnum() {
+      return this.$store.state.monthlyReportEdit.selectEnum
+    }
+  },
+  watch: {
+    tabsActive() {
+      this.init()
+    }
+  },
+  mounted() {
+    this.init()
+  },
+  methods: {
+    init() {
+      // console.log(this.selectEnum);
+      // console.log(this.teamData);
+      if (this.teamData && this.teamData.length && this.selectEnum) {
+        const itemName = []
+        const onlyId = []
+        this.teamData.forEach((elm) => {
+          if (onlyId.indexOf(elm) < 0) {
+            const item = this.find(elm)
+            // console.log(item);
+            // console.log({
+            //   label: item.label,
+            //   deptPath: item.deptPath
+            // })
+            onlyId.push(elm)
+            itemName.push({
+              label: item.label,
+              deptPath: item.deptPath
+            })
+          }
+        })
+        // 数组去重
+        this.itemName = [...itemName]
+        this.$forceUpdate()
+        // console.log(69, this.itemName)
+      }
+    },
+    find(id) {
+      let name = ''
+      const run = (arr) => {
+        for (let i = 0; i < arr.length; i++) {
+          const elm = arr[i]
+          if (`${elm.value}` === `${id}`) {
+            name = elm
+            return
+          }
+          if (elm.children) {
+            run(elm.children)
+          }
+        }
+      }
+      run(this.selectEnum)
+      return name
+    }
+  }
+}
+</script>
+
+<style scoped lang='less'></style>

+ 20 - 9
src/store/modules/monthlyReport/baseMixin/actions.js

@@ -13,7 +13,8 @@ import {
   getSubReportInfo,
   updateSubReport,
   pullDataAgain,
-  pullSubTitle
+  pullSubTitle,
+  getHistoryDetail
 } from '@/api/qualityMonthlyReport/edit'
 // import { memberQueryMemberInfoByIDAPorName } from '@/api/projectIndex'
 import { getAvaliableInfo, getMonthlyReportVersion } from '@/api/qualityMonthlyReport'
@@ -34,7 +35,7 @@ export default {
   // 月报数据获取
   async initPageData(
     { commit, state, dispatch },
-    { id, subReportId, subActive }
+    { id, subReportId, subActive, windowHref, historyId }
   ) {
     dispatch('setSubReportInfo', id)
     const { pageType } = state
@@ -47,7 +48,9 @@ export default {
       dispatch('getSubReportData', {
         id,
         subReportId,
-        tabsActive: `tab_${subActive || '上月问题跟进'}`
+        tabsActive: `tab_${subActive || '上月问题跟进'}`,
+        windowHref,
+        historyId
       })
     } else {
       const res = await getMonthlyReport(id)
@@ -64,21 +67,20 @@ export default {
     }
   },
   // 页面切换 TAB_ACTIVE_CHANGE
-  tabActiveChange({ commit, state, dispatch }, { id, tabsActive }) {
+  tabActiveChange({ commit, state, dispatch }, { id, tabsActive, windowHref }) {
     const { pageType } = state
     if (pageType === 'editAll') {
       return commit('TAB_ACTIVE_CHANGE', tabsActive)
     }
     if (pageType === 'readAll') {
-      dispatch('getSubReportData', { id, tabsActive })
+      dispatch('getSubReportData', { id, tabsActive, windowHref })
     }
   },
   // 获取查看月报数据
-  async getSubReportData({ dispatch, commit, state }, { id, subReportId, tabsActive }) {
+  async getSubReportData({ dispatch, commit, state }, { id, subReportId, tabsActive, windowHref, historyId }) {
     const { pageType } = state
     let params = {}
-    const method =
-      pageType === 'readAll' ? getAllSubReportCatalog : getSubReport
+    let method = pageType === 'readAll' ? getAllSubReportCatalog : getSubReport
     if (pageType === 'read' || pageType === 'edit') {
       params = {
         subReportId
@@ -93,11 +95,19 @@ export default {
         catalogTitle: setTabActive('tab_', tabsActive)
       }
     }
+    if (windowHref.indexOf('isHistory=new') > -1) {
+      method = getHistoryDetail
+      params = {
+        historyId: historyId
+      }
+    }
     const res = await method(params)
+    // 设置月报版本
+    state.version = res.data.version
     if (res.code === 200) {
       // 单个月报与完整月报数据梳理
       if (pageType === 'read' || pageType === 'edit') {
-        commit('SET_CLIENT_TYPE_LIST', res.data.dependence.clientType)
+        // commit('SET_CLIENT_TYPE_LIST', res.data.dependence.clientType)
         // commit('SET_SELECT_ENUM', res.data.dependence.deptArch.children)
         commit('SET_PAGE_DATA', res.data)
       }
@@ -142,6 +152,7 @@ export default {
       params.saveAsTargetList = _.cloneDeep(state.saveAsTargetList)
     }
     params.dependence = null
+    console.log(params)
     const res = await updateSubReport(params)
     if (res.code === 200) {
       callback()

+ 8 - 0
src/store/modules/monthlyReport/baseMixin/mutations.js

@@ -298,6 +298,7 @@ export default {
     state.timeout = null // 函数防抖/节流
     state.subTitle = '新建月报'
     state.subReportName = ''
+    state.version = '' // 月报版本
     state.subReportInfo = null // 为回退时,当前页面为查看完整时,无法获取子月报数据情况设置
     state.offsetList = []
     /**
@@ -352,6 +353,13 @@ export default {
     // console.log(state.selectEnum)
     // setDeptArch(state.selectEnum)
   },
+  // 获取isHistory数据
+  SETISHISTORY(state, isHistory) {
+    // console.log(params)
+    state.isHistory = isHistory
+    // console.log(state.selectEnum)
+    // setDeptArch(state.selectEnum)
+  },
   // 标记为本月重点问题
   MARK_ISSUES(state, { cascaderValue, normalAreaName, multiplePeople }) {
     let isAdd = true

+ 2 - 0
src/store/modules/monthlyReport/baseMixin/state.js

@@ -19,6 +19,8 @@ export default {
   peopleLists: [], // 人员账号数据
   subTitle: '新建月报',
   subReportName: '',
+  isHistory: '',
+  version: '', // 月报版本
   subReportInfo: null, // 为回退时,当前页面为查看完整时,无法获取子月报数据情况设置
   timeout: null, // 函数防抖/节流
   offsetList: [],

+ 116 - 30
src/views/dataBigManage/components/drawerModal/drawerModalData.js

@@ -95,7 +95,7 @@ export const columns = {
     {
       label: '优先级',
       key: 'priorityName',
-      minWidth: 90,
+      minWidth: 65,
       align: 'left',
       type: 'level'
     }
@@ -214,25 +214,55 @@ export const columns = {
       {
         label: '优先级',
         key: 'priorityStr',
-        minWidth: 50,
+        minWidth: 65,
         type: 'level',
+        fixed: true,
         align: 'left'
       },
       {
         label: '需求名称',
         key: 'name',
-        minWidth: 200,
+        minWidth: 150,
         align: 'left',
         type: 'topTitle',
+        fixed: true,
         topName: 'REQUIREMENT',
         topKey: 'id'
       },
+      // {
+      //   label: '需求交付周期',
+      //   key: 'title',
+      //   minWidth: 100,
+      //   // tips: '需求从开始到交付(已上线取实际上线时间,未上线取排期交付时间)的总周期 / 参与计算的需求总量',
+      //   align: 'center'
+      // },
       {
         label: '需求交付周期',
         key: 'title',
+        minWidth: 130,
+        tips: '需求从开始到交付(已上线取实际上线时间,未上线取排期交付时间)的总周期',
+        align: 'left'
+      },
+      {
+        label: '产品周期',
+        key: 'title2',
         minWidth: 100,
-        // tips: '需求从开始到交付(已上线取实际上线时间,未上线取排期交付时间)的总周期 / 参与计算的需求总量',
-        align: 'center'
+        tips: '计算范围内需求,需求从BRD评审通过到技术准入的总周期',
+        align: 'left'
+      },
+      {
+        label: '研发周期',
+        key: 'title3',
+        minWidth: 100,
+        tips: '计算范围内需求, 需求排期里开发、联调、提测、上线类型排期的总周期',
+        align: 'left'
+      },
+      {
+        label: '测试周期',
+        key: 'title4',
+        minWidth: 100,
+        tips: '计算范围内需求,需求排期里用例、测试、准出、上线类型排期的总周期',
+        align: 'left'
       },
       {
         label: '状态',
@@ -245,7 +275,7 @@ export const columns = {
       {
         label: '需求交付周期',
         key: 'title',
-        minWidth: 100,
+        minWidth: 180,
         tips: '需求从开始到交付(已上线取实际上线时间,未上线取排期交付时间)的总周期',
         align: 'left'
       },
@@ -276,14 +306,14 @@ export const columns = {
       {
         label: '优先级',
         key: 'priorityStr',
-        minWidth: 50,
+        minWidth: 65,
         type: 'level',
         align: 'left'
       },
       {
         label: '任务名称',
         key: 'name',
-        minWidth: 200,
+        minWidth: 100,
         align: 'left',
         type: 'topTitle',
         topName: 'TASK',
@@ -292,14 +322,28 @@ export const columns = {
       {
         label: '任务交付周期',
         key: 'title',
-        minWidth: 90,
+        minWidth: 130,
         tips: '计算范围内任务,任务从开始到交付(已上线取实际上线时间,未上线取排期交付时间)的总周期',
         align: 'center'
       },
+      {
+        label: '研发周期',
+        key: 'title2',
+        minWidth: 100,
+        tips: '计算范围内任务,任务开发、联调、提测、上线排期的总周期',
+        align: 'center'
+      },
+      {
+        label: '测试周期',
+        key: 'title3',
+        minWidth: 100,
+        tips: '计算范围内任务,任务用例、测试、准出、上线排期的总周期',
+        align: 'center'
+      },
       {
         label: '状态',
         key: 'statusStr',
-        minWidth: 90,
+        minWidth: 150,
         align: 'center'
       }
     ],
@@ -307,21 +351,21 @@ export const columns = {
       {
         label: '任务交付周期',
         key: 'title',
-        minWidth: 90,
+        minWidth: 150,
         tips: '计算范围内任务,任务从开始到交付(已上线取实际上线时间,未上线取排期交付时间)的总周期',
         align: 'center'
       },
       {
         label: '研发周期',
         key: 'title',
-        minWidth: 90,
+        minWidth: 100,
         tips: '计算范围内任务,任务开发、联调、提测、上线排期的总周期',
         align: 'center'
       },
       {
         label: '测试周期',
         key: 'title',
-        minWidth: 90,
+        minWidth: 100,
         tips: '计算范围内任务,任务用例、测试、准出、上线排期的总周期',
         align: 'center'
       }
@@ -331,14 +375,14 @@ export const columns = {
       {
         label: '优先级',
         key: 'priorityStr',
-        minWidth: 50,
+        minWidth: 65,
         type: 'level',
         align: 'left'
       },
       {
         label: '需求名称',
         key: 'name',
-        minWidth: 200,
+        minWidth: 130,
         align: 'left',
         type: 'topTitle',
         topName: 'REQUIREMENT',
@@ -347,14 +391,35 @@ export const columns = {
       {
         label: '需求使用人力',
         key: 'title',
-        minWidth: 90,
+        minWidth: 130,
         tips: '团队成员参与的在统计时间范围内需求状态在"已排期"到"已上线"(不包含)状态的需求,或在统计时间范围内变更为已上线的需求',
         align: 'center'
       },
+      {
+        label: '开发人力',
+        key: 'title2',
+        minWidth: 100,
+        tips: ' 计算范围内需求,需求开发、联调、提测、上线排期人日总量',
+        align: 'center'
+      },
+      {
+        label: '测试人力',
+        key: 'title3',
+        minWidth: 100,
+        tips: '计算范围内需求,需求用例、测试、准出、上线排期人日总量',
+        align: 'center'
+      },
+      {
+        label: '联调人力',
+        key: 'title4',
+        minWidth: 100,
+        tips: '计算范围内需求,需求联调排期人日总量',
+        align: 'center'
+      },
       {
         label: '状态',
         key: 'statusStr',
-        minWidth: 90,
+        minWidth: 100,
         align: 'center'
       }
     ],
@@ -362,28 +427,28 @@ export const columns = {
       {
         label: '需求使用人力',
         key: 'title',
-        minWidth: 90,
+        minWidth: 200,
         tips: '团队成员参与的在统计时间范围内需求状态在"已排期"到"已上线"(不包含)状态的需求,或在统计时间范围内变更为已上线的需求',
         align: 'center'
       },
       {
         label: '开发人力',
         key: 'title',
-        minWidth: 90,
+        minWidth: 100,
         tips: ' 计算范围内需求,需求开发、联调、提测、上线排期人日总量',
         align: 'center'
       },
       {
         label: '测试人力',
         key: 'title',
-        minWidth: 90,
+        minWidth: 100,
         tips: '计算范围内需求,需求用例、测试、准出、上线排期人日总量',
         align: 'center'
       },
       {
         label: '联调人力',
         key: 'title',
-        minWidth: 90,
+        minWidth: 100,
         tips: '计算范围内需求,需求联调排期人日总量',
         align: 'center'
       }
@@ -393,14 +458,14 @@ export const columns = {
       {
         label: '优先级',
         key: 'priorityStr',
-        minWidth: 50,
+        minWidth: 65,
         type: 'level',
         align: 'left'
       },
       {
         label: '任务名称',
         key: 'name',
-        minWidth: 200,
+        minWidth: 150,
         align: 'left',
         type: 'topTitle',
         topName: 'REQUIREMENT',
@@ -409,10 +474,31 @@ export const columns = {
       {
         label: '任务使用人力',
         key: 'title',
-        minWidth: 90,
+        minWidth: 130,
         tips: '团队成员参与的在统计时间范围内任务状态在"已排期"到"已上线"(不包含)状态的任务,或在统计时间范围内变更为已上线的任务',
         align: 'center'
       },
+      {
+        label: '开发人力',
+        key: 'title2',
+        minWidth: 100,
+        tips: '计算范围内任务,开发、联调、提测、上线排期人日总量 / 参与计算的任务总量',
+        align: 'center'
+      },
+      {
+        label: '测试人力',
+        key: 'title3',
+        minWidth: 100,
+        tips: '计算范围内任务,任务用例、测试、准出、上线排期人日总量 / 参与计算的任务总量',
+        align: 'center'
+      },
+      {
+        label: '联调人力',
+        key: 'title4',
+        minWidth: 100,
+        tips: '计算范围内任务,任务联调排期人日总量 / 参与计算的任务总量',
+        align: 'center'
+      },
       {
         label: '状态',
         key: 'statusStr',
@@ -424,28 +510,28 @@ export const columns = {
       {
         label: '任务使用人力',
         key: 'title',
-        minWidth: 90,
+        minWidth: 130,
         tips: '团队成员参与的在统计时间范围内需求状态在"已排期"到"已上线"(不包含)状态的需求,或在统计时间范围内变更为已上线的需求',
         align: 'center'
       },
       {
         label: '开发人力',
         key: 'title',
-        minWidth: 90,
+        minWidth: 100,
         tips: '计算范围内任务,开发、联调、提测、上线排期人日总量 / 参与计算的任务总量',
         align: 'center'
       },
       {
         label: '测试人力',
         key: 'title',
-        minWidth: 90,
+        minWidth: 100,
         tips: '计算范围内任务,任务用例、测试、准出、上线排期人日总量 / 参与计算的任务总量',
         align: 'center'
       },
       {
         label: '联调人力',
         key: 'title',
-        minWidth: 90,
+        minWidth: 100,
         tips: '计算范围内任务,任务联调排期人日总量 / 参与计算的任务总量',
         align: 'center'
       }
@@ -487,7 +573,7 @@ export const columns = {
       {
         label: '优先级',
         key: 'priorityStr',
-        minWidth: 50,
+        minWidth: 65,
         type: 'level',
         align: 'left'
       },
@@ -526,7 +612,7 @@ export const columns = {
       {
         label: '优先级',
         key: 'priorityStr',
-        minWidth: 50,
+        minWidth: 65,
         type: 'level',
         align: 'left'
       },

+ 19 - 11
src/views/dataBigManage/components/drawerModal/index.vue

@@ -247,6 +247,7 @@ export default {
       const paging = _.cloneDeep(this.paging)
       paging.pageSize = Number.parseInt(pageSize)
       this.paging = _.cloneDeep(paging)
+      console.log(this.paging, 250)
     },
     // 设置标题
     setTitle() {
@@ -415,7 +416,7 @@ export default {
       paging.pageSize = value
       this.paging = _.cloneDeep(paging)
       window.localStorage.setItem('pageSize', value)
-      if (this.headerTitle === '效率' && this.title !== '需求人力' && this.title !== '任务人力') {
+      if (this.headerTitle === '效率' && this.title !== '需求人力') {
         this.tableListPagination()
       } else {
         this.setTableList()
@@ -427,7 +428,7 @@ export default {
       paging.curIndex = value
       this.paging = _.cloneDeep(paging)
       // console.log(this.title)
-      if (this.headerTitle === '效率' && this.title !== '需求人力' && this.title !== '任务人力') {
+      if (this.headerTitle === '效率' && this.title !== '需求人力') {
         this.tableListPagination()
       } else {
         this.setTableList()
@@ -490,11 +491,11 @@ export default {
         if (this.title.search(/缺陷修复时长|缺陷24小时修复率/) > -1) {
           columnsKey = 'bugRepairDataColumns'
         }
-        const columnsTipsKey = `${columnsKey}Tips`
+        // const columnsTipsKey = `${columnsKey}Tips`
         this.column = columns.efficiency[columnsKey].map((elm, index) => {
-          if (index === 2 && this.title.search(/任务周期|需求人力|任务人力|需求周期/) > -1) {
-            return columns.efficiency[columnsTipsKey][this.timelineData.firstActive || 0]
-          }
+          // if (index === 2 && this.title.search(/任务周期|需求人力|任务人力|需求周期/) > -1) {
+          //   return columns.efficiency[columnsTipsKey][this.timelineData.firstActive || 0]
+          // }
           return elm
         })
       }
@@ -837,12 +838,13 @@ export default {
       delete params.pageTotal
       const res = await getTaskPeopleData(params)
       if (res.code === 200) {
-        // console.log(res.data)
-        this.tableList = res.data
-        // this.tableListOld = res.data.length && res.data.map(e => e)
-        // this.tableListPagination()
+        // this.tableList = res.data
+        this.tableListOld = res.data.length && res.data.map(e => e)
+        this.tableListPagination()
+        paging.pageTotal = this.tableListOld.length
         paging.pageTotal = this.sourceData[0].IdList.length
         this.paging = { ...paging }
+        console.log(847, this.paging)
         this.loading = false
       }
     },
@@ -951,7 +953,9 @@ export default {
         this.tableHeight = 'calc(100vh - 290px)'
       } else if (this.title.search(/状态停留分布图数据|状态累积流量图数据/) > -1) {
         this.tableHeight = 'calc(100vh - 363px)'
-      } else if (this.title.search(/需求周期|新增项目|新增任务|reopen|新增缺陷|需求人力|任务人力|任务周期|缺陷修复时长|延期准出率|延期提测率/) > -1) {
+      } else if (this.title.search(/需求周期|需求人力|任务人力|任务周期/) > -1) {
+        this.tableHeight = 'calc(100vh - 136px)'
+      } else if (this.title.search(/新增项目|新增任务|reopen|新增缺陷|缺陷修复时长|延期准出率|延期提测率/) > -1) {
         this.tableHeight = 'calc(100vh - 288px)'
       } else if (this.title.search(/需求|任务|项目/) > -1) {
         // 吞吐量: 需求
@@ -1046,6 +1050,10 @@ export default {
         if (this.drawerData.moduleName && this.drawerData.moduleName === '回滚次数') {
           return true
         }
+        console.log(1049, this.title, this.headerTitle)
+        if (this.headerTitle.search(/效率/) > -1 && this.title.search(/需求周期|任务周期|需求人力|任务人力/) > -1) {
+          return false
+        }
         return this.headerTitle.search(/吞吐量|效率/) > -1
       }
       // 是第二条

+ 4 - 3
src/views/dataBigManage/components/efficiencyModule/index.vue

@@ -315,16 +315,17 @@
         />
         <!-- <div class="titleLevel3" style="color: #fff;">{{ mainData.testDevPeopleScale.label }}</div> -->
         <div class="content">
-               <div
-            v-for="item in mainData.testDevPeopleScale.subCountList"
+          <div
+            v-for="(item, itemIndex) in mainData.testDevPeopleScale.subCountList"
             :key="item.label"
+            :style="{marginRight: itemIndex ? '0' : '5px'}"
             class="item"
           >
           <!-- @click.stop="$emit(
               'checkDetialModal',
               { ...mainData.testDevPeopleScale, activeLabel: item.label }
             )" -->
-            <span class="title">{{ item.label }}:</span><span class="value"><span class="num noHover">{{ item.countStr }}</span></span>
+            <span class="title">{{ item.label }}:</span><span class="value"><span class="num noHover">{{ item.countStr }}&nbsp;&nbsp;</span></span>
           </div>
         </div>
         <!-- <div class="foot">

+ 86 - 31
src/views/monthlyReport/childrenPage/editReport/components/MrTable/index.vue

@@ -35,7 +35,7 @@
           <template slot-scope="scope">
             <!--    展开    -->
             <div v-if="item.type === 'expand'">
-<!--              <div @click="showItem(item, scope)">item</div>-->
+              <!-- <div @click="showItem(item, scope)">item</div>-->
               <TableExpandRowList
                 v-if="scope.row.analyticFeedbackList"
                 :columns="columns"
@@ -87,7 +87,7 @@
                     </el-dropdown>
                   </span>
                   <!--链接-->
-                  <span v-else-if="btnItem.value === '链接' && isShowButton(scope.row, item)" @click.stop>
+                  <span v-else-if="btnItem.value === '链接' && isShowButton(scope.row, item) && pageType.search(/edit/) > -1" @click.stop>
                     <el-popover v-if="scope.row.operationTarget" placement="bottom-start" trigger="hover">
                       <el-button-group>
                         <el-button
@@ -261,7 +261,7 @@
     </span>
 
     <div class="plus-table-data" :style="{ marginBottom: plusTableDataBottom }" @click.stop>
-      <el-button v-if="pageDate && pageDate.status < 20" type="text" @click.stop="addTableData">
+      <el-button v-if="pageDate && pageDate.status < 20 && !isHistory" type="text" @click.stop="addTableData">
         <svg-icon icon-class="data-plus" class="icon" />
         新增
       </el-button>
@@ -295,7 +295,7 @@ import _ from 'lodash'
 import { uuid10 } from '@/utils'
 import Analysis from './Analysis'
 import LinkEdit from './LinkEdit'
-import Cascader from '../Cascader'
+import Cascader from '@/components/select/selectCascader'
 import CascaderInfo from '../CascaderInfo'
 import TextInfo from '../TextInfo'
 import MultiplePeopleInfo from '../MultiplePeopleInfo'
@@ -305,7 +305,7 @@ import markingIssues from '../markingIssues'
 import CascaderSingle from '../CascaderSingle'
 import CascaderSingleInfo from '../CascaderSingleInfo'
 import searchPeople from '@/components/select/searchPeople' // 人员select
-import { updateAnalyticFeedback, getDeptCharge } from '@/api/qualityMonthlyReport/edit'
+import { updateAnalyticFeedback, getDeptCharge, getAnalyticFeedback } from '@/api/qualityMonthlyReport/edit'
 import { reportDataBack } from '@/store/modules/monthlyReport/utils'
 // import { getDeptByKeyWord } from '@/api/qualityMonthlyReport'
 
@@ -421,6 +421,12 @@ export default {
     },
     isLoading() {
       return this.$store.state.monthlyReportEdit.isLoading
+    },
+    version() {
+      return this.$store.state.monthlyReportEdit.version
+    },
+    isHistory() {
+      return this.$store.state.monthlyReportEdit.isHistory
     }
   },
   watch: {
@@ -441,12 +447,12 @@ export default {
   // },
   mounted() {
     this.$nextTick(() => {
-      this.setExpandRowKeys()
+      this.setAnalyticFeedbackTitle()
       this.init()
     })
     setTimeout(() => {
       if (!this.analyticFeedback) {
-        this.setAnalyticFeedback()
+        this.setAnalyticFeedbackTitle()
       }
     }, 3000)
   },
@@ -651,8 +657,9 @@ export default {
         }
       })
       // if (this.pageDate.status > 10 && this.tabsActive.indexOf('本月重点问题') < 0) {
+      const { isHistory } = this.$route.query
       // 非编辑状态,并且不是·本月重点问题·,删除操作按钮
-      if (this.pageDate && this.pageDate.status > 10 && !this.isExpand) {
+      if (this.pageDate && this.pageDate.status > 10 && !this.isExpand || isHistory) {
         newColumns.splice(newColumns.length - 1, 1)
       }
       return newColumns
@@ -668,6 +675,70 @@ export default {
         return [0, 0]
       }
     },
+    getTableObjAndVersion() {
+      const tabPageData = reportDataBack(_.cloneDeep(this.tabPageData))
+      let version = ''
+      let obj = null
+      const run = (arr) => {
+        arr.forEach((elm) => {
+          if (elm.domKey === this.domKey) {
+            console.log(elm, 686)
+            if (!version) {
+              version = elm.version
+            }
+            obj = _.cloneDeep(elm)
+          }
+          if (elm.content.length) {
+            elm.content.forEach((item) => {
+              if (item.domKey === this.domKey) {
+                // console.log(elm)
+                obj = _.cloneDeep(elm)
+              }
+            })
+          }
+          if (elm.children.length) {
+            run(elm.children)
+          }
+        })
+      }
+      run(tabPageData.children)
+      return { obj, version }
+    },
+    // 更新分析反馈信息title
+    async setAnalyticFeedbackTitle() {
+      if (this.analyticFeedback) return
+      const { obj } = this.getTableObjAndVersion()
+      let subReportId = ''
+
+      if (this.$route.query.pageType === 'readAll') {
+        // 根据找到的业务线名称查询业务线ID
+        this.subReportInfo && this.subReportInfo.length && this.subReportInfo.forEach(elm => {
+          if (elm.reportName === obj.title) {
+            subReportId = elm.id
+          }
+        })
+      } else {
+        subReportId = this.$route.query.subReportId
+      }
+      const res = await getAnalyticFeedback({
+        subReportId
+      })
+      if (res.code === 200) {
+        this.analyticFeedback = res.data
+        if (this.analyticFeedback.search(/yellow/) > -1) {
+          this.analyticFeedback = this.analyticFeedback.replace(
+            /yellow/g,
+            '#FAAD14'
+          )
+        }
+        if (this.analyticFeedback.search(/green/) > -1) {
+          this.analyticFeedback = this.analyticFeedback.replace(
+            /green/g,
+            '#7ED321'
+          )
+        }
+      }
+    },
     // 查看页面数据分析
     setAnalyticFeedback(key = '', feedbackCharge = '') {
       if (
@@ -676,28 +747,7 @@ export default {
         // this.tabsActive.indexOf('本月重点问题') > -1
         this.isExpand
       ) {
-        const tabPageData = reportDataBack(_.cloneDeep(this.tabPageData))
-        let obj = null
-        const run = (arr) => {
-          arr.forEach((elm) => {
-            if (elm.domKey === this.domKey) {
-              // console.log(elm)
-              obj = _.cloneDeep(elm)
-            }
-            if (elm.content.length) {
-              elm.content.forEach((item) => {
-                if (item.domKey === this.domKey) {
-                  // console.log(elm)
-                  obj = _.cloneDeep(elm)
-                }
-              })
-            }
-            if (elm.children.length) {
-              run(elm.children)
-            }
-          })
-        }
-        run(tabPageData.children)
+        const { obj } = this.getTableObjAndVersion()
         const params = {
           reportId: this.$route.query.reportId,
           subReportName: this.subReportName,
@@ -708,8 +758,12 @@ export default {
         }
         if (this.$route.query.pageType === 'readAll' && obj) {
           params.subReportName = `${obj.title}`
+          // 获取查看完整月报状态下的子月报ID的version
+          params.version = obj.version || 0
+        } else {
+          // 获取查看单个子月报状态下的子月报ID的version
+          params.version = this.version || 0
         }
-        // console.log(params)
         // 提交数据
         if (obj && obj.content[0].tableRows.length) {
           if (key && key === 'feedbackType') {
@@ -755,6 +809,7 @@ export default {
       ) {
         return true
       }
+
       if (row.analyticFeedback && row.analyticFeedback.isCommitted) {
         return false
       }

+ 1 - 1
src/views/monthlyReport/childrenPage/editReport/components/ReadOnlyTable.vue

@@ -76,7 +76,7 @@ import _ from 'lodash'
 import { uuid10 } from '@/utils'
 import drawerAll from '@/views/quality/components/drawerAll'
 import Clickoutside from 'element-ui/src/utils/clickoutside'
-// import Cascader from '../Cascader'
+// import Cascader from '@/components/select/selectCascader'
 import CascaderInfo from './CascaderInfo'
 
 export default {

+ 4 - 4
src/views/monthlyReport/childrenPage/editReport/components/VarText.vue

@@ -6,15 +6,15 @@
       </div>
       <div class="value">
         <el-input
-          v-if="pageDate.status < 20"
+          v-if="pageDate.status < 20 && !isHistory"
           v-model="textValue"
           type="textarea"
           :placeholder="headerTitleType === 'Head2' ? `请针对${headerTitle}进行分析` : '请输入'"
           show-word-limit
         />
         <span
-          v-if="pageDate.status > 10 && textValue"
-          style="display: inline-block;line-height: 1.65;    background-color: #f7f7f7; padding: 10px; border-radius: 5px;"
+          v-if="pageDate.status > 10 && textValue || isHistory && textValue"
+          style="display: inline-block;line-height: 1.65;background-color: #f7f7f7; padding: 10px; border-radius: 5px;"
           v-html="textValue.replace(/\n/g, '<br />')"
           />
       </div>
@@ -62,7 +62,7 @@ export default {
     }
   },
   computed: {
-    ...mapState('monthlyReportEdit', ['pageType', 'pageDate'])
+    ...mapState('monthlyReportEdit', ['pageType', 'pageDate', 'isHistory'])
     // pageType() {
     //   return this.$store.state.monthlyReportEditV2.pageType
     // },

+ 7 - 4
src/views/monthlyReport/childrenPage/editReport/components/core.vue

@@ -7,7 +7,7 @@
         @click.native.stop="baseDataShow"
       >
         <Refresh
-          v-if="pageDate && pageDate.status < 20"
+          v-if="pageDate && pageDate.status < 20 && !isHistory"
           slot="refresh"
           :title="baseData.title"
           :tab-key="tabKey"
@@ -48,7 +48,7 @@
         style="margin-bottom: 10px"
       />
       <PushAndBanck
-        v-else-if="baseData.title.indexOf('发布&回滚') > -1"
+        v-else-if="baseData.title.indexOf('发布&回滚') > -1 && !isHistory"
         :title="baseData.title"
         :sub-title="baseData.subTitles"
         style="margin-bottom: 5px"
@@ -69,13 +69,13 @@
         :sub-title="baseData.subTitles"
         style="margin-bottom: 10px" /><span v-if="baseData.title.search(/提测打回|增发/) > -1">。</span>
       <Refresh
-        v-if="pageDate && pageDate.status < 20"
+        v-if="pageDate && pageDate.status < 20 && !isHistory"
         slot="refresh"
         :title="baseData.title"
         :dom-key="baseData.domKey"
         :style="{marginLeft: baseData.title.search(/线上问题/) > -1 ? '5px' : '5px'}" />
       <span><el-button
-        v-if="headerTitle.indexOf('线下缺陷') > -1 && pageDate.status < 20"
+        v-if="headerTitle.indexOf('线下缺陷') > -1 && pageDate.status < 20 && !isHistory"
         type="text"
         style="margin-left: 15px;font-weight: 400;"
         @click.stop="marking">标记</el-button></span>
@@ -212,6 +212,9 @@ export default {
     },
     pageDate() {
       return this.$store.state.monthlyReportEdit.pageDate
+    },
+    isHistory() {
+      return this.$store.state.monthlyReportEdit.isHistory
     }
   },
   watch: {

+ 162 - 0
src/views/monthlyReport/childrenPage/editReport/components/historyRecord.vue

@@ -0,0 +1,162 @@
+<template>
+  <div class="history-wrapper">
+    <section class="main-section">
+      <div class="el-main-title">
+        <div class="title-left-icon" />
+        <div class="title-left-name">动态</div>
+      </div>
+      <div class="comments-margin">
+        <el-tabs v-model="tabPosition">
+          <el-tab-pane label="评论" name="first">
+            <comments-and-changes v-if="$route.query.subReportId" :data="{type: 8, id: $route.query.subReportId}" />
+          </el-tab-pane>
+          <el-tab-pane label="变更记录" name="second">
+            <div v-if="historyList && historyList.length" class="history-list-wrapper">
+                <div v-for="(item, itemIndex) in historyList" :key="itemIndex" class="history-wrapper">
+                  <!-- <div class="operationTypeStr">{{ item.operationTypeStr }}:</div> -->
+                  <div class="creatorCn">{{ item.creatorCn }}:</div>
+                  <div class="content-wrapper">
+                    <span>{{ item.content }}</span>
+                    <!-- <div class="isHove el-button--text" type="text">内容查看</div> -->
+                    <div v-if="item.operationTypeStr !== '创建'" class="isHove el-button--text" type="text" @click="showHistory(item)">内容查看</div>
+                  </div>
+                  <div class="operationTime">{{ item.operationTime }}</div>
+                </div>
+
+            </div>
+            <!-- <record v-if="form_query.id" :id="form_query.id" ref="record" :name="7" /> -->
+          </el-tab-pane>
+        </el-tabs>
+      </div>
+    </section>
+  </div>
+</template>
+
+<script>
+import { getHistory } from '@/api/qualityMonthlyReport/edit'
+import commentsAndChanges from '@/components/commentsAndChanges/index.vue'
+
+export default {
+  name: 'History',
+  components: {
+    commentsAndChanges
+    // record
+  },
+  data() {
+    return {
+      historyList: [],
+      form_query: {},
+      tabPosition: 'first'
+    }
+  },
+  computed: {
+    tabsActive() {
+      return this.$store.state.monthlyReportEdit.tabsActive
+    },
+    pageType() {
+      return this.$store.state.monthlyReportEdit.pageType
+    },
+    pageDate() {
+      return this.$store.state.monthlyReportEdit.pageDate
+    }
+  },
+  watch: {
+    tabPosition() {
+      if (this.tabPosition === 'second') {
+        this.getHistoryFn()
+      }
+    }
+  },
+  mounted() {
+    this.getHistoryFn()
+  },
+  methods: {
+    async getHistoryFn() {
+      const { subReportId } = this.$route.query
+      if (subReportId) {
+        const res = await getHistory({
+          subMonthlyReportId: subReportId
+        })
+        if (res.code === 200) {
+          this.historyList = res.data
+        }
+
+        console.log(res)
+      }
+    },
+    // 查看历史月报详情
+    showHistory(item) {
+      const url = `${location.origin}/#/monthlyReport/edit?pageType=read&reportId=334&subReportId=${this.$route.query.subReportId}&isHistory=new&historyId=${item.historyId}`
+      window.open(url, '_blank')
+    }
+  }
+}
+</script>
+
+<style scoped lang='less'>
+.history-wrapper {
+  background-color: white;
+
+  .main-section{
+    margin-left: 0;
+    margin-bottom: 0;
+
+    .el-main-title {
+      margin-left: 0;
+      margin-top: 40px;
+      margin-bottom: 10px;
+    }
+  }
+
+  .history-list-wrapper {
+
+    .history-wrapper{
+      display: flex;
+
+      > * {
+        padding: 10px 0;
+        margin-right: 10px;
+        height: initial;
+      }
+      .operationTypeStr {
+        color: #FAAD14;
+      }
+      .content-wrapper {
+        > * {
+          // padding: 10px 0;
+           height: initial;
+          display: inline-block;
+          margin-right: 10px;
+        }
+      }
+    }
+     // 全局动效
+  .isHove{
+    &:hover{
+      cursor: pointer;
+      display: inline-block;
+      animation-name: example;
+      // animation-iteration-count:1;
+      animation-duration: 300ms;
+    }
+  }
+  .noHover {
+    cursor: auto!important;
+  }
+  @keyframes example {
+  0% {
+    transform: scale(1.2);
+    // transform: rotateX(60deg);
+  }
+  50%  {
+    transform: scale(1.3);
+    // transform: rotateX(90deg);
+  }
+  100% {
+    transform: scale(1);
+    // transform: rotateX(0);
+  }
+}
+  }
+}
+</style>

+ 1 - 1
src/views/monthlyReport/childrenPage/editReport/components/markingIssues.vue

@@ -39,7 +39,7 @@
 </template>
 <script>
 import { uuid10 } from '@/utils'
-import Cascader from './Cascader'
+import Cascader from '@/components/select/selectCascader'
 import normalDialog from '@/components/dialog/normalDialog'
 import Clickoutside from 'element-ui/src/utils/clickoutside'
 import searchPeople from '@/components/select/searchPeople'

+ 15 - 7
src/views/monthlyReport/childrenPage/editReport/index.vue

@@ -7,7 +7,7 @@
     @click.stop="$store.commit('monthlyReportEdit/INIT_EDIT_KEYS')"
   >
     <headerCom :key="subTitle" title="月报" :sub-title="subTitle" :address="address">
-      <template v-if="pageDate" slot="content">
+      <template v-if="pageDate && !isHistory" slot="content">
         <el-button
           v-if="pageDate && pageDate.status < 20 && (roleCode === 100 || roleCode === 50 || roleCode === 0)"
           type="primary"
@@ -100,6 +100,7 @@
             />
           </div>
           <div v-else style="margin-top: 30px;">暂无数据!</div>
+          <historyRecord v-if="pageType.search(/All/) < 0 && tabPageData && windowHref.indexOf('isHistory=new') < 0" />
         </div>
         <div class="right-wrapper">
           <Affix
@@ -221,6 +222,7 @@ import Affix from '@/components/affix/affix'
 import Anchor from './components/anchor'
 import Menu from './components/menu'
 import Core from './components/core'
+import historyRecord from './components/historyRecord'
 import Clickoutside from 'element-ui/src/utils/clickoutside'
 import normalDialog from '@/components/dialog/normalDialog'
 import { projectManagementUrl } from '@/apiConfig/api'
@@ -234,6 +236,7 @@ export default {
     Anchor,
     Menu,
     Core,
+    historyRecord,
     normalDialog
   },
   directives: { Clickoutside },
@@ -245,7 +248,8 @@ export default {
       bodyLoading: false,
       monthlyReportPreView: null,
       monthlyReportPrePdfView: null,
-      scrollTop: 0
+      scrollTop: 0,
+      windowHref: ''
     }
   },
   computed: {
@@ -260,7 +264,7 @@ export default {
       return pathName
     },
     ...mapState('monthlyReportEdit',
-      ['pageDate', 'tabPageData', 'subTitle', 'tabsList', 'tabsActive', 'treeData', 'subTabsActive', 'domKeys', 'offsetList', 'pageType', 'subReportInfo', 'roleCode', 'loading']
+      ['pageDate', 'tabPageData', 'subTitle', 'tabsList', 'tabsActive', 'treeData', 'subTabsActive', 'domKeys', 'offsetList', 'pageType', 'subReportInfo', 'roleCode', 'loading', 'version', 'isHistory']
     )
   },
   watch: {
@@ -269,6 +273,7 @@ export default {
     }
   },
   created() {
+    this.SETISHISTORY(this.$route.query.isHistory)
     this.INIT_STATE_DATA()
     this.SET_LOADING(true)
     this.indexShow = true
@@ -291,12 +296,14 @@ export default {
     if (this.$route.query.pageType === 'readAll') {
       this.SET_SUB_TITLE('查看完整月报')
     }
-
+    this.windowHref = window.location.href
     if (this.$route.query.reportId || this.$route.query.subReportId) {
       this.initPageData({
         id: this.$route.query.reportId,
         subActive: this.$route.query.subActive,
-        subReportId: this.$route.query.subReportId
+        subReportId: this.$route.query.subReportId,
+        historyId: this.$route.query.historyId,
+        windowHref: window.location.href
       })
     }
     // 数据埋点
@@ -323,7 +330,7 @@ export default {
   },
   methods: {
     ...mapMutations('monthlyReportEdit',
-      ['INIT_STATE_DATA', 'SET_LOADING', 'SET_PAGE_TYPE', 'SET_SUB_TITLE']
+      ['INIT_STATE_DATA', 'SET_LOADING', 'SET_PAGE_TYPE', 'SET_SUB_TITLE', 'SETISHISTORY']
     ),
     ...mapActions('monthlyReportEdit',
       ['getUserPermission', 'deleteReport', 'setSelectEnum', 'initPageData', 'upDateReport', 'upDateSubReport', 'confirmReport']
@@ -477,7 +484,8 @@ export default {
         this.$store.dispatch('monthlyReportEdit/tabActiveChange', {
           ...this.$route.query,
           id: this.$route.query.reportId,
-          tabsActive: tab.name
+          tabsActive: tab.name,
+          windowHref: window.location.href
         })
         setTimeout(() => {
           this.bodyLoading = false

+ 1 - 1
src/views/monthlyReport/childrenPage/setReport/components/nodeTreeSet.vue

@@ -44,7 +44,7 @@
 
 <script>
 import normalDialog from '@/components/dialog/normalDialog'
-import Cascader from '@/views/monthlyReport/childrenPage/editReport/components/Cascader'
+import Cascader from '@/components/select/selectCascader'
 import { getDeptByKeyWord, createOdinDeptRel, deleteOdinBizRel, getOdinTree, getOdinNodeByParentId, addShowOdinNode } from '@/api/qualityMonthlyReport'
 export default {
   components: { normalDialog, Cascader },

+ 1 - 1
src/views/monthlyReport/index.vue

@@ -13,8 +13,8 @@
 
       <template slot="content">
         <div v-if="reportData.roleCode !== 30">
-          <el-button type="primary" size="small" @click="createReport">新建月报</el-button>
           <el-button plain size="small" @click="jump('report_home_set', '/monthlyReport/set', {})">月报设置</el-button>
+          <el-button type="primary" size="small" @click="createReport">新建月报</el-button>
         </div>
       </template>
     </headerCom>

+ 11 - 2
src/views/projectManage/onlineproblem/create/component/renderBase.js

@@ -1,4 +1,3 @@
-
 const data = [
   [{
     name: '名称',
@@ -42,7 +41,7 @@ const data = [
     key: 'happenDate',
     type: 'date',
     requried: true
-  }, {
+  }, /* {
     name: '责任团队',
     key: 'teamId',
     type: 'remoteSelect',
@@ -51,6 +50,16 @@ const data = [
     value: '',
     utilName: 'getTeam',
     option: []
+  },*/
+  {
+    name: '责任团队',
+    key: 'deptIds',
+    type: 'cascader',
+    multiple: true,
+    placeholder: '请选择责任团队',
+    value: '',
+    utilName: 'getDept',
+    option: []
   }],
   [{
     name: '影响面',

+ 16 - 2
src/views/projectManage/onlineproblem/detial/component/base.vue

@@ -62,14 +62,23 @@
         <over-click id="teamId-select" @overMouse="changeArea">
           <template slot="active">
             <selectTeam
+              v-if="data.teamId"
               :value="data.teamId"
               :name="data.teamName"
               :biz-id-flag="false"
               @onChange="(e) => onChange('teamId', e)"
             />
+            <span v-else>
+              <selectCascader
+              :value="data.deptIds"
+              placeholder="请选择责任团队"
+              @change="(e) => onChange('deptIds', e)"
+            />
+            </span>
           </template>
           <template slot="overMouse">
-            <span :class="!data.teamName && 'showPlacehodler'">{{ data.teamName ? data.teamName : '请选择' }}</span>
+            <selectCascaderInfo v-if="data.deptIds" :key="data.deptIds.length" :team-data="data.deptIds" />
+            <span v-else :class="!data.teamName && 'showPlacehodler'">{{ data.teamName ? data.teamName : '请选择' }}</span>
           </template>
         </over-click>
       </el-form-item>
@@ -166,11 +175,15 @@
 </template>
 <script>
 import selectTeam from '@/components/select/selectTeam'
+import selectCascader from '@/components/select/selectCascader'
+import selectCascaderInfo from '@/components/select/selectCascaderInfo'
 import overClick from '@/components/click/overClick'
 export default {
   components: {
     overClick,
-    selectTeam
+    selectTeam,
+    selectCascader,
+    selectCascaderInfo
   },
   props: {
     data: {
@@ -206,6 +219,7 @@ export default {
   },
   methods: {
     onChange(key, value) {
+      console.log(key, value)
       this.$emit('change', key, value)
     },
     changeArea() {

+ 2 - 0
src/views/projectManage/onlineproblem/detial/index.vue

@@ -172,6 +172,8 @@ export default {
     }
   },
   async mounted() {
+    // 获取部门数据
+    this.$store.dispatch('monthlyReportEdit/setSelectEnum')
     if (this.id) {
       await this.search()
       this.getCommentList()