import{r as e,F as T,j as s,B as b,a as P}from"./main-gLMaKCvr.js";import{R as u}from"./index-Ci9o3BMm.js";import{A as D}from"./index-DEhiFitC.js";import{A as M}from"./index-4ifBGcWk.js";import J from"./index-DYCVsG_r.js";import{C as N}from"./index-Jdu54dr5.js";import{D as q}from"./index-DDpcHwmR.js";import{S as C}from"./index-B-_sZvQI.js";import"./Table-CWRWFg95.js";import"./addEventListener-BwXlid1p.js";import"./Dropdown-CSp8FTqG.js";import"./index-CjYZg4K2.js";import"./index-B__zS0KG.js";import"./index-BrNLqRge.js";import"./index-ByQpjXWK.js";import"./UpOutlined-CEatmWIN.js";import"./study-page-BLC-2qgz.js";import"./usePagination-DK-N3QaW.js";import"./index-ZwmWfN3I.js";import"./index-Das8pPKs.js";import"./index-CWqFacgc.js";import"./callSuper-DlyBkZi7.js";import"./utils-D2B0dIuM.js";const rs=()=>{const n=e.useRef(null),[y,O]=e.useState("downstream"),[c,l]=e.useState(),[f,m]=e.useState(!1),[t,x]=e.useState(),[a,h]=e.useState(),[g,p]=e.useState(!1),[i]=T.useForm(),[j,A]=e.useState(),[S,R]=e.useState({}),[F,d]=e.useState(!1),[L,_]=e.useState(!1),w=async o=>{d(!0);const r=await P.get(`/find_downstream_analysis/${o}`);R(r.data),d(!1)};return s.jsxs("div",{style:{maxWidth:"1500px",margin:"1rem auto"},children:[s.jsx(u,{title:"分析结果",ref:n,analysisType:"analysisResult",params:{},setTableLoading:m,setRecord:o=>{const r=JSON.parse(o.request_param);console.log(r),x(o),h(r)},setTabletData:o=>{l(o)}}),s.jsx("div",{style:{marginBottom:"2rem"}}),t&&s.jsxs(s.Fragment,{children:[s.jsx(N,{title:`${t.analysis_name}(${t.analysis_method})`,extra:s.jsx(s.Fragment,{children:s.jsx(b,{onClick:()=>{p(!0),w(a.analysis_method),i.resetFields(),i.setFieldsValue(a),t!=null&&t.id&&i.setFieldValue("id",t==null?void 0:t.id)},children:"重新分析"})}),children:s.jsx(D,{plotLoading:f,filePlot:c})}),s.jsx("hr",{}),s.jsx(J,{params:{obj_key:t.analysis_method,obj_type:"analysis_img"}}),s.jsxs(q,{loading:F,title:`重新分析 - ${t.analysis_name}`,open:g,onClose:()=>p(!1),width:"50%",children:[s.jsx(u,{title:"输出文件",analysisType:y,analysisMethod:[a.inputAnalysisMenthod],shouldTrigger:!0,setResultTableList:A}),s.jsx(C,{spinning:L,children:s.jsx(M,{form:i,resultTableList:j,formJson:S.formJson,sampleGroupApI:!1,moduleName:a.moduleName,params:a.params,setPlotLoading:o=>{m(o),_(o)},activeTabKey:a.inputAnalysisMenthod.name,inputAnalysisMethod:a.inputAnalysisMenthod,saveAnalysisMethod:a.analysis_method,project:a.project,setFilePlot:l,plotReloadTable:()=>{n.current&&n.current.reload()}})})]})]})]})};export{rs as default};
