import{M as h,a0 as x,l as I,W as y}from"./index.17037962789732.js";import"./index.170379627897337.js";import"./index.170379627897315.js";import"./index.1703796278973302.js";import"./index.170379627897336.js";import{f as L}from"./department.1703796278973.js";import{d as P,k,v as C,l as E,r as B,o as S,c as j,a as c,z as t,b as l,u as i,G as w,H as D}from"./vue.1703796278973.js";import{_ as M}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"./system.1703796278973.js";import"./comm.1703796278973.js";import"./index.170379627897332.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 d=e=>(w("data-v-7aba9ae3"),e=e(),D(),e),A={class:"alert-info"},J=d(()=>t("span",null,"只能分配有'共享'权限的资产数据",-1)),N={style:{"margin-top":"5px"}},O=d(()=>t("span",null,"资产权限：",-1)),T=P({__name:"EditPermissionDialog",props:{visible:{type:Boolean},ids:null,permissionList:null,parentId:null,allPermission:null,assetType:null},emits:["confirm","update:visible"],setup(e,{emit:n}){const s=e,a=k(!1),_=()=>{a.value=!0,L(s.assetType,s.parentId,p).then(()=>{h.success("操作成功"),n("confirm"),n("update:visible",!1)}).finally(()=>a.value=!1)},p=C({assetIdList:[...s.ids],permission:[...s.permissionList]}),u=E(()=>{const r=[];return s.allPermission.forEach(o=>{s.permissionList.includes(o.id)&&r.push({label:o.name,value:o.id,disabled:o.id==="read"})}),r});return(r,o)=>{const f=B("AIcon"),v=x,b=I,g=y;return S(),j(g,{class:"edit-permission-dialog-container",title:"编辑",width:"500px",onOk:_,confirmLoading:i(a),visible:"",onCancel:o[1]||(o[1]=m=>n("update:visible",!1))},{default:c(()=>[t("div",A,[l(v,null,{default:c(()=>[l(f,{type:"ExclamationCircleOutlined"}),J]),_:1})]),t("div",N,[O,l(b,{value:i(p).permission,"onUpdate:value":o[0]||(o[0]=m=>i(p).permission=m),options:i(u)},null,8,["value","options"])])]),_:1},8,["confirmLoading"])}}});const ro=M(T,[["__scopeId","data-v-7aba9ae3"]]);export{ro as default};
