suyuan-breed/public/admin/assets/index.9a3967d4.js

2 lines
5.5 KiB
JavaScript

import{B as K,C as U,w as q,D as M,J as Q,K as z,L as G,M as H}from"./element-plus.0aa2c80d.js";import{_ as O}from"./index.vue_vue_type_script_setup_true_lang.0cb948f8.js";import{_ as W}from"./index.vue_vue_type_script_setup_true_lang.4e44db35.js";import{f as X,b as Y}from"./index.8b40bb9d.js";import{u as Z}from"./usePaging.2a59f422.js";import{u as ee}from"./useDictOptions.cc1b72cb.js";import{E as te,a as oe,b as ae}from"./edit.c475629c.js";import{d as V,s as le,r as D,_ as re,ae as ne,o as i,c as se,T as e,K as o,L as _,u as n,J as m,Q as ie,a as g,R as r,S as p,j as ue,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.3838d2e5.js";import"./common.5fcb7813.js";const me=r("\u67E5\u8BE2"),pe=r("\u91CD\u7F6E"),de=r(" \u65B0\u589E "),_e=r(" \u5220\u9664 "),ce={class:"mt-4"},fe=["src"],ve=r(" \u7F16\u8F91 "),be=r(" \u5220\u9664 "),Ce={class:"flex mt-4 justify-end"},ye=V({name:"farmLists"}),it=V({...ye,setup(he){const c=le(),f=D(!1),v=re({farm_name:""}),h=D([]),x=s=>{h.value=s.map(({id:l})=>l)},{dictData:F}=ee("farm_type,breed_type"),{pager:d,getLists:b,resetParams:$,resetPage:L}=Z({fetchFun:oe,params:v}),P=async()=>{var s;f.value=!0,await A(),(s=c.value)==null||s.open("add")},S=async s=>{var l,C;f.value=!0,await A(),(l=c.value)==null||l.open("edit"),(C=c.value)==null||C.setFormData(s)},w=async s=>{await X.confirm("\u786E\u5B9A\u8981\u5220\u9664\uFF1F"),await ae({id:s}),b()};return b(),(s,l)=>{const C=K,B=U,u=q,R=M,E=Q,T=Y,a=z,k=W,N=G,j=O,y=ne("perms"),I=H;return i(),se("div",null,[e(E,{class:"!border-none mb-4",shadow:"never"},{default:o(()=>[e(R,{class:"mb-[-16px]",model:v,inline:""},{default:o(()=>[e(B,{label:"\u540D\u79F0",prop:"farm_name"},{default:o(()=>[e(C,{class:"w-[280px]",modelValue:v.farm_name,"onUpdate:modelValue":l[0]||(l[0]=t=>v.farm_name=t),clearable:"",placeholder:"\u8BF7\u8F93\u5165\u540D\u79F0"},null,8,["modelValue"])]),_:1}),e(B,null,{default:o(()=>[e(u,{type:"primary",onClick:n(L)},{default:o(()=>[me]),_:1},8,["onClick"]),e(u,{onClick:n($)},{default:o(()=>[pe]),_:1},8,["onClick"])]),_:1})]),_:1},8,["model"])]),_:1}),_((i(),m(E,{class:"!border-none",shadow:"never"},{default:o(()=>[_((i(),m(u,{type:"primary",onClick:P},{icon:o(()=>[e(T,{name:"el-icon-Plus"})]),default:o(()=>[de]),_:1})),[[y,["farm.farm/add"]]]),_((i(),m(u,{disabled:!h.value.length,onClick:l[1]||(l[1]=t=>w(h.value))},{default:o(()=>[_e]),_:1},8,["disabled"])),[[y,["farm.farm/delete"]]]),g("div",ce,[e(N,{data:n(d).lists,onSelectionChange:x},{default:o(()=>[e(a,{type:"selection",width:"55"}),e(a,{label:"\u540D\u79F0",prop:"farm_name","show-overflow-tooltip":""}),e(a,{label:"\u517B\u6B96\u57FA\u5730\u7C7B\u578B",prop:"farm_type"},{default:o(({row:t})=>[e(k,{options:n(F).farm_type,value:t.farm_type},null,8,["options","value"])]),_:1}),e(a,{label:"\u517B\u6B96\u79CD\u7C7B",prop:"breed_type"},{default:o(({row:t})=>[e(k,{options:n(F).breed_type,value:t.breed_type},null,8,["options","value"])]),_:1}),e(a,{label:"\u517B\u6B96\u573A\u89C4\u6A21",prop:"form_scale","show-overflow-tooltip":""}),e(a,{label:"\u8D1F\u8D23\u4EBA",prop:"master","show-overflow-tooltip":""}),e(a,{label:"\u8054\u7CFB\u65B9\u5F0F",prop:"master_contact","show-overflow-tooltip":""}),e(a,{label:"\u7701",prop:"province"},{default:o(({row:t})=>[r(p(t.provinceAttr.province_name),1)]),_:1}),e(a,{label:"\u5E02",prop:"city"},{default:o(({row:t})=>[r(p(t.cityAttr.city_name),1)]),_:1}),e(a,{label:"\u533A",prop:"area"},{default:o(({row:t})=>[r(p(t.areaAttr.county_name),1)]),_:1}),e(a,{label:"\u9547/\u8857",prop:"street"},{default:o(({row:t})=>[r(p(t.streetAttr.town_name),1)]),_:1}),e(a,{label:"\u6751",prop:"village"},{default:o(({row:t})=>[r(p(t.villageAttr.village_name),1)]),_:1}),e(a,{label:"\u5C0F\u961F",prop:"bridge"},{default:o(({row:t})=>[r(p(t.bridgeAttr.group_name),1)]),_:1}),e(a,{label:"\u5730\u5740",prop:"address","show-overflow-tooltip":""}),e(a,{label:"\u56FE\u7247"},{default:o(({row:t})=>[g("img",{src:t.image},null,8,fe)]),_:1}),e(a,{label:"\u64CD\u4F5C",width:"120",fixed:"right"},{default:o(({row:t})=>[_((i(),m(u,{type:"primary",link:"",onClick:J=>S(t)},{default:o(()=>[ve]),_:2},1032,["onClick"])),[[y,["farm.farm/edit"]]]),_((i(),m(u,{type:"danger",link:"",onClick:J=>w(t.id)},{default:o(()=>[be]),_:2},1032,["onClick"])),[[y,["farm.farm/delete"]]])]),_:1})]),_:1},8,["data"])]),g("div",Ce,[e(j,{modelValue:n(d),"onUpdate:modelValue":l[2]||(l[2]=t=>ue(d)?d.value=t:null),onChange:n(b)},null,8,["modelValue","onChange"])])]),_:1})),[[I,n(d).loading]]),f.value?(i(),m(te,{key:0,ref_key:"editRef",ref:c,"dict-data":n(F),onSuccess:n(b),onClose:l[3]||(l[3]=t=>f.value=!1)},null,8,["dict-data","onSuccess"])):ie("",!0)])}}});export{it as default};