zhangwei
2025-08-18 35cf8d289a09a6a4a34cf3d73fb41d84969ae4ee
src/views/system/dept/utils/hook.tsx
@@ -23,6 +23,7 @@
// import { useUserStoreHook } from "@/store/modules/user";
import type { PaginationProps } from "@pureadmin/table";
import pdfPreview from "../../component/pdfPreview.vue";
// const nowRole = computed(() => {
//   return useUserStoreHook().nowRole;
// });
@@ -285,10 +286,23 @@
    console.log(`current page: ${val}`);
  }
  function resetForm(formEl) {
    if (!formEl) return;
    formEl.resetFields();
    onSearch();
  function resetForm() {
    // if (!formEl) return;
    // formEl.resetFields();
    // onSearch();
    addDialog({
      title: `预览pdf`,
      props: {},
      width: "60%",
      draggable: true,
      fullscreen: deviceDetection(),
      fullscreenIcon: true,
      sureBtnLoading: true,
      closeOnClickModal: false,
      contentRenderer: () => h(pdfPreview, { ref: formRef, formInline: null })
      // jsx 语法 (注意在.vue文件启用jsx语法,需要在script开启lang="tsx")
    });
  }
  const checkboxAsRadio = data => {
    if (data.length > 1) {