import{aI as U,aC as x,bJ as a,bt as c,b9 as b,aH as t,ac as g,aE as T,ai as h,bj as I,a9 as S,aa as B,ab as $,R as v,a8 as D,r as L,aG as f,bc as N,bq as R,c as z}from"./index-Dg4NaXsE.js";/* empty css             *//* empty css                    *//* empty css                     *//* empty css                  */import"./el-tooltip-l0sNRNKZ.js";/* empty css                    *//* empty css                        *//* empty css                  *//* empty css                  *//* empty css               *//* empty css                 */import{C as P}from"./ConfigPageBase-MHa7yfOO.js";/* empty css               *//* empty css                */import"./PermissionGuard-BlMEkqrL.js";/* empty css                 */import"./reflection-B_glb6eT.js";import"./monitorConfigCache-BigdkiFw.js";const le=U({__name:"ExternalIntegrationView",setup(A){function w(r,s,l){const o=`${l}-${Date.now()}`,i={...r,[l]:[...r[l]??[],{id:o,name:"新端点",url:"http://",enabled:!1}]};s(i)}function V(r,s,l,o){const i={...r,[l]:(r[l]??[]).filter((u,p)=>p!==o)};s(i)}return(r,s)=>{const l=v,o=$,i=D,u=L,p=B,E=S,C=g;return b(),x(P,{section:"integrations",title:"外部系统对接",description:"MES / WMS / RCS / PTL 等标准接口配置（ExternalIntegrations）",defaults:c(z)},{default:a(({payload:d,update:_})=>[t(C,{"model-value":"mes"},{default:a(()=>[(b(),T(h,null,I(["mes","wms","rcs","ptl"],m=>t(E,{key:m,name:m,label:m.toUpperCase()},{default:a(()=>[t(p,{data:d[m]??[],size:"small",border:""},{default:a(()=>[t(o,{label:"ID",width:"120"},{default:a(e=>[t(l,{modelValue:e.row.id,"onUpdate:modelValue":n=>e.row.id=n},null,8,["modelValue","onUpdate:modelValue"])]),_:1}),t(o,{label:"名称","min-width":"160"},{default:a(e=>[t(l,{modelValue:e.row.name,"onUpdate:modelValue":n=>e.row.name=n},null,8,["modelValue","onUpdate:modelValue"])]),_:1}),t(o,{label:"URL","min-width":"260"},{default:a(e=>[t(l,{modelValue:e.row.url,"onUpdate:modelValue":n=>e.row.url=n},null,8,["modelValue","onUpdate:modelValue"])]),_:1}),t(o,{label:"启用",width:"80"},{default:a(e=>[t(i,{modelValue:e.row.enabled,"onUpdate:modelValue":n=>e.row.enabled=n},null,8,["modelValue","onUpdate:modelValue"])]),_:1}),t(o,{label:"操作",width:"80"},{default:a(e=>[t(u,{text:"",type:"danger",size:"small",onClick:n=>V(d,_,m,e.$index)},{default:a(()=>[...s[0]||(s[0]=[f("删除",-1)])]),_:1},8,["onClick"])]),_:2},1024)]),_:2},1032,["data"]),t(u,{size:"small",icon:c(N),style:{"margin-top":"8px"},onClick:e=>w(d,_,m)},{default:a(()=>[f("新增 "+R(m.toUpperCase())+" 端点",1)]),_:2},1032,["icon","onClick"])]),_:2},1032,["name","label"])),64))]),_:2},1024)]),_:1},8,["defaults"])}}});export{le as default};
