zy-react-library 1.1.12 → 1.1.14
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.
|
@@ -1 +1 @@
|
|
|
1
|
-
import{request as e}from"@cqsjjb/jjb-common-lib/http";import{Spin as i,Divider as d,Descriptions as l,Space as n,Button as t}from"antd";import r from"dayjs";import{useState as a,useEffect as c}from"react";import{HIDDEN_SOURCE_ENUM as s,HIDDEN_STATE_ENUM as h,HIDDEN_RECTIFICATION_TYPE_ENUM as o}from"../../../enum/hidden/gwj/index.js";import{UPLOAD_FILE_TYPE_ENUM as m}from"../../../enum/uploadFile/gwj/index.js";import p from"../../../hooks/useDownloadFile/index.js";import f from"../../../hooks/useGetFile/index.js";import b from"../../../hooks/useGetUrlQuery/index.js";import{getLabelName as C,getFileSuffix as O,getFileName as u}from"../../../utils/index.js";import y from"../../Icon/VideoIcon/index.js";import U from"../../PreviewImg/index.js";import g from"../../PreviewPdf/index.js";import N from"../../Video/index.js";import{jsxs as k,jsx as j,Fragment as T}from"react/jsx-runtime";function F(F){const{id:S="",idKey:R="id",hiddenId:I="",hiddenIdKey:A="hiddenId",history:L=!1,onGetData:w}=F,[D,q]=a({hiddenUserPresetsCO:{},hiddenRectifyUserCO:[],hiddenConfirmUserCO:[],hiddenAcceptUserCO:[],hiddenAcceptQualifiedUserCO:[],hiddenAcceptUnqualifiedUserCO:[],hiddenInspecCO:{},hiddenSpecialList:[],hiddenExtensionList:[]}),[x,P]=a([]),[v,Q]=a([]),[K,M]=a([]),[Y,$]=a([]),[E,G]=a([]),[H,z]=a([]),[B,V]=a(!0),[J,W]=a(!1),{getFile:X}=f(),Z=b(),{loading:_,downloadFile:ee}=p();return c(()=>{(async()=>{e(L?`/hidden/hidden/history/${S||Z[R]}`:`/hidden/hidden/${S||Z[R]}`,"get").then(e=>{if(e.data.hiddenAcceptQualifiedUserCO=[],e.data.hiddenAcceptUnqualifiedUserCO=[],e.data.hiddenAcceptUserCO&&e.data.hiddenAcceptUserCO.length>0)for(let i=0;i<e.data.hiddenAcceptUserCO.length;i++)1===e.data.hiddenAcceptUserCO[i].status?e.data.hiddenAcceptQualifiedUserCO.push(e.data.hiddenAcceptUserCO[i]):e.data.hiddenAcceptUnqualifiedUserCO.push(e.data.hiddenAcceptUserCO[i]);q(e.data),(async e=>{const i=await X({eqType:m[3],eqForeignKey:I||Z[A]});P(i);const d=await X({eqType:m[102],eqForeignKey:I||Z[A]});if(Q(d),e.hiddenRectifyUserCO&&e.hiddenRectifyUserCO.length>0)for(let i=0;i<e.hiddenRectifyUserCO.length;i++){if(e.hiddenRectifyUserCO[i].hiddenUserId){const d=await X({eqType:m[4],eqForeignKey:e.hiddenRectifyUserCO[i].hiddenUserId});M(e=>[...e,d])}if(1===e.hiddenRectifyUserCO[i].isRectificationScheme&&e.hiddenRectifyUserCO[i].hiddenSchemeCO&&Object.keys(e.hiddenRectifyUserCO[i].hiddenSchemeCO).length>0&&e.hiddenRectifyUserCO[i].hiddenSchemeCO.hiddenSchemeId){const d=await X({eqType:m[8],eqForeignKey:e.hiddenRectifyUserCO[i].hiddenSchemeCO.hiddenSchemeId});$(e=>[...e,d])}}if(e.hiddenAcceptQualifiedUserCO&&e.hiddenAcceptQualifiedUserCO.length>0)for(let i=0;i<e.hiddenAcceptQualifiedUserCO.length;i++)if(e.hiddenAcceptQualifiedUserCO[i].hiddenUserId){const d=await X({eqType:m[5],eqForeignKey:e.hiddenAcceptQualifiedUserCO[i].hiddenUserId});G(e=>[...e,d])}if(e.hiddenInspecCO&&Object.keys(e.hiddenInspecCO).length>0){const e=await X({eqType:m[146],eqForeignKey:I||Z[A]});z(e)}})(e.data),V(!1),w?.(e.data)})})()},[F.id,F.hiddenId]),k("div",{children:[k(i,{spinning:B||_,children:[j(d,{orientation:"left",children:"隐患信息"}),j(l,{bordered:!0,column:1,styles:{label:{width:200}},items:[{label:"隐患来源",children:C({list:s,status:D.source})},{label:"隐患类型",children:D.hiddenTypeName},{label:"隐患级别",children:D.hiddenLevelName},{label:"隐患状态",children:C({list:h,status:D.state})},{label:"隐患描述",children:D.hiddenDesc},...D.hiddenPartName?[{label:"隐患部位",children:D.hiddenPartName}]:[],...(2===D.source||3===D.source)&&D.hiddenCheckListCO&&Object.keys(D.hiddenCheckListCO).length>0?[{label:"风险点(单元)",children:D.hiddenCheckListCO.listRiskPoints},{label:"辨识部位",children:D.hiddenCheckListCO.identifiedLocations},{label:"存在风险",children:D.hiddenCheckListCO.existingRisks},{label:"风险分级",children:D.hiddenCheckListCO.riskLevel},{label:"隐患清单",children:D.hiddenCheckListCO.listName},{label:"检查内容",children:D.hiddenCheckListCO.inspectionContent}]:[],...D.longitude?[{label:"隐患上报位置(经纬度)",children:[D.longitude&&`经度:${D.longitude}`,D.latitude&&`纬度:${D.latitude}`].filter(Boolean).join(" ")}]:[],...D.positionDesc?[{label:"隐患位置描述",children:D.positionDesc}]:[],{label:"隐患发现人",children:D.creatorName},{label:"隐患发现时间",children:r(D.hiddenFindTime).format("YYYY-MM-DD HH:mm:ss")},{label:"整改类型",children:C({list:o,status:D.rectificationType})},{label:"是否相关方",children:C({list:[{bianma:"1",name:"是"},{bianma:"0",name:"否"}],status:D.isRelated})},...1===D.isRelated?[{label:"相关方项目",children:D.projectName}]:[],{label:"隐患图片",children:j(U,{files:x})},...v.length>0?[{label:"隐患视频",children:j(y,{onClick:()=>{W(!0)}})}]:[]]}),D.hiddenUserPresetsCO&&Object.keys(D.hiddenUserPresetsCO).length>0&&k(T,{children:[j(d,{orientation:"left",children:"整改信息(发现人预填)"}),j(l,{bordered:!0,column:1,styles:{label:{width:200}},items:[{label:"整改"+(1===D.isRelated?"单位":"部门"),children:D.hiddenUserPresetsCO.rectifyDeptName},{label:"整改人",children:D.hiddenUserPresetsCO.rectifyUserName},...2===D.rectificationType?[{label:"整改期限",children:D.hiddenUserPresetsCO.rectifyDeadline?r(D.hiddenUserPresetsCO.rectifyDeadline).format("YYYY-MM-DD"):""}]:[],...1===D.rectificationType?[{label:"验收部门",children:D.hiddenUserPresetsCO.checkDeptName},{label:"验收人",children:D.hiddenUserPresetsCO.checkUserName}]:[]]})]}),D.hiddenConfirmUserCO&&D.hiddenConfirmUserCO.length>0&&k(T,{children:[j(d,{orientation:"left",children:"隐患确认"}),D.hiddenConfirmUserCO.map(e=>j(l,{bordered:!0,column:1,styles:{label:{width:200}},items:[...e.hiddenLevelName?[{label:"隐患级别",children:e.hiddenLevelName}]:[],...e.userName?[{label:"隐患确认人",children:e.userName}]:[],...e.rectificationTime?[{label:"隐患确认时间",children:e.rectificationTime}]:[],...e.rectifyDeptName?[{label:"整改"+(1===D.isRelated?"单位":"部门"),children:e.rectifyDeptName}]:[],...e.rectifyUserName?[{label:"整改人",children:e.rectifyUserName}]:[],...e.rectificationDeadline?[{label:"整改完成期限",children:e.rectificationDeadline}]:[],...e.checkDeptName?[{label:"验收部门",children:e.checkDeptName}]:[],...e.checkUserName?[{label:"验收人",children:e.checkUserName}]:[],...e.repulseCause?[...e.repulseCause?[{label:"打回意见",children:e.repulseCause}]:[],...e.rectificationTime?[{label:"打回时间",children:e.rectificationTime}]:[]]:[]]},e.id))]}),D.hiddenExtensionList&&D.hiddenExtensionList.length>0&&k(T,{children:[j(d,{orientation:"left",children:"延期信息"}),D.hiddenExtensionList.map(e=>j(l,{bordered:!0,column:1,styles:{label:{width:200}},items:[...e.createTime?[{label:"申请延期日期",children:e.createTime}]:[],...e.delayTime?[{label:"延期日期",children:e.delayTime}]:[],...e.updateName?[{label:"审核人",children:e.updateName}]:[],...e.disposalPlan?[{label:"处置方案",children:e.disposalPlan}]:[],...e.disposalFile?[{label:"处置方案附件",children:"pdf"===O(e.disposalFile)?j(g,{name:u(e.disposalFile),url:e.disposalFile}):k(n,{children:[j("span",{children:u(e.disposalFile)}),j(t,{type:"primary",size:"small",onClick:()=>ee(e.disposalFile),children:"下载"})]})}]:[],{label:"延期审核状态",children:k(T,{children:[1===e.state&&j("span",{children:"待审核"}),2===e.state&&j("span",{children:"审批中"}),3===e.state&&j("span",{children:"已通过"}),4===e.state&&j("span",{children:"已拒绝"}),5===e.state&&j("span",{children:"已撤回"})]})},...3===e.state||4===e.state?[{label:"延期审核时间",children:e.updateTime}]:[]]},e.id))]}),D.hiddenSpecialList&&D.hiddenSpecialList.length>0&&k(T,{children:[j(d,{orientation:"left",children:"特殊处置审核信息"}),D.hiddenSpecialList.map(e=>j(l,{bordered:!0,column:1,styles:{label:{width:200}},items:[...3===e.state||4===e.state?[...e.updateName?[{label:"审核人",children:e.updateName}]:[],...e.updateTime?[{label:"审核时间",children:e.updateTime}]:[]]:[],{label:"无法整改原因",children:e.examine},...3===e.state?[...e.disposalPlan?[{label:"处置方案",children:e.disposalPlan}]:[],...e.disposalFile?[{label:"处置方案附件",children:"pdf"===O(e.disposalFile)?j(g,{name:u(e.disposalFile),url:e.disposalFile}):k(n,{children:[j("span",{children:u(e.disposalFile)}),j(t,{type:"primary",size:"small",onClick:()=>ee(e.disposalFile),children:"下载"})]})}]:[],{label:"是否更换整改负责人",children:e.rectifyUserCO&&Object.keys(e.rectifyUserCO).length>0?"是":"否"},...e.rectifyUserCO&&Object.keys(e.rectifyUserCO).length>0?[{label:"整改负责人",children:e.rectifyUserCO.userName}]:[]]:[],{label:"特殊处置审核状态",children:k(T,{children:[1===e.state&&j("span",{children:"待审核"}),2===e.state&&j("span",{children:"审批中"}),3===e.state&&j("span",{children:"已通过"}),4===e.state&&j("span",{children:"已拒绝"}),5===e.state&&j("span",{children:"已撤回"})]})}]},e.id))]}),D.hiddenRectifyUserCO&&D.hiddenRectifyUserCO.length>0&&k(T,{children:[j(d,{orientation:"left",children:"整改信息"}),D.hiddenRectifyUserCO.map((e,i)=>j(l,{bordered:!0,column:1,styles:{label:{width:200}},items:[...e.deptName?[{label:"整改"+(1===D.isRelated?"单位":"部门"),children:e.deptName}]:[],...e.userName?[{label:"整改人",children:e.userName}]:[],...e.rectificationTime?[{label:"整改时间",children:e.rectificationTime}]:[],...e.descr?[{label:"整改描述",children:e.descr}]:[],...e.investmentFunds?[{label:"投入资金",children:`${e.investmentFunds}元`}]:[],...D.tempSafeMeasure?[{label:"临时安全措施",children:D.tempSafeMeasure}]:[],{label:"整改后图片",children:j(U,{files:K[i]})},{label:"整改方案",children:k(T,{children:[0===e.isRectificationScheme&&j("span",{children:"无"}),1===e.isRectificationScheme&&j("span",{children:"有"})]})},...1===e.isRectificationScheme&&e.hiddenSchemeCO&&Object.keys(e.hiddenSchemeCO).length>0?[{label:"治理标准",children:e.hiddenSchemeCO.governStanDards},{label:"治理方法",children:e.hiddenSchemeCO.governMethod},{label:"经费落实",children:e.hiddenSchemeCO.expenditure},{label:"负责人员",children:e.hiddenSchemeCO.principal},{label:"工时安排",children:e.hiddenSchemeCO.programming},{label:"时限要求",children:e.hiddenSchemeCO.timeLimitFor},{label:"工作要求",children:e.hiddenSchemeCO.jobRequireMent},{label:"其他事项",children:e.hiddenSchemeCO.otherBusiness},{label:"方案图片",children:j(U,{files:Y[i]})}]:[]]},e.id))]}),D.hiddenAcceptQualifiedUserCO.length>0?k(T,{children:[j(d,{orientation:"left",children:"验收信息"}),D.hiddenAcceptQualifiedUserCO.map((e,i)=>j(l,{bordered:!0,column:1,styles:{label:{width:200}},items:[{label:"验收部门",children:e.deptName},{label:"验收人",children:e.userName},{label:"验收时间",children:e.rectificationTime},...e.repulseCause?[{label:"验收打回意见",children:e.repulseCause}]:[],{label:"是否合格",children:e.rectificationTime?"合格":""},...e.descr?[{label:"验收描述",children:e.descr}]:[],...E[i]&&E[i].length>0?[{label:"验收图片",children:j(U,{files:E[i]})}]:[]]},e.id))]}):null,D.hiddenAcceptUnqualifiedUserCO.length>0?k(T,{children:[j(d,{orientation:"left",children:"验收打回信息"}),D.hiddenAcceptUnqualifiedUserCO.map(e=>j(l,{bordered:!0,column:1,styles:{label:{width:200}},items:[{label:"验收部门",children:e.deptName},{label:"验收人",children:e.userName},{label:"验收时间",children:e.rectificationTime},{label:"验收打回意见",children:e.repulseCause}]},e.id))]}):null,D.hiddenInspecCO&&Object.keys(D.hiddenInspecCO).length>0?k(T,{children:[j(d,{orientation:"left",children:"安全环保验收信息"}),j(l,{bordered:!0,column:1,styles:{label:{width:200}},items:[{label:"验收人",children:D.hiddenInspecCO.finalCheckOr},{label:"验收时间",children:D.hiddenInspecCO.finalCheckTime},{label:"是否合格",children:1===D.hiddenInspecCO.finalCheck?"合格":"不合格"},{label:"验收描述",children:D.hiddenInspecCO.finalCheckDesc},{label:"验收图片",children:j(U,{files:H})}]})]}):null]}),J&&j(N,{visible:J,source:v[0].url,onCancel:()=>W(!1),title:"隐患视频"})]})}F.displayName="HiddenInfo";export{F as default};
|
|
1
|
+
import{request as e}from"@cqsjjb/jjb-common-lib/http";import{Spin as i,Divider as d,Descriptions as l,Space as n,Button as t}from"antd";import r from"dayjs";import{useState as a,useEffect as c}from"react";import{HIDDEN_SOURCE_ENUM as s,HIDDEN_STATE_ENUM as h,HIDDEN_RECTIFICATION_TYPE_ENUM as o}from"../../../enum/hidden/gwj/index.js";import{UPLOAD_FILE_TYPE_ENUM as m}from"../../../enum/uploadFile/gwj/index.js";import p from"../../../hooks/useDownloadFile/index.js";import f from"../../../hooks/useGetFile/index.js";import b from"../../../hooks/useGetUrlQuery/index.js";import{getLabelName as C,getFileSuffix as O,getFileName as u}from"../../../utils/index.js";import y from"../../Icon/VideoIcon/index.js";import U from"../../PreviewImg/index.js";import g from"../../PreviewPdf/index.js";import N from"../../Video/index.js";import{jsxs as k,jsx as j,Fragment as T}from"react/jsx-runtime";function F(F){const{id:S="",idKey:R="id",hiddenId:I="",hiddenIdKey:A="hiddenId",history:L=!1,onGetData:w}=F,[D,q]=a({hiddenUserPresetsCO:{},hiddenRectifyUserCO:[],hiddenConfirmUserCO:[],hiddenAcceptUserCO:[],hiddenAcceptQualifiedUserCO:[],hiddenAcceptUnqualifiedUserCO:[],hiddenInspecCO:{},hiddenSpecialList:[],hiddenExtensionList:[]}),[x,P]=a([]),[v,Q]=a([]),[K,M]=a([]),[Y,$]=a([]),[E,G]=a([]),[H,z]=a([]),[B,V]=a(!0),[J,W]=a(!1),{getFile:X}=f(),Z=b(),{loading:_,downloadFile:ee}=p();return c(()=>{(async()=>{e(L?`/hidden/hidden/history/${S||Z[R]}`:`/hidden/hidden/${S||Z[R]}`,"get").then(e=>{if(e.data.hiddenAcceptQualifiedUserCO=[],e.data.hiddenAcceptUnqualifiedUserCO=[],e.data.hiddenAcceptUserCO&&e.data.hiddenAcceptUserCO.length>0)for(let i=0;i<e.data.hiddenAcceptUserCO.length;i++)1===e.data.hiddenAcceptUserCO[i].status?e.data.hiddenAcceptQualifiedUserCO.push(e.data.hiddenAcceptUserCO[i]):e.data.hiddenAcceptUnqualifiedUserCO.push(e.data.hiddenAcceptUserCO[i]);q(e.data),(async e=>{const i=await X({eqType:m[3],eqForeignKey:I||Z[A]});P(i);const d=await X({eqType:m[102],eqForeignKey:I||Z[A]});if(Q(d),e.hiddenRectifyUserCO&&e.hiddenRectifyUserCO.length>0)for(let i=0;i<e.hiddenRectifyUserCO.length;i++){if(e.hiddenRectifyUserCO[i].hiddenUserId){const d=await X({eqType:m[4],eqForeignKey:e.hiddenRectifyUserCO[i].hiddenUserId});M(e=>[...e,d])}if(1===e.hiddenRectifyUserCO[i].isRectificationScheme&&e.hiddenRectifyUserCO[i].hiddenSchemeCO&&Object.keys(e.hiddenRectifyUserCO[i].hiddenSchemeCO).length>0&&e.hiddenRectifyUserCO[i].hiddenSchemeCO.hiddenSchemeId){const d=await X({eqType:m[8],eqForeignKey:e.hiddenRectifyUserCO[i].hiddenSchemeCO.hiddenSchemeId});$(e=>[...e,d])}}if(e.hiddenAcceptQualifiedUserCO&&e.hiddenAcceptQualifiedUserCO.length>0)for(let i=0;i<e.hiddenAcceptQualifiedUserCO.length;i++)if(e.hiddenAcceptQualifiedUserCO[i].hiddenUserId){const d=await X({eqType:m[5],eqForeignKey:e.hiddenAcceptQualifiedUserCO[i].hiddenUserId});G(e=>[...e,d])}if(e.hiddenInspecCO&&Object.keys(e.hiddenInspecCO).length>0){const e=await X({eqType:m[146],eqForeignKey:I||Z[A]});z(e)}})(e.data),V(!1),w?.(e.data)})})()},[F.id,F.hiddenId]),k("div",{children:[k(i,{spinning:B||_,children:[j(d,{orientation:"left",children:"隐患信息"}),j(l,{bordered:!0,column:1,styles:{label:{width:200}},items:[{label:"隐患来源",children:C({list:s,status:D.source})},{label:"隐患类型",children:D.hiddenTypeName},{label:"隐患级别",children:D.hiddenLevelName},{label:"隐患状态",children:C({list:h,status:D.state})},{label:"隐患描述",children:D.hiddenDesc},...D.hiddenPartName?[{label:"隐患部位",children:D.hiddenPartName}]:[],...(2===D.source||3===D.source)&&D.hiddenCheckListCO&&Object.keys(D.hiddenCheckListCO).length>0?[{label:"风险点(单元)",children:D.hiddenCheckListCO.listRiskPoints},{label:"辨识部位",children:D.hiddenCheckListCO.identifiedLocations},{label:"存在风险",children:D.hiddenCheckListCO.existingRisks},{label:"风险分级",children:D.hiddenCheckListCO.riskLevel},{label:"隐患清单",children:D.hiddenCheckListCO.listName},{label:"检查内容",children:D.hiddenCheckListCO.inspectionContent}]:[],...D.longitude?[{label:"隐患上报位置(经纬度)",children:[D.longitude&&`经度:${D.longitude}`,D.latitude&&`纬度:${D.latitude}`].filter(Boolean).join(" ")}]:[],...D.positionDesc?[{label:"隐患位置描述",children:D.positionDesc}]:[],{label:"隐患发现人",children:D.creatorName},{label:"隐患发现时间",children:r(D.hiddenFindTime).format("YYYY-MM-DD HH:mm:ss")},{label:"整改类型",children:C({list:o,status:D.rectificationType})},{label:"是否相关方",children:C({list:[{bianma:"1",name:"是"},{bianma:"0",name:"否"}],status:D.isRelated})},...1===D.isRelated?[{label:"相关方项目",children:D.projectName}]:[],{label:"隐患图片",children:j(U,{files:x})},...v.length>0?[{label:"隐患视频",children:j(y,{onClick:()=>{W(!0)}})}]:[]]}),D.hiddenUserPresetsCO&&Object.keys(D.hiddenUserPresetsCO).length>0&&k(T,{children:[j(d,{orientation:"left",children:"整改信息(发现人预填)"}),j(l,{bordered:!0,column:1,styles:{label:{width:200}},items:[{label:"整改"+(1===D.isRelated?"单位":"部门"),children:D.hiddenUserPresetsCO.rectifyDeptName},{label:"整改人",children:D.hiddenUserPresetsCO.rectifyUserName},...2===D.rectificationType?[{label:"整改期限",children:D.hiddenUserPresetsCO.rectifyDeadline?r(D.hiddenUserPresetsCO.rectifyDeadline).format("YYYY-MM-DD"):""}]:[],...1===D.rectificationType?[{label:"验收部门",children:D.hiddenUserPresetsCO.checkDeptName},{label:"验收人",children:D.hiddenUserPresetsCO.checkUserName}]:[]]})]}),D.hiddenConfirmUserCO&&D.hiddenConfirmUserCO.length>0&&k(T,{children:[j(d,{orientation:"left",children:"隐患确认"}),D.hiddenConfirmUserCO.map(e=>j(l,{bordered:!0,column:1,styles:{label:{width:200}},items:[...e.hiddenLevelName?[{label:"隐患级别",children:e.hiddenLevelName}]:[],...e.userName?[{label:"隐患确认人",children:e.userName}]:[],...e.rectificationTime?[{label:"隐患确认时间",children:e.rectificationTime}]:[],...e.rectifyDeptName?[{label:"整改"+(1===D.isRelated?"单位":"部门"),children:e.rectifyDeptName}]:[],...e.rectifyUserName?[{label:"整改人",children:e.rectifyUserName}]:[],...e.rectificationDeadline?[{label:"整改完成期限",children:e.rectificationDeadline}]:[],...e.checkDeptName?[{label:"验收部门",children:e.checkDeptName}]:[],...e.checkUserName?[{label:"验收人",children:e.checkUserName}]:[],...e.repulseCause?[...e.repulseCause?[{label:"打回意见",children:e.repulseCause}]:[],...e.rectificationTime?[{label:"打回时间",children:e.rectificationTime}]:[]]:[]]},e.id))]}),D.hiddenExtensionList&&D.hiddenExtensionList.length>0&&k(T,{children:[j(d,{orientation:"left",children:"延期信息"}),D.hiddenExtensionList.map(e=>j(l,{bordered:!0,column:1,styles:{label:{width:200}},items:[...e.createTime?[{label:"申请延期日期",children:e.createTime}]:[],...e.delayTime?[{label:"延期日期",children:e.delayTime}]:[],...e.updateName?[{label:"审核人",children:e.updateName}]:[],...e.disposalPlan?[{label:"处置方案",children:e.disposalPlan}]:[],...e.disposalFile?[{label:"处置方案附件",children:"pdf"===O(e.disposalFile)?j(g,{name:u(e.disposalFile),url:e.disposalFile}):k(n,{children:[j("span",{children:u(e.disposalFile)}),j(t,{type:"primary",size:"small",onClick:()=>ee({url:e.disposalFile}),children:"下载"})]})}]:[],{label:"延期审核状态",children:k(T,{children:[1===e.state&&j("span",{children:"待审核"}),2===e.state&&j("span",{children:"审批中"}),3===e.state&&j("span",{children:"已通过"}),4===e.state&&j("span",{children:"已拒绝"}),5===e.state&&j("span",{children:"已撤回"})]})},...3===e.state||4===e.state?[{label:"延期审核时间",children:e.updateTime}]:[]]},e.id))]}),D.hiddenSpecialList&&D.hiddenSpecialList.length>0&&k(T,{children:[j(d,{orientation:"left",children:"特殊处置审核信息"}),D.hiddenSpecialList.map(e=>j(l,{bordered:!0,column:1,styles:{label:{width:200}},items:[...3===e.state||4===e.state?[...e.updateName?[{label:"审核人",children:e.updateName}]:[],...e.updateTime?[{label:"审核时间",children:e.updateTime}]:[]]:[],{label:"无法整改原因",children:e.examine},...3===e.state?[...e.disposalPlan?[{label:"处置方案",children:e.disposalPlan}]:[],...e.disposalFile?[{label:"处置方案附件",children:"pdf"===O(e.disposalFile)?j(g,{name:u(e.disposalFile),url:e.disposalFile}):k(n,{children:[j("span",{children:u(e.disposalFile)}),j(t,{type:"primary",size:"small",onClick:()=>ee({url:e.disposalFile}),children:"下载"})]})}]:[],{label:"是否更换整改负责人",children:e.rectifyUserCO&&Object.keys(e.rectifyUserCO).length>0?"是":"否"},...e.rectifyUserCO&&Object.keys(e.rectifyUserCO).length>0?[{label:"整改负责人",children:e.rectifyUserCO.userName}]:[]]:[],{label:"特殊处置审核状态",children:k(T,{children:[1===e.state&&j("span",{children:"待审核"}),2===e.state&&j("span",{children:"审批中"}),3===e.state&&j("span",{children:"已通过"}),4===e.state&&j("span",{children:"已拒绝"}),5===e.state&&j("span",{children:"已撤回"})]})}]},e.id))]}),D.hiddenRectifyUserCO&&D.hiddenRectifyUserCO.length>0&&k(T,{children:[j(d,{orientation:"left",children:"整改信息"}),D.hiddenRectifyUserCO.map((e,i)=>j(l,{bordered:!0,column:1,styles:{label:{width:200}},items:[...e.deptName?[{label:"整改"+(1===D.isRelated?"单位":"部门"),children:e.deptName}]:[],...e.userName?[{label:"整改人",children:e.userName}]:[],...e.rectificationTime?[{label:"整改时间",children:e.rectificationTime}]:[],...e.descr?[{label:"整改描述",children:e.descr}]:[],...e.investmentFunds?[{label:"投入资金",children:`${e.investmentFunds}元`}]:[],...D.tempSafeMeasure?[{label:"临时安全措施",children:D.tempSafeMeasure}]:[],{label:"整改后图片",children:j(U,{files:K[i]})},{label:"整改方案",children:k(T,{children:[0===e.isRectificationScheme&&j("span",{children:"无"}),1===e.isRectificationScheme&&j("span",{children:"有"})]})},...1===e.isRectificationScheme&&e.hiddenSchemeCO&&Object.keys(e.hiddenSchemeCO).length>0?[{label:"治理标准",children:e.hiddenSchemeCO.governStanDards},{label:"治理方法",children:e.hiddenSchemeCO.governMethod},{label:"经费落实",children:e.hiddenSchemeCO.expenditure},{label:"负责人员",children:e.hiddenSchemeCO.principal},{label:"工时安排",children:e.hiddenSchemeCO.programming},{label:"时限要求",children:e.hiddenSchemeCO.timeLimitFor},{label:"工作要求",children:e.hiddenSchemeCO.jobRequireMent},{label:"其他事项",children:e.hiddenSchemeCO.otherBusiness},{label:"方案图片",children:j(U,{files:Y[i]})}]:[]]},e.id))]}),D.hiddenAcceptQualifiedUserCO.length>0?k(T,{children:[j(d,{orientation:"left",children:"验收信息"}),D.hiddenAcceptQualifiedUserCO.map((e,i)=>j(l,{bordered:!0,column:1,styles:{label:{width:200}},items:[{label:"验收部门",children:e.deptName},{label:"验收人",children:e.userName},{label:"验收时间",children:e.rectificationTime},...e.repulseCause?[{label:"验收打回意见",children:e.repulseCause}]:[],{label:"是否合格",children:e.rectificationTime?"合格":""},...e.descr?[{label:"验收描述",children:e.descr}]:[],...E[i]&&E[i].length>0?[{label:"验收图片",children:j(U,{files:E[i]})}]:[]]},e.id))]}):null,D.hiddenAcceptUnqualifiedUserCO.length>0?k(T,{children:[j(d,{orientation:"left",children:"验收打回信息"}),D.hiddenAcceptUnqualifiedUserCO.map(e=>j(l,{bordered:!0,column:1,styles:{label:{width:200}},items:[{label:"验收部门",children:e.deptName},{label:"验收人",children:e.userName},{label:"验收时间",children:e.rectificationTime},{label:"验收打回意见",children:e.repulseCause}]},e.id))]}):null,D.hiddenInspecCO&&Object.keys(D.hiddenInspecCO).length>0?k(T,{children:[j(d,{orientation:"left",children:"安全环保验收信息"}),j(l,{bordered:!0,column:1,styles:{label:{width:200}},items:[{label:"验收人",children:D.hiddenInspecCO.finalCheckOr},{label:"验收时间",children:D.hiddenInspecCO.finalCheckTime},{label:"是否合格",children:1===D.hiddenInspecCO.finalCheck?"合格":"不合格"},{label:"验收描述",children:D.hiddenInspecCO.finalCheckDesc},{label:"验收图片",children:j(U,{files:H})}]})]}):null]}),J&&j(N,{visible:J,source:v[0].url,onCancel:()=>W(!1),title:"隐患视频"})]})}F.displayName="HiddenInfo";export{F as default};
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
import type { ForwardRefExoticComponent, RefAttributes } from "react";
|
|
2
|
+
|
|
3
|
+
export interface SeamlessScrollProps {
|
|
4
|
+
/** 是否开启自动滚动,默认 true */
|
|
5
|
+
value?: boolean;
|
|
6
|
+
/** 原始数据列表 */
|
|
7
|
+
list: unknown[];
|
|
8
|
+
/** 步进速度,step 需是单步大小的约数,值越大滚动的越快,默认 1 */
|
|
9
|
+
step?: number;
|
|
10
|
+
/** 开启滚动的数据量,默认 3 */
|
|
11
|
+
limitScrollNum?: number;
|
|
12
|
+
/** 是否开启鼠标悬停,默认 true */
|
|
13
|
+
hover?: boolean;
|
|
14
|
+
/** 控制滚动方向,默认 up */
|
|
15
|
+
direction?: "up" | "down" | "left" | "right";
|
|
16
|
+
/** 单步运动停止的高度,默认 0 */
|
|
17
|
+
singleHeight?: number;
|
|
18
|
+
/** 单步运动停止的宽度,默认 0 */
|
|
19
|
+
singleWidth?: number;
|
|
20
|
+
/** 单步停止等待时间,默认 1000ms */
|
|
21
|
+
singleWaitTime?: number;
|
|
22
|
+
/** 是否开启 rem 度量,默认 false */
|
|
23
|
+
isRemUnit?: boolean;
|
|
24
|
+
/** 开启数据更新监听,默认 true */
|
|
25
|
+
isWatch?: boolean;
|
|
26
|
+
/** 动画时间,默认 0 */
|
|
27
|
+
delay?: number;
|
|
28
|
+
/** 动画方式,默认 ease-in */
|
|
29
|
+
ease?: string | { x1: number; y1: number; x2: number; y2: number };
|
|
30
|
+
/** 动画循环次数,-1 表示一直动画,默认 -1 */
|
|
31
|
+
count?: number;
|
|
32
|
+
/** 拷贝几份滚动列表,默认 1 */
|
|
33
|
+
copyNum?: number;
|
|
34
|
+
/** 开启鼠标悬停时支持滚轮滚动,默认 false */
|
|
35
|
+
wheel?: boolean;
|
|
36
|
+
/** 启用单行滚动,默认 false */
|
|
37
|
+
singleLine?: boolean;
|
|
38
|
+
/** 自定义类名 */
|
|
39
|
+
className?: string;
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
export interface SeamlessScrollRef {
|
|
43
|
+
reset: () => void;
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
/**
|
|
47
|
+
* 无缝滚动组件
|
|
48
|
+
*/
|
|
49
|
+
declare const SeamlessScroll: ForwardRefExoticComponent<SeamlessScrollProps & RefAttributes<SeamlessScrollRef>>;
|
|
50
|
+
|
|
51
|
+
export default SeamlessScroll;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{forwardRef as e,useRef as t,useState as r,useEffect as n,useImperativeHandle as l}from"react";import{throttle as o}from"throttle-debounce";import{jsx as i,jsxs as c,Fragment as s}from"react/jsx-runtime";const u=e((e,u)=>{const{value:a=!0,list:d=[],step:m=1,limitScrollNum:f=3,hover:h=!0,direction:p="up",singleHeight:g=0,singleWidth:y=0,singleWaitTime:w=1e3,isRemUnit:b=!1,isWatch:v=!0,delay:$=0,ease:x="ease-in",count:M=-1,copyNum:T=1,wheel:N=!1,singleLine:S=!1,children:W,className:A}=e,k=t(null),E=t(null),F=t(null),H=t(null),L=t(null),q=t(!1),[z,Y]=r(0),[j,C]=r(0),[I,R]=r(0),[U,B]=r(0),[D,G]=r(0),J=d.length>=f,K={width:z?`${z}px`:"auto",transform:`translate(${I}px,${U}px)`,transition:`all ${"string"==typeof x?x:`cubic-bezier(${x.x1}, ${x.y1}, ${x.x2}, ${x.y2})`} ${$}ms`,overflow:"hidden",display:S?"flex":"block"},O="left"===p||"right"===p,P=O?{float:"left",overflow:"hidden",display:S?"flex":"block",flexShrink:S?0:1}:{overflow:"hidden"},Q=b?Number.parseInt(window.getComputedStyle(document.documentElement,null).fontSize):1,V=y*Q,X=g*Q;n(()=>{X>0&&X%m>0&&console.error("如果设置了单步滚动,step 需是单步大小的约数,否则无法保证单步滚动结束的位置是否准确。~~~~~")},[X,m]);const Z=()=>{H.current&&(cancelAnimationFrame(H.current),H.current=null)},_=(e,t,r)=>{H.current=requestAnimationFrame(()=>{const n=j/2,l=z/2;if(("up"===e||"down"===e)&&n<=0)return;if(("left"===e||"right"===e)&&l<=0)return;let o=U,i=I;"up"===e?B(e=>Math.abs(e)>=n?(G(e=>e+1),o=-t,-t):(o=e-t,e-t)):"down"===e?B(e=>e>=0?(G(e=>e+1),o=-1*n+t,-1*n+t):(o=e+t,e+t)):"left"===e?R(e=>Math.abs(e)>=l?(G(e=>e+1),i=-t,-t):(i=e-t,e-t)):"right"===e&&R(e=>e>=0?(G(e=>e+1),i=-1*l+t,-1*l+t):(i=e+t,e+t)),r||(L.current&&clearTimeout(L.current),X?Math.abs(o)%X<t?L.current=window.setTimeout(()=>{ee()},w):ee():V&&Math.abs(i)%V<t?L.current=window.setTimeout(()=>{ee()},w):ee())})},ee=()=>{Z(),!q.current&&J&&D!==M?_(p,m,!1):G(0)},te=()=>{if(d&&"boolean"!=typeof d&&d.length>100&&console.warn(`数据达到了${d.length}条有点多哦~,可能会造成部分老旧浏览器卡顿。`),O){let e=E.current?.offsetWidth||0;e=2*e+1,Y(e)}J?requestAnimationFrame(()=>{const e=F.current?.offsetHeight||0;e>0?C(e):setTimeout(()=>{const e=F.current?.offsetHeight||0;e>0&&C(e)},100)}):(Z(),R(0),B(0))},re=()=>{q.current=!1,ee()},ne=()=>{q.current=!0,L.current&&clearTimeout(L.current),Z()},le=h&&a&&J,oe=()=>{Z(),te()},ie=o(30,e=>{Z();const t=X||15;e.deltaY<0&&_("down",t,!0),e.deltaY>0&&_("up",t,!0)});l(u,()=>({reset:oe})),n(()=>{J&&te()},[J]),n(()=>{J&&a&&(j>0||z>0)&&!q.current&&ee()},[j,z]),n(()=>{a?re():ne()},[a]),n(()=>{0!==M&&re()},[M]),n(()=>{v&&oe()},[d,v]),n(()=>()=>{Z(),L.current&&clearTimeout(L.current)},[]);const ce=()=>c(s,{children:[i("div",{ref:E,style:P,children:W}),J?Array.from({length:T}).map((e,t)=>i("div",{style:P,children:W},`copy-${t}`)):null]});return i("div",{ref:k,className:A,children:i("div",N&&h?{ref:F,style:K,onMouseEnter:()=>{le&&ne()},onMouseLeave:()=>{le&&re()},onWheel:e=>{le&&ie(e)},children:ce()}:{ref:F,style:K,onMouseEnter:()=>{le&&ne()},onMouseLeave:()=>{le&&re()},children:ce()})})});u.displayName="SeamlessScroll";export{u as default};
|