import{C as A,D as I,w as Q,F as q,T as K,O as M,Q as O,R as Z}from"./element-plus.d8e0827b.js";import{_ as z}from"./index.vue_vue_type_script_setup_true_lang.b67c1046.js";import{f as G,b as H}from"./index.58242ff9.js";import{u as J}from"./usePaging.6a6670f9.js";import{u as W}from"./useDictOptions.f8f89444.js";import{_ as X,a as Y,b as ee}from"./edit.vue_vue_type_script_setup_true_name_userFeedbackEdit_lang.59cd7e68.js";import"./lodash.466e9fe4.js";import{d as V,s as te,r as D,Z as oe,ap as ae,o as s,c as le,U as e,L as a,u as t,R as m,M as _,K as p,a as h,j as ne,Q as ue,n as g}from"./@vue.18505fe0.js";import"./lodash-es.bdeecbdb.js";import"./async-validator.fb49d0f5.js";import"./@vueuse.fbc6a400.js";import"./@element-plus.edbd5a83.js";import"./dayjs.a6528143.js";import"./@babel.16688d44.js";import"./@ctrl.b082b0c1.js";import"./normalize-wheel-es.8aeb3683.js";import"./@popperjs.36402333.js";import"./axios.4905d81f.js";import"./jspdf.54afd842.js";import"./fflate.fca59393.js";import"./vue-router.101084e3.js";import"./pinia.a969beab.js";import"./css-color-function.29b71fa4.js";import"./color.87d313dc.js";import"./clone.a63396d9.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.3461658b.js";import"./vue-clipboard3.c63182fd.js";import"./clipboard.dd2c63d0.js";import"./echarts.5016c48c.js";import"./zrender.58d022a1.js";import"./tslib.60310f1a.js";import"./highlight.js.31cd7941.js";import"./@highlightjs.b0c09b66.js";import"./index.432b2bf9.js";const se={class:"mt-4"},ie={class:"flex mt-4 justify-end"},re=V({name:"userFeedbackLists"}),Je=V({...re,setup(de){const f=te(),F=D(!1),u=oe({uid:"",name:"",contact:""}),k=D([]),y=n=>{k.value=n.map(({id:o})=>o)},{dictData:E}=W(""),{pager:c,getLists:b,resetParams:x,resetPage:U}=J({fetchFun:ee,params:u}),$=async()=>{var n;F.value=!0,await g(),(n=f.value)==null||n.open("add")},R=async n=>{var o,i;F.value=!0,await g(),(o=f.value)==null||o.open("edit"),(i=f.value)==null||i.setFormData(n)},w=async n=>{await G.confirm("\u786E\u5B9A\u8981\u5220\u9664\uFF1F"),await Y({id:n}),b()};return b(),(n,o)=>{const i=A,C=I,r=Q,L=q,B=K,P=H,d=M,T=O,N=z,v=ae("perms"),S=Z;return s(),le("div",null,[e(B,{class:"!border-none mb-4",shadow:"never"},{default:a(()=>[e(L,{class:"mb-[-16px]",model:t(u),inline:""},{default:a(()=>[e(C,{label:"\u7528\u6237id",prop:"uid"},{default:a(()=>[e(i,{class:"w-[280px]",modelValue:t(u).uid,"onUpdate:modelValue":o[0]||(o[0]=l=>t(u).uid=l),clearable:"",placeholder:"\u8BF7\u8F93\u5165\u7528\u6237id"},null,8,["modelValue"])]),_:1}),e(C,{label:"\u8054\u7CFB\u59D3\u540D",prop:"name"},{default:a(()=>[e(i,{class:"w-[280px]",modelValue:t(u).name,"onUpdate:modelValue":o[1]||(o[1]=l=>t(u).name=l),clearable:"",placeholder:"\u8BF7\u8F93\u5165\u8054\u7CFB\u59D3\u540D"},null,8,["modelValue"])]),_:1}),e(C,{label:"\u8054\u7CFB\u65B9\u5F0F",prop:"contact"},{default:a(()=>[e(i,{class:"w-[280px]",modelValue:t(u).contact,"onUpdate:modelValue":o[2]||(o[2]=l=>t(u).contact=l),clearable:"",placeholder:"\u8BF7\u8F93\u5165\u8054\u7CFB\u65B9\u5F0F"},null,8,["modelValue"])]),_:1}),e(C,null,{default:a(()=>[e(r,{type:"primary",onClick:t(U)},{default:a(()=>[m("\u67E5\u8BE2")]),_:1},8,["onClick"]),e(r,{onClick:t(x)},{default:a(()=>[m("\u91CD\u7F6E")]),_:1},8,["onClick"])]),_:1})]),_:1},8,["model"])]),_:1}),_((s(),p(B,{class:"!border-none",shadow:"never"},{default:a(()=>[_((s(),p(r,{type:"primary",onClick:$},{icon:a(()=>[e(P,{name:"el-icon-Plus"})]),default:a(()=>[m(" \u65B0\u589E ")]),_:1})),[[v,["user.user_feedback/add"]]]),_((s(),p(r,{disabled:!t(k).length,onClick:o[3]||(o[3]=l=>w(t(k)))},{default:a(()=>[m(" \u5220\u9664 ")]),_:1},8,["disabled"])),[[v,["user.user_feedback/delete"]]]),h("div",se,[e(T,{data:t(c).lists,onSelectionChange:y},{default:a(()=>[e(d,{type:"selection",width:"55"}),e(d,{label:"\u7528\u6237id",prop:"uid","show-overflow-tooltip":""}),e(d,{label:"\u53CD\u9988\u5185\u5BB9",prop:"content","show-overflow-tooltip":""}),e(d,{label:"\u8054\u7CFB\u59D3\u540D",prop:"name","show-overflow-tooltip":""}),e(d,{label:"\u8054\u7CFB\u65B9\u5F0F",prop:"contact","show-overflow-tooltip":""}),e(d,{label:"\u64CD\u4F5C",width:"120",fixed:"right"},{default:a(({row:l})=>[_((s(),p(r,{type:"primary",link:"",onClick:j=>R(l)},{default:a(()=>[m(" \u7F16\u8F91 ")]),_:2},1032,["onClick"])),[[v,["user.user_feedback/edit"]]]),_((s(),p(r,{type:"danger",link:"",onClick:j=>w(l.id)},{default:a(()=>[m(" \u5220\u9664 ")]),_:2},1032,["onClick"])),[[v,["user.user_feedback/delete"]]])]),_:1})]),_:1},8,["data"])]),h("div",ie,[e(N,{modelValue:t(c),"onUpdate:modelValue":o[4]||(o[4]=l=>ne(c)?c.value=l:null),onChange:t(b)},null,8,["modelValue","onChange"])])]),_:1})),[[S,t(c).loading]]),t(F)?(s(),p(X,{key:0,ref_key:"editRef",ref:f,"dict-data":t(E),onSuccess:t(b),onClose:o[5]||(o[5]=l=>F.value=!1)},null,8,["dict-data","onSuccess"])):ue("",!0)])}}});export{Je as default};