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.

2 lines
5.4KB

  1. import{E as I}from"./index.d8fd7f0b.js";import{g,a as P}from"./getIsShowRegionTree.a2404325.js";import{r as Y}from"./earlyWarningManage.98d3a17e.js";import{d as H,b as s,r as _,o as L,c as n,e as v,I as O,i as a,u as N,h as e,k as z,j as R}from"./index.63921713.js";const B=H({name:"earlyWarningRecord"}),Q=Object.assign(B,{setup(F){const l=s({projectName:void 0,times:void 0,buildOrgName:void 0,areaCode:void 0}),u=_(),y=_(0),U=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=_([]),i=async(m=u.value.pageParams)=>{var r,d;const t=await Y(o.value,{...m,...l,startTime:((r=l.times)==null?void 0:r[0])||void 0,endTime:((d=l.times)==null?void 0:d[1])||void 0,times:void 0});w.value=t.data.records,y.value=t.data.total},S=()=>{i()},k=()=>{l.projectName=void 0,l.times=void 0,l.buildOrgName=void 0,u.value.pageParams.pageNumber=1,u.value.pageParams.pageSize=10,i()},M=m=>{l.areaCode=m.regionLevel===3?m.regionCode:void 0,i()},o=_("1"),A=m=>{o.value=m,k()};return L(()=>{g(["SUPER_ADMIN","REGION_MANAGER"])||i()}),(m,t)=>{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"),x=n("el-form"),h=n("el-card"),c=n("el-tab-pane"),C=n("el-tabs"),G=n("table-list");return v(),O(f,null,{default:a(()=>[N(g)(["SUPER_ADMIN","REGION_MANAGER"])?(v(),O(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(h,{class:"search mb-16"},{default:a(()=>[e(x,{"label-suffix":":",model:l,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:l.projectName,"onUpdate:modelValue":t[0]||(t[0]=p=>l.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:l.buildOrgName,"onUpdate:modelValue":t[1]||(t[1]=p=>l.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:l.times,"onUpdate:modelValue":t[2]||(t[2]=p=>l.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(()=>[R("\u67E5\u8BE2")]),_:1}),e(T,{onClick:k},{default:a(()=>[R("\u91CD\u7F6E")]),_:1})]),_:1})]),_:1})]),_:1})]),_:1},8,["model"])]),_:1}),e(h,{class:"tab-card"},{header:a(()=>[e(C,{modelValue:o.value,"onUpdate:modelValue":t[3]||(t[3]=p=>o.value=p),onTabChange:A},{default:a(()=>[e(c,{label:"\u6D41\u7A0B\u9884\u8B66\u8BB0\u5F55",name:"1"}),e(c,{label:"\u586B\u62A5\u9884\u8B66\u8BB0\u5F55",name:"2"}),e(c,{label:"\u5B9E\u65BD\u76D1\u7BA1",name:"3"}),e(c,{label:"\u7EED\u5EFA\u9879\u76EE\u8D44\u91D1\u5BA1\u6279",name:"4"})]),_:1},8,["modelValue"])]),default:a(()=>[e(G,{ref_key:"tableListRef",ref:u,column:o.value==="1"?U: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};