Agriculture-front-end/dist/assets/index.c79ebeb4.js

2 lines
6.8 KiB
JavaScript
Raw Normal View History

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.9f28707e.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"}},{def