import{M as y,a0 as P,ax as T}from"./index.17037962789732.js";import"./index.1703796278973300.js";import"./index.170379627897315.js";import"./index.170379627897317.js";import"./index.1703796278973301.js";import"./index.1703796278973302.js";import"./index.170379627897332.js";import"./index.1703796278973303.js";import"./index.170379627897339.js";import"./index.170379627897316.js";import"./index.170379627897314.js";import"./index.1703796278973304.js";import"./index.1703796278973305.js";import"./index.1703796278973306.js";import"./index.170379627897336.js";import{_}from"./index.vue_vue_type_script_setup_true_name_PermissionButton_lang.1703796278973.js";import{g as I,_ as N,d as $}from"./EditDialog.vue_vue_type_script_setup_true_lang.17037962789733.js";import{d as b,k as g,v as D,r as p,o as v,c as h,a as i,z as S,b as e,u as s,t as w,B as z}from"./vue.1703796278973.js";import{_ as B}from"./_plugin-vue_export-helper.1703796278973.js";import"./index.17037962789733.js";import"./dayjs.min.1703796278973.js";import"./isArray.1703796278973.js";import"./editor.api.1703796278973.js";import"./preload-helper.1703796278973.js";import"./monaco.contribution.1703796278973.js";import"./index.170379627897320.js";import"./index.170379627897321.js";import"./permission.1703796278973.js";import"./index.170379627897337.js";import"./index.170379627897318.js";import"./index.170379627897319.js";import"./index.170379627897327.js";import"./system.1703796278973.js";import"./comm.1703796278973.js";import"./index.170379627897333.js";import"./index.170379627897334.js";import"./default.1703796278973.js";import"./consts.1703796278973.js";import"./404.1703796278973.js";const j={class:"relationship-container"},O=b({name:"Relationship"}),V=b({...O,setup(q){const m="system/Relationship",u=[{title:"名称",dataIndex:"name",key:"name",ellipsis:!0,fixed:"left",search:{type:"string"}},{title:"关联方",dataIndex:"objectTypeName",key:"objectTypeName",ellipsis:!0,fixed:"left",search:{type:"select",options:[{label:"用户",value:"用户"},{label:"设备",value:"设备"}]}},{title:"被关联方",dataIndex:"targetTypeName",key:"targetTypeName",ellipsis:!0,fixed:"left",search:{rename:"targetType",type:"select",options:[{label:"用户",value:"user"}]}},{title:"说明",dataIndex:"description",key:"description",ellipsis:!0,fixed:"left",search:{type:"string"}},{title:"操作",dataIndex:"action",key:"action",scopedSlots:!0}],f=g({}),c=g({}),r={openDialog:(n={})=>{a.selectRow={...n},a.visible=!0},clickDel:n=>{$(n.id).then(t=>{var l;t.status===200?((l=c.value)==null||l.reload(),y.success("操作成功!")):y.error(t.message)})},refresh:()=>{c.value.reload()}},a=D({selectRow:{},visible:!1});return(n,t)=>{const l=p("pro-search"),d=p("AIcon"),x=P,k=T,C=p("FullPage"),R=p("page-container");return v(),h(R,null,{default:i(()=>[S("div",j,[e(l,{columns:u,target:"category",onSearch:t[0]||(t[0]=o=>f.value={...o})}),e(C,null,{default:i(()=>[e(k,{ref_key:"tableRef",ref:c,columns:u,request:s(I),model:"TABLE",params:s(f),defaultParams:{pageSize:10,sorts:[{name:"createTime",order:"desc"}]},pagination:{showSizeChanger:!0,pageSizeOptions:["10","20","50","100"]}},{headerTitle:i(()=>[e(_,{type:"primary",hasPermission:`${m}:add`,onClick:t[1]||(t[1]=o=>r.openDialog(void 0))},{default:i(()=>[e(d,{type:"PlusOutlined"}),w("新增 ")]),_:1},8,["hasPermission"])]),action:i(o=>[e(x,{size:16},{default:i(()=>[e(_,{hasPermission:`${m}:update`,type:"link",tooltip:{title:"编辑"},onClick:A=>r.openDialog(o)},{default:i(()=>[e(d,{type:"EditOutlined"})]),_:2},1032,["hasPermission","onClick"]),e(_,{danger:!0,hasPermission:`${m}:delete`,type:"link",tooltip:{title:"删除"},popConfirm:{title:"确认删除",onConfirm:()=>r.clickDel(o)},disabled:o.status},{default:i(()=>[e(d,{type:"DeleteOutlined"})]),_:2},1032,["hasPermission","popConfirm","disabled"])]),_:2},1024)]),_:1},8,["request","params"])]),_:1}),s(a).visible?(v(),h(N,{key:0,visible:s(a).visible,"onUpdate:visible":t[2]||(t[2]=o=>s(a).visible=o),data:s(a).selectRow,onRefresh:r.refresh},null,8,["visible","data","onRefresh"])):z("",!0)])]),_:1})}}});const Pe=B(V,[["__scopeId","data-v-f7122400"]]);export{Pe as default};
