2024-01-15 09:23:49 +08:00
|
|
|
import{B as I,C as J,w as K,D as U,J as q,K as M,L as Q,M as z}from"./element-plus.0aa2c80d.js";import{_ as G}from"./index.vue_vue_type_script_setup_true_lang.0cb948f8.js";import{_ as O}from"./index.vue_vue_type_script_setup_true_lang.4e44db35.js";import{f as W,b as X}from"./index.8b40bb9d.js";import{u as Y}from"./usePaging.2a59f422.js";import{u as Z}from"./useDictOptions.cc1b72cb.js";import{_ as ee,a as oe,b as te}from"./edit.vue_vue_type_script_setup_true_name_fenceHouseEdit_lang.0212cdda.js";import"./lodash.e92d81a1.js";import{d as V,s as ae,r as k,_ as ne,ae as le,o as i,c as se,T as e,K as o,L as m,u as n,J as r,Q as ie,a as g,j as ue,R as p,n as E}from"./@vue.108c970a.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"./vue-router.ed788fee.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.3838d2e5.js";const re=p("\u67E5\u8BE2"),pe=p("\u91CD\u7F6E"),ce=p(" \u65B0\u589E "),me=p(" \u5220\u9664 "),_e={class:"mt-4"},de=p(" \u7F16\u8F91 "),fe=p(" \u5220\u9664 "),he={class:"flex mt-4 justify-end"},ve=V({name:"fenceHouseLists"}),lo=V({...ve,setup(Ce){const _=ae(),d=k(!1),f=ne({fence_house_name:""}),F=k([]),x=l=>{F.value=l.map(({id:t})=>t)},{dictData:b}=Z("animal_type,fence_house_type"),{pager:c,getLists:h,resetParams:$,resetPage:L}=Y({fetchFun:oe,params:f}),A=async()=>{var l;d.value=!0,await E(),(l=_.value)==null||l.open("add")},P=async l=>{var t,v;d.value=!0,await E(),(t=_.value)==null||t.open("edit"),(v=_.value)==null||v.setFormData(l)},y=async l=>{await W.confirm("\u786E\u5B9A\u8981\u5220\u9664\uFF1F"),await te({id:l}),h()};return h(),(l,t)=>{const v=I,w=J,u=K,R=U,D=q,T=X,s=M,B=O,N=Q,S=G,C=le("perms"),H=z;return i(),se("div",null,[e(D,{class:"!border-none mb-4",shadow:"never"},{default:o(()=>[e(R,{class:"mb-[-16px]",model:f,inline:""},{default:o(()=>[e(w,{label:"\u680F\u820D\u540D\u79F0",prop:"fence_house_name"},{default:o(()=>[e(v,{class:"w-[280px]",modelValue:f.fence_house_name,"onUpdate:modelValue":t[0]||(t[0]=a=>f.fence_house_name=a),clearable:"",placeholder:"\u8BF7\u8F93\u5165\u680F\u820D\u540D\u79F0"},null,8,["modelValue"])]),_:1}),e(w,null,{default:o(()=>[e(u,{type:"primary",onClick:n(L)},{default:o(()=>[re]),_:1},8,["onClick"]),e(u,{onClick:n($)},{default:o(()=>[pe]),_:1},8,["onClick"])]),_:1})]),_:1},8,["model"])]),_:1}),m((i(),r(D,{class:"!border-none",shadow:"never"},{default:o(()=>[m((i(),r(u,{type:"primary",onClick:A},{icon:o(()=>[e(T,{name:"el-icon-Plus"})]),default:o(()=>[ce]),_:1})),[[C,["fence_house.fence_house/add"]]]),m((i(),r(u,{disabled:!F.value.length,onClick:t[1]||(t[1]=a=>y(F.value))},{default:o(()=>[me]),_:1},8,["disabled"])),[[C,["fence_house.fence_house/delete"]]]),g("div",_e,[e(N,{data:n(c).lists,onSelectionChange:x},{default:o(()=>[e(s,{type:"selection",width:"55"}),e(s,{label:"\u517B\u6B96\u57FA\u5730",prop:"farm_id","show-overflow-tooltip":""}),e(s,{label:"\u680F\u820D\u540D\u79F0",prop:"fence_house_name","show-overflow-tooltip":""}),e(s,{label:"\u52A8\u7269\u7C7B\u578B",prop:"animal_type"},{default:o(({row:a})=>[e(B,{options:n(b).animal_type,value:a.animal_type},null,8,["options","value"])]),_:1}),e(s,{label:"\u680F\u820D\u7C7B\u578B",prop:"fence_house_type"},{default:o(({row:a})=>[e(B,{options:n(b).fence_house_type,value:a.fence_house_typ
|