From 3e25627ae9d56d22b2a9bb27cd57d4cd02296c4a Mon Sep 17 00:00:00 2001
From: yyb <995253665@qq.com>
Date: 星期三, 29 四月 2026 16:25:12 +0800
Subject: [PATCH] 更新工序选择弹窗标题,使用字典数据源替代静态列表,并调整相关逻辑以支持新字段名
---
src/views/index.vue | 27 ++++++++++++++-------------
1 files changed, 14 insertions(+), 13 deletions(-)
diff --git a/src/views/index.vue b/src/views/index.vue
index dd903ca..028dbf3 100644
--- a/src/views/index.vue
+++ b/src/views/index.vue
@@ -152,7 +152,7 @@
</div>
<!-- 宸ュ簭閫夋嫨寮圭獥 -->
- <el-dialog v-model="processDialogVisible" title="閫夋嫨宸ュ簭" width="500px" append-to-body>
+ <el-dialog v-model="processDialogVisible" title="閫夋嫨閮ㄤ欢" width="500px" append-to-body>
<div class="process-selection-wrapper">
<el-checkbox-group v-model="tempProcessIds">
<div class="process-grid">
@@ -246,7 +246,7 @@
</template>
<script setup>
-import { ref, onMounted, computed, reactive } from 'vue'
+import { ref, onMounted, computed, reactive, getCurrentInstance } from 'vue'
import Echarts from "@/components/Echarts/echarts.vue";
import * as echarts from 'echarts';
import useUserStore from "@/store/modules/user.js";
@@ -258,12 +258,21 @@
statisticsReceivablePayable,
qualityInspectionStatistics
} from "@/api/viewIndex.js";
-import { list } from '@/api/productionManagement/productionProcess';
const userStore = useUserStore()
-const processOptions = ref([])
+const { proxy } = getCurrentInstance()
+const { product_process_type } = proxy.useDict('product_process_type')
+
+// 宸ュ簭閫夋嫨寮圭獥锛氫娇鐢ㄥ瓧鍏� product_process_type
+// 瀛楀吀瀛楁锛歭abel / value锛岀粍浠舵湡鏈涘瓧娈碉細name / id
+const processOptions = computed(() => {
+ return (product_process_type?.value || []).map(item => ({
+ id: item.value,
+ name: item.label
+ }))
+})
const selectedProcessIds = ref([])
const tempProcessIds = ref([])
const processDialogVisible = ref(false)
@@ -450,7 +459,6 @@
statisticsReceivable()
qualityStatisticsInfo()
getAmountHalfYearNum()
- getProcessList()
})
// 鏁版嵁缁熻
const getBusinessData = () => {
@@ -477,13 +485,6 @@
todoList.value = res.data
})
}
-// 鑾峰彇宸ュ簭鍒楄〃
-const getProcessList = () => {
- list().then(res => {
- processOptions.value = res.data
- })
-}
-
const openProcessDialog = () => {
tempProcessIds.value = [...selectedProcessIds.value]
processDialogVisible.value = true
@@ -703,7 +704,7 @@
const refreshProcessStats = () => {
processDataProductionStatistics({
type: processRange.value,
- processIds: selectedProcessIds.value.length > 0 ? selectedProcessIds.value.join(',') : null
+ processTypes: selectedProcessIds.value.length > 0 ? selectedProcessIds.value.join(',') : null
}).then(res => {
processChartData.value = res.data.map(item => ({
name: item.processName,
--
Gitblit v1.9.3