You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

index.02c5cc85.js 5.4KB

3 maanden geleden
1
  1. import{E as I}from"./index.108a55d4.js";import{g,a as P}from"./getIsShowRegionTree.7b64ce60.js";import{r as Y}from"./earlyWarningManage.304b26cd.js";import{d as H,b as s,r as c,o as L,c as n,e as O,G as R,i as a,u as N,h as e,k as z,j as U}from"./index.a2494fc2.js";const B=H({name:"earlyWarningRecord"}),Q=Object.assign(B,{setup(F){const t=s({projectName:void 0,times:void 0,buildOrgName:void 0,areaCode:void 0}),u=c(),y=c(0),h=s([{label:"\u5E8F\u53F7",type:"index",width:"80"},{label:"\u9879\u76EE\u540D\u79F0",key:"projectName",prop:"projectName"},{label:"\u7533\u62A5\u5355\u4F4D",key:"buildOrgName",prop:"buildOrgName"},{label:"\u6D41\u7A0B\u7C7B\u578B",key:"instTypeName",prop:"instTypeName"},{label:"\u5230\u8FBE\u8282\u70B9\u65F6\u95F4",key:"instStart",prop:"instStart",width:150},{label:"\u63D0\u9192\u65F6\u95F4",key:"warningTime",prop:"warningTime",width:150},{label:"\u63D0\u9192\u4EBA\u5458",key:"warningUsername",prop:"warningUsername"}]),V=s([{label:"\u5E8F\u53F7",type:"index",width:"80"},{label:"\u9879\u76EE\u540D\u79F0",key:"projectName",prop:"projectName"},{label:"\u7533\u62A5\u5355\u4F4D",key:"buildOrgName",prop:"buildOrgName"},{label:"\u586B\u62A5\u7C7B\u578B",key:"instTypeName",prop:"instTypeName"},{label:"\u5230\u8FBE\u73AF\u8282\u65F6\u95F4",key:"instStart",prop:"instStart",width:150},{label:"\u63D0\u9192\u65F6\u95F4",key:"warningTime",prop:"warningTime",width:150},{label:"\u63D0\u9192\u4EBA\u5458",key:"warningUsername",prop:"warningUsername"}]),j=s([{label:"\u5E8F\u53F7",type:"index",width:"80"},{label:"\u9879\u76EE\u540D\u79F0",key:"projectName",prop:"projectName"},{label:"\u7533\u62A5\u5355\u4F4D",key:"buildOrgName",prop:"buildOrgName"},{label:"\u9884\u8B66\u73AF\u8282",key:"instTypeName",prop:"instTypeName"},{label:"\u5230\u8FBE\u73AF\u8282\u65F6\u95F4",key:"instStart",prop:"instStart",width:150},{label:"\u63D0\u9192\u65F6\u95F4",key:"warningTime",prop:"warningTime",width:150},{label:"\u63D0\u9192\u4EBA\u5458",key:"warningUsername",prop:"warningUsername"}]),E=s([{label:"\u5E8F\u53F7",type:"index",width:"80"},{label:"\u88AB\u5173\u8054\u9879\u76EE\u540D\u79F0",key:"projectName",prop:"projectName"},{label:"\u8D44\u91D1\u7533\u62A5\u5355\u4F4D",key:"buildOrgName",prop:"buildOrgName"},{label:"\u5230\u8FBE\u8282\u70B9\u65F6\u95F4",key:"instStart",prop:"instStart",width:150},{label:"\u63D0\u9192\u65F6\u95F4",key:"warningTime",prop:"warningTime",width:150},{label:"\u63D0\u9192\u4EBA\u5458",key:"warningUsername",prop:"warningUsername"}]),w=c([]),i=async(m=u.value.pageParams)=>{var r,d;const l=await Y(o.value,{...m,...t,startTime:((r=t.times)==null?void 0:r[0])||void 0,endTime:((d=t.times)==null?void 0:d[1])||void 0,times:void 0});w.value=l.data.records,y.value=l.data.total},S=()=>{i()},k=()=>{t.projectName=void 0,t.times=void 0,t.buildOrgName=void 0,u.value.pageParams.pageNumber=1,u.value.pageParams.pageSize=10,i()},M=m=>{t.areaCode=m.regionLevel===3?m.regionCode:void 0,i()},o=c("1"),A=m=>{o.value=m,k()};return L(()=>{g(["SUPER_ADMIN","REGION_MANAGER"])||i()}),(m,l)=>{const r=n("el-col"),d=n("el-input"),b=n("el-form-item"),D=n("el-date-picker"),f=n("el-row"),T=n("el-button"),G=n("el-form"),v=n("el-card"),_=n("el-tab-pane"),x=n("el-tabs"),C=n("table-list");return O(),R(f,null,{default:a(()=>[N(g)(["SUPER_ADMIN","REGION_MANAGER"])?(O(),R(r,{key:0,style:{"padding-right":"16px"},span:4},{default:a(()=>[e(I,{params:N(P)({SUPER_ADMIN:!1,REGION_MANAGER:!1}),onGetTree:M},null,8,["params"])]),_:1})):z("",!0),e(r,{span:N(g)(["SUPER_ADMIN","REGION_MANAGER"])?20:24},{default:a(()=>[e(v,{class:"search mb-16"},{default:a(()=>[e(G,{"label-suffix":":",model:t,size:"small"},{default:a(()=>[e(f,{gutter:16,class:"mb-16"},{default:a(()=>[e(r,{span:8},{default:a(()=>[e(b,{label:"\u9879\u76EE\u540D\u79F0"},{default:a(()=>[e(d,{modelValue:t.projectName,"onUpdate:modelValue":l[0]||(l[0]=p=>t.projectName=p),placeholder:"\u8BF7\u8F93\u5165"},null,8,["modelValue"])]),_:1})]),_:1}),e(r,{span:8},{default:a(()=>[e(b,{label:"\u9879\u76EE\u5355\u4F4D"},{default:a(()=>[e(d,{modelValue:t.buildOrgName,"onUpdate:modelValue":l[1]||(l[1]=p=>t.buildOrgName=p),placeholder:"\u8BF7\u8F93\u5165"},null,8,["modelValue"])]),_:1})]),_:1}),e(r,{span:8},{default:a(()=>[e(b,{label:"\u63D0\u9192\u65F6\u95F4"},{default:a(()=>[e(D,{modelValue:t.times,"onUpdate:modelValue":l[2]||(l[2]=p=>t.times=p),type:"datetimerange","range-separator":"-","start-placeholder":"\u5F00\u59CB\u65F6\u95F4","end-placeholder":"\u7ED3\u675F\u65F6\u95F4",format:"YYYY-MM-DD HH:mm","value-format":"YYYY-MM-DD HH:mm:ss"},null,8,["modelValue"])]),_:1})]),_:1})]),_:1}),e(f,{gutter:16},{default:a(()=>[e(r,{span:24},{default:a(()=>[e(b,{class:"btn"},{default:a(()=>[e(T,{type:"primary",onClick:S},{default:a(()=>l[4]||(l[4]=[U("\u67E5\u8BE2")])),_:1}),e(T,{onClick:k},{default:a(()=>l[5]||(l[5]=[U("\u91CD\u7F6E")])),_:1})]),_:1})]),_:1})]),_:1})]),_:1},8,["model"])]),_:1}),e(v,{class:"tab-card"},{header:a(()=>[e(x,{modelValue:o.value,"onUpdate:modelValue":l[3]||(l[3]=p=>o.value=p),onTabChange:A},{default:a(()=>[e(_,{label:"\u6D41\u7A0B\u9884\u8B66\u8BB0\u5F55",name:"1"}),e(_,{label:"\u586B\u62A5\u9884\u8B66\u8BB0\u5F55",name:"2"}),e(_,{label:"\u5B9E\u65BD\u76D1\u7BA1",name:"3"}),e(_,{label:"\u7EED\u5EFA\u9879\u76EE\u8D44\u91D1\u5BA1\u6279",name:"4"})]),_:1},8,["modelValue"])]),default:a(()=>[e(C,{ref_key:"tableListRef",ref:u,column:o.value==="1"?h:o.value==="2"?V:o.value==="4"?E:j,data:w.value,total:y.value,onGetTableData:i},null,8,["column","data","total"])]),_:1})]),_:1},8,["span"])]),_:1})}}});export{Q as default};