seatonwan9
2025-09-02 83d5b2be8fdf0ac0b59cacf6b344c8815ab4d040
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
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
<template>
  <div style="position: relative">
    <el-scrollbar style="width: 100%; height: 82vh" ref="scrollViewContainer">
        <!-- 详情 -->
        <informationBasicView
          ref="informationBasicViewRrf"
          :customerInfo="state.basicInfo"
        />
      <div class="viewbox-cont">
        <h2>审批追踪</h2>
        <div class="bodyBoxiframe" v-if="state.routeData.flowId">
          <iframe
            style="width: 100%; height: 700px; border: none"
            :src="state.srcData"
          ></iframe>
        </div>
        <div v-else style="text-align: center; padding: 20px 0 10px">
          当前状态下无追踪信息
        </div>
      </div>
    </el-scrollbar>
    <div class="absolutBnt">
      <el-button type="primary" class="backicon" @click="goBackList"
        >返回</el-button
      >
    </div>
  </div>
</template>
<script lang="ts">
export default {
  name: 'meritRatingView',
}
</script>
<script setup lang="ts">
import informationBasicView from './components/informationBasicView.vue'
import Base64 from '@/utils/base64'
import { useRoute } from 'vue-router'
import productService from '@/api/zhongjian/productApi' // 接口文件
import _ from 'lodash'
import router from '@/router'
 
const currentTab = ref<string>('1')
const route = useRoute()
const state = reactive<any>({
  visible: false,
  title: '',
  editType: 'add',
  id: '',
  parentName: '',
  basicInfo: {
    editType: '',
    addType: '', // 添加按钮类型
  },
  fullscreen: false, // 全屏对话框
  routeData: {}, // 路由传参
  srcData: '',
  richTextList: [],
  submitDisabled: false,
  isSaveChapter: false,
})
const informationBasicViewRrf = ref()
const scrollViewContainer = ref()
const goBackList = () => {
  scrollViewContainer.value.scrollTo({ top: 0 })
  router.push({
    path: state.routeData.backPath,
  })
}
// 根据id查看详情
const queryDetailById = () => {
  const param: object = {
    id: state.id,
  }
  productService
    .getIdListUrl({
      ...param,
    })
    .then((res) => {
      if (res.code == 200) {
        state.basicInfo = { ...res.data }
        state.richTextList = res.data.productSubmissionDetailDOList
        if (state.richTextList.length == 0) {
          state.isSaveChapter = false
        } else {
          state.isSaveChapter = true
        }
        localStorage.setItem('productIdData', res.data.id)
      }
    })
}
onActivated(() => {
  currentTab.value = '1'
  state.routeData = JSON.parse(Base64.decode(route.query.info))
  console.log('state.routeData', state.routeData)
  state.editType = state.routeData?.informationEditType
  state.id = state.routeData?.id ?? ''
  state.basicInfo = {
    editType: '',
    addType: '', // 添加按钮类型
  }
  state.basicInfo.editType = state.editType
    queryDetailById()
   
  const history_url: string = import.meta.env.VITE_IFREAM_URL as string
  if (state.routeData.flowId) {
    state.srcData = `${history_url}/activity/history?processinstId=${state.routeData.flowId}&token=${state.routeData.token}`
  }
})
</script>
<style scoped lang="scss">
.bodyBoxiframe {
  width: 100%;
  height: 70vh;
  display: flex;
  flex-direction: column;
  align-items: center;
}
.absolutBnt {
  position: fixed;
  width: 70px;
  top: 133px;
  right: 10px;
  z-index: 999;
  display: flex;
}
.viewbox-cont {
  margin-bottom: 10px;
  h2 {
    padding: 8px;
    background-color: #dce6f4;
    color: #656d9a;
    font-size: 17px;
  }
}
</style>