Agriculture-front-end/dist/assets/chzl.4141e351.js

2 lines
6.5 KiB
JavaScript
Raw Normal View History

2023-09-21 17:37:29 +08:00
import{L as P,_ as de,B as ue,r as i,D as re,P as ce,d as u,O as L,o as h,c as N,G as z,H as Q,f as e,e as l,w as a,i as pe,m as p,j as k,F as R,k as s,x as G,l as T,p as me,q as fe,s as _e}from"./index.57224d07.js";import{_ as he,a as ge,b as ve}from"./fang.a29eda73.js";function ye(r){return P({url:"/system/chzl/list",method:"get",params:r})}function be(r){return P({url:"/system/chzl/insert",method:"post",data:r})}function ze(r){return P({url:"/system/chzl/delete",method:"get",params:r})}const V=r=>(me("data-v-4bcdc4f9"),r=r(),fe(),r),xe={class:"app-container"},we=["onClick"],Ce={class:"dialog-footer"},ke={class:"titleDivs"},Ve=V(()=>s("div",{style:{height:"60px",width:"6px",background:"rgba(100, 195, 164, 1)"}},null,-1)),Se=V(()=>s("div",{style:{height:"60px",width:"6px",background:"#fff"}},null,-1)),Ue=V(()=>s("div",{style:{height:"60px",width:"3px",background:"rgba(100, 195, 164, 0.6)"}},null,-1)),De={style:{background:"#fff",height:"60px",padding:"20px","font-size":"28px","font-weight":"800"}},Ne={class:"GuidanceDiv"},Re={class:"GuidanceContent"},Ge={style:{color:"rgba(100, 195, 164, 1)","font-weight":"600",display:"flex"}},Pe={key:0,src:he},$e={key:1,src:ge},qe={style:{"white-space":"pre-line"}},Be=V(()=>s("h3",{style:{color:"rgba(100, 195, 164, 1)","font-weight":"600",display:"flex"}},[s("img",{src:ve}),p(" \xA0 \u9632\u6CBB\u65B9\u6CD5 ")],-1)),Fe={style:{"white-space":"pre-wrap"}},Ie=ue({name:"Chzl"}),Ke=Object.assign(Ie,{setup(r){const{proxy:m}=_e(),$=i([]),f=i(!1),S=i(!0),x=i(!0),j=i([]),O=i(!0),A=i(!0),U=i(0),q=i("");let v=i(!1);i([]);let w=i([]);const E=re({form:{},queryParams:{pageNum:1,pageSize:10,id:null,name:null,bt:null,nr:null},rules:{}}),{queryParams:c,form:d,rules:H}=ce(E);function _(){S.value=!0,ye({...c.value}).then(n=>{$.value=n.data,U.value=n.total,S.value=!1})}function J(){f.value=!1,B()}function B(){d.value={name:null,xttz:null,fzff:null},m.resetForm("chzlRef")}function D(){c.value.pageNum=1,_()}function M(){m.resetForm("queryRef"),D()}function W(n){j.value=n.map(t=>t.id),O.value=n.length!=1,A.value=!n.length}function X(){B(),f.value=!0,q.value="\u6DFB\u52A0\u75C5\u5BB3"}function Y(){m.$refs.chzlRef.validate(n=>{n&&(d.value.id!=null?updateChzl(d.value).then(t=>{m.$modal.msgSuccess("\u4FEE\u6539\u6210\u529F"),f.value=!1,_()}):be(d.value).then(t=>{m.$modal.msgSuccess(t.msg),f.value=!1,_()}))})}function Z(n){const t=n.name;m.$modal.confirm('\u662F\u5426\u786E\u8BA4\u5220\u9664"'+t+'"\u7684\u6570\u636E\u9879\uFF1F').then(function(){return ze({name:t})}).then(()=>{_(),m.$modal.msgSuccess("\u5220\u9664\u6210\u529F")}).catch(()=>{})}const ee=n=>{v.value=!0,w.value=n};return _(),(n,t)=>{const C=u("el-input"),y=u("el-form-item"),g=u("el-button"),F=u("el-form"),te=u("el-col"),le=u("right-toolbar"),oe=u("el-row"),b=u("el-table-column"),ae=u("el-table"),ne=u("pagination"),I=u("el-dialog"),K=L("hasPermi"),se=L("loading");return h(),N("div",xe,[z(l(F,{model:e(c),ref:"queryRef",inline:!0,"label-width":"68px"},{default:a(()=>[l(y,{label:"\u75C5\u5BB3\u540D\u79F0",prop:"name"},{default:a(()=>[l(C,{modelValue:e(c).name,"onUpdate:modelValue":t[0]||(t[0]=o=>e(c).name=o),placeholder:"\u8BF7\u8F93\u5165\u75C5\u5BB3\u540D\u79F0",clearable:"",onKeyup:pe(D,["enter"])},null,8,["modelValue","onKeyup"])]),_:1}),l(y,null,{default:a(()=>[l(g,{type:"primary",icon:"Search",onClick:D},{default:a(()=>[p("\u641C\u7D22")]),_:1}),l(g,{icon:"Refresh",onClick:M},{default:a(()=>[p("\u91CD\u7F6E")]),_:1})]),_:1})]),_:1},8,["model"]),[[Q,e(x)]]),l(oe,{gutter:10,class:"mb8"},{default:a(()=>[l(te,{span:1.5},{default:a(()=>[z((h(),k(g,{type:"primary",plain:"",icon:"Plus",onClick:X},{default:a(()=>[p(" \u65B0\u589E ")]),_:1})),[[K,["system:chzl:add"]]])]),_:1},8,["span"]),l(le,{showSearch:e(x),"onUpdate:showSearch":t[1]||(t[1]=o=>R(x)?x.value=o:null),onQueryTable:_},null,8,["showSearch"])]),_:1}),z((h(),k(ae,{data:e($),"max-height":"75vh",onSelectionChange:W},{default:a(()=>[l(b,{label:"\u75C5\u5BB3\u540D\u79F0",align:"center",prop:"name"}),l(b,{label:"\u9632\u6CBB\u65B9\u6CD5",align:"center",prop:"fzff"}),l(b,{label:"\u53D1\u75C5\u75C7\u