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