From 6f3011dd56f545dcdbf56abf744e302ebc6e9c5e Mon Sep 17 00:00:00 2001
From: yuan <123@>
Date: 星期日, 21 六月 2026 17:43:25 +0800
Subject: [PATCH] feat: 添加生产驾驶舱路由跳转
---
src/views/reportAnalysis/PSIDataAnalysis/components/left-bottom.vue | 2
src/views/reportAnalysis/productionAnalysis/components/right-top.vue | 2
src/views/reportAnalysis/PSIDataAnalysis/components/left-top.vue | 2
src/views/reportAnalysis/productionAnalysis/components/left-bottom.vue | 2
src/views/reportAnalysis/productionAnalysis/components/PanelHeader.vue | 30 ++++++++++++++-
src/views/reportAnalysis/productionAnalysis/productionNavigation.js | 19 +++++++++
src/views/reportAnalysis/PSIDataAnalysis/psiNavigation.js | 4 +-
src/views/reportAnalysis/productionAnalysis/components/center-bottom.vue | 2
src/views/reportAnalysis/productionAnalysis/components/left-top.vue | 2
src/views/reportAnalysis/productionAnalysis/components/right-bottom.vue | 2
src/views/reportAnalysis/productionAnalysis/components/center-center.vue | 21 ++++++++++
src/views/reportAnalysis/productionAnalysis/components/center-top.vue | 22 +++++++++++
12 files changed, 98 insertions(+), 12 deletions(-)
diff --git a/src/views/reportAnalysis/PSIDataAnalysis/components/left-bottom.vue b/src/views/reportAnalysis/PSIDataAnalysis/components/left-bottom.vue
index ee5cd9f..aa27c0e 100644
--- a/src/views/reportAnalysis/PSIDataAnalysis/components/left-bottom.vue
+++ b/src/views/reportAnalysis/PSIDataAnalysis/components/left-bottom.vue
@@ -1,6 +1,6 @@
<template>
<div>
- <PanelHeader title="閲囪喘鍝佸垎甯�" to="/procurementManagement/paymentLedger" />
+ <PanelHeader title="閲囪喘鍝佸垎甯�" to="/procurementManagement/procurementLedger" />
<div class="main-panel panel-item-customers">
<CarouselCards :items="cardItems" :visible-count="3" />
<div class="pie-chart-wrapper" ref="pieWrapperRef">
diff --git a/src/views/reportAnalysis/PSIDataAnalysis/components/left-top.vue b/src/views/reportAnalysis/PSIDataAnalysis/components/left-top.vue
index b5574a1..cf2a234 100644
--- a/src/views/reportAnalysis/PSIDataAnalysis/components/left-top.vue
+++ b/src/views/reportAnalysis/PSIDataAnalysis/components/left-top.vue
@@ -1,6 +1,6 @@
<template>
<div>
- <PanelHeader title="閿�鍞搧鍒嗗竷" to="/salesManagement/receiptPaymentLedger" />
+ <PanelHeader title="閿�鍞搧鍒嗗竷" to="/salesManagement/salesLedger" />
<div class="main-panel panel-item-customers">
<CarouselCards :items="cardItems" :visible-count="3" />
<div class="pie-chart-wrapper" ref="pieWrapperRef">
diff --git a/src/views/reportAnalysis/PSIDataAnalysis/psiNavigation.js b/src/views/reportAnalysis/PSIDataAnalysis/psiNavigation.js
index 9a3a05d..425e666 100644
--- a/src/views/reportAnalysis/PSIDataAnalysis/psiNavigation.js
+++ b/src/views/reportAnalysis/PSIDataAnalysis/psiNavigation.js
@@ -1,6 +1,6 @@
export const PSI_ROUTE_MAP = {
- 閿�鍞搧鍒嗗竷: '/salesManagement/receiptPaymentLedger',
- 閲囪喘鍝佸垎甯�: '/procurementManagement/paymentLedger',
+ 閿�鍞搧鍒嗗竷: '/salesManagement/salesLedger',
+ 閲囪喘鍝佸垎甯�: '/procurementManagement/procurementLedger',
閿�鍞骇鍝佹暟: '/salesManagement/salesLedger',
閲囪喘浜у搧鏁�: '/procurementManagement/procurementLedger',
鍌ㄥ瓨浜у搧鏁�: '/inventoryManagement/stockManagement',
diff --git a/src/views/reportAnalysis/productionAnalysis/components/PanelHeader.vue b/src/views/reportAnalysis/productionAnalysis/components/PanelHeader.vue
index 313f1df..fad818d 100644
--- a/src/views/reportAnalysis/productionAnalysis/components/PanelHeader.vue
+++ b/src/views/reportAnalysis/productionAnalysis/components/PanelHeader.vue
@@ -1,17 +1,35 @@
<template>
- <div class="panel-header">
+ <div
+ class="panel-header"
+ :class="{ clickable: !!to }"
+ @click="handleClick"
+ >
<span class="panel-title">{{ title }}</span>
</div>
</template>
<script setup>
-defineProps({
+import { useRouter } from 'vue-router'
+
+const props = defineProps({
title: {
type: String,
required: true,
default: ''
+ },
+ to: {
+ type: String,
+ default: ''
}
})
+
+const router = useRouter()
+
+const handleClick = () => {
+ if (props.to) {
+ router.push(props.to)
+ }
+}
</script>
<style scoped>
@@ -30,4 +48,12 @@
padding-left: 46px;
line-height: 36px;
}
+
+.panel-header.clickable {
+ cursor: pointer;
+}
+
+.panel-header.clickable:hover .panel-title {
+ color: #43e8fc;
+}
</style>
diff --git a/src/views/reportAnalysis/productionAnalysis/components/center-bottom.vue b/src/views/reportAnalysis/productionAnalysis/components/center-bottom.vue
index f4f4024..ce746c7 100644
--- a/src/views/reportAnalysis/productionAnalysis/components/center-bottom.vue
+++ b/src/views/reportAnalysis/productionAnalysis/components/center-bottom.vue
@@ -1,6 +1,6 @@
<template>
<div>
- <PanelHeader title="鐢熶骇璁㈠崟瀹屾垚杩涘害" />
+ <PanelHeader title="鐢熶骇璁㈠崟瀹屾垚杩涘害" to="/productionManagement/productionOrder" />
<div class="main-panel">
<div class="panel-item-customers">
<CarouselCards :items="cardItems" :visible-count="4" />
diff --git a/src/views/reportAnalysis/productionAnalysis/components/center-center.vue b/src/views/reportAnalysis/productionAnalysis/components/center-center.vue
index 7221b47..c56a4f8 100644
--- a/src/views/reportAnalysis/productionAnalysis/components/center-center.vue
+++ b/src/views/reportAnalysis/productionAnalysis/components/center-center.vue
@@ -2,7 +2,7 @@
<div>
<!-- 璁惧缁熻 -->
<div class="equipment-stats">
- <div class="equipment-header">
+ <div class="equipment-header clickable" @click="handleNavigate">
<img
src="@/assets/BI/shujutongjiicon@2x.png"
alt="鍥炬爣"
@@ -32,10 +32,21 @@
<script setup>
import { ref, onMounted, inject, watch, nextTick } from 'vue'
+import { useRouter } from 'vue-router'
import * as echarts from 'echarts'
import Echarts from '@/components/Echarts/echarts.vue'
import { inputOutputAnalysis } from '@/api/viewIndex.js'
import DateTypeSwitch from "@/views/reportAnalysis/productionAnalysis/components/DateTypeSwitch.vue";
+import { getProductionRoute } from '../productionNavigation.js'
+
+const router = useRouter()
+
+const handleNavigate = () => {
+ const path = getProductionRoute('鎶曞叆浜у嚭鍒嗘瀽')
+ if (path) {
+ router.push(path)
+ }
+}
const dateType = ref(3) // 1=鍛� 2=鏈� 3=瀛e害
const chartRef = ref(null)
@@ -204,6 +215,14 @@
padding-bottom: 2px;
}
+.equipment-header.clickable {
+ cursor: pointer;
+}
+
+.equipment-header.clickable:hover .equipment-title {
+ opacity: 0.85;
+}
+
.equipment-title {
font-weight: 500;
font-size: 18px;
diff --git a/src/views/reportAnalysis/productionAnalysis/components/center-top.vue b/src/views/reportAnalysis/productionAnalysis/components/center-top.vue
index a806150..7a3deef 100644
--- a/src/views/reportAnalysis/productionAnalysis/components/center-top.vue
+++ b/src/views/reportAnalysis/productionAnalysis/components/center-top.vue
@@ -6,6 +6,8 @@
v-for="item in statItems"
:key="item.name"
class="stat-card"
+ :class="{ clickable: !!getStatRoute(item.name) }"
+ @click="handleStatClick(item.name)"
>
<img src="@/assets/BI/icon@2x.png" alt="鍥炬爣" class="card-icon" />
<div class="card-content">
@@ -25,9 +27,21 @@
<script setup>
import { ref, onMounted, inject, watch } from 'vue'
+import { useRouter } from 'vue-router'
import { orderCount } from '@/api/viewIndex.js'
+import { getProductionRoute } from '../productionNavigation.js'
+const router = useRouter()
const statItems = ref([])
+
+const getStatRoute = (name) => getProductionRoute(name)
+
+const handleStatClick = (name) => {
+ const path = getStatRoute(name)
+ if (path) {
+ router.push(path)
+ }
+}
const formatPercent = (val) => {
const num = Number(val) || 0
@@ -81,6 +95,14 @@
height: 142px;
}
+.stat-card.clickable {
+ cursor: pointer;
+}
+
+.stat-card.clickable:hover .card-label {
+ color: #43e8fc;
+}
+
.card-icon {
width: 100px;
height: 100px;
diff --git a/src/views/reportAnalysis/productionAnalysis/components/left-bottom.vue b/src/views/reportAnalysis/productionAnalysis/components/left-bottom.vue
index b7c7358..e6e8189 100644
--- a/src/views/reportAnalysis/productionAnalysis/components/left-bottom.vue
+++ b/src/views/reportAnalysis/productionAnalysis/components/left-bottom.vue
@@ -1,6 +1,6 @@
<template>
<div>
- <PanelHeader title="鍦ㄥ埗鍝佺粺璁″垎鏋�" />
+ <PanelHeader title="鍦ㄥ埗鍝佺粺璁″垎鏋�" to="/productionManagement/productionOrder" />
<div class="main-panel panel-item-customers">
<CarouselCards :items="cardItems" :visible-count="3" />
<div class="chart-wrapper">
diff --git a/src/views/reportAnalysis/productionAnalysis/components/left-top.vue b/src/views/reportAnalysis/productionAnalysis/components/left-top.vue
index 37c82f0..8b25973 100644
--- a/src/views/reportAnalysis/productionAnalysis/components/left-top.vue
+++ b/src/views/reportAnalysis/productionAnalysis/components/left-top.vue
@@ -1,6 +1,6 @@
<template>
<div>
- <PanelHeader title="宸ュ簭浜у嚭鍒嗘瀽" />
+ <PanelHeader title="宸ュ簭浜у嚭鍒嗘瀽" to="/productionManagement/processStatistics" />
<div class="main-panel panel-item-customers">
<div class="filters-row">
<DateTypeSwitch v-model="dateType" @change="handleDateTypeChange" />
diff --git a/src/views/reportAnalysis/productionAnalysis/components/right-bottom.vue b/src/views/reportAnalysis/productionAnalysis/components/right-bottom.vue
index c3d3db3..33c5c20 100644
--- a/src/views/reportAnalysis/productionAnalysis/components/right-bottom.vue
+++ b/src/views/reportAnalysis/productionAnalysis/components/right-bottom.vue
@@ -1,6 +1,6 @@
<template>
<div>
- <PanelHeader title="鐢熶骇鏍哥畻鍒嗘瀽" />
+ <PanelHeader title="鐢熶骇鏍哥畻鍒嗘瀽" to="/productionManagement/productionCosting" />
<div class="main-panel panel-item-customers">
<div class="filters-row">
<DateTypeSwitch v-model="dateType" @change="handleDateTypeChange" />
diff --git a/src/views/reportAnalysis/productionAnalysis/components/right-top.vue b/src/views/reportAnalysis/productionAnalysis/components/right-top.vue
index 5ac7035..8e6ffef 100644
--- a/src/views/reportAnalysis/productionAnalysis/components/right-top.vue
+++ b/src/views/reportAnalysis/productionAnalysis/components/right-top.vue
@@ -1,6 +1,6 @@
<template>
<div>
- <PanelHeader title="宸ュ崟鎵ц鏁堢巼鍒嗘瀽" />
+ <PanelHeader title="宸ュ崟鎵ц鏁堢巼鍒嗘瀽" to="/productionManagement/productionManagement/workOrderEdit/index" />
<div class="main-panel panel-item-customers">
<div class="filters-row">
<DateTypeSwitch v-model="dateType" @change="handleDateTypeChange" />
diff --git a/src/views/reportAnalysis/productionAnalysis/productionNavigation.js b/src/views/reportAnalysis/productionAnalysis/productionNavigation.js
new file mode 100644
index 0000000..38b45e8
--- /dev/null
+++ b/src/views/reportAnalysis/productionAnalysis/productionNavigation.js
@@ -0,0 +1,19 @@
+const PRODUCTION_ORDER_ROUTE = '/productionManagement/productionOrder'
+
+export const PRODUCTION_ROUTE_MAP = {
+ 宸ュ簭浜у嚭鍒嗘瀽: '/productionManagement/processStatistics',
+ 鍦ㄥ埗鍝佺粺璁″垎鏋�: PRODUCTION_ORDER_ROUTE,
+ 鐢熶骇璁㈠崟鏁�: PRODUCTION_ORDER_ROUTE,
+ 宸插畬鎴愯鍗曟暟: PRODUCTION_ORDER_ROUTE,
+ 寰呯敓浜ц鍗�: PRODUCTION_ORDER_ROUTE,
+ 寰呯敓浜ц鍗曟暟: PRODUCTION_ORDER_ROUTE,
+ 鐢熶骇璁㈠崟瀹屾垚杩涘害: PRODUCTION_ORDER_ROUTE,
+ 鐢熶骇璁㈠崟瀹屾垚杩涘害鏁�: PRODUCTION_ORDER_ROUTE,
+ 鎶曞叆浜у嚭鍒嗘瀽: '/productionManagement/productionReporting',
+ 宸ュ崟鎵ц鏁堢巼鍒嗘瀽: '/productionManagement/productionManagement/workOrderEdit/index',
+ 鐢熶骇鏍哥畻鍒嗘瀽: '/productionManagement/productionCosting',
+}
+
+export function getProductionRoute(name) {
+ return PRODUCTION_ROUTE_MAP[name] || ''
+}
--
Gitblit v1.9.3