ソースを参照

月报:历史记录(version)

洪海涛 4 年 前
コミット
df7a09922b

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

@@ -101,6 +101,8 @@ export default {
       }
     }
     const res = await method(params)
+    // 设置月报版本
+    state.version = res.data.version
     if (res.code === 200) {
       // 单个月报与完整月报数据梳理
       if (pageType === 'read' || pageType === 'edit') {

+ 1 - 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 = []
     /**

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

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

+ 9 - 1
src/views/monthlyReport/childrenPage/editReport/components/MrTable/index.vue

@@ -421,6 +421,9 @@ export default {
     },
     isLoading() {
       return this.$store.state.monthlyReportEdit.isLoading
+    },
+    version() {
+      return this.$store.state.monthlyReportEdit.version
     }
   },
   watch: {
@@ -670,6 +673,7 @@ export default {
     },
     // 查看页面数据分析
     setAnalyticFeedback(key = '', feedbackCharge = '') {
+      let version = this.version + ''
       if (
         // this.pageType.search(/edit/) < 0 &&
         // this.pageDate.status > 10 &&
@@ -680,8 +684,11 @@ export default {
         let obj = null
         const run = (arr) => {
           arr.forEach((elm) => {
+            console.log(elm, '分析反馈')
             if (elm.domKey === this.domKey) {
-              // console.log(elm)
+              if (!version) {
+                version = elm.domKey
+              }
               obj = _.cloneDeep(elm)
             }
             if (elm.content.length) {
@@ -715,6 +722,7 @@ export default {
           if (key && key === 'feedbackType') {
             params[key] = 'feedback_commit'
           }
+          params.version = version || ''
           updateAnalyticFeedback(params).then((res) => {
             if (res.code === 200) {
               this.analyticFeedback = res.data

+ 2 - 1
src/views/monthlyReport/childrenPage/editReport/index.vue

@@ -85,6 +85,7 @@
         </el-button>
       </template>
     </headerCom>
+    version: {{ version }}
     <div class="content-wrapper">
       <el-tabs v-if="pageType.search(/All/) > -1" :value="tabsActive" @tab-click="tabClick">
         <el-tab-pane v-for="item in tabsList" :key="item.name" :label="item.label" :name="item.name" />
@@ -264,7 +265,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']
     )
   },
   watch: {