diff --git a/src/views/dms/dmsBaseTransferInfo/index.vue b/src/views/dms/dmsBaseTransferInfo/index.vue
index f88f1ce..bbab924 100644
--- a/src/views/dms/dmsBaseTransferInfo/index.vue
+++ b/src/views/dms/dmsBaseTransferInfo/index.vue
@@ -104,8 +104,7 @@
-->
-
-
+
-
+
@@ -289,6 +288,7 @@ const handleSelectionChange = (selection: DmsBaseTransferInfoVO[]) => {
/** 新增按钮操作 */
const handleAdd = () => {
reset();
+ getMachineOptions();
dialog.visible = true;
dialog.title = "添加设备转移信息";
}
@@ -296,6 +296,7 @@ const handleAdd = () => {
/** 修改按钮操作 */
const handleUpdate = async (row?: DmsBaseTransferInfoVO) => {
reset();
+ getMachineOptions();
const _transferInfoId = row?.transferInfoId || ids.value[0]
const res = await getDmsBaseTransferInfo(_transferInfoId);
Object.assign(form.value, res.data);
@@ -337,14 +338,25 @@ const handleExport = () => {
}
// 获取设备下拉框数据
-let machineOptions = ref([]);
+let machineOptions = ref([]);
const getMachineOptions = async () => {
const res = await getDmsBaseMachineInfoList(null);
machineOptions.value = res.data;
}
+/** 设备选择变更处理 */
+const handleMachineChange = (machineId) => {
+ if (machineId) {
+ const selectedMachine = machineOptions.value.find(m => m.machineId === machineId);
+ if (selectedMachine) {
+ form.value.devicePosition = selectedMachine.machineLocation || '';
+ }
+ } else {
+ form.value.devicePosition = '';
+ }
+}
+
onMounted(() => {
- getMachineOptions();
getList();
});