2 lines
5.0 KiB
JavaScript
2 lines
5.0 KiB
JavaScript
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.7d0bde5f.js";import{u as Y}from"./usePaging.2a59f422.js";import{u as Z}from"./useDictOptions.2e5fb2d1.js";import{E as ee,a as oe,b as te}from"./edit.d29e15ff.js";import"./lodash.e92d81a1.js";import{d as V,s as ae,r as k,_ as ne,ae as se,o as u,c as le,T as e,K as o,L as m,u as n,J as r,Q as ue,a as E,j as ie,R as p,n as g}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.8f8cdbb9.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"}),so=V({...ve,setup(Ce){const _=ae(),d=k(!1),f=ne({fence_house_name:""}),y=k([]),x=s=>{y.value=s.map(({id:a})=>a)},{dictData:h}=Z("animal_type,fence_house_type,system_disable"),{pager:c,getLists:v,resetParams:$,resetPage:L}=Y({fetchFun:oe,params:f}),P=async()=>{var s;d.value=!0,await g(),(s=_.value)==null||s.open("add")},A=async s=>{var a,C;d.value=!0,await g(),(a=_.value)==null||a.open("edit"),(C=_.value)==null||C.setFormData(s)},w=async s=>{await W.confirm("\u786E\u5B9A\u8981\u5220\u9664\uFF1F"),await te({id:s}),v()};return v(),(s,a)=>{const C=I,D=J,i=K,R=U,B=q,T=X,l=M,F=O,N=Q,S=G,b=se("perms"),H=z;return u(),le("div",null,[e(B,{class:"!border-none mb-4",shadow:"never"},{default:o(()=>[e(R,{class:"mb-[-16px]",model:f,inline:""},{default:o(()=>[e(D,{label:"\u680F\u820D\u540D\u79F0",prop:"fence_house_name"},{default:o(()=>[e(C,{class:"w-[280px]",modelValue:f.fence_house_name,"onUpdate:modelValue":a[0]||(a[0]=t=>f.fence_house_name=t),clearable:"",placeholder:"\u8BF7\u8F93\u5165\u680F\u820D\u540D\u79F0"},null,8,["modelValue"])]),_:1}),e(D,null,{default:o(()=>[e(i,{type:"primary",onClick:n(L)},{default:o(()=>[re]),_:1},8,["onClick"]),e(i,{onClick:n($)},{default:o(()=>[pe]),_:1},8,["onClick"])]),_:1})]),_:1},8,["model"])]),_:1}),m((u(),r(B,{class:"!border-none",shadow:"never"},{default:o(()=>[m((u(),r(i,{type:"primary",onClick:P},{icon:o(()=>[e(T,{name:"el-icon-Plus"})]),default:o(()=>[ce]),_:1})),[[b,["fence_house.fence_house/add"]]]),m((u(),r(i,{disabled:!y.value.length,onClick:a[1]||(a[1]=t=>w(y.value))},{default:o(()=>[me]),_:1},8,["disabled"])),[[b,["fence_house.fence_house/delete"]]]),E("div",_e,[e(N,{data:n(c).lists,onSelectionChange:x},{default:o(()=>[e(l,{type:"selection",width:"55"}),e(l,{label:"\u517B\u6B96\u57FA\u5730",prop:"farm_id","show-overflow-tooltip":""}),e(l,{label:"\u680F\u820D\u540D\u79F0",prop:"fence_house_name","show-overflow-tooltip":""}),e(l,{label:"\u52A8\u7269\u7C7B\u578B",prop:"animal_type"},{default:o(({row:t})=>[e(F,{options:n(h).animal_type,value:t.animal_type},null,8,["options","value"])]),_:1}),e(l,{label:"\u680F\u820D\u7C7B\u578B",prop:"fence_house_type"},{default:o(({row:t})=>[e(F,{options:n(h).fence_house_type,value:t.fence_house_type},null,8,["options","value"])]),_:1}),e(l,{label:"\u5BB9\u91CF",prop:"capacity","show-overflow-tooltip":""}),e(l,{label:"\u8D1F\u8D23\u4EBA",prop:"master","show-overflow-tooltip":""}),e(l,{label:"\u72B6\u6001",prop:"status"},{default:o(({row:t})=>[e(F,{options:n(h).system_disable,value:t.status},null,8,["options","value"])]),_:1}),e(l,{label:"\u64CD\u4F5C",width:"120",fixed:"right"},{default:o(({row:t})=>[m((u(),r(i,{type:"primary",link:"",onClick:j=>A(t)},{default:o(()=>[de]),_:2},1032,["onClick"])),[[b,["fence_house.fence_house/edit"]]]),m((u(),r(i,{type:"danger",link:"",onClick:j=>w(t.id)},{default:o(()=>[fe]),_:2},1032,["onClick"])),[[b,["fence_house.fence_house/delete"]]])]),_:1})]),_:1},8,["data"])]),E("div",he,[e(S,{modelValue:n(c),"onUpdate:modelValue":a[2]||(a[2]=t=>ie(c)?c.value=t:null),onChange:n(v)},null,8,["modelValue","onChange"])])]),_:1})),[[H,n(c).loading]]),d.value?(u(),r(ee,{key:0,ref_key:"editRef",ref:_,"dict-data":n(h),onSuccess:n(v),onClose:a[3]||(a[3]=t=>d.value=!1)},null,8,["dict-data","onSuccess"])):ue("",!0)])}}});export{so as default};
|