suyuan-breed/public/admin/assets/index.8e848e9f.js

2 lines
5.6 KiB
JavaScript

import{B as U,C as M,w as Q,D as z,J as G,K as O,L as W,M as X,N as Y}from"./element-plus.ae8e286c.js";import{_ as Z}from"./index.vue_vue_type_script_setup_true_lang.4acf6c9d.js";import{_ as ee}from"./index.vue_vue_type_script_setup_true_lang.4e44db35.js";import{k as te,f as oe,b as ae}from"./index.fccb4ef5.js";import{u as ne}from"./usePaging.2a59f422.js";import{u as le}from"./useDictOptions.7b4b6189.js";import{E as se,a as ue,b as ie}from"./edit.27351324.js";import{d as P,s as re,r as w,_ as _e,a3 as me,ae as pe,o as l,c as ce,T as e,K as t,L as m,u as n,J as i,Q as k,a as V,R as r,S as x,j as de,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.0d3bed35.js";const fe=r("\u67E5\u8BE2"),he=r("\u91CD\u7F6E"),ve=r(" \u65B0\u589E "),ye=r(" \u5220\u9664 "),Ce={class:"mt-4"},be=r(" \u7F16\u8F91 "),Fe=r(" \u5220\u9664 "),ke=r(" \u52A8\u7269\u6863\u6848 "),De={class:"flex mt-4 justify-end"},ge=P({name:"fenceHouseLists"}),pt=P({...ge,setup(Be){const d=re(),f=w(!1),h=_e({fence_house_name:""}),b=w([]),$=s=>{b.value=s.map(({id:a})=>a)},{dictData:v}=le("animal_type,fence_house_type,system_disable"),{pager:p,getLists:y,resetParams:L,resetPage:R}=ne({fetchFun:ue,params:h}),S=async()=>{var s;f.value=!0,await A(),(s=d.value)==null||s.open("add")},T=async s=>{var a,C;f.value=!0,await A(),(a=d.value)==null||a.open("edit"),(C=d.value)==null||C.setFormData(s)},D=async s=>{await oe.confirm("\u786E\u5B9A\u8981\u5220\u9664\uFF1F"),await ie({id:s}),y()};return y(),(s,a)=>{const C=U,g=M,_=Q,N=z,B=G,H=ae,u=O,E=W,F=ee,I=me("router-link"),j=X,q=Z,c=pe("perms"),J=Y;return l(),ce("div",null,[e(B,{class:"!border-none mb-4",shadow:"never"},{default:t(()=>[e(N,{class:"mb-[-16px]",model:h,inline:""},{default:t(()=>[e(g,{label:"\u680F\u820D\u540D\u79F0",prop:"fence_house_name"},{default:t(()=>[e(C,{class:"w-[280px]",modelValue:h.fence_house_name,"onUpdate:modelValue":a[0]||(a[0]=o=>h.fence_house_name=o),clearable:"",placeholder:"\u8BF7\u8F93\u5165\u680F\u820D\u540D\u79F0"},null,8,["modelValue"])]),_:1}),e(g,null,{default:t(()=>[e(_,{type:"primary",onClick:n(R)},{default:t(()=>[fe]),_:1},8,["onClick"]),e(_,{onClick:n(L)},{default:t(()=>[he]),_:1},8,["onClick"])]),_:1})]),_:1},8,["model"])]),_:1}),m((l(),i(B,{class:"!border-none",shadow:"never"},{default:t(()=>[m((l(),i(_,{type:"primary",onClick:S},{icon:t(()=>[e(H,{name:"el-icon-Plus"})]),default:t(()=>[ve]),_:1})),[[c,["fence_house.fence_house/add"]]]),m((l(),i(_,{disabled:!b.value.length,onClick:a[1]||(a[1]=o=>D(b.value))},{default:t(()=>[ye]),_:1},8,["disabled"])),[[c,["fence_house.fence_house/delete"]]]),V("div",Ce,[e(j,{data:n(p).lists,onSelectionChange:$},{default:t(()=>[e(u,{type:"selection",width:"55"}),e(u,{label:"\u517B\u6B96\u57FA\u5730",prop:"farm_id"},{default:t(({row:o})=>[o.farm_id!=null?(l(),i(E,{key:0,class:"mr-2",type:"info"},{default:t(()=>[r("ID: "+x(o.farm_id),1)]),_:2},1024)):k("",!0),o.farmAttr!=null?(l(),i(E,{key:1,class:"mr-2",type:"info"},{default:t(()=>[r("\u540D\u79F0: "+x(o.farmAttr.farm_name),1)]),_:2},1024)):k("",!0)]),_:1}),e(u,{label:"\u680F\u820D\u540D\u79F0",prop:"fence_house_name","show-overflow-tooltip":""}),e(u,{label:"\u52A8\u7269\u7C7B\u578B",prop:"animal_type"},{default:t(({row:o})=>[e(F,{options:n(v).animal_type,value:o.animal_type},null,8,["options","value"])]),_:1}),e(u,{label:"\u680F\u820D\u7C7B\u578B",prop:"fence_house_type"},{default:t(({row:o})=>[e(F,{options:n(v).fence_house_type,value:o.fence_house_type},null,8,["options","value"])]),_:1}),e(u,{label:"\u5BB9\u91CF",prop:"capacity","show-overflow-tooltip":""}),e(u,{label:"\u8D1F\u8D23\u4EBA",prop:"master","show-overflow-tooltip":""}),e(u,{label:"\u72B6\u6001",prop:"status"},{default:t(({row:o})=>[e(F,{options:n(v).system_disable,value:o.status},null,8,["options","value"])]),_:1}),e(u,{label:"\u64CD\u4F5C",width:"300",fixed:"right"},{default:t(({row:o})=>[m((l(),i(_,{type:"primary",link:"",onClick:K=>T(o)},{default:t(()=>[be]),_:2},1032,["onClick"])),[[c,["fence_house.fence_house/edit"]]]),m((l(),i(_,{type:"danger",link:"",onClick:K=>D(o.id)},{default:t(()=>[Fe]),_:2},1032,["onClick"])),[[c,["fence_house.fence_house/delete"]]]),m((l(),i(_,{type:"primary",link:""},{default:t(()=>[e(I,{to:{path:n(te)("animal_info.animal_info/lists"),query:{fence_house_id:o.id}}},{default:t(()=>[ke]),_:2},1032,["to"])]),_:2},1024)),[[c,["animal_info.animal_info/lists"]]])]),_:1})]),_:1},8,["data"])]),V("div",De,[e(q,{modelValue:n(p),"onUpdate:modelValue":a[2]||(a[2]=o=>de(p)?p.value=o:null),onChange:n(y)},null,8,["modelValue","onChange"])])]),_:1})),[[J,n(p).loading]]),f.value?(l(),i(se,{key:0,ref_key:"editRef",ref:d,"dict-data":n(v),onSuccess:n(y),onClose:a[3]||(a[3]=o=>f.value=!1)},null,8,["dict-data","onSuccess"])):k("",!0)])}}});export{pt as default};