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.d7311395.js";import{u as Y}from"./usePaging.2a59f422.js";import{u as Z}from"./useDictOptions.53c0e829.js";import{_ as ee,a as oe,b as te}from"./edit.vue_vue_type_script_setup_true_name_fenceHouseEdit_lang.89328ccb.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.7e882bb4.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_type},null,8,["options","value"])]),_:1}),e(s,{label:"\u5BB9\u91CF",prop:"capacity","show-overflow-tooltip":""}),e(s,{label:"\u8D1F\u8D23\u4EBA",prop:"master","show-overflow-tooltip":""}),e(s,{label:"\u72B6\u6001",prop:"status","show-overflow-tooltip":""}),e(s,{label:"\u64CD\u4F5C",width:"120",fixed:"right"},{default:o(({row:a})=>[m((i(),r(u,{type:"primary",link:"",onClick:j=>P(a)},{default:o(()=>[de]),_:2},1032,["onClick"])),[[C,["fence_house.fence_house/edit"]]]),m((i(),r(u,{type:"danger",link:"",onClick:j=>y(a.id)},{default:o(()=>[fe]),_:2},1032,["onClick"])),[[C,["fence_house.fence_house/delete"]]])]),_:1})]),_:1},8,["data"])]),g("div",he,[e(S,{modelValue:n(c),"onUpdate:modelValue":t[2]||(t[2]=a=>ue(c)?c.value=a:null),onChange:n(h)},null,8,["modelValue","onChange"])])]),_:1})),[[H,n(c).loading]]),d.value?(i(),r(ee,{key:0,ref_key:"editRef",ref:_,"dict-data":n(b),onSuccess:n(h),onClose:t[3]||(t[3]=a=>d.value=!1)},null,8,["dict-data","onSuccess"])):ie("",!0)])}}});export{lo as default};
|