Agriculture-front-end/dist/assets/index.7585ad44.js

2 lines
6.3 KiB
JavaScript

import{Q as e,_ as l,r as a,I as t,a5 as s,a6 as i,a7 as r,d,o as n,c as o,l as m,e as u,w as p,f,V as g,W as v,k as y,n as c,A as _,J as b}from"./index.e5c8b0d6.js";function x(l){return e({url:"/bh/gjsjhzdmcckxx",method:"get",params:l})}const w={class:"DiseaseBox"},h={class:"TopForm"},Y={class:"CenterTable"},C={style:{display:"flex","align-items":"center"}},z={style:{"margin-left":"10px"}},D={style:{display:"flex","align-items":"center"}},M={style:{"margin-left":"10px"}},k={style:{display:"flex","align-items":"center"}},T={style:{"margin-left":"10px"}},V={style:{display:"flex","align-items":"center"}},S={style:{"margin-left":"10px"}},j={style:{display:"flex","align-items":"center"}},N={style:{"margin-left":"10px"}},U={style:{display:"flex","align-items":"center"}},A={style:{"margin-left":"10px"}},I={style:{display:"flex","align-items":"center"}},q={style:{"margin-left":"10px"}},B={style:{display:"flex","align-items":"center"}},F={style:{"margin-left":"10px"}},P={style:{display:"flex","align-items":"center"}},J={style:{"margin-left":"10px"}},Q={style:{display:"flex","align-items":"center"}},R={style:{"margin-left":"10px"}},W={style:{display:"flex","align-items":"center"}},E={style:{"margin-left":"10px"}},G={style:{display:"flex","align-items":"center"}},H={style:{"margin-left":"10px"}},K={style:{display:"flex","align-items":"center"}},L={style:{"margin-left":"10px"}},O={style:{display:"flex","align-items":"center"}},X={style:{"margin-left":"10px"}},Z={class:"Bottom"},$=l({__name:"index",setup(l){var $=localStorage.getItem("deptName")||"青岛西海岸新区";const ee=a(),le=t({time:[{required:!1,message:"Please input Activity name",trigger:"blur"}],msCode:[{required:!1,message:"Please input Activity name",trigger:"blur"}]});let ae=a({time:"",msCode:""}),te=a([]),se=a([]),ie=a(1),re=a(20),de=a(0);function ne(e){re.value=e,ie.value=1}function oe(e){ie.value=e}function me(){ae.value.time="",ae.value.msCode="",ie.value=1,re.value=20}return s((()=>{let e={};ae.value.time&&(e.startTime=i(ae.value.time[0]).format("YYYY-MM-DD"),e.endTime=i(ae.value.time[1]).format("YYYY-MM-DD")),e.msCode=ae.value.msCode,e.pageNum=ie.value,e.pageSize=re.value,x(e).then((e=>{se.value=e.rows,de.value=e.total}))})),r((async()=>{const l=await(a={divisions:$},e({url:"/bh/cxzdmchzdh",method:"get",params:a}));var a;let t={};ae.value.time&&(t.startTime=i(ae.value.time[0]).format("YYYY-MM-DD"),t.endTime=i(ae.value.time[1]).format("YYYY-MM-DD")),t.msCode=ae.value.msCode,t.pageNum=ie.value,t.pageSize=re.value;const s=await x(t);200==l.code&&(te.value=l.data.map((e=>({value:e.mscode,label:e.msname})))),200==s.code&&(de.value=s.total,se.value=s.rows)})),(e,l)=>{const a=d("el-date-picker"),t=d("el-form-item"),s=d("el-option"),r=d("el-select"),$=d("el-button"),ue=d("el-form"),pe=d("el-table-column"),fe=d("el-table"),ge=d("el-pagination");return n(),o("div",w,[m("div",h,[u(ue,{ref_key:"ruleFormRef",ref:ee,rules:le,model:f(ae),"label-width":"auto",style:{"max-width":"100%"},inline:!0,"label-position":"left"},{default:p((()=>[u(t,{label:"日期:",prop:"time"},{default:p((()=>[u(a,{modelValue:f(ae).time,"onUpdate:modelValue":l[0]||(l[0]=e=>f(ae).time=e),type:"daterange","range-separator":"至","start-placeholder":"开始时间","end-placeholder":"结束时间",size:e.size},null,8,["modelValue","size"])])),_:1}),u(t,{label:"站点:",prop:"msCode"},{default:p((()=>[u(r,{modelValue:f(ae).msCode,"onUpdate:modelValue":l[1]||(l[1]=e=>f(ae).msCode=e),placeholder:"请选择",size:"large",style:{width:"240px"}},{default:p((()=>[u(s,{key:"全部",label:"全部",value:""}),(n(!0),o(g,null,v(f(te),(e=>(n(),y(s,{key:e.value,label:e.label,value:e.value},null,8,["label","value"])))),128))])),_:1},8,["modelValue"])])),_:1}),u(t,null,{default:p((()=>[u($,{type:"primary",onClick:l[2]||(l[2]=e=>(async e=>{e&&await e.validate(((e,l)=>{if(e){let e={};ae.value.time&&(e.startTime=i(ae.value.time[0]).format("YYYY-MM-DD"),e.endTime=i(ae.value.time[1]).format("YYYY-MM-DD")),e.msCode=ae.value.msCode,e.pageNum=ie.value,e.pageSize=re.value,x(e).then((e=>{se.value=e.rows}))}}))})(ee.value)),style:{display:"none"}},{default:p((()=>[c("查询")])),_:1}),u($,{onClick:me},{default:p((()=>[c("重置")])),_:1})])),_:1})])),_:1},8,["rules","model"])]),m("div",Y,[u(fe,{data:f(se),height:"650",style:{width:"100%",color:"black"}},{default:p((()=>[u(pe,{prop:"dataTime",label:"时间",width:"100",fixed:""}),u(pe,{prop:"ms_crop",label:"作物名称",fixed:""}),u(pe,{prop:"description",label:"描述",width:"100"}),u(pe,{prop:"ms_code",label:"监测站编码",width:"120"}),u(pe,{label:"白粉病"},{default:p((e=>[m("div",C,[m("span",z,_(e.row.barley_powdery_mildew)+"%",1)])])),_:1}),u(pe,{label:"穗腐病"},{default:p((e=>[m("div",D,[m("span",M,_(e.row.ear_rot)+"%",1)])])),_:1}),u(pe,{label:"赤霉菌"},{default:p((e=>[m("div",k,[m("span",T,_(e.row.gibberella)+"%",1)])])),_:1}),u(pe,{label:"散黑穗病"},{default:p((e=>[m("div",V,[m("span",S,_(e.row.loose_smut)+"%",1)])])),_:1}),u(pe,{label:"大斑病"},{default:p((e=>[m("div",j,[m("span",N,_(e.row.northern_leaf_blight)+"%",1)])])),_:1}),u(pe,{label:"根腐病"},{default:p((e=>[m("div",U,[m("span",A,_(e.row.root_rot)+"%",1)])])),_:1}),u(pe,{label:"粗缩病"},{default:p((e=>[m("div",I,[m("span",q,_(e.row.rough_dwarf)+"%",1)])])),_:1}),u(pe,{label:"纹枯病"},{default:p((e=>[m("div",B,[m("span",F,_(e.row.sheath_blight)+"%",1)])])),_:1}),u(pe,{label:"小斑病"},{default:p((e=>[m("div",P,[m("span",J,_(e.row.southern_leaf_blight)+"%",1)])])),_:1}),u(pe,{label:"茎基腐病"},{default:p((e=>[m("div",Q,[m("span",R,_(e.row.stem_base_rot)+"%",1)])])),_:1}),u(pe,{label:"全蚀病"},{default:p((e=>[m("div",W,[m("span",E,_(e.row.take_all)+"%",1)])])),_:1}),u(pe,{label:"顶腐病"},{default:p((e=>[m("div",G,[m("span",H,_(e.row.top_rot)+"%",1)])])),_:1}),u(pe,{label:"黑粉病"},{default:p((e=>[m("div",K,[m("span",L,_(e.row.ustilago_maydis)+"%",1)])])),_:1}),u(pe,{label:"锈病"},{default:p((e=>[m("div",O,[m("span",X,_(e.row.yellow_rust)+"%",1)])])),_:1})])),_:1},8,["data"])]),m("div",Z,[u(ge,{"current-page":f(ie),"onUpdate:current-page":l[3]||(l[3]=e=>b(ie)?ie.value=e:ie=e),"page-size":f(re),"onUpdate:page-size":l[4]||(l[4]=e=>b(re)?re.value=e:re=e),"page-sizes":[10,20,30,40],size:"default",background:"true",layout:"total, sizes, prev, pager, next, jumper",total:f(de),onSizeChange:ne,onCurrentChange:oe},null,8,["current-page","page-size","total"])])])}}},[["__scopeId","data-v-ee9adcff"]]);export{$ as default};