import{a5 as g,r as u,e as y,ak as I,j as E,k as w,m as C,c as D,v as i,p as t,q as r,x,n as c,a as R,D as A,o as B,u as V,$}from"./index.8d733f79.js";import{E as j}from"./el-text.54dc8292.js";const N={class:"subPage-content"},q={class:"nav"},F={class:"details-wrap",style:{overflow:"auto"}},G=g({name:"deviceGroupEdit"}),z=Object.assign(G,{setup(K){const p=u();u("");const e=u({name:"",authInfo:[]}),f=V(),_=R(),{proxy:m}=A();y(()=>{e.value=JSON.parse(_.query.str);const o=[];for(let a=0;a<e.value.authInfo.length;a++){const s=e.value.authInfo[a];for(let n=0;n<s.children.length;n++){const l=s.children[n];l.hasAuth&&o.push(l.identifier)}}m.$refs.treeRef.setCheckedKeys(o)});const h=()=>{f.push("/sysConfig/dataAuth/list")};return(o,a)=>{const s=$("Back"),n=I,l=E,d=w,k=j,v=C;return B(),D("div",N,[i("div",q,[t(n,{color:"#0052D9",size:"24",onClick:h,style:{cursor:"pointer"}},{default:r(()=>[t(s)]),_:1}),i("span",null,x(o.$t("viewDataAuth")),1)]),i("div",F,[t(v,{model:c(e),ref:"deviceGroupRef","label-position":"top",disabled:"",style:{width:"400px",margin:"0 auto"}},{default:r(()=>[t(d,{label:o.$t("viewDataAuth"),prop:"name"},{default:r(()=>[t(l,{modelValue:c(e).name,"onUpdate:modelValue":a[0]||(a[0]=b=>c(e).name=b)},null,8,["modelValue"])]),_:1},8,["label"]),t(d,{label:o.$t("setDataAuth"),prop:"deviceIds"},{default:r(()=>[t(k,{"show-checkbox":"",ref_key:"treeRef",ref:p,"default-expand-all":"",data:c(e).authInfo,props:{label:"name",children:"children"},"highlight-current":"","node-key":"identifier","expand-on-click-node":!1},null,8,["data"])]),_:1},8,["label"])]),_:1},8,["model"])])])}}});export{z as default};
