zy-react-library 1.1.7 → 1.1.9
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/components/Pdf/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{useFullscreen as e}from"ahooks";import{Modal as r,Button as o,Spin as i,message as n}from"antd";import{useState as t,useRef as l}from"react";import{pdfjs as a,Document as d,Page as s}from"react-pdf";import c from"../../hooks/useDownloadFile/index.js";import{getFileUrl as p}from"../../utils/index.js";import"react-pdf/dist/Page/AnnotationLayer.css";import"react-pdf/dist/Page/TextLayer.css";import"./index.less";import{
|
|
1
|
+
import{useFullscreen as e}from"ahooks";import{Modal as r,Button as o,Spin as i,message as n}from"antd";import{useState as t,useRef as l}from"react";import{pdfjs as a,Document as d,Page as s}from"react-pdf";import c from"../../hooks/useDownloadFile/index.js";import{getFileUrl as p}from"../../utils/index.js";import"react-pdf/dist/Page/AnnotationLayer.css";import"react-pdf/dist/Page/TextLayer.css";import"./index.less";import{jsx as m,Fragment as f}from"react/jsx-runtime";function h(h){const{visible:u=!1,onCancel:x,file:g,name:v,inline:y=!1,title:w="PDF预览",style:k={}}=h,C=p(),[j,F]=t(0),[P,b]=t(600),L=l(null),[S,{enterFullscreen:D,exitFullscreen:A}]=e(L),{downloadFile:N}=c();a.GlobalWorkerOptions.workerSrc=`//unpkg.com/pdfjs-dist@${a.version}/build/pdf.worker.min.mjs`;const W=({numPages:e})=>{F(e)},$=()=>{n.error("加载 PDF 文件失败"),x&&x()},z=({width:e})=>{b(e)},B=()=>m(f,{children:m("div",{style:{height:S?"calc(100vh - 40px - 24px - 8px - 32px - 12px)":"72vh",overflowY:"auto",padding:"24px",...k},children:m(d,{file:g.includes(C)?g:C+g,onLoadSuccess:W,onLoadError:$,loading:m("div",{style:{display:"flex",justifyContent:"center",alignItems:"center",height:"65vh"},children:m(i,{size:"large"})}),children:Array.from({length:j}).map((e,r)=>m(s,{pageNumber:r+1,onLoadSuccess:z},`page_${r+1}`))})})});return y?B():m("div",{ref:L,children:m(r,{style:{top:S?0:100,maxWidth:S?"100vw":"calc(100vw - 32px)",paddingBottom:S?0:24},open:u,maskClosable:!1,width:S?"100vw":P+100,title:w,onCancel:()=>{S&&A(),x()},getContainer:!1,footer:[m(o,{onClick:()=>{S&&A(),x()},children:"关闭"},"cancel"),m(o,{onClick:()=>{S?A():D()},children:S?"退出全屏":"全屏"},"fullScreen"),m(o,{type:"primary",onClick:()=>{S&&A(),N({url:g,name:v})},children:"下载"},"download")],children:B()})})}h.displayName="Pdf";export{h as default};
|
package/enum/hidden/gwj/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const a=[{bianma:"1",name:"隐患快报"},{bianma:"2",name:"清单排查"},{bianma:"4",name:"安全环保检查(监管端)"},{bianma:"5",name:"安全环保检查(企业端)"},{bianma:"6",name:"消防检查"}],n=[{bianma:"100",name:"待确认"},{bianma:"200",name:"待整改"},{bianma:"201",name:"确认打回"},{bianma:"202",name:"特殊处置"},{bianma:"300",name:"已整改"},{bianma:"301",name:"已验收"},{bianma:"302",name:"验收打回"},{bianma:"400",name:"归档"},{bianma:"99",name:"关闭"},{bianma:"98",name:"安全环保检查/清单排查暂存"},{bianma:"102",name:"安全环保检查,隐患带指派"},{bianma:"97",name:"已过期"},{bianma:"101",name:"
|
|
1
|
+
const a=[{bianma:"1",name:"隐患快报"},{bianma:"2",name:"清单排查"},{bianma:"4",name:"安全环保检查(监管端)"},{bianma:"5",name:"安全环保检查(企业端)"},{bianma:"6",name:"消防检查"}],n=[{bianma:"100",name:"待确认"},{bianma:"200",name:"待整改"},{bianma:"201",name:"确认打回"},{bianma:"202",name:"特殊处置"},{bianma:"300",name:"已整改"},{bianma:"301",name:"已验收"},{bianma:"302",name:"验收打回"},{bianma:"400",name:"归档"},{bianma:"99",name:"关闭"},{bianma:"98",name:"安全环保检查/清单排查暂存"},{bianma:"102",name:"安全环保检查,隐患带指派"},{bianma:"97",name:"已过期"},{bianma:"101",name:"已忽略"}],m=[{bianma:1,name:"立即整改"},{bianma:2,name:"限期整改"}];export{m as HIDDEN_RECTIFICATION_TYPE_ENUM,a as HIDDEN_SOURCE_ENUM,n as HIDDEN_STATE_ENUM};
|