import{d as g,v as D,u as T,y as E,z as h,r as k,D as R,c as o,b as e,w as a,n as i,P as S,U as V,e as x,o as r,f as t,j as $,I as O,t as y,T as f,L as C,_ as A}from"./index-FX23dEwE.js";import{i as G,j as B}from"./traffic-3Lpl9nRz.js";import{S as P,a as Y}from"./SearchUtil-_PbmflM7.js";import"./request-dCC5BMJA.js";const j={class:"__container_traffic_config_index"},M=["onClick"],F=g({__name:"index",setup(J){D(n=>({"0c6a8dc2":i(S)}));const s=T(),I=E(h.PROVIDE_INJECT_KEY);I.dynamicConfigForm=k({});let v=[{title:"ruleName",key:"ruleName",dataIndex:"ruleName",width:200,ellipsis:!0},{title:"ruleGranularity",key:"ruleGranularity",dataIndex:"ruleGranularity",render:(n,l)=>l.isService?"服务":"应用",width:100},{title:"createTime",key:"createTime",dataIndex:"createTime",width:200},{title:"enabled",key:"enabled",dataIndex:"enabled",render:(n,l)=>l.enabled?"是":"否",width:120},{title:"operation",key:"operation",dataIndex:"operation",width:200}];const c=k(new P([{label:"serviceGovernance",param:"keywords",placeholder:"typeRoutingRules",style:{width:"200px"}}],G,v)),w=()=>{s.push("/traffic/dynamicConfig/formview/_tmp/1")};R(async()=>{await c.onSearch()});const b=async n=>{await B({name:n.ruleName}),await c.onSearch()};return V(h.SEARCH_DOMAIN,c),(n,l)=>{const d=x("a-button"),N=x("a-popconfirm");return r(),o("div",j,[e(Y,{"search-domain":c},{customOperation:a(()=>[e(d,{type:"primary",onClick:w},{default:a(()=>[t("新增动态配置")]),_:1})]),bodyCell:a(({text:p,column:m,record:u})=>[m.dataIndex==="ruleName"?(r(),o("span",{key:0,class:"config-link",onClick:_=>i(s).push(`/traffic/dynamicConfig/formview/${u.ruleName}/0`)},[$("b",null,[e(i(O),{style:{"margin-bottom":"-2px"},icon:"material-symbols:attach-file-rounded"}),t(" "+y(p),1)])],8,M)):f("",!0),m.dataIndex==="ruleGranularity"?(r(),o(C,{key:1},[t(y(p?"服务":"应用"),1)],64)):f("",!0),m.dataIndex==="enabled"?(r(),o(C,{key:2},[t(y(p?"启用":"禁用"),1)],64)):f("",!0),m.dataIndex==="operation"?(r(),o(C,{key:3},[e(d,{type:"link",onClick:_=>i(s).push(`/traffic/dynamicConfig/formview/${u.ruleName}/0`)},{default:a(()=>[t("查看")]),_:2},1032,["onClick"]),e(d,{type:"link",onClick:_=>i(s).push(`/traffic/dynamicConfig/formview/${u.ruleName}/1`)},{default:a(()=>[t(" 修改 ")]),_:2},1032,["onClick"]),e(N,{title:"确认删除该动态配置？","ok-text":"Yes","cancel-text":"No",onConfirm:_=>b(u)},{default:a(()=>[e(d,{type:"link"},{default:a(()=>[t("删除")]),_:1})]),_:2},1032,["onConfirm"])],64)):f("",!0)]),_:1},8,["search-domain"])])}}}),U=A(F,[["__scopeId","data-v-bb5c6413"]]);export{U as default};
