import{d as v,v as N,y as S,z as C,D as h,a as g,r as D,c as l,b as a,w as t,n as o,P as E,U as $,e as T,o as i,Y as u,f as n,j as V,I as A,t as y,T as p,L as k,_ as B}from"./index-FX23dEwE.js";import{b as O,c as P}from"./traffic-3Lpl9nRz.js";import{S as Y,a as F}from"./SearchUtil-_PbmflM7.js";import{f as H}from"./DateUtil-Z-8-nHP2.js";import{H as M}from"./request-dCC5BMJA.js";const U={class:"tag-rule-container"},j=["onClick"],J=v({__name:"index",setup(K){N(e=>({"09243b96":o(E)}));const b=S(C.PROVIDE_INJECT_KEY);h(()=>{b.tagRule=null}),g();let I=[{title:"ruleName",key:"ruleName",dataIndex:"ruleName",width:140},{title:"createTime",key:"createTime",dataIndex:"createTime",width:120},{title:"enable",key:"enabled",dataIndex:"enabled",width:120},{title:"operation",key:"operation",dataIndex:"operation",width:200}];const r=D(new Y([{label:"serviceGovernance",param:"keywords",placeholder:"typeRoutingRules",style:{width:"200px"}}],O,I)),w=async e=>{(await P(e)).code===M.SUCCESS&&await r.onSearch()};h(()=>{r.onSearch(),r.tableStyle={scrollX:"100",scrollY:"367px"}});const x=e=>{w(e)};return $(C.SEARCH_DOMAIN,r),(e,f)=>{const d=T("a-button"),R=T("a-popconfirm");return i(),l("div",U,[a(F,{"search-domain":r},{customOperation:t(()=>[a(d,{type:"primary",onClick:f[0]||(f[0]=c=>o(u).push("/traffic/addTagRule/addByFormView"))},{default:t(()=>[n(" 新增标签路由规则 ")]),_:1})]),bodyCell:t(({text:c,column:s,record:m})=>[s.dataIndex==="ruleName"?(i(),l("span",{key:0,class:"rule-link",onClick:_=>o(u).push(`/traffic/tagRule/formview/${m[s.key]}`)},[V("b",null,[a(o(A),{style:{"margin-bottom":"-2px"},icon:"material-symbols:attach-file-rounded"}),n(" "+y(c),1)])],8,j)):p("",!0),s.dataIndex==="createTime"?(i(),l(k,{key:1},[n(y(o(H)(c)),1)],64)):p("",!0),s.dataIndex==="enabled"?(i(),l(k,{key:2},[n(y(c?e.$t("flowControlDomain.enabled"):e.$t("flowControlDomain.disabled")),1)],64)):p("",!0),s.dataIndex==="operation"?(i(),l(k,{key:3},[a(d,{type:"link",onClick:_=>o(u).push(`formview/${m.ruleName}`)},{default:t(()=>[n(" 查看 ")]),_:2},1032,["onClick"]),a(d,{onClick:_=>o(u).push(`/traffic/updateTagRule/updateByFormView/${m.ruleName}`),type:"link"},{default:t(()=>[n(" 修改 ")]),_:2},1032,["onClick"]),a(R,{title:"确认删除该标签路由规则？","ok-text":"Yes","cancel-text":"No",onConfirm:_=>x(m.ruleName)},{default:t(()=>[a(d,{type:"link"},{default:t(()=>[n(" 删除 ")]),_:1})]),_:2},1032,["onConfirm"])],64)):p("",!0)]),_:1},8,["search-domain"])])}}}),Q=B(J,[["__scopeId","data-v-0f474753"]]);export{Q as default};
