suyuan-breed/public/admin/assets/index.5b541fbd.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 H,L as O,M as W}from"./element-plus.0aa2c80d.js";import{_ as X}from"./index.vue_vue_type_script_setup_true_lang.0cb948f8.js";import{_ as Y}from"./index.vue_vue_type_script_setup_true_lang.4e44db35.js";import{f as Z,b as ee}from"./index.d7311395.js";import{u as te}from"./vue-router.ed788fee.js";import{u as oe}from"./usePaging.2a59f422.js";import{u as ae}from"./useDictOptions.53c0e829.js";import{E as le,a as re,b as ne}from"./edit.96ad0c67.js";import{d as x,s as se,r as A,_ as ie,ae as ue,o as i,c as me,T as e,K as o,L as _,u as n,J as m,Q as pe,a as w,R as r,S as p,j as de,n as V}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"./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";import"./common.66675abf.js";const _e=r("\u67E5\u8BE2"),ce=r("\u91CD\u7F6E"),fe=r(" \u65B0\u589E "),ve=r(" \u5220\u9664 "),be={class:"mt-4"},ye=["src"],Ce=r(" \u7F16\u8F91 "),he=r(" \u5220\u9664 "),Fe={class:"flex mt-4 justify-end"},ge=x({name:"farmLists"}),pt=x({...ge,setup(we){const{query:$}=te(),c=se(),f=A(!1);let h=$.user_id;typeof h>"u"&&(h="");const v=ie({user_id:h,farm_name:""}),F=A([]),L=s=>{F.value=s.map(({id:l})=>l)},{dictData:g}=ae("farm_type,breed_type"),{pager:d,getLists:b,resetParams:P,resetPage:R}=oe({fetchFun:re,params:v}),S=async()=>{var s;f.value=!0,await V(),(s=c.value)==null||s.open("add")},T=async s=>{var l,y;f.value=!0,await V(),(l=c.value)==null||l.open("edit"),(y=c.value)==null||y.setFormData(s)},B=async s=>{await Z.confirm("\u786E\u5B9A\u8981\u5220\u9664\uFF1F"),await ne({id:s}),b()};return b(),(s,l)=>{const y=U,E=M,u=Q,N=z,k=G,j=ee,a=H,D=Y,q=O,I=X,C=ue("perms"),J=W;return i(),me("div",null,[e(k,{class:"!border-none mb-4",shadow:"never"},{default:o(()=>[e(N,{class:"mb-[-16px]",model:v,inline:""},{default:o(()=>[e(E,{label:"\u540D\u79F0",prop:"farm_name"},{default:o(()=>[e(y,{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(E,null,{default:o(()=>[e(u,{type:"primary",onClick:n(R)},{default:o(()=>[_e]),_:1},8,["onClick"]),e(u,{onClick:n(P)},{default:o(()=>[ce]),_:1},8,["onClick"])]),_:1})]),_:1},8,["model"])]),_:1}),_((i(),m(k,{class:"!border-none",shadow:"never"},{default:o(()=>[_((i(),m(u,{type:"primary",onClick:S},{icon:o(()=>[e(j,{name:"el-icon-Plus"})]),default:o(()=>[fe]),_:1})),[[C,["farm.farm/add"]]]),_((i(),m(u,{disabled:!F.value.length,onClick:l[1]||(l[1]=t=>B(F.value))},{default:o(()=>[ve]),_:1},8,["disabled"])),[[C,["farm.farm/delete"]]]),w("div",be,[e(q,{data:n(d).lists,onSelectionChange:L},{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(D,{options:n(g).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(D,{options:n(g).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})=>[w("img",{src:t.image},null,8,ye)]),_:1}),e(a,{label:"\u64CD\u4F5C",width:"120",fixed:"right"},{default:o(({row:t})=>[_((i(),m(u,{type:"primary",link:"",onClick:K=>T(t)},{default:o(()=>[Ce]),_:2},1032,["onClick"])),[[C,["farm.farm/edit"]]]),_((i(),m(u,{type:"danger",link:"",onClick:K=>B(t.id)},{default:o(()=>[he]),_:2},1032,["onClick"])),[[C,["farm.farm/delete"]]])]),_:1})]),_:1},8,["data"])]),w("div",Fe,[e(I,{modelValue:n(d),"onUpdate:modelValue":l[2]||(l[2]=t=>de(d)?d.value=t:null),onChange:n(b)},null,8,["modelValue","onChange"])])]),_:1})),[[J,n(d).loading]]),f.value?(i(),m(le,{key:0,ref_key:"editRef",ref:c,"dict-data":n(g),onSuccess:n(b),onClose:l[3]||(l[3]=t=>f.value=!1)},null,8,["dict-data","onSuccess"])):pe("",!0)])}}});export{pt as default};