张诺
3 天以前 c7afec3ad75b22bc8b96d8129956913c2b473d9b
src/views/archiveManagement/mould/archiveDialog.vue
@@ -36,11 +36,12 @@
      </el-row>
    </template>
    <fileUpload
    ref="fileUploadRef"
    :fileSize="1024"
    :fileType="['pdf', 'docx', 'txt', 'xlsx', 'pptx....']"
    :limit="10"
    v-model:modelValue="modelValue"
      ref="fileUploadRef"
      :fileSize="1024"
      :fileType="['pdf', 'docx', 'txt', 'xlsx', 'pptx....']"
      :limit="10"
      :drag="false"
      v-model:modelValue="modelValue"
    />
  </el-dialog>
</template>
@@ -98,16 +99,13 @@
};
const fileUploadRef = ref(null);
const initForm = () => {
  ruleForm.value = {}
  fileUploadRef.value.init()
  ruleForm.value = {};
  fileUploadRef.value.init();
};
const editForm = (val) => {
  ruleForm.value = copyForm.value;
  // fileUploadRef.value.editInit(ruleForm.value);
  nextTick(() => {
      // console.log("编辑表单数据:", fileUploadRef.value);
  fileUploadRef.value.editInit(val);
    fileUploadRef.value.editInit(val);
  });
};
defineExpose({
@@ -144,15 +142,17 @@
        type: "error",
        message: error.msg || "操作失败",
      });
      console.error("API 调用失败:", error);
      return;
    }
    // 发送 emit 事件
    // 关闭对话框
    centerDialogVisible.value = false;
  } catch (error) {
    console.error("表单验证失败或API调用失败:", error);
    ElMessage({
      type: "error",
      message: error.msg || "操作失败",
    });
  }
};
</script>