2 lines
5.7 KiB
JavaScript
2 lines
5.7 KiB
JavaScript
import{Q as e,_ as l,G as a,r as t,I as n,U as o,d as u,T as d,o as s,c as i,K as r,M as p,f as c,e as m,w as f,j as h,n as g,p as v,k as y,J as b,l as x,A as w,m as z,q as _,s as V,v as k}from"./index.e5c8b0d6.js";import{_ as S,a as C,b as R}from"./fang.1cee0737.js";const U=e=>(_("data-v-27d512e1"),e=e(),V(),e),q={class:"app-container"},P=["onClick"],j={class:"dialog-footer"},G={class:"titleDivs"},N=U((()=>x("div",{style:{height:"60px",width:"6px",background:"rgba(100, 195, 164, 1)"}},null,-1))),K=U((()=>x("div",{style:{height:"60px",width:"6px",background:"#fff"}},null,-1))),$=U((()=>x("div",{style:{height:"60px",width:"3px",background:"rgba(100, 195, 164, 0.6)"}},null,-1))),A={style:{background:"#fff",height:"60px",padding:"20px","font-size":"28px","font-weight":"800"}},D={class:"GuidanceDiv"},F={class:"GuidanceContent"},I={style:{color:"rgba(100, 195, 164, 1)","font-weight":"600",display:"flex"}},Q={key:0,src:S},T={key:1,src:C},J={style:{"white-space":"pre-line"}},M=U((()=>x("h3",{style:{color:"rgba(100, 195, 164, 1)","font-weight":"600",display:"flex"}},[x("img",{src:R}),g(" 防治方法 ")],-1))),O={style:{"white-space":"pre-wrap"}},B=a({name:"insect"}),E=l(Object.assign(B,{setup(l){const{proxy:a}=k(),_=t([]),V=t(!1),S=t(!0),C=t(!0),R=t([]),U=t(!0),B=t(!0),E=t(0),H=t("");let L=t(!1),W=t([]);const X=n({form:{},queryParams:{pageNum:1,pageSize:10,id:null,name:null,bt:null,nr:null},rules:{}}),{queryParams:Y,form:Z,rules:ee}=o(X);function le(){var l;S.value=!0,(l={...Y.value},e({url:"/chyf/queryAll",method:"get",params:l})).then((e=>{_.value=e.data,E.value=e.total,S.value=!1}))}function ae(){V.value=!1,te()}function te(){Z.value={name:null,xttz:null,fzff:null},a.resetForm("chzlRef")}function ne(){Y.value.pageNum=1,le()}function oe(){a.resetForm("queryRef"),ne()}function ue(e){R.value=e.map((e=>e.id)),U.value=1!=e.length,B.value=!e.length}function de(){te(),V.value=!0,H.value="添加虫害"}function se(){a.$refs.chzlRef.validate((l=>{var t;l&&(null!=Z.value.id?updateChzl(Z.value).then((e=>{a.$modal.msgSuccess("修改成功"),V.value=!1,le()})):(t=Z.value,e({url:"/chyf/add",method:"post",data:t})).then((e=>{a.$modal.msgSuccess(e.msg),V.value=!1,le()})))}))}return le(),(e,l)=>{const a=u("el-input"),t=u("el-form-item"),n=u("el-button"),o=u("el-form"),k=u("el-col"),R=u("right-toolbar"),U=u("el-row"),B=u("el-table-column"),X=u("el-table"),te=u("pagination"),ie=u("el-dialog"),re=d("hasPermi"),pe=d("loading");return s(),i("div",q,[r(m(o,{model:c(Y),ref:"queryRef",inline:!0,"label-width":"68px",onSubmit:l[1]||(l[1]=v((()=>{}),["prevent"]))},{default:f((()=>[m(t,{label:"虫害名称",prop:"name"},{default:f((()=>[m(a,{modelValue:c(Y).name,"onUpdate:modelValue":l[0]||(l[0]=e=>c(Y).name=e),placeholder:"请输入虫害名称",clearable:"",onKeyup:h(ne,["enter"])},null,8,["modelValue","onKeyup"])])),_:1}),m(t,null,{default:f((()=>[m(n,{type:"primary",icon:"Search",onClick:ne},{default:f((()=>[g("搜索")])),_:1}),m(n,{icon:"Refresh",onClick:oe},{default:f((()=>[g("重置")])),_:1})])),_:1})])),_:1},8,["model"]),[[p,c(C)]]),m(U,{gutter:10,class:"mb8"},{default:f((()=>[m(k,{span:1.5},{default:f((()=>[r((s(),y(n,{type:"primary",plain:"",icon:"Plus",onClick:de},{default:f((()=>[g(" 新增 ")])),_:1})),[[re,["system:insect:add"]]])])),_:1},8,["span"]),m(R,{showSearch:c(C),"onUpdate:showSearch":l[2]||(l[2]=e=>b(C)?C.value=e:null),onQueryTable:le},null,8,["showSearch"])])),_:1}),r((s(),y(X,{data:c(_),"max-height":"73vh",onSelectionChange:ue},{default:f((()=>[m(B,{label:"虫害名称",align:"center",prop:"name"}),m(B,{label:"防治方法",align:"center",prop:"fzff"}),m(B,{label:"发病症状",align:"center",prop:"xttz"}),(s(),y(B,{key:e.index,align:"center",label:"详情"},{default:f((e=>[x("span",{class:"Guidance",style:{cursor:"pointer",color:"rgba(100, 195, 164, 1)"},onClick:l=>{return a=e.row,L.value=!0,void(W.value=a);var a}}," 查看详情 ",8,P)])),_:1}))])),_:1},8,["data"])),[[pe,c(S)]]),r(m(te,{total:c(E),page:c(Y).pageNum,"onUpdate:page":l[3]||(l[3]=e=>c(Y).pageNum=e),limit:c(Y).pageSize,"onUpdate:limit":l[4]||(l[4]=e=>c(Y).pageSize=e),onPagination:le},null,8,["total","page","limit"]),[[p,c(E)>0]]),m(ie,{title:c(H),modelValue:c(V),"onUpdate:modelValue":l[8]||(l[8]=e=>b(V)?V.value=e:null),width:"500px","append-to-body":""},{footer:f((()=>[x("div",j,[m(n,{type:"primary",onClick:se},{default:f((()=>[g("确 定")])),_:1}),m(n,{onClick:ae},{default:f((()=>[g("取 消")])),_:1})])])),default:f((()=>[m(o,{ref:"chzlRef",model:c(Z),rules:c(ee),"label-width":"80px"},{default:f((()=>[m(t,{label:"虫害名称",prop:"name"},{default:f((()=>[m(a,{modelValue:c(Z).name,"onUpdate:modelValue":l[5]||(l[5]=e=>c(Z).name=e),placeholder:"请输入虫害名称"},null,8,["modelValue"])])),_:1}),m(t,{label:"防治方法",prop:"fzff"},{default:f((()=>[m(a,{autosize:{minRows:2,maxRows:4},type:"textarea",modelValue:c(Z).fzff,"onUpdate:modelValue":l[6]||(l[6]=e=>c(Z).fzff=e),placeholder:"请输入防治方法"},null,8,["modelValue"])])),_:1}),m(t,{label:"发病症状",prop:"xttz"},{default:f((()=>[m(a,{autosize:{minRows:2,maxRows:4},type:"textarea",modelValue:c(Z).xttz,"onUpdate:modelValue":l[7]||(l[7]=e=>c(Z).xttz=e),placeholder:"请输入发病症状"},null,8,["modelValue"])])),_:1})])),_:1},8,["model","rules"])])),_:1},8,["title","modelValue"]),m(ie,{modelValue:c(L),"onUpdate:modelValue":l[9]||(l[9]=e=>b(L)?L.value=e:L=e),title:"指导意见",width:"50%",center:""},{default:f((()=>[x("div",G,[N,K,$,x("h2",A,w(c(W).name),1)]),x("div",D,[x("div",F,[x("h3",I,["虫情监测仪"==e.label3?(s(),i("img",Q)):z("",!0),"大田视频病害监测"==e.label3?(s(),i("img",T)):z("",!0),g(" 形态特征 ")]),x("p",J," "+w(c(W).xttz),1),M,x("p",O,w(c(W).fzff),1)])])])),_:1},8,["modelValue"])])}}}),[["__scopeId","data-v-27d512e1"]]);export{E as default};
|