2 lines
4.5 KiB
JavaScript
2 lines
4.5 KiB
JavaScript
import{C as T,D as I,w as j,F as M,L as q,M as O,N as Q,O as Z}from"./element-plus.7b9d0c0d.js";import{_ as z}from"./index.vue_vue_type_script_setup_true_lang.8b9de773.js";import{f as G,b as H}from"./index.1377ea40.js";import{d as V,s as J,r as D,Z as W,ap as X,o as n,c as Y,U as e,L as o,u as t,aa as ee,R as u,M as d,K as p,a as E,j as te,Q as oe,n as g}from"./@vue.18505fe0.js";import{u as ae}from"./usePaging.6a6670f9.js";import{u as le}from"./useDictOptions.60bb00d4.js";import{d as se,e as ie}from"./user_ship.e8e793ed.js";import"./lodash.9dc701ad.js";import{_ as ne}from"./edit.vue_vue_type_script_setup_true_name_userShipEdit_lang.d0a0550d.js";import"./lodash-es.f52bd8b1.js";import"./async-validator.fb49d0f5.js";import"./@vueuse.fbc6a400.js";import"./@element-plus.edbd5a83.js";import"./dayjs.7347fedc.js";import"./axios.4607972f.js";import"./@ctrl.b082b0c1.js";import"./normalize-wheel-es.8aeb3683.js";import"./@popperjs.36402333.js";import"./vue-router.101084e3.js";import"./pinia.a969beab.js";import"./css-color-function.bb8c34b2.js";import"./color.fbd63fe8.js";import"./clone.31a3aa2c.js";import"./color-convert.755d189f.js";import"./color-name.e7a4e1d3.js";import"./color-string.e356f5de.js";import"./balanced-match.d2a36341.js";import"./ms.564e106c.js";import"./nprogress.0d2736b7.js";import"./vue-clipboard3.7d5a7a5d.js";import"./clipboard.860a1cea.js";import"./echarts.5016c48c.js";import"./zrender.58d022a1.js";import"./tslib.60310f1a.js";import"./highlight.js.31cd7941.js";import"./@highlightjs.b0c09b66.js";import"./index.96efcd7d.js";import"./index.vue_vue_type_style_index_0_scoped_d380c88d_lang.d9a16ced.js";const re={class:"mt-4"},ue={class:"flex mt-4 justify-end"},pe=V({name:"userShipLists"}),Je=V({...pe,setup(me){const c=J(),_=D(!1),f=W({title:""}),w=D([]),x=l=>{w.value=l.map(({id:a})=>a)},{dictData:B}=le(""),{pager:m,getLists:h,resetParams:S,resetPage:F}=ae({fetchFun:ie,params:f}),$=async()=>{var l;_.value=!0,await g(),(l=c.value)==null||l.open("add")},L=async l=>{var a,v;_.value=!0,await g(),(a=c.value)==null||a.open("edit"),(v=c.value)==null||v.setFormData(l)},b=async l=>{await G.confirm("\u786E\u5B9A\u8981\u5220\u9664\uFF1F"),await se({id:l}),h()};return h(),(l,a)=>{const v=T,k=I,r=j,A=M,y=q,N=H,i=O,P=Q,R=z,C=X("perms"),U=Z;return n(),Y("div",null,[e(y,{class:"!border-none mb-4",shadow:"never"},{default:o(()=>[e(A,{class:"mb-[-16px]",model:t(f),inline:""},{default:o(()=>[e(k,{label:"\u4F1A\u5458\u540D\u79F0",prop:"title"},{default:o(()=>[e(v,{class:"w-[280px]",modelValue:t(f).title,"onUpdate:modelValue":a[0]||(a[0]=s=>t(f).title=s),onKeydown:ee(t(F),["enter"]),onClear:t(F),clearable:"",placeholder:"\u8BF7\u8F93\u5165\u4F1A\u5458\u540D\u79F0"},null,8,["modelValue","onKeydown","onClear"])]),_:1}),e(k,null,{default:o(()=>[e(r,{type:"primary",onClick:t(F)},{default:o(()=>[u("\u67E5\u8BE2")]),_:1},8,["onClick"]),e(r,{onClick:t(S)},{default:o(()=>[u("\u91CD\u7F6E")]),_:1},8,["onClick"])]),_:1})]),_:1},8,["model"])]),_:1}),d((n(),p(y,{class:"!border-none",shadow:"never"},{default:o(()=>[d((n(),p(r,{type:"primary",onClick:$},{icon:o(()=>[e(N,{name:"el-icon-Plus"})]),default:o(()=>[u(" \u65B0\u589E ")]),_:1})),[[C,["user_ship.user_ship/add"]]]),d((n(),p(r,{disabled:!t(w).length,onClick:a[1]||(a[1]=s=>b(t(w)))},{default:o(()=>[u(" \u5220\u9664 ")]),_:1},8,["disabled"])),[[C,["user_ship.user_ship/delete"]]]),E("div",re,[e(P,{data:t(m).lists,onSelectionChange:x},{default:o(()=>[e(i,{type:"selection",width:"55"}),e(i,{label:"ID",prop:"id","show-overflow-tooltip":""}),e(i,{label:"\u4F1A\u5458\u540D\u79F0",prop:"title","show-overflow-tooltip":""}),e(i,{label:"\u6298\u6263",prop:"discount","show-overflow-tooltip":""}),e(i,{label:"\u5145\u503C\u91D1\u989D",prop:"limit","show-overflow-tooltip":""}),e(i,{label:"\u6392\u5E8F\u5012\u5E8F",prop:"sort","show-overflow-tooltip":""}),e(i,{label:"\u64CD\u4F5C",width:"120",fixed:"right"},{default:o(({row:s})=>[d((n(),p(r,{type:"primary",link:"",onClick:K=>L(s)},{default:o(()=>[u(" \u7F16\u8F91 ")]),_:2},1032,["onClick"])),[[C,["user_ship.user_ship/edit"]]]),d((n(),p(r,{type:"danger",link:"",onClick:K=>b(s.id)},{default:o(()=>[u(" \u5220\u9664 ")]),_:2},1032,["onClick"])),[[C,["user_ship.user_ship/delete"]]])]),_:1})]),_:1},8,["data"])]),E("div",ue,[e(R,{modelValue:t(m),"onUpdate:modelValue":a[2]||(a[2]=s=>te(m)?m.value=s:null),onChange:t(h)},null,8,["modelValue","onChange"])])]),_:1})),[[U,t(m).loading]]),t(_)?(n(),p(ne,{key:0,ref_key:"editRef",ref:c,"dict-data":t(B),onSuccess:t(h),onClose:a[3]||(a[3]=s=>_.value=!1)},null,8,["dict-data","onSuccess"])):oe("",!0)])}}});export{Je as default};
|