2 lines
5.6 KiB
JavaScript
2 lines
5.6 KiB
JavaScript
|
import{B as U,C as M,w as Q,D as z,J as G,K as H,M as O,N as W}from"./element-plus.ae8e286c.js";import{_ as X}from"./index.vue_vue_type_script_setup_true_lang.4acf6c9d.js";import{_ as Y}from"./index.vue_vue_type_script_setup_true_lang.4e44db35.js";import{f as Z,b as ee}from"./index.71fc8348.js";import{u as te}from"./vue-router.ed788fee.js";import{u as oe}from"./usePaging.2a59f422.js";import{u as ae}from"./useDictOptions.40b26c73.js";import{E as le,a as re,b as ne}from"./edit.15e0814b.js";import{d as x,s as se,r as A,_ as ie,ae as ue,o as i,c as me,T as e,K as o,L as _,u as n,J as m,Q as pe,a as w,R as r,S as p,j as de,n as V}from"./@vue.108c970a.js";import"./lodash.e92d81a1.js";import"./@vueuse.d3d080b7.js";import"./@element-plus.d6eabd08.js";import"./lodash-es.29c53eac.js";import"./dayjs.664390f6.js";import"./axios.4ebfdb3f.js";import"./async-validator.fb49d0f5.js";import"./@ctrl.82a509e0.js";import"./@popperjs.36402333.js";import"./escape-html.e5dfadb9.js";import"./normalize-wheel-es.8aeb3683.js";import"./pinia.eff1ffd5.js";import"./vue-demi.ebc8116b.js";import"./css-color-function.dbf33394.js";import"./color.e1b5fced.js";import"./clone.0a4e8ac3.js";import"./color-convert.755d189f.js";import"./color-name.e7a4e1d3.js";import"./color-string.e356f5de.js";import"./balanced-match.d2a36341.js";import"./debug.f174a91e.js";import"./ms.a9ae1d6d.js";import"./nprogress.d7c3ab1b.js";import"./vue-clipboard3.add720e2.js";import"./clipboard.01ea18f5.js";import"./echarts.8d7a50ae.js";import"./zrender.1084fa23.js";import"./tslib.60310f1a.js";import"./highlight.js.4ebdf9a4.js";import"./@highlightjs.241b9b5d.js";import"./index.a9e38e26.js";import"./common.e26c7223.js";import"./land.24df685b.js";const _e=r("\u67E5\u8BE2"),ce=r("\u91CD\u7F6E"),fe=r(" \u65B0\u589E "),ve=r(" \u5220\u9664 "),be={class:"mt-4"},ye=["src"],Ce=r(" \u7F16\u8F91 "),he=r(" \u5220\u9664 "),Fe={class:"flex mt-4 justify-end"},ge=x({name:"farmLists"}),dt=x({...ge,setup(we){const{query:$}=te(),c=se(),f=A(!1);let h=$.user_id;typeof h>"u"&&(h="");const v=ie({user_id:h,farm_name:""}),F=A([]),P=s=>{F.value=s.map(({id:l})=>l)},{dictData:g}=ae("farm_type,breed_type"),{pager:d,getLists:b,resetParams:R,resetPage:S}=oe({fetchFun:re,params:v}),L=async()=>{var s;f.value=!0,await V(),(s=c.value)==null||s.open("add")},N=async s=>{var l,y;f.value=!0,await V(),(l=c.value)==null||l.open("edit"),(y=c.value)==null||y.setFormData(s)},B=async s=>{await Z.confirm("\u786E\u5B9A\u8981\u5220\u9664\uFF1F"),await ne({id:s}),b()};return b(),(s,l)=>{const y=U,E=M,u=Q,T=z,k=G,j=ee,a=H,D=Y,q=O,I=X,C=ue("perms"),J=W;return i(),me("div",null,[e(k,{class:"!border-none mb-4",shadow:"never"},{default:o(()=>[e(T,{class:"mb-[-16px]",model:v,inline:""},{default:o(()=>[e(E,{label:"\u540D\u79F0",prop:"farm_name"},{default:o(()=>[e(y,{class:"w-[280px]",modelValue:v.farm_name,"onUpdate:modelValue":l[0]||(l[0]=t=>v.farm_name=t),clearable:"",placeholder:"\u8BF7\u8F93\u5165\u540D\u79F0"},null,8,["modelValue"])]),_:1}),e(E,null,{default:o(()=>[e(u,{type:"primary",onClick:n(S)},{default:o(()=>[_e]),_:1},8,["onClick"]),e(u,{onClick:n(R)},{default:o(()=>[ce]),_:1},8,["onClick"])]),_:1})]),_:1},8,["model"])]),_:1}),_((i(),m(k,{class:"!border-none",shadow:"never"},{default:o(()=>[_((i(),m(u,{type:"primary",onClick:L},{icon:o(()=>[e(j,{name:"el-icon-Plus"})]),default:o(()=>[fe]),_:1})),[[C,["farm.farm/add"]]]),_((i(),m(u,{disabled:!F.value.length,onClick:l[1]||(l[1]=t=>B(F.value))},{default:o(()=>[ve]),_:1},8,["disabled"])),[[C,["farm.farm/delete"]]]),w("div",be,[e(q,{data:n(d).lists,onSelectionChange:P},{default:o(()=>[e(a,{type:"selection",width:"55"}),e(a,{label:"\u540D\u79F0",prop:"farm_name","show-overflow-tooltip":""}),e(a,{label:"\u517B\u6B96\u57FA\u5730\u7C7B\u578B",prop:"farm_type"},{default:o(({row:t})=>[e(D,{options:n(g).farm_type,value:t.farm_type},null,8,["options","value"])]),_:1}),e(a,{label:"\u517B\u6B96\u79CD\u7C7B",prop:"breed_type"},{default:o(({row:t})=>[e(D,{options:n(g).breed_type,value:t.breed_type},null,8,["options","value"])]),_:1}),e(a,{label:"\u517B\u6B96\u573A\u89C4\u6A21",prop:"form_scale","s
|