import{r as a,F as T,j as s,z as P,B as D,a as M}from"./index-DWaKf7-t.js";import{R as y}from"./index-B9lQzejH.js";import{A as v}from"./index-gW1uKEbV.js";import{A as C}from"./index-DI9_eMz3.js";import J from"./index-CicSOEzM.js";import{R as N}from"./Table-DdQ_sLHU.js";import{C as q}from"./index-FZ8AkgCd.js";import{D as B}from"./index-Tb4IBdIf.js";import{S as O}from"./index-bFL3q_Rm.js";import"./index-Bdd9AuZi.js";import"./index-DXS1j8KM.js";import"./index-C8BxaXP_.js";import"./addEventListener-Bv6KfeSZ.js";import"./utils-D2B0dIuM.js";const Z=()=>{const l=a.useRef(null),[r,c]=a.useState("downstream"),[f,m]=a.useState(),[g,p]=a.useState(!1),[t,x]=a.useState(),[o,h]=a.useState(),[j,u]=a.useState(!1),[n]=T.useForm(),[A,S]=a.useState(),[R,b]=a.useState({}),[F,d]=a.useState(!1),[_,w]=a.useState(!1),L=async e=>{d(!0);const i=await M.get(`/find_downstream_analysis/${e}`);b(i.data),d(!1)};return s.jsxs("div",{style:{maxWidth:"1800px",margin:"1rem auto"},children:[s.jsx(P,{style:{marginBottom:"1rem"},justify:"flex-end",align:"center",gap:"small",children:s.jsx(N.Group,{options:[{label:"下游分析结果",value:"downstream"},{label:"上游分析结果",value:"upstream"}],onChange:({target:{value:e}})=>{console.log(e),c(e)},value:r,optionType:"button",buttonStyle:"solid"})}),s.jsx(y,{title:"下游分析历史记录",ref:l,analysisType:"analysisResult",params:{analysis_type:r},setTableLoading:p,setRecord:e=>{const i=JSON.parse(e.request_param);console.log(i),x(e),h(i)},setTabletData:e=>{m(e)}}),s.jsx("div",{style:{marginBottom:"2rem"}}),t&&s.jsxs(s.Fragment,{children:[s.jsx(q,{title:`${t.analysis_name}(${t.analysis_method})`,extra:s.jsx(s.Fragment,{children:s.jsx(D,{onClick:()=>{u(!0),L(o.analysis_method),n.resetFields(),n.setFieldsValue(o),t!=null&&t.id&&n.setFieldValue("id",t==null?void 0:t.id)},children:"重新分析"})}),children:s.jsx(v,{plotLoading:g,filePlot:f})}),s.jsx("hr",{}),s.jsx(J,{params:{obj_key:t.analysis_method,obj_type:"analysis_img"}}),s.jsxs(B,{loading:F,title:`重新分析 - ${t.analysis_name}`,open:j,onClose:()=>u(!1),width:"50%",children:[s.jsx(y,{title:"输出文件",analysisType:r,analysisMethod:[o.inputAnalysisMenthod],shouldTrigger:!0,setResultTableList:S}),s.jsx(O,{spinning:_,children:s.jsx(C,{form:n,resultTableList:A,formJson:R.formJson,sampleGroupApI:!1,moduleName:o.moduleName,params:o.params,setPlotLoading:e=>{p(e),w(e)},activeTabKey:o.inputAnalysisMenthod.name,inputAnalysisMethod:o.inputAnalysisMenthod,saveAnalysisMethod:o.analysis_method,project:o.project,setFilePlot:m,plotReloadTable:()=>{l.current&&l.current.reload()}})})]})]})]})};export{Z as default};
