zhaoxiaoqiang1
2026-01-04 f1d30d03186c79ca2cbcfe60d6d2ce7d73fba97b
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
<template>
  <div class="apply-info">
    <CommTable title="流程流转记录" :isAutoIndex="true" :list="list" :header="tableHeader"></CommTable>
  </div>
</template>
<script>
// 流程流转记录
import CommTable from '@/components/CommTable'
import queryFlowTaskInfo from '@/controller/queryFlowTaskInfo'
import queryFlowTaskInfoCommom from '@/controller/queryFlowTaskInfoCommom'
 
export default {
  components: {
    CommTable
  },
  data() {
    return {
      tableHeader: [],
      model: null,
      list: []
    }
  },
  created() {
    this.init()
  },
  methods: {
    init() {
      const { query } = this.$route
      this.query = query
      // 建议使用isCommon字段来区分,pageId在此区分容易混乱
      const { pageId, isCommon } = query
      const isComm = ['30', '35'].includes(pageId) || Number(isCommon) === 1
      const model = isComm ? queryFlowTaskInfoCommom() : queryFlowTaskInfo()
      this.model = model
      this.tableHeader = model.getTableList()
      isComm ? this.getListTable() : this.getList()
    },
    // 第五次迭代流程流转记录
    async getList() {
      const { model, query } = this
      const { transLogSerialno } = query
      const { list } = await model.request({
        transLogSerialno
      })
      this.list = list
    },
    // 第六次迭代流程流转记录
    async getListTable() {
      const { model, query } = this
      const { objectNo, objectType, phaseNo } = query
      const { list } = await model.request({
        objectNo,
        objectType,
        phaseNo
      })
      this.list = list
    }
  },
  watch: {
    $route() {
      const { transLogSerialno, pageId, objectNo } = this.$route.query
      if (pageId === '30') {
        if (objectNo) {
          this.init()
        }
      } else {
        if (transLogSerialno) {
          this.init()
        }
      }
    }
  }
}
</script>
<style lang="postcss" scoped>
.apply-info {
}
</style>