import{v as C,$ as I,ax as R}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.170379627897335.js";import"./index.170379627897318.js";import"./index.170379627897319.js";import"./index.170379627897320.js";import"./index.170379627897321.js";import"./index.170379627897322.js";import"./index.170379627897323.js";import"./index.170379627897324.js";import"./index.170379627897325.js";import"./index.170379627897326.js";import"./index.170379627897327.js";import"./index.170379627897328.js";import"./Item.1703796278973.js";import{g as S}from"./util.17037962789732.js";import{g as E}from"./department.1703796278973.js";import{d as u,k as r,l as L,o as A,x as B,b as i,u as d,F as T}from"./vue.1703796278973.js";import{_ as j}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"./comm.1703796278973.js";import"./system.1703796278973.js";import"./index.170379627897333.js";import"./index.170379627897334.js";import"./default.1703796278973.js";import"./permission.1703796278973.js";import"./consts.1703796278973.js";import"./404.1703796278973.js";const k=u({name:"OrgList"}),O=u({...k,props:{rowKeys:{type:Array,default:()=>[]},productId:{type:String,default:""}},emits:["update"],setup(_,{emit:m}){const a=_,g=r(),s=r([]);r(a.rowKeys.map(e=>e.value));const p=r({name:"sortIndex",order:"asc"}),c=r(!0),y=L(()=>a.rowKeys.map(e=>e.value)),l=[{title:"名称",width:300,ellipsis:!0,dataIndex:"name",search:{type:"string"}},{title:"排序",dataIndex:"sortIndex",sorter:!0}],f=e=>{g.value=e},v=(e,o,t)=>{t.order?p.value={name:t.columnKey,order:t.order.replace("end","")}:p.value={name:"sortIndex",order:"asc"}},x=async e=>{var n;const o={paging:!1,sorts:[p.value]};e.terms&&e.terms.length&&(o.terms=e.terms);const t=await E(o);return c.value&&a.rowKeys.length&&(c.value=!1,s.value=S((n=a.rowKeys[0])==null?void 0:n.value,t.result)),t},h=(e,o)=>{const t=o[0];console.log(e,o),m("update",[{name:t.name,value:t.id}])},w=()=>{m("update",[])},K=e=>{s.value=e};return(e,o)=>{const t=C,n=I,b=R;return A(),B(T,null,[i(t,{columns:l,type:"simple",onSearch:f,class:"scene-search",target:"scene-triggrt-device-category"}),i(n,{style:{margin:"0"}}),i(b,{ref:"instanceRef",model:"TABLE",type:"TREE",columns:l,request:x,scroll:{y:200},bodyStyle:{padding:"16px 0 0 0"},expandable:{expandedRowKeys:d(s),onExpandedRowsChange:K},rowSelection:{type:"radio",selectedRowKeys:d(y),onChange:h},onChange:v,onSelectCancel:w},null,8,["expandable","rowSelection"])],64)}}});const Se=j(O,[["__scopeId","data-v-7b87c2c6"]]);export{Se as default};
