From bfbb1ea3c6bb2dd7db064fb189290a1bfcf6c9cd Mon Sep 17 00:00:00 2001 From: seatonwan9 Date: 星期四, 28 八月 2025 02:14:48 +0800 Subject: [PATCH] 提交源码 --- src/views/tradeManage/detail/index.vue | 52 ++++++++++++++++++++++++++++++++++++++++++++++------ 1 files changed, 46 insertions(+), 6 deletions(-) diff --git a/src/views/tradeManage/detail/index.vue b/src/views/tradeManage/detail/index.vue index 098fffc..7882083 100644 --- a/src/views/tradeManage/detail/index.vue +++ b/src/views/tradeManage/detail/index.vue @@ -226,11 +226,11 @@ </el-card> <!-- 瀹℃壒杩借釜 --> - <el-card class="mt15" shadow="never" v-if="detail.records?.length"> + <el-card class="mt15" shadow="never"> <div class="title">瀹℃壒杩借釜</div> <!-- 鏍囩椤� --> - <el-tabs v-model="activeTab" class="approval-tabs"> + <!-- <el-tabs v-model="activeTab" class="approval-tabs"> <el-tab-pane label="瀹℃壒璁板綍" name="records"> <el-table :data="detail.records" @@ -279,13 +279,18 @@ </el-table-column> </el-table> </el-tab-pane> - </el-tabs> + </el-tabs> --> - <!-- 杩斿洖鎸夐挳 --> - <div class="action-buttons"> + <!-- 澶栭儴绯荤粺瀹℃壒杞ㄨ抗 iframe --> + <div class="iframe-wrap" v-if="workflowIframeUrl"> + <iframe :src="workflowIframeUrl" class="workflow-iframe" referrerpolicy="no-referrer"></iframe> + </div> + + </el-card> + <!-- 杩斿洖鎸夐挳 --> + <div class="action-buttons"> <el-button @click="goBack">杩斿洖</el-button> </div> - </el-card> </div> </template> @@ -296,12 +301,22 @@ import { ElMessage } from 'element-plus' import orderApi from '@/api/orderApi' import createAxios from '@/utils/axios' +import productApi from '@/api/productApi' +import { useUserInfo } from '@/stores/modules/userInfo' +const hostUrl = import.meta.env.VITE_AXIOS_BASE_URL const route = useRoute() const router = useRouter() const detail = reactive<any>({ items: [], records: [], nodes: [] }) const orderTableWrapRef = ref<HTMLElement | null>(null) const activeTab = ref('records') +const userStore = useUserInfo() +// 澶栭儴瀹℃壒杞ㄨ抗iframe鍦板潃 +const workflowIframeUrl = computed(() => { + const pid = (detail.workflowId || route.query.processinstId || '').toString().trim() + if (!pid) return '' + return `${hostUrl}/activity/history?processinstId=${encodeURIComponent(pid)}&token=${userStore.getAdminToken}` +}) const labelStyle = { width: '180px', maxWidth: '180px' } const contentStyle = { width: 'calc(50% - 180px)' } @@ -379,6 +394,26 @@ const statusName: string = data.orderStatus || '' const uiStatus = statusServerToUi[statusName] || 'INFO' + // 鏍规嵁浜у搧id鑾峰彇浜у搧淇℃伅锛屾洿鏂板ご閮ㄥ睍绀� + try { + if (data.productId) { + const detailRes: any = await productApi.getProductById({ id: data.productId }) + if (detailRes?.code === 200 && detailRes.data) { + // 鐢ㄤ骇鍝佽鎯呰ˉ鍏ㄥご淇℃伅 + data.productName = detailRes.data.name || data.productName + data.providerName = detailRes.data.submissionUnit || data.providerName + data.industry = detailRes.data.industrialChainName || data.industry + data.productDesc = detailRes.data.describe || data.productDesc + data.projectUnit = detailRes.data.importantAreaName || data.productDesc + data.productType = detailRes.data.typeName || data.productDesc + } + } + } catch (e) { + // 蹇界暐浜у搧璇︽儏澶辫触锛屼笉闃诲璁㈠崟璇︽儏 + } + + // 鑾峰彇鐢ㄦ埛淇℃伅 + // 鏄犲皠璁㈠崟璇︽儏澶撮儴淇℃伅 const head = { orderNo: data.orderId, @@ -430,6 +465,7 @@ cashTotal: cashTotalNum.toLocaleString(), records: [], nodes: [], + workflowId: data.workflowId || data.processinstId || '' }) // 鍒濆鍖栦氦鏄撲俊鎭娉ㄦ暟鎹� @@ -1006,6 +1042,10 @@ text-align: left !important; } +/* 澶栭儴瀹℃壒杞ㄨ抗 iframe 鏍峰紡 */ +.iframe-wrap { margin-top: 10px; } +.workflow-iframe { width: 100%; height: 500px; border: none; border-radius: 6px; } + /* 鏂囦欢鎿嶄綔鎸夐挳鏍峰紡 */ .file-actions { display: flex; -- Gitblit v1.8.0