import{C as U,D as W,w as j,F as q,N as O,O as M,P as Q,Q as z}from"./element-plus.55d71530.js";import{_ as G}from"./index.vue_vue_type_script_setup_true_lang.39bbbfbb.js";import{f as H,b as J}from"./index.75e08341.js";import{u as K}from"./usePaging.af60c1ec.js";import{u as X}from"./useDictOptions.ce720875.js";import{_ as Y,a as Z,b as ee}from"./edit.vue_vue_type_script_setup_true_name_performanceWorkerRulesEdit_lang.bf2c563e.js";import"./lodash.d6737109.js";import"./dayjs.37feae28.js";import{d as h,s as oe,r as E,_ as te,aq as ae,o as n,c as le,V as e,M as a,u as o,S as m,O as _,L as p,a as y,j as re,R as se,n as B}from"./@vue.96c135a1.js";import"./lodash-es.bdeecbdb.js";import"./async-validator.fb49d0f5.js";import"./@vueuse.f4694335.js";import"./@element-plus.07bd0514.js";import"./@ctrl.b082b0c1.js";import"./normalize-wheel-es.8aeb3683.js";import"./@popperjs.36402333.js";import"./axios.c6b9fe3d.js";import"./@amap.8a62addd.js";import"./vue-router.64fdcd9a.js";import"./pinia.aebd7275.js";import"./css-color-function.7f53c13d.js";import"./color.4952d479.js";import"./clone.dd01d7ea.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.f73355d0.js";import"./vue-clipboard3.dca5bca3.js";import"./clipboard.16e4491b.js";import"./echarts.80787eb0.js";import"./tslib.60310f1a.js";import"./zrender.6f33727c.js";import"./highlight.js.31cd7941.js";import"./@highlightjs.3d7ee361.js";import"./index.8e3b20a1.js";import"./goods.2ecc1535.js";const ne={class:"mt-4"},ue={class:"flex mt-4 justify-end"},ie=h({name:"performanceWorkerRulesLists"}),Je=h({...ie,setup(me){const f=oe(),C=E(!1),u=te({goods_category_ids:"",rate:""}),g=E([]),D=r=>{g.value=r.map(({id:t})=>t)},{dictData:V}=X(""),{pager:d,getLists:v,resetParams:x,resetPage:P}=K({fetchFun:ee,params:u}),R=async()=>{var r;C.value=!0,await B(),(r=f.value)==null||r.open("add")},$=async r=>{var t,c;C.value=!0,await B(),(t=f.value)==null||t.open("edit"),(c=f.value)==null||c.setFormData(r)},F=async r=>{await H.confirm("\u786E\u5B9A\u8981\u5220\u9664\uFF1F"),await Z({id:r}),v()};return v(),(r,t)=>{const c=U,k=W,i=j,A=q,b=O,L=J,s=M,N=Q,S=G,w=ae("perms"),T=z;return n(),le("div",null,[e(b,{class:"!border-none mb-4",shadow:"never"},{default:a(()=>[e(A,{class:"mb-[-16px]",model:o(u),inline:""},{default:a(()=>[e(k,{label:"\u4EA7\u54C1\u5206\u7C7B\u96C6\u5408",prop:"goods_category_ids"},{default:a(()=>[e(c,{class:"w-[280px]",modelValue:o(u).goods_category_ids,"onUpdate:modelValue":t[0]||(t[0]=l=>o(u).goods_category_ids=l),clearable:"",placeholder:"\u8BF7\u8F93\u5165\u4EA7\u54C1\u5206\u7C7B\u96C6\u5408"},null,8,["modelValue"])]),_:1}),e(k,{label:"\u63D0\u6210\u6BD4\u4F8B",prop:"rate"},{default:a(()=>[e(c,{class:"w-[280px]",modelValue:o(u).rate,"onUpdate:modelValue":t[1]||(t[1]=l=>o(u).rate=l),clearable:"",placeholder:"\u8BF7\u8F93\u5165\u63D0\u6210\u6BD4\u4F8B"},null,8,["modelValue"])]),_:1}),e(k,null,{default:a(()=>[e(i,{type:"primary",onClick:o(P)},{default:a(()=>[m("\u67E5\u8BE2")]),_:1},8,["onClick"]),e(i,{onClick:o(x)},{default:a(()=>[m("\u91CD\u7F6E")]),_:1},8,["onClick"])]),_:1})]),_:1},8,["model"])]),_:1}),_((n(),p(b,{class:"!border-none",shadow:"never"},{default:a(()=>[_((n(),p(i,{type:"primary",onClick:R},{icon:a(()=>[e(L,{name:"el-icon-Plus"})]),default:a(()=>[m(" \u65B0\u589E ")]),_:1})),[[w,["platform_rule.performance_worker_rules/add"]]]),_((n(),p(i,{disabled:!o(g).length,onClick:t[2]||(t[2]=l=>F(o(g)))},{default:a(()=>[m(" \u5220\u9664 ")]),_:1},8,["disabled"])),[[w,["platform_rule.performance_worker_rules/delete"]]]),y("div",ne,[e(N,{data:o(d).lists,onSelectionChange:D},{default:a(()=>[e(s,{type:"selection",width:"55"}),e(s,{label:"ID",prop:"id","show-overflow-tooltip":""}),e(s,{label:"\u4EA7\u54C1\u5206\u7C7B\u96C6\u5408",prop:"goods_category_ids","show-overflow-tooltip":""}),e(s,{label:"\u63D0\u6210\u6BD4\u4F8B",prop:"rate","show-overflow-tooltip":""}),e(s,{label:"\u521B\u5EFA\u65F6\u95F4",prop:"create_time","show-overflow-tooltip":""}),e(s,{label:"\u4FEE\u6539\u65F6\u95F4",prop:"update_time","show-overflow-tooltip":""}),e(s,{label:"\u64CD\u4F5C",width:"120",fixed:"right"},{default:a(({row:l})=>[_((n(),p(i,{type:"primary",link:"",onClick:I=>$(l)},{default:a(()=>[m(" \u7F16\u8F91 ")]),_:2},1032,["onClick"])),[[w,["platform_rule.performance_worker_rules/edit"]]]),_((n(),p(i,{type:"danger",link:"",onClick:I=>F(l.id)},{default:a(()=>[m(" \u5220\u9664 ")]),_:2},1032,["onClick"])),[[w,["platform_rule.performance_worker_rules/delete"]]])]),_:1})]),_:1},8,["data"])]),y("div",ue,[e(S,{modelValue:o(d),"onUpdate:modelValue":t[3]||(t[3]=l=>re(d)?d.value=l:null),onChange:o(v)},null,8,["modelValue","onChange"])])]),_:1})),[[T,o(d).loading]]),o(C)?(n(),p(Y,{key:0,ref_key:"editRef",ref:f,"dict-data":o(V),onSuccess:o(v),onClose:t[4]||(t[4]=l=>C.value=!1)},null,8,["dict-data","onSuccess"])):se("",!0)])}}});export{Je as default};
