zhang_12370
6 天以前 c6d13e58d85fbaaceb49d4c24401b50143050173
src/views/archiveManagement/mould/archiveDialog.vue
@@ -68,6 +68,7 @@
};
// 初始化表单数据的辅助函数
const initFormData = (rowData) => {
  console.log("rowData", rowData);
  if (rowData && rowData.id) {
    return copyFormData(rowData);
  }
@@ -97,9 +98,12 @@
  type: [{required: true, message: "请选择文档类型", trigger: "blur"}],
  status: [{required: true, message: "请选择文档状态", trigger: "blur"}],
};
const initTreeDataId = ref(null);
const fileUploadRef = ref(null);
const initForm = () => {
const initForm = (val) => {
  initTreeDataId.value = val.id || null; // 确保 initTreeDataId 初始化为 null
  ruleForm.value = {};
  ruleForm.value.treeId = val.id || null; // 确保 treeId 初始化为 null
  nextTick(() => {
    fileUploadRef.value.init();
  });
@@ -142,10 +146,6 @@
      });
      return;
    }
    // 发送 emit 事件
    // 关闭对话框
    ElMessage.success("操作成功");
    centerDialogVisible.value = false;
  } catch (error) {
    ElMessage({