1 |
- import{d as L,o as w,c as S,a as b,u as O,b as B,e as J,r as k,f as U,g as j,h as q,i as p,j as l,w as F,F as M,k as a,_ as R,l as V,m as x,n as $,N as _,p as u,q as m}from"./index-e497b666.js";import{g as P,a as E,b as H}from"./Task-28f1f3c2.js";import{_ as G}from"./DataTable-41a24bfd.js";import{_ as f}from"./Space-84278c21.js";import"./RadioGroup-6edab0a1.js";import"./get-slot-1efb97e5.js";const K={xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink",viewBox:"0 0 1024 1024"},Q=b("path",{d:"M869 487.8L491.2 159.9c-2.9-2.5-6.6-3.9-10.5-3.9h-88.5c-7.4 0-10.8 9.2-5.2 14l350.2 304H152c-4.4 0-8 3.6-8 8v60c0 4.4 3.6 8 8 8h585.1L386.9 854c-5.6 4.9-2.2 14 5.2 14h91.5c1.9 0 3.8-.7 5.2-2L869 536.2a32.07 32.07 0 0 0 0-48.4z",fill:"currentColor"},null,-1),W=[Q],y=L({name:"ArrowRightOutlined",render:function(h,d){return w(),S("svg",K,W)}}),X={style:{display:"flex","align-items":"center","margin-bottom":"10px"}},se={__name:"index",setup(C){const h=O(),d=B(),s=J(),n=k({T_uuid:"",T_name:"",page:1,page_z:8,T_company:""}),T=U([]),N=(e,t)=>a($,{trigger:"hover"},{trigger:()=>e,default:()=>a(f,null,{default:()=>t})}),A=[{title:"公司名称",key:"T_user_name",width:180},{title:"报告名称",key:"T_name",width:180},{title:"任务Id ",key:"T_task_id",width:180},{title:"截止时间",key:"T_deadline",width:180},{title(){return N("流程(?)",[0,1,2,3,4].map(e=>a(_,{bordered:!1,type:e===0?"error":e===1?"info":e===2?"warning":e===4?"success":"default"},{default:()=>e===0?"未完成":e===1?"数据来源已完成":e===2?"处理中":e===4?"数据编辑已完成":"已采集-无数据"})))},key:"T_task_id",width:460,render(e){return a(f,{align:"center"},{default:()=>[a(u,{style:{width:"70px",height:"50px"},contentStyle:{textAlign:"center",padding:0}},{default:()=>e.T_scheme_name,cover:()=>a(_,{class:"w-full",type:e.T_scheme_state===0?"error":"success",bordered:!1},{default:()=>"实施方案"})}),a(m,{size:25,component:y,color:"#0e7a0d"},{}),a(u,{contentStyle:{textAlign:"center",padding:0},onClick:()=>v(e,"数据采集","T_collection_state")},{default:()=>e.T_collection_name,cover:()=>a(_,{class:"w-full",type:e.T_collection_state===0?"error":e.T_collection_state===1?"info":e.T_collection_state===2?"warning":e.T_collection_state===4?"success":"default",bordered:!1},{default:()=>"数据采集"})}),a(m,{size:25,component:y,color:"#0e7a0d"},{}),a(u,{contentStyle:{textAlign:"center",padding:0}},{default:()=>e.T_reporting_name,cover:()=>a(_,{class:"w-full",type:e.T_reporting_state===0?"error":"success",bordered:!1},{default:()=>"报告编写"})}),a(m,{size:25,component:y,color:"#0e7a0d"},{}),a(u,{contentStyle:{textAlign:"center",padding:0},onClick:()=>v(e,"交付审核","T_delivery_state")},{default:()=>e.T_delivery_name,cover:()=>a(_,{class:"w-full",type:e.T_delivery_state===0?"error":e.T_delivery_state===1?"success":"warning",bordered:!1},{default:()=>"交付审核"})})]})}},{title:"操作",key:"actions",render(e){return a(f,null,{default:()=>["设备管理","实施方案","数据来源","数据查询","数据校验","报告生成","报告审核"].map(t=>a(x,{type:"primary",size:"small",onClick:()=>{window.sessionStorage.setItem("task",JSON.stringify(e)),localStorage.setItem("keepAlive",JSON.stringify({T_name:n.T_name,page:n.page})),t==="实施方案"?s.push("/scheme"):t==="校准证书"?s.push("/certificate"):t==="设备管理"?s.push("/equipment"):t==="数据来源"?s.push("/data_source"):t==="数据查询"?s.push("/data_edit"):t==="数据校验"?s.push("/data_checkout"):t==="报告生成"?s.push("/report_create"):s.push("/report_audit")}},{default:()=>t}))})}}],v=async(e,t,c)=>{let{T_task_id:g}=e,o={T_task_id:g,[c]:0};e[c]!=0&&h.warning({title:"警告",content:`【${t}】修改为未完成状态,是否修改?`,positiveText:"确定",negativeText:"取消",onPositiveClick:async()=>{const{data:D}=t=="交付审核"?await E(o):await H(o);D.Code==200?d.success("修改成功"):d.error("修改失败"),i()},onNegativeClick:()=>{}})},I=()=>{n.page=1,r.page=1,localStorage.setItem("keepAlive",JSON.stringify({T_name:n.T_name,page:n.page})),i()},r=k({page:n.page,pageSize:n.page_z,itemCount:0,onChange:e=>{localStorage.setItem("keepAlive",JSON.stringify({T_name:n.T_name,page:e})),r.page=e,n.page=e,i()}}),i=async()=>{const{data:e}=await P(n);r.itemCount=e.Data.Num,T.value=e.Data.List||[]};j(()=>{let e=JSON.parse(localStorage.getItem("keepAlive"));console.log("初次加载",e),n.page=Number(e.page),r.page=Number(e.page),n.T_name=e.T_name,i()});let z=setInterval(()=>{i()},3e4);return q(()=>{clearInterval(z)}),(e,t)=>{const c=R,g=G;return w(),S(M,null,[b("div",X,[p(c,{value:l(n).T_name,"onUpdate:value":t[0]||(t[0]=o=>l(n).T_name=o),type:"text",placeholder:"请输入报告名称",style:{width:"15%"},clearable:""},null,8,["value"]),p(c,{value:l(n).T_company,"onUpdate:value":t[1]||(t[1]=o=>l(n).T_company=o),type:"text",placeholder:"请输入公司名称",style:{width:"15%",margin:"0 10px"},clearable:""},null,8,["value"]),p(l(x),{type:"primary",onClick:I,style:{}},{default:F(()=>[V("搜索")]),_:1})]),p(g,{remote:"",columns:A,data:l(T),pagination:l(r),class:"flex flex-col justify-between"},null,8,["data","pagination"])],64)}}};export{se as default};
|