import{F as C}from"./index.d8717905.js";import{d as E,aX as x,b as D,c as n,e as c,f as U,h as t,i as l,u as S,g as h,k as _,A as T,F as N,m as r,E as y}from"./index.0308b213.js";import{M as v,N as A,O as z}from"./setting.644fa418.js";const G=h("span",null,"\u5546\u6237\u6807\u7B7E",-1),M={style:{display:"flex"}},O=r("\u7CFB\u7EDF\u6807\u7B7E"),$=r("\u81EA\u5B9A\u4E49\u6807\u7B7E"),J=r("\u5220\u9664 "),P=r("\u6DFB\u52A0\u7528\u6237\u6807\u7B7E"),X=r("\u4FDD\u5B58"),K=E({setup(j){const m=x.get("uniacid"),o=D({count:0,pages:1,page:1,limit:12,list:[]}),g=()=>{v({uniacid:m,page:o.page,limit:o.limit}).then(a=>{let i;for(i in o)o[i]=a[i]})},V=()=>{const a={id:0,displayorder:0,title:"",color:"",is_system:0};o.list.push(a)},w=(a,i)=>{o.list=o.list.filter((d,u)=>u!=i),a!==0&&A({id:a}).then(d=>{d&&y({message:"\u5220\u9664\u6210\u529F",type:"success"})})},B=()=>{z({uniacid:m,list:JSON.stringify(o.list)}).then(a=>{a&&y({message:"\u4FDD\u5B58\u6210\u529F",type:"success"})})};return g(),(a,i)=>{const d=n("el-input"),u=n("el-table-column"),k=n("el-color-picker"),f=n("el-tag"),p=n("el-button"),F=n("el-table"),b=n("el-card");return c(),U(N,null,[t(b,null,{header:l(()=>[G]),default:l(()=>[t(F,{data:S(o).list,style:{width:"100%"}},{default:l(()=>[t(u,{fixed:"",prop:"displayorder",label:"\u6392\u5E8F",width:"150"},{default:l(e=>[t(d,{modelValue:e.row.displayorder,"onUpdate:modelValue":s=>e.row.displayorder=s},null,8,["modelValue","onUpdate:modelValue"])]),_:1}),t(u,{prop:"title",label:"\u6807\u7B7E\u540D\u79F0",width:"120"},{default:l(e=>[t(d,{modelValue:e.row.title,"onUpdate:modelValue":s=>e.row.title=s},null,8,["modelValue","onUpdate:modelValue"])]),_:1}),t(u,{prop:"color",label:"\u989C\u8272",width:"900"},{default:l(e=>[h("div",M,[t(d,{modelValue:e.row.color,"onUpdate:modelValue":s=>e.row.color=s,style:{display:"inline-flex"}},null,8,["modelValue","onUpdate:modelValue"]),t(k,{modelValue:e.row.color,"onUpdate:modelValue":s=>e.row.color=s,style:{display:"inline-flex"}},null,8,["modelValue","onUpdate:modelValue"])])]),_:1}),t(u,{prop:"is_system",label:"\u7C7B\u578B",width:"120"},{default:l(e=>[e.row.is_system?(c(),_(f,{key:0,class:"ml-2",type:"danger"},{default:l(()=>[O]),_:1})):(c(),_(f,{key:1,class:"ml-2",type:"success"},{default:l(()=>[$]),_:1}))]),_:1}),t(u,{fixed:"right",label:"\u64CD\u4F5C",width:"80"},{default:l(e=>[e.row.is_system?T("",!0):(c(),_(p,{key:0,link:"",type:"danger",size:"small",onClick:s=>w(e.row.id,e.$index)},{default:l(()=>[J]),_:2},1032,["onClick"]))]),_:1})]),_:1},8,["data"]),t(p,{type:"primary",style:{margin:"10px"},onClick:V},{default:l(()=>[P]),_:1})]),_:1}),t(C,null,{default:l(()=>[t(p,{type:"primary",size:"small",onClick:B},{default:l(()=>[X]),_:1})]),_:1})],64)}}});export{K as default};
