|
@@ -54,7 +54,7 @@
|
|
|
<ContentWrap v-if="selectedRows.length > 0"
|
|
|
style="margin: -10px 0px 10px; padding: 10px 15px; background: #f8fafc; border-radius: 4px; border: 1px solid #ebeef5;">
|
|
|
<div style="display: flex; align-items: center; flex-wrap: wrap; gap: 8px;">
|
|
|
- <div style="font-weight: bold; color: #606266; margin-right: 10px;">已选物料:</div>
|
|
|
+ <div style="font-weight: bold; color: #606266; margin-right: 10px;">已选路线设备:</div>
|
|
|
<el-tag
|
|
|
v-for="item in selectedRows"
|
|
|
:key="item.id"
|
|
@@ -152,7 +152,16 @@ const queryParams = reactive({
|
|
|
deviceCode: undefined,
|
|
|
routeName: undefined,
|
|
|
})
|
|
|
-
|
|
|
+// 处理单选逻辑
|
|
|
+const selectRow = (row) => {
|
|
|
+ const index = selectedRows.value.findIndex(item => item.id === row.id);
|
|
|
+ if (index > -1) {
|
|
|
+ selectedRows.value.splice(index, 1); // 取消选中
|
|
|
+ row.quantity = undefined;
|
|
|
+ } else {
|
|
|
+ selectedRows.value.push({ ...row }); // 选中
|
|
|
+ }
|
|
|
+};
|
|
|
// 新增:移除标签方法
|
|
|
const removeTag = (route) => {
|
|
|
// 从已选列表中移除
|