2024-01-25 16:28:48 +08:00
|
|
|
import{B as j,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{f as H,b as O}from"./index.7d0bde5f.js";import{u as W}from"./usePaging.2a59f422.js";import{u as X}from"./useDictOptions.2e5fb2d1.js";import{_ as Y,a as Z,b as ee}from"./edit.vue_vue_type_script_setup_true_name_animalRfidEdit_lang.f15e62ab.js";import"./lodash.e92d81a1.js";import{d as D,s as te,r as E,_ as oe,ae,o as l,c as ie,T as e,K as t,L as u,u as n,J as r,Q as ne,a as F,j as le,R as d,n as y}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";import"./monitor_threshold.f9ca97f0.js";const se=d("\u67E5\u8BE2"),re=d("\u91CD\u7F6E"),de=d(" \u65B0\u589E "),me=d(" \u5220\u9664 "),ue={class:"mt-4"},ce=d(" \u7F16\u8F91 "),pe=d(" \u5220\u9664 "),_e={class:"flex mt-4 justify-end"},fe=D({name:"animalRfidLists"}),at=D({...fe,setup(ve){const c=te(),p=E(!1),_=oe({rfid:""}),b=E([]),B=a=>{b.value=a.map(({id:o})=>o)},{dictData:R}=X(""),{pager:m,getLists:f,resetParams:V,resetPage:x}=W({fetchFun:Z,params:_}),$=async()=>{var a;p.value=!0,await y(),(a=c.value)==null||a.open("add")},L=async a=>{var o,v;p.value=!0,await y(),(o=c.value)==null||o.open("edit"),(v=c.value)==null||v.setFormData(a)},k=async a=>{await H.confirm("\u786E\u5B9A\u8981\u5220\u9664\uFF1F"),await ee({id:a}),f()};return f(),(a,o)=>{const v=j,w=J,s=K,P=U,g=q,T=O,C=M,A=Q,I=G,h=ae("perms"),N=z;return l(),ie("div",null,[e(g,{class:"!border-none mb-4",shadow:"never"},{default:t(()=>[e(P,{class:"mb-[-16px]",model:_,inline:""},{default:t(()=>[e(w,{label:"RFID",prop:"rfid"},{default:t(()=>[e(v,{class:"w-[280px]",modelValue:_.rfid,"onUpdate:modelValue":o[0]||(o[0]=i=>_.rfid=i),clearable:"",placeholder:"\u8BF7\u8F93\u5165"},null,8,["modelValue"])]),_:1}),e(w,null,{default:t(()=>[e(s,{type:"primary",onClick:n(x)},{default:t(()=>[se]),_:1},8,["onClick"]),e(s,{onClick:n(V)},{default:t(()=>[re]),_:1},8,["onClick"])]),_:1})]),_:1},8,["model"])]),_:1}),u((l(),r(g,{class:"!border-none",shadow:"never"},{default:t(()=>[u((l(),r(s,{type:"primary",onClick:$},{icon:t(()=>[e(T,{name:"el-icon-Plus"})]),default:t(()=>[de]),_:1})),[[h,["rfid.animal_rfid/add"]]]),u((l(),r(s,{disabled:!b.value.length,onClick:o[1]||(o[1]=i=>k(b.value))},{default:t(()=>[me]),_:1},8,["disabled"])),[[h,["rfid.animal_rfid/delete"]]]),F("div",ue,[e(A,{data:n(m).lists,onSelectionChange:B},{default:t(()=>[e(C,{type:"selection",width:"55"}),e(C,{label:"RFID",prop:"rfid","show-overflow-tooltip":""}),e(C,{label:"\u6240\u5C5E\u680F\u820D",prop:"fence_house_id","show-overflow-tooltip":""}),e(C,{label:"\u64CD\u4F5C",width:"120",fixed:"right"},{default:t(({row:i})=>[u((l(),r(s,{type:"primary",link:"",onClick:S=>L(i)},{default:t(()=>[ce]),_:2},1032,["onClick"])),[[h,["rfid.animal_rfid/edit"]]]),u((l(),r(s,{type:"danger",link:"",onClick:S=>k(i.id)},{default:t(()=>[pe]),_:2},1032,["onClick"])),[[h,["rfid.animal_rfid/delete"]]])]),_:1})]),_:1},8,["data"])]),F("div",_e,[e(I,{modelValue:n(m),"onUpdate:modelValue":o[2]||(o[2]=i=>le(m)?m.value=i:null),onChange:n(f)},null,8,["modelValue","onChange"])])]),_:1}))
|