2 lines
6.8 KiB
JavaScript
2 lines
6.8 KiB
JavaScript
import{Q as T,_ as P,r as f,I as q,a5 as E,a6 as g,a7 as G,d as c,o as x,c as k,l as t,e as l,w as s,f as m,V as J,W as L,k as Q,n as D,A as d,J as M}from"./index.064676a5.js";function W(y){return T({url:"/bh/cxzdmchzdh",method:"get",params:y})}function w(y){return T({url:"/bh/gjsjhzdmcckxx",method:"get",params:y})}const $={class:"DiseaseBox"},H={class:"TopForm"},K={class:"CenterTable"},O={style:{display:"flex","align-items":"center"}},X={style:{"margin-left":"10px"}},Z={style:{display:"flex","align-items":"center"}},ee={style:{"margin-left":"10px"}},te={style:{display:"flex","align-items":"center"}},le={style:{"margin-left":"10px"}},ae={style:{display:"flex","align-items":"center"}},oe={style:{"margin-left":"10px"}},se={style:{display:"flex","align-items":"center"}},ne={style:{"margin-left":"10px"}},ie={style:{display:"flex","align-items":"center"}},re={style:{"margin-left":"10px"}},de={style:{display:"flex","align-items":"center"}},_e={style:{"margin-left":"10px"}},me={style:{display:"flex","align-items":"center"}},ue={style:{"margin-left":"10px"}},ce={style:{display:"flex","align-items":"center"}},pe={style:{"margin-left":"10px"}},fe={style:{display:"flex","align-items":"center"}},ge={style:{"margin-left":"10px"}},ve={style:{display:"flex","align-items":"center"}},ye={style:{"margin-left":"10px"}},he={style:{display:"flex","align-items":"center"}},be={style:{"margin-left":"10px"}},xe={style:{display:"flex","align-items":"center"}},we={style:{"margin-left":"10px"}},Ce={style:{display:"flex","align-items":"center"}},Ye={style:{"margin-left":"10px"}},ze={class:"Bottom"},ke={__name:"index",setup(y){var V=localStorage.getItem("deptName")||"\u9752\u5C9B\u897F\u6D77\u5CB8\u65B0\u533A";const C=f(),j=q({time:[{required:!1,message:"Please input Activity name",trigger:"blur"}],msCode:[{required:!1,message:"Please input Activity name",trigger:"blur"}]});let n=f({time:"",msCode:""}),Y=f([]),h=f([]),_=f(1),u=f(20),b=f(0);function B(o){console.log(`\u6BCF\u9875 ${o} \u6761`),u.value=o,_.value=1}function S(o){console.log(`\u5F53\u524D\u9875: ${o}`),_.value=o}const N=async o=>{!o||await o.validate((a,p)=>{if(a){let r={};n.value.time&&(r.startTime=g(n.value.time[0]).format("YYYY-MM-DD"),r.endTime=g(n.value.time[1]).format("YYYY-MM-DD")),r.msCode=n.value.msCode,console.log(r),r.pageNum=_.value,r.pageSize=u.value,w(r).then(v=>{console.log(v),h.value=v.rows})}else console.log("error submit!",p)})};function F(){n.value.time="",n.value.msCode="",_.value=1,u.value=20}return E(()=>{let o={};n.value.time&&(o.startTime=g(n.value.time[0]).format("YYYY-MM-DD"),o.endTime=g(n.value.time[1]).format("YYYY-MM-DD")),o.msCode=n.value.msCode,console.log(o),o.pageNum=_.value,o.pageSize=u.value,w(o).then(a=>{console.log(a),h.value=a.rows,b.value=a.total})}),G(async()=>{const o=await W({divisions:V});let a={};n.value.time&&(a.startTime=g(n.value.time[0]).format("YYYY-MM-DD"),a.endTime=g(n.value.time[1]).format("YYYY-MM-DD")),a.msCode=n.value.msCode,console.log(a),a.pageNum=_.value,a.pageSize=u.value;const p=await w(a);console.log(o,p,"\u6D4B\u8BD5"),o.code==200&&(Y.value=o.data.map(r=>({value:r.mscode,label:r.msname}))),p.code==200&&(b.value=p.total,h.value=p.rows)}),(o,a)=>{const p=c("el-date-picker"),r=c("el-form-item"),v=c("el-option"),R=c("el-select"),z=c("el-button"),U=c("el-form"),i=c("el-table-column"),A=c("el-table"),I=c("el-pagination");return x(),k("div",$,[t("div",H,[l(U,{ref_key:"ruleFormRef",ref:C,rules:j,model:m(n),"label-width":"auto",style:{"max-width":"100%"},inline:!0,"label-position":"left"},{default:s(()=>[l(r,{label:"\u65E5\u671F\uFF1A",prop:"time"},{default:s(()=>[l(p,{modelValue:m(n).time,"onUpdate:modelValue":a[0]||(a[0]=e=>m(n).time=e),type:"daterange","range-separator":"\u81F3","start-placeholder":"\u5F00\u59CB\u65F6\u95F4","end-placeholder":"\u7ED3\u675F\u65F6\u95F4",size:o.size},null,8,["modelValue","size"])]),_:1}),l(r,{label:"\u7AD9\u70B9\uFF1A",prop:"msCode"},{default:s(()=>[l(R,{modelValue:m(n).msCode,"onUpdate:modelValue":a[1]||(a[1]=e=>m(n).msCode=e),placeholder:"\u8BF7\u9009\u62E9",size:"large",style:{width:"240px"}},{default:s(()=>[l(v,{key:"\u5168\u90E8",label:"\u5168\u90E8",value:""}),(x(!0),k(J,null,L(m(Y),e=>(x(),Q(v,{key:e.value,label:e.label,value:e.value},null,8,["label","value"]))),128))]),_:1},8,["modelValue"])]),_:1}),l(r,null,{default:s(()=>[l(z,{type:"primary",onClick:a[2]||(a[2]=e=>N(C.value)),style:{display:"none"}},{default:s(()=>[D("\u67E5\u8BE2")]),_:1}),l(z,{onClick:F},{default:s(()=>[D("\u91CD\u7F6E")]),_:1})]),_:1})]),_:1},8,["rules","model"])]),t("div",K,[l(A,{data:m(h),height:"650",style:{width:"100%",color:"black"}},{default:s(()=>[l(i,{prop:"dataTime",label:"\u65F6\u95F4",width:"100",fixed:""}),l(i,{prop:"ms_crop",label:"\u4F5C\u7269\u540D\u79F0",fixed:""}),l(i,{prop:"description",label:"\u63CF\u8FF0",width:"100"}),l(i,{prop:"ms_code",label:"\u76D1\u6D4B\u7AD9\u7F16\u7801",width:"120"}),l(i,{label:"\u767D\u7C89\u75C5"},{default:s(e=>[t("div",O,[t("span",X,d(e.row.barley_powdery_mildew)+"%",1)])]),_:1}),l(i,{label:"\u7A57\u8150\u75C5"},{default:s(e=>[t("div",Z,[t("span",ee,d(e.row.ear_rot)+"%",1)])]),_:1}),l(i,{label:"\u8D64\u9709\u83CC"},{default:s(e=>[t("div",te,[t("span",le,d(e.row.gibberella)+"%",1)])]),_:1}),l(i,{label:"\u6563\u9ED1\u7A57\u75C5"},{default:s(e=>[t("div",ae,[t("span",oe,d(e.row.loose_smut)+"%",1)])]),_:1}),l(i,{label:"\u5927\u6591\u75C5"},{default:s(e=>[t("div",se,[t("span",ne,d(e.row.northern_leaf_blight)+"%",1)])]),_:1}),l(i,{label:"\u6839\u8150\u75C5"},{default:s(e=>[t("div",ie,[t("span",re,d(e.row.root_rot)+"%",1)])]),_:1}),l(i,{label:"\u7C97\u7F29\u75C5"},{default:s(e=>[t("div",de,[t("span",_e,d(e.row.rough_dwarf)+"%",1)])]),_:1}),l(i,{label:"\u7EB9\u67AF\u75C5"},{default:s(e=>[t("div",me,[t("span",ue,d(e.row.sheath_blight)+"%",1)])]),_:1}),l(i,{label:"\u5C0F\u6591\u75C5"},{default:s(e=>[t("div",ce,[t("span",pe,d(e.row.southern_leaf_blight)+"%",1)])]),_:1}),l(i,{label:"\u830E\u57FA\u8150\u75C5"},{default:s(e=>[t("div",fe,[t("span",ge,d(e.row.stem_base_rot)+"%",1)])]),_:1}),l(i,{label:"\u5168\u8680\u75C5"},{default:s(e=>[t("div",ve,[t("span",ye,d(e.row.take_all)+"%",1)])]),_:1}),l(i,{label:"\u9876\u8150\u75C5"},{default:s(e=>[t("div",he,[t("span",be,d(e.row.top_rot)+"%",1)])]),_:1}),l(i,{label:"\u9ED1\u7C89\u75C5"},{default:s(e=>[t("div",xe,[t("span",we,d(e.row.ustilago_maydis)+"%",1)])]),_:1}),l(i,{label:"\u9508\u75C5"},{default:s(e=>[t("div",Ce,[t("span",Ye,d(e.row.yellow_rust)+"%",1)])]),_:1})]),_:1},8,["data"])]),t("div",ze,[l(I,{"current-page":m(_),"onUpdate:current-page":a[3]||(a[3]=e=>M(_)?_.value=e:_=e),"page-size":m(u),"onUpdate:page-size":a[4]||(a[4]=e=>M(u)?u.value=e:u=e),"page-sizes":[10,20,30,40],size:"default",background:"true",layout:"total, sizes, prev, pager, next, jumper",total:m(b),onSizeChange:B,onCurrentChange:S},null,8,["current-page","page-size","total"])])])}}},Me=P(ke,[["__scopeId","data-v-ee9adcff"]]);export{Me as default};
|