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