mirror of
https://gitee.com/wujiawei1207537021/wu-lazy-cloud-network.git
synced 2025-06-06 13:27:55 +08:00
2 lines
11 KiB
JavaScript
2 lines
11 KiB
JavaScript
/*! For license information please see 73.8732afdc.js.LICENSE.txt */
|
|
"use strict";(self.webpackChunkwu_vue_zone_ecology=self.webpackChunkwu_vue_zone_ecology||[]).push([[73],{35661:function(e,n,t){t.d(n,{M$:function(){return u},Pt:function(){return o},Ze:function(){return r}});t(44114);const r=(e,n,t="id",u=[])=>{if(!e)return[];for(const o of e){if(u.push(o[t]),n(o))return u;if(o.children){const e=r(o.children,n,t,u);if(e.length)return e}u.pop()}return[]},u=e=>e&&(e.__v_raw||e.valueOf()||e),o=()=>{const e=t(27003);console.log("🚀 ~ file: index.js ~ line 107 ~ icons ~ e",e);const n=[];for(const t in e)n.push(e[t].name);return n}},84202:function(e,n,t){t.r(n),t.d(n,{default:function(){return f}});var r=t(20641),u=t(50953),o=t(90033),i=t(35661),c=t(88908),l=t(78982);const a=["data-menuId"];var f={__name:"LazyZoneEdit",props:{showDialog:{type:Boolean,default:!0},title:{type:String,default:"添加"},rowData:{type:Object,default:null}},emits:["closeDialog"],setup(e,{emit:n}){const t=e,f=n,{title:s,rowData:d}=(0,u.QW)(t),p=()=>{f("closeDialog",!1)},m=(0,u.Kh)({code:"",name:"",menuIds:[],status:!0}),{code:v,name:h,menuIds:g,status:y}=(0,u.QW)(m),_=(0,u.KR)(null),b={name:[{required:!0,message:"请输入名称",trigger:"blur"}],code:[{required:!0,message:"请输入角色编码",trigger:"blur"}],menuIds:[{validator:(e,n,t)=>{g.value=[...k.value.getCheckedKeys(!1)],g.value.length<1?t(new Error("请选择权限")):t()},required:!0}]},k=(0,u.KR)(null),w=(0,u.KR)([]);d.value&&(h.value=d.value.name,v.value=d.value.code,y.value=d.value.status);return(0,r.sV)((async()=>{await(async()=>{const{code:e,data:n}=await VE_API.system.menuList({size:10,page:1,total:0},{Global:!1});if(0===e){const e=l.mapTree(l.toArrayTree(n,{sortKey:"sort",key:"code",parentKey:"parentCode"}),(e=>(e.children&&e.children.length<=0&&delete e.children,e)));w.value=e}})(),(0,r.dY)((async()=>{if((()=>{let e=document.getElementsByClassName("ve_tree_item");Array.from(e).forEach((e=>{const n=1*e.dataset.roleid,t=(0,i.Ze)(w.value,(e=>e.id===n)).length-1;e.parentNode.parentNode.parentNode.style.paddingLeft=18*t+"px";let r=e.parentNode.className;e.parentNode.className=r+" fl p0"}))})(),"添加"===s.value)k.value.setCheckedNodes(w.value);else{const{code:e,data:n}=await VE_API.system.roleOne({id:d.value.id});if(0===e){const e=l.mapTree(l.toArrayTree(n.menuList,{sortKey:"sort",key:"code",parentKey:"parentCode"}),(e=>(e.children&&e.children.length<=0&&delete e.children,e)));console.log(e),e&&e.length>0&&k.value.setCheckedNodes(e)}}}))})),(n,t)=>{const i=(0,r.g2)("el-input"),l=(0,r.g2)("el-form-item"),f=(0,r.g2)("el-scrollbar"),g=(0,r.g2)("el-card"),R=(0,r.g2)("el-radio-button"),C=(0,r.g2)("el-radio-group"),S=(0,r.g2)("el-form"),E=(0,r.g2)("el-button"),T=(0,r.g2)("el-dialog");return(0,r.uX)(),(0,r.Wv)(T,{title:(0,u.R1)(s),"append-to-body":"","destroy-on-close":"","model-value":e.showDialog,onClose:t[5]||(t[5]=e=>p())},{footer:(0,r.k6)((()=>[(0,r.Lk)("span",null,[(0,r.bF)(E,{onClick:t[3]||(t[3]=e=>p())},{default:(0,r.k6)((()=>[(0,r.eW)("取消")])),_:1}),(0,r.bF)(E,{type:"primary",onClick:t[4]||(t[4]=e=>{_.value.validate((async e=>{if(!e)return console.log("error submit!!"),!1;{let e;e="添加"===s.value?await VE_API.system.roleAdd(m):await VE_API.system.roleEdit({id:d.value.id,...m});const{code:n}=e;0===n&&p()}}))})},{default:(0,r.k6)((()=>[(0,r.eW)("确定")])),_:1})])])),default:(0,r.k6)((()=>[(0,r.bF)(S,{model:m,ref_key:"formRef",ref:_,rules:b,inline:!1,"label-width":"120px"},{default:(0,r.k6)((()=>[(0,r.bF)(l,{label:"名称",prop:"name",class:"role_edit_item"},{default:(0,r.k6)((()=>[(0,r.bF)(i,{modelValue:(0,u.R1)(h),"onUpdate:modelValue":t[0]||(t[0]=e=>(0,u.i9)(h)?h.value=e:null),placeholder:"",clearable:""},null,8,["modelValue"])])),_:1}),(0,r.bF)(l,{label:"角色编码",prop:"code",class:"role_edit_item"},{default:(0,r.k6)((()=>[(0,r.bF)(i,{modelValue:(0,u.R1)(v),"onUpdate:modelValue":t[1]||(t[1]=e=>(0,u.i9)(v)?v.value=e:null),placeholder:"",clearable:""},null,8,["modelValue"])])),_:1}),(0,r.bF)(l,{label:"权限",prop:"menuIds",class:"role_edit_item"},{default:(0,r.k6)((()=>[(0,r.bF)(g,{shadow:"never","body-style":{padding:0,height:"200px",width:"100%"},class:"role_edit_item"},{default:(0,r.k6)((()=>[(0,r.bF)(f,{style:{width:"100%"}},{default:(0,r.k6)((()=>[(0,r.bF)((0,u.R1)(c.q),{ref_key:"tree",ref:k,data:w.value,"node-key":"id","default-expand-all":"",props:{label:"name"},"empty-text":"暂无数据","show-checkbox":"","highlight-current":""},{default:(0,r.k6)((({data:e})=>[(0,r.Lk)("span",{"data-menuId":e.id,class:(0,o.C4)({ve_tree_item:2===e.type})},(0,o.v_)(e.name),11,a)])),_:1},8,["data"])])),_:1})])),_:1})])),_:1}),(0,r.bF)(l,{label:"状态",prop:"status",class:"role_edit_item"},{default:(0,r.k6)((()=>[(0,r.bF)(C,{modelValue:(0,u.R1)(y),"onUpdate:modelValue":t[2]||(t[2]=e=>(0,u.i9)(y)?y.value=e:null)},{default:(0,r.k6)((()=>[(0,r.bF)(R,{label:!0},{default:(0,r.k6)((()=>[(0,r.eW)("启用")])),_:1}),(0,r.bF)(R,{label:!1},{default:(0,r.k6)((()=>[(0,r.eW)("停用")])),_:1})])),_:1},8,["modelValue"])])),_:1})])),_:1},8,["model"])])),_:1},8,["title","model-value"])}}}},8756:function(e,n,t){t.r(n),t.d(n,{BaseTransition:function(){return r.pR},BaseTransitionPropsValidators:function(){return r.QP},Comment:function(){return r.Mw},DeprecationTypes:function(){return r.aT},EffectScope:function(){return r.yC},ErrorCodes:function(){return r.tG},ErrorTypeStrings:function(){return r.ZQ},Fragment:function(){return r.FK},KeepAlive:function(){return r.PR},ReactiveEffect:function(){return r.X2},Static:function(){return r.jC},Suspense:function(){return r.tY},Teleport:function(){return r.Im},Text:function(){return r.EY},TrackOpTypes:function(){return r.Ul},Transition:function(){return r.eB},TransitionGroup:function(){return r.F},TriggerOpTypes:function(){return r.PP},VueElement:function(){return r.Vy},assertNumber:function(){return r.U4},callWithAsyncErrorHandling:function(){return r.qL},callWithErrorHandling:function(){return r.gh},camelize:function(){return r.PT},capitalize:function(){return r.ZH},cloneVNode:function(){return r.E3},compatUtils:function(){return r.Y5},compile:function(){return u},computed:function(){return r.EW},createApp:function(){return r.Ef},createBlock:function(){return r.Wv},createCommentVNode:function(){return r.Q3},createElementBlock:function(){return r.CE},createElementVNode:function(){return r.Lk},createHydrationRenderer:function(){return r.ci},createPropsRestProxy:function(){return r.bn},createRenderer:function(){return r.K9},createSSRApp:function(){return r.m1},createSlots:function(){return r.eX},createStaticVNode:function(){return r.Fv},createTextVNode:function(){return r.eW},createVNode:function(){return r.bF},customRef:function(){return r.rY},defineAsyncComponent:function(){return r.$V},defineComponent:function(){return r.pM},defineCustomElement:function(){return r.Xq},defineEmits:function(){return r.qP},defineExpose:function(){return r.wk},defineModel:function(){return r.NP},defineOptions:function(){return r.GM},defineProps:function(){return r.Yj},defineSSRCustomElement:function(){return r.Po},defineSlots:function(){return r.Lu},devtools:function(){return r.lt},effect:function(){return r.QZ},effectScope:function(){return r.uY},getCurrentInstance:function(){return r.nI},getCurrentScope:function(){return r.o5},getTransitionRawChildren:function(){return r.Df},guardReactiveProps:function(){return r.Ng},h:function(){return r.h},handleError:function(){return r.H4},hasInjectionContext:function(){return r.PS},hydrate:function(){return r.Qv},initCustomFormatter:function(){return r.y$},initDirectivesForSSR:function(){return r.Ib},inject:function(){return r.WQ},isMemoSame:function(){return r.Bs},isProxy:function(){return r.ju},isReactive:function(){return r.g8},isReadonly:function(){return r.Tm},isRef:function(){return r.i9},isRuntimeOnly:function(){return r.dA},isShallow:function(){return r.fE},isVNode:function(){return r.vv},markRaw:function(){return r.IG},mergeDefaults:function(){return r.HF},mergeModels:function(){return r.zz},mergeProps:function(){return r.v6},nextTick:function(){return r.dY},normalizeClass:function(){return r.C4},normalizeProps:function(){return r._B},normalizeStyle:function(){return r.Tr},onActivated:function(){return r.n},onBeforeMount:function(){return r.KC},onBeforeUnmount:function(){return r.xo},onBeforeUpdate:function(){return r.Ic},onDeactivated:function(){return r.Y4},onErrorCaptured:function(){return r.qG},onMounted:function(){return r.sV},onRenderTracked:function(){return r.qR},onRenderTriggered:function(){return r.bj},onScopeDispose:function(){return r.jr},onServerPrefetch:function(){return r.SS},onUnmounted:function(){return r.hi},onUpdated:function(){return r.$u},openBlock:function(){return r.uX},popScopeId:function(){return r.jt},provide:function(){return r.Gt},proxyRefs:function(){return r.Pr},pushScopeId:function(){return r.Qi},queuePostFlushCb:function(){return r.Dl},reactive:function(){return r.Kh},readonly:function(){return r.tB},ref:function(){return r.KR},registerRuntimeCompiler:function(){return r.tC},render:function(){return r.XX},renderList:function(){return r.pI},renderSlot:function(){return r.RG},resolveComponent:function(){return r.g2},resolveDirective:function(){return r.gN},resolveDynamicComponent:function(){return r.$y},resolveFilter:function(){return r.LJ},resolveTransitionHooks:function(){return r.OW},setBlockTracking:function(){return r.Vq},setDevtoolsHook:function(){return r.iD},setTransitionHooks:function(){return r.MZ},shallowReactive:function(){return r.Gc},shallowReadonly:function(){return r.nD},shallowRef:function(){return r.IJ},ssrContextKey:function(){return r.Fw},ssrUtils:function(){return r.Gw},stop:function(){return r.ds},toDisplayString:function(){return r.v_},toHandlerKey:function(){return r.rU},toHandlers:function(){return r.Tb},toRaw:function(){return r.ux},toRef:function(){return r.lW},toRefs:function(){return r.QW},toValue:function(){return r.BA},transformVNodeArgs:function(){return r.gW},triggerRef:function(){return r.mu},unref:function(){return r.R1},useAttrs:function(){return r.OA},useCssModule:function(){return r.D},useCssVars:function(){return r.$9},useModel:function(){return r.fn},useSSRContext:function(){return r.LM},useSlots:function(){return r.Ht},useTransitionState:function(){return r.Gy},vModelCheckbox:function(){return r.lH},vModelDynamic:function(){return r.hp},vModelRadio:function(){return r.XL},vModelSelect:function(){return r.u1},vModelText:function(){return r.Jo},vShow:function(){return r.aG},version:function(){return r.rE},warn:function(){return r.R8},watch:function(){return r.wB},watchEffect:function(){return r.nT},watchPostEffect:function(){return r.p9},watchSyncEffect:function(){return r.U_},withAsyncContext:function(){return r.E},withCtx:function(){return r.k6},withDefaults:function(){return r.rO},withDirectives:function(){return r.bo},withKeys:function(){return r.jR},withMemo:function(){return r.bU},withModifiers:function(){return r.D$},withScopeId:function(){return r.YY}});var r=t(53751);const u=()=>{0}}}]); |