From ad268f7a3f6507086f8869d1f62415093d3fe710 Mon Sep 17 00:00:00 2001
From: fengyuan_yang <1976974459@qq.com>
Date: Sat, 11 Oct 2025 14:18:26 +0800
Subject: [PATCH] =?UTF-8?q?2025-10-11=20=E8=AE=A2=E5=8D=95=E6=8E=92?=
=?UTF-8?q?=E4=BA=A7-=E6=89=B9=E9=87=8F=E6=8E=92=E4=BA=A7=E7=9A=84?=
=?UTF-8?q?=E5=8F=AF=E7=94=A8=E6=9C=BA=E5=8F=B0=E4=BC=98=E5=8C=96?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.../schedule/order_schedule_expand.vue | 43 ++++++++++++++++---
1 file changed, 38 insertions(+), 5 deletions(-)
diff --git a/src/views/modules/schedule/order_schedule_expand.vue b/src/views/modules/schedule/order_schedule_expand.vue
index 2f7f167..4ff6edb 100644
--- a/src/views/modules/schedule/order_schedule_expand.vue
+++ b/src/views/modules/schedule/order_schedule_expand.vue
@@ -161,7 +161,7 @@
@@ -204,11 +204,21 @@
:show-overflow-tooltip="item.showOverflowTooltip"
:align="item.align"
:fixed="item.fixed==''?false:item.fixed"
- :width="item.columnWidth"
+ :min-width="item.columnWidth"
:label="item.columnLabel">
-
+
{{ scope.row[item.columnProp] }}
+
+
+
+
+
+
@@ -396,7 +406,7 @@ export default {
headerAlign: "center",
align: "center",
columnLabel: "机台",
- columnWidth: 100,
+ columnWidth: 150,
columnHidden: false,
columnImage: false,
columnSortable: true,
@@ -1330,7 +1340,30 @@ export default {
// 选中记录
handleSelectionChange(val) {
- this.dataListSelections = val
+ // 解析每个工单的可用机台字段
+ this.dataListSelections = val.map(item => {
+ // 解析availResource字段,格式如:ResourceID(ResourceDesc) ResourceID(ResourceDesc)
+ if (item.availResource && item.availResource.trim()) {
+ // 匹配所有 ResourceID(ResourceDesc) 格式的字符串
+ const regex = /(\S+)\(([^)]+)\)/g;
+ const matches = [];
+ let match;
+ while ((match = regex.exec(item.availResource)) !== null) {
+ matches.push({
+ resourceId: match[1],
+ resourceDesc: match[1] + '(' + match[2] + ')'
+ });
+ }
+ item.availResourceList = matches;
+ // 如果当前没有选中机台,默认选择第一个
+ if ((!item.resourceId || item.resourceId === '') && matches.length > 0) {
+ item.resourceId = matches[0].resourceId;
+ }
+ } else {
+ item.availResourceList = [];
+ }
+ return item;
+ });
},
/*刷新页面table*/