zhang_12370
6 天以前 18238d4e28b263e5b0d0b1ba48c29703b79f1078
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.value.id || null; // 确保 initTreeDataId 初始化为 null
  ruleForm.value = {};
  ruleForm.value.treeId = val.value.id || null; // 确保 treeId 初始化为 null
  nextTick(() => {
    fileUploadRef.value.init();
  });