ss-component-new 1.3.447 → 1.3.448
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{array-BamRuoOD.js → array-BsZboS17.js} +2 -2
- package/dist/{array-btZYLqUK.cjs → array-DukrgspM.cjs} +1 -1
- package/dist/{index-DFUcqAnm.js → index-5bUauTcA.js} +1 -1
- package/dist/{index-C-z-Nlg9.js → index-BAu5iXMJ.js} +1 -1
- package/dist/{index-D-j5ega_.cjs → index-BJM-PYJI.cjs} +1 -1
- package/dist/{index-wA8Et9Q3.cjs → index-BdOFufFv.cjs} +1 -1
- package/dist/{index-C7RhO6sY.cjs → index-BhEdQqn7.cjs} +1 -1
- package/dist/{index-CzjnoeKD.js → index-BtHlFKsL.js} +3 -3
- package/dist/{index-DTKhT44W.cjs → index-BzY8VYo7.cjs} +1 -1
- package/dist/{index-Cd0RwOH4.js → index-C1xV3RCI.js} +2 -2
- package/dist/{index-B72-4yf7.js → index-COJ19b-A.js} +1 -1
- package/dist/{index-CpwW2U4S.cjs → index-CcRrA_AS.cjs} +1 -1
- package/dist/{index-D9epS32a.cjs → index-CjIvswjY.cjs} +1 -1
- package/dist/{index-RWivHsXr.js → index-CxXJcN1Z.js} +1 -1
- package/dist/{index-t1up3rVy.js → index-CzTlJ-LB.js} +1 -1
- package/dist/{index-BVDaFrR1.cjs → index-D01aQmQY.cjs} +1 -1
- package/dist/{index-DI3TtkkA.js → index-D28-2Ryy.js} +4 -4
- package/dist/{index-Dg22_ZeG.js → index-DFTDuJ2W.js} +1 -1
- package/dist/{index-Dfo0qUQb.cjs → index-DJj4YdxX.cjs} +1 -1
- package/dist/{index-DqxQx4BR.cjs → index-DNgDdB-M.cjs} +1 -1
- package/dist/{index-C1FnwRUu.cjs → index-DQQTkzWE.cjs} +1 -1
- package/dist/{index-CCs8JfeG.cjs → index-DkXx8QZy.cjs} +1 -1
- package/dist/{index-CBXxToaR.js → index-DwwMqNIs.js} +2 -2
- package/dist/{index-BHTcqooS.js → index-ERw6KvoP.js} +7 -7
- package/dist/{index-DdGEVAoz.cjs → index-UDdd0QRU.cjs} +1 -1
- package/dist/{index-BuKQQPdl.js → index-YI023H7H.js} +2 -2
- package/dist/{main-DW827WGq.js → main-BF9jU0ln.js} +2 -2
- package/dist/{main-BMtNW6cb.cjs → main-kaWxNNhX.cjs} +1 -1
- package/dist/ss-component.cjs +1 -1
- package/dist/ss-component.js +5 -5
- package/dist/ss-component2.cjs +1 -1
- package/dist/ss-component2.js +8 -8
- package/dist/{threeModel-CJT7ouCQ.js → threeModel-C0jHCs0R.js} +1 -1
- package/dist/{threeModel-vePnqmZ4.cjs → threeModel-CZhpOWwk.cjs} +1 -1
- package/dist/{threeSceneView-CGKt1WlS.js → threeSceneView-B54tVT5y.js} +3 -3
- package/dist/{threeSceneView-BWxf-cVH.cjs → threeSceneView-DD4k5kk6.cjs} +1 -1
- package/dist/{threeSceneViewForCPMPIP-ClxNNEo3.cjs → threeSceneViewForCPMPIP-Ba6tHbTy.cjs} +1 -1
- package/dist/{threeSceneViewForCPMPIP-B5YgmLd-.js → threeSceneViewForCPMPIP-DgPjcojw.js} +1 -1
- package/dist/{threeViewerHost-B5GraQL0.js → threeViewerHost-BjdfqOo4.js} +1 -1
- package/dist/{threeViewerHost-D0tSdUbT.cjs → threeViewerHost-QiJwhxNw.cjs} +1 -1
- package/package.json +1 -1
|
@@ -4,14 +4,14 @@ var Ci = (e, a, r) => Lp(e, typeof a != "symbol" ? a + "" : a, r);
|
|
|
4
4
|
import { ref as se, watch as bl, nextTick as Yr, resolveComponent as Sl, createBlock as gl, openBlock as ce, withCtx as Fe, createElementVNode as fe, renderSlot as cn, defineComponent as oi, computed as er, createElementBlock as Ze, createCommentVNode as Ll, normalizeStyle as si, toDisplayString as al, onMounted as rn, onUnmounted as iu, withModifiers as jr, createVNode as Pe, createTextVNode as wl, Fragment as Fl, renderList as lr, normalizeClass as ji, onBeforeUnmount as ao, unref as Jl, createSlots as nu, mergeProps as su, resolveDynamicComponent as Ji, shallowRef as Uc, reactive as wi, getCurrentInstance as Wc, inject as jt, provide as Ws, toRef as Rp, onBeforeMount as qc, watchEffect as Pp, getCurrentScope as Hp, onScopeDispose as jp, toRefs as ju, withDirectives as Fp, vShow as Up } from "vue";
|
|
5
5
|
import { o as Wp, q as qp, E as zl, b as Pi, l as Kc, i as Fu, a as Uu, ar as Gc, as as Kp, at as Gp, au as At, aq as Wu } from "./request-XJsZ4h2T.js";
|
|
6
6
|
import { e as un, c as Ce, s as sr, i as zn, p as rr, b as In, u as _n, j as Dn, n as Yc, a as On, a6 as Co, a5 as ou, a3 as ko, q as lo, h as bi, a7 as bn, m as $o, k as Io, E as Qi, t as qs, a8 as Yp, a9 as _o, aa as Jp, a1 as Xp } from "./index-D6RGTlCo.js";
|
|
7
|
-
import { S as Zp, b as ei, _ as qu, f as Qp, h as Jc, i as Es, j as Ko, a as Sr, k as Vp, l as ef, m as af, d as tu, e as lf, c as rf, n as nf, o as sf } from "./index-
|
|
7
|
+
import { S as Zp, b as ei, _ as qu, f as Qp, h as Jc, i as Es, j as Ko, a as Sr, k as Vp, l as ef, m as af, d as tu, e as lf, c as rf, n as nf, o as sf } from "./index-DFTDuJ2W.js";
|
|
8
8
|
import { h as Ma, B as ws, C as Ks, D as of, g as Kr, E as tf, m as ns, F as No, t as Qs, G as uf, H as cf, I as df, e as zs, J as ro, r as pf, k as Gs, K as ff, d as xi, c as Is, L as hf, u as uu, M as Ui, N as Go, O as vf, P as yf, Q as gf, R as mf, s as Ln, l as bf, S as kf, w as _f, T as xf, U as wf, V as Sf, W as Xc, X as $i, Y as Ss, Z as kn, _ as es, $ as Tt, a0 as Af, o as Tf, a1 as Et, a2 as Ef, a3 as Df } from "./index-CmJoUVma.js";
|
|
9
9
|
import { _ as br } from "./_plugin-vue_export-helper-CHgC5LLL.js";
|
|
10
10
|
import { r as zf, I as Ku, J as If, K as Of, C as Mf, c as Dt, u as Zc, N as js, O as Bf, Q as Qc, R as Vc, s as zt, U as Cf, t as $f, h as Zn, B as Nf, V as It, Y as Gu, k as gs, l as Ps, Z as Lf, w as Rf, _ as Pf, $ as Hf, a0 as ed, d as ad, a1 as Yu } from "./index.vue_vue_type_style_index_0_scoped_6b92e250_lang-BPcdPEE5.js";
|
|
11
11
|
import { s as Vr } from "./index-11kpzK0A.js";
|
|
12
|
-
import { a as ld, T as rd } from "./threeViewerHost-
|
|
12
|
+
import { a as ld, T as rd } from "./threeViewerHost-BjdfqOo4.js";
|
|
13
13
|
import { g as xs, u as Ft, c as id, a as io, e as cu, b as Lo } from "./index-DUq4XELr.js";
|
|
14
|
-
import { a as jf, s as Ff } from "./index-
|
|
14
|
+
import { a as jf, s as Ff } from "./index-BAu5iXMJ.js";
|
|
15
15
|
import { u as nd } from "./index-D1UnVGMH.js";
|
|
16
16
|
/* empty css */
|
|
17
17
|
import { i as Ro } from "./isString-ChmgnNIb.js";
|
|
@@ -3414,7 +3414,7 @@ const Vu = async (e, a, r = !0) => {
|
|
|
3414
3414
|
let i = (I = e == null ? void 0 : e.compNames) == null ? void 0 : I[((K = e == null ? void 0 : e.compNames) == null ? void 0 : K.length) - 1], n = ((S = (M = (R = vd.value) == null ? void 0 : R.filter((y) => (y == null ? void 0 : y.condition) === "child")) == null ? void 0 : M[0]) == null ? void 0 : S.value) ?? "", p = a6.value;
|
|
3415
3415
|
n !== "" && (p = (w = p == null ? void 0 : p.find((y) => (y == null ? void 0 : y.path) === n)) == null ? void 0 : w.children), p = (b = p == null ? void 0 : p.find((y) => (y == null ? void 0 : y.name) === i)) == null ? void 0 : b.children;
|
|
3416
3416
|
let t = p == null ? void 0 : p.find((y) => (y == null ? void 0 : y.name) === r), c = p == null ? void 0 : p.find((y) => (y == null ? void 0 : y.name) === l);
|
|
3417
|
-
console.log(232, t);
|
|
3417
|
+
console.log(232, t), t = t.replace(/^file:\/\//, "file:///").replace(/\\/g, "/");
|
|
3418
3418
|
const m = await (await fetch(t)).blob();
|
|
3419
3419
|
let k = t.split(/[\\/]/).pop();
|
|
3420
3420
|
const u = new File([m], k, { type: m.type || "application/octet-stream" }), z = new FormData();
|
|
@@ -8,7 +8,7 @@ import { _ as Y0 } from "./index.vue_vue_type_script_setup_true_lang-DRzriV-s.js
|
|
|
8
8
|
import { m as Ki, B as $9, X as l8 } from "./index-CmJoUVma.js";
|
|
9
9
|
/* empty css */
|
|
10
10
|
import { s as J4 } from "./index-11kpzK0A.js";
|
|
11
|
-
import { T as Xi, a as j9 } from "./threeViewerHost-
|
|
11
|
+
import { T as Xi, a as j9 } from "./threeViewerHost-BjdfqOo4.js";
|
|
12
12
|
import { A as W9 } from "./index-xrsX_7VG.js";
|
|
13
13
|
var U9 = "[object Date]";
|
|
14
14
|
function I9(n) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),s=require("./index-
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),s=require("./index-D01aQmQY.cjs"),n=require("./index-Cvn9j6Uk.cjs"),u=require("./_plugin-vue_export-helper-BHFhmbuH.cjs"),r=e.ref([]),i=e.computed(()=>[{key:"extraButton",contents:[{label:"清空",background:"#f56c6c",color:"#ffffff"}]},{key:"rowButton",contents:[]},{key:"header",contents:[{label:"模块名称",prop:"module",filterable:!0},{label:"操作类型",prop:"type",filterable:!0},{label:"账号",prop:"account",filterable:!0},{label:"姓名",prop:"userName",filterable:!0},{label:"时间",prop:"timeStamp",sortable:!0}]},{key:"tableContents",contents:r.value}]),p=Object.freeze(Object.defineProperty({__proto__:null,pageData:i,tableData:r},Symbol.toStringTag,{value:"Module"})),b={class:"log-wrap"},d=e.defineComponent({__name:"index",setup(_){const t=e.reactive({...p});e.onMounted(async()=>{t.tableData=await n.getLogTableDataAsync("operate")});const c=l=>{var a;n.clickButton(l,(a=t.tableData)==null?void 0:a.map(o=>o.id),o=>{o&&(t.tableData=[])})};return(l,a)=>(e.openBlock(),e.createElementBlock("div",b,[e.createVNode(s.ssTable,{itemData:t.pageData,allowOperate:!1,allowSelect:!1,onOnButtonClick:c},null,8,["itemData"])]))}}),f=u._export_sfc(d,[["__scopeId","data-v-3d3b471d"]]);exports.default=f;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),ee=require("./request-Dl8yi2iS.cjs"),N=require("./index-mqL-OFAs.cjs"),L=require("./index-Dom0zBom.cjs"),oe=require("./index-B-pflqKE.cjs");require("./index.vue_vue_type_style_index_0_scoped_6b92e250_lang-DTWSzwUy.cjs");require("./index-BVDaFrR1.cjs");require("./index-BpPyaNFa.cjs");const b=require("./index.vue_vue_type_script_setup_true_lang-BKTJR2th.cjs");require("./index-BTEY8ajW.cjs");require("./index-wA8Et9Q3.cjs");const z=require("./_plugin-vue_export-helper-BHFhmbuH.cjs"),te=require("./clone-7j6nCPRO.cjs"),je={class:"param-auth"},Ge={class:"body"},Qe={class:"node-content-wrapper"},He={class:"node-label-wrapper"},Je={class:"node-label"},We=e.defineComponent({__name:"index",props:{params:{},checkedParams:{}},setup($,{expose:E}){const c=$,y={value:"uniqueKey",label:"label",children:"children",class:f=>{}},{buildParamAuthTree:g}=N.useRole(),p=e.ref(),w=e.computed(()=>g(c.params)),i=e.computed(()=>c.checkedParams.map(f=>`${f.id}_${f.prop}`));return E({getCheckedParams:()=>{var d;return((d=p.value)==null?void 0:d.getCheckedNodes())||[]}}),(f,d)=>{const v=e.resolveComponent("el-tree");return e.openBlock(),e.createElementBlock("div",je,[d[0]||(d[0]=e.createElementVNode("div",{class:"header"},[e.createElementVNode("div",{class:"header-left"}),e.createElementVNode("div",{class:"header-right"})],-1)),e.createElementVNode("div",Ge,[e.createVNode(v,{ref_key:"paramTreeRef",ref:p,class:"param-tree",data:w.value,props:y,"node-key":"uniqueKey","show-checkbox":"","default-expanded-keys":i.value,"default-checked-keys":i.value,height:"100%"},{default:e.withCtx(({node:u,data:P})=>[e.createElementVNode("div",Qe,[e.createElementVNode("div",He,[e.createElementVNode("div",Je,e.toDisplayString(u.label),1)])])]),_:1},8,["data","default-expanded-keys","default-checked-keys"])]),d[1]||(d[1]=e.createElementVNode("div",{class:"footer"},[e.createElementVNode("div",{class:"footer-left"}),e.createElementVNode("div",{class:"footer-right"})],-1))])}}}),Xe=z._export_sfc(We,[["__scopeId","data-v-b7ce5c18"]]),Ye={class:"param-wrapper"},Ze={class:"param-body"},et={class:"role-form-wrapper"},tt={class:"edit-footer"},ot={class:"footer-right"},at=e.defineComponent({__name:"index",props:{params:{},checkedParams:{}},emits:["updateParams"],setup($,{expose:E,emit:c}){const y=c,g=e.ref(),p=e.ref(!1),w=()=>{p.value=!0},i=()=>{p.value=!1},_=()=>{i()},f=()=>{const v=d();y("updateParams",v),i()},d=()=>{var u;return((u=g.value)==null?void 0:u.getCheckedParams())||[]};return E({openEditDialog:w}),(v,u)=>(e.openBlock(),e.createBlock(oe.ssDialog,{class:"param-edit-dialog",visible:p.value,title:"参数权限",onBeforeDestroy:i,showClose:!0,closeOnClickModal:!1,closeOnPressEscape:!1,modalClass:"role-edit-modal",alignCenter:!0,appendToBody:!1},{default:e.withCtx(()=>[e.createElementVNode("div",Ye,[u[0]||(u[0]=e.createElementVNode("div",{class:"param-header"},[e.createElementVNode("div",{class:"header-left"}),e.createElementVNode("div",{class:"header-right"})],-1)),e.createElementVNode("div",Ze,[e.createElementVNode("div",et,[e.createVNode(Xe,{ref_key:"paramAuthTree",ref:g,params:v.params,"checked-params":v.checkedParams},null,8,["params","checked-params"])])])])]),footer:e.withCtx(()=>[e.createElementVNode("div",tt,[u[1]||(u[1]=e.createElementVNode("div",{class:"footer-left"},null,-1)),e.createElementVNode("div",ot,[e.createVNode(b._sfc_main,{class:"cancel",emptyColor:!0,onClickTrigger:_,modelValue:"取消",buttonType:"info"}),e.createVNode(b._sfc_main,{class:"confirm",emptyColor:!0,onClickTrigger:f,modelValue:"确定",buttonType:"primary"})])])]),_:1},8,["visible"]))}}),lt=z._export_sfc(at,[["__scopeId","data-v-875ed466"]]),rt={class:"scope-management-wrapper"},nt={class:"scope-management-body"},st={class:"scope-form-wrapper"},it={class:"edit-footer"},ct={class:"footer-right"},dt=e.defineComponent({__name:"index",emits:["confirm"],setup($,{expose:E,emit:c}){const y=c,{initDepartmentScope:g}=L.useDataPermission(),p=e.ref(),w=e.reactive({departmentScope:[{required:!0,message:"请输入角色名称",trigger:"change"}]}),i=e.ref(g()),_=e.ref(!1),f=()=>{_.value=!0},d=()=>{_.value=!1},v=async h=>{i.value=te.clone(h),f()},u=()=>{i.value=g(),d()},P=async()=>{var h,m;await((m=(h=p.value)==null?void 0:h.validate)==null?void 0:m.call(h)),y("confirm",te.clone(i.value)),u()};return E({handleEdit:v}),(h,m)=>{const U=e.resolveComponent("el-radio"),M=e.resolveComponent("el-radio-group"),K=e.resolveComponent("el-form-item"),j=e.resolveComponent("el-col"),G=e.resolveComponent("el-row"),Q=e.resolveComponent("el-form");return e.openBlock(),e.createBlock(oe.ssDialog,{class:"scope-edit-dialog",visible:_.value,title:"数据权限",onBeforeDestroy:d,showClose:!0,closeOnClickModal:!1,closeOnPressEscape:!1,modalClass:"scope-edit-modal",alignCenter:!0,appendToBody:!1},{default:e.withCtx(()=>[e.createElementVNode("div",rt,[m[1]||(m[1]=e.createElementVNode("div",{class:"scope-management-header"},[e.createElementVNode("div",{class:"header-left"}),e.createElementVNode("div",{class:"header-right"})],-1)),e.createElementVNode("div",nt,[e.createElementVNode("div",st,[e.createVNode(Q,{class:"scope-edit-form",ref_key:"scopeFormRef",ref:p,model:i.value,rules:w},{default:e.withCtx(()=>[e.createVNode(G,{gutter:20},{default:e.withCtx(()=>[e.createVNode(j,{span:24},{default:e.withCtx(()=>[e.createVNode(K,{prop:"departmentScope",label:"部门权限范围","label-position":"top"},{default:e.withCtx(()=>[e.createVNode(M,{modelValue:i.value.departmentScope,"onUpdate:modelValue":m[0]||(m[0]=C=>i.value.departmentScope=C)},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(e.unref(L.departmentScopeOptions),C=>(e.openBlock(),e.createBlock(U,{key:C.value,value:C.value},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(C.label),1)]),_:2},1032,["value"]))),128))]),_:1},8,["modelValue"])]),_:1})]),_:1})]),_:1})]),_:1},8,["model","rules"])])])])]),footer:e.withCtx(()=>[e.createElementVNode("div",it,[m[2]||(m[2]=e.createElementVNode("div",{class:"footer-left"},null,-1)),e.createElementVNode("div",ct,[e.createVNode(b._sfc_main,{class:"cancel",emptyColor:!0,onClickTrigger:u,modelValue:"取消",buttonType:"info"}),e.createVNode(b._sfc_main,{class:"confirm",emptyColor:!0,onClickTrigger:P,modelValue:"确定",buttonType:"primary"})])])]),_:1},8,["visible"])}}}),ut=z._export_sfc(dt,[["__scopeId","data-v-40d37c72"]]),pt={class:"role-management"},mt={class:"header"},_t={class:"header-left"},ft={class:"query-wrapper"},vt={class:"header-right"},Vt={class:"body"},gt={class:"role-table-wrapper"},ht={class:"operate-list"},Ct=["onClick"],Nt={class:"pagination-wrapper"},yt={class:"role-management-wrapper"},wt={class:"role-management-body"},kt={class:"role-form-wrapper"},Et={class:"auth-tree-wrapper"},xt={class:"node-content-wrapper"},bt={class:"node-label-wrapper"},Tt={class:"node-label"},Pt={key:0,class:"status-tag"},Bt={key:1,class:"status-tag"},Dt={key:2,class:"status-tag"},St={key:3,class:"status-tag"},Lt={class:"edit-footer"},$t={class:"footer-right"},It=e.defineComponent({__name:"index",setup($){const E={value:"id",label:"label",children:"children"},c=L.useMenuState(L.pinia),{initDepartmentScope:y,recAndInitNodeDataPermission:g}=L.useDataPermission(),{initRoleItem:p,queryInfo:w,resetQuery:i,pageInfo:_,setPageNum:f,setPageSize:d,initGetByPage:v,initCreate:u,initUpdate:P,initDelete:h,propertyAuthTree:m,initPropertyAuthTree:U,getStatusLabelByValue:M,getStatusTagByValue:K,getFeatureStatusLabelByValue:j,getFeatureStatusTagByValue:G,initRoleConfig:Q,hasRoleEditAuth:C,isTableFeature:fe,initImport:ve,initExport:Ve,exportTemplate:ge}=N.useRole(),ae=e.ref([]),he=async()=>{const o=await v(),{roleData:t=[]}=o;return t},B=async()=>{ae.value=await he()},Ce=o=>{f(o),B()},Ne=o=>{d(o),B()},ye=async()=>{i(),c.setImportLoading(!0),await B().finally(()=>{c.setImportLoading(!1)})},T=async()=>{await B(),await Q()};e.onMounted(()=>{T()});const le=e.ref(),we=e.reactive({name:[{required:!0,message:"请输入角色名称",trigger:"blur"}]}),I=e.ref(),q=e.ref(""),n=e.ref(p());e.watch(q,o=>{I.value.filter(o)});const ke=(o,t)=>o?t.label.includes(o):!0,re=e.ref([]),R=e.ref(),Ee=(o,t)=>{var a;o.stopPropagation(),re.value=t.params||[],(a=R==null?void 0:R.value)==null||a.openEditDialog()},xe=o=>{var s;const t=(s=o==null?void 0:o[0])==null?void 0:s.id,a=n.value.params.filter(V=>V.id!==t);n.value.params=[...a,...o]},H=e.ref(!1),be=()=>{H.value=!0},ne=()=>{q.value="",H.value=!1},se=async o=>{if(!C.value)return;const t=[];o&&t.push(o.role_id),await U(t);let a={};o!=null&&o.role_id||(a={checkAll:!0,tree:m.value}),n.value=p(o,a),be()},ie=()=>{n.value=p(),ne()},Te=async()=>{var a,s,V;await((s=(a=le.value)==null?void 0:a.validate)==null?void 0:s.call(a));let o=((V=I.value)==null?void 0:V.getCheckedNodes())||[];o=o.filter(k=>k.isPropertyLeaf),o=o.map(k=>{const{departmentScope:X}=k.dataPermission||{};return{...k,department_scope:X}}),n.value.main_ids=o;const{role_id:t}=n.value;t?await De():await Be(),ie()},Pe=async o=>{if(!C.value)return;const{status:t}=o;N.statusConstants.ENABLE.value===t?o.status=N.statusConstants.DISABLED.value:o.status=N.statusConstants.ENABLE.value,await P(o),await T()},Be=async()=>{await u(n.value),await T()},De=async()=>{await P(n.value),await T()},Se=async o=>{await h(o),await T()},Le=async(o,t)=>{if(!C.value)return;const{value:a}=o,s=t.row;if(a==="edit"){se(s);return}if(a==="delete"){await Se(s);return}},$e=async(o,t)=>{o.stopPropagation();const{status:a}=t;N.featureStatusConstants.EDITABLE.value===a?t.status=N.featureStatusConstants.DISABLED.value:t.status=N.featureStatusConstants.EDITABLE.value},J=o=>{var a;return(((a=I.value)==null?void 0:a.getCheckedKeys(!0))||[]).includes(o.id)},ce=e.ref(),A=e.ref(),W=e.ref(y()),de=(o,t)=>{var a;o.stopPropagation(),A.value=t,t.isPropertyLeaf&&(W.value=te.clone(t.dataPermission)),t.isProperty||(W.value=y("")),(a=ce.value)==null||a.handleEdit(W.value)},Ie=o=>{const{isProperty:t,isPropertyLeaf:a}=A.value;if(a){A.value.dataPermission=o;return}if(!t){g(A.value,o);return}},qe=async()=>{await Re()},Re=async()=>{const o=document.createElement("input");o.type="file",o.accept=".xlsx",o.onchange=async t=>{var V;const s=(V=t.target.files)==null?void 0:V[0];if(s)try{c.setImportLoading(!0),await ve(s),await T(),c.setImportLoading(!1)}catch{c.setImportLoading(!1)}},o.click()},Ae=async()=>{c.setImportLoading(!0),await Ve().finally(()=>{c.setImportLoading(!1)})},Fe=async()=>{ge()};return(o,t)=>{var ue,pe,me,_e;const a=e.resolveComponent("el-input"),s=e.resolveComponent("el-button"),V=e.resolveComponent("el-icon"),k=e.resolveComponent("el-dropdown-item"),X=e.resolveComponent("el-dropdown-menu"),Oe=e.resolveComponent("el-dropdown"),D=e.resolveComponent("el-table-column"),S=e.resolveComponent("el-tag"),ze=e.resolveComponent("el-table"),Ue=e.resolveComponent("el-pagination"),F=e.resolveComponent("el-form-item"),O=e.resolveComponent("el-col"),Y=e.resolveComponent("el-row"),Me=e.resolveComponent("el-tree"),Ke=e.resolveComponent("el-form");return e.openBlock(),e.createElementBlock(e.Fragment,null,[e.createElementVNode("div",pt,[e.createElementVNode("div",mt,[e.createElementVNode("div",_t,[e.createElementVNode("div",ft,[e.createVNode(a,{modelValue:e.unref(w).name,"onUpdate:modelValue":t[0]||(t[0]=l=>e.unref(w).name=l),style:{width:"240px"},placeholder:"请输入名称"},null,8,["modelValue"]),e.createVNode(s,{type:"primary",onClick:B},{default:e.withCtx(()=>t[6]||(t[6]=[e.createTextVNode("查询")])),_:1,__:[6]}),e.createVNode(s,{type:"primary",plain:"",onClick:ye},{default:e.withCtx(()=>t[7]||(t[7]=[e.createTextVNode("重置")])),_:1,__:[7]})])]),e.createElementVNode("div",vt,[e.createVNode(s,{type:"primary",onClick:qe},{default:e.withCtx(()=>[t[8]||(t[8]=e.createTextVNode(" 导入 ")),e.createVNode(V,{class:"el-icon--right"},{default:e.withCtx(()=>[e.createVNode(e.unref(ee.upload_default))]),_:1})]),_:1,__:[8]}),e.createVNode(Oe,null,{dropdown:e.withCtx(()=>[e.createVNode(X,null,{default:e.withCtx(()=>[e.createVNode(k,{onClick:Fe},{default:e.withCtx(()=>t[10]||(t[10]=[e.createTextVNode("导出模板")])),_:1,__:[10]}),e.createVNode(k,{onClick:Ae},{default:e.withCtx(()=>t[11]||(t[11]=[e.createTextVNode("导出数据")])),_:1,__:[11]})]),_:1})]),default:e.withCtx(()=>[e.createVNode(s,{type:"primary"},{default:e.withCtx(()=>[t[9]||(t[9]=e.createTextVNode(" 导出 ")),e.createVNode(V,{class:"el-icon--right"},{default:e.withCtx(()=>[e.createVNode(e.unref(ee.arrow_down_default))]),_:1})]),_:1,__:[9]})]),_:1}),e.createVNode(b._sfc_main,{emptyColor:!0,onClickTrigger:t[1]||(t[1]=l=>se()),modelValue:"创建角色",buttonType:"primary"})])]),e.createElementVNode("div",Vt,[e.createElementVNode("div",gt,[e.createVNode(ze,{class:"role-table",data:ae.value,"empty-text":""},{default:e.withCtx(()=>[e.createVNode(D,{prop:"name",label:"名称",align:"center"}),e.createVNode(D,{prop:"code",label:"编码",align:"center"}),e.createVNode(D,{prop:"remark",label:"备注",align:"center"}),e.createVNode(D,{prop:"status",label:"状态",align:"center"},{default:e.withCtx(l=>[e.createVNode(S,{class:"status-tag",type:e.unref(K)(l.row.status),title:"点击切换",onClick:r=>Pe(l.row)},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(M)(l.row.status)),1)]),_:2},1032,["type","onClick"])]),_:1}),e.createVNode(D,{label:"操作",align:"center"},{default:e.withCtx(l=>[e.createElementVNode("div",ht,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(e.unref(N.operateList),r=>(e.openBlock(),e.createElementBlock("div",{class:"operate-item",key:r.value,onClick:e.withModifiers(Z=>Le(r,l),["stop"])},e.toDisplayString(r.label),9,Ct))),128))])]),_:1})]),_:1},8,["data"])]),e.createElementVNode("div",Nt,[t[12]||(t[12]=e.createElementVNode("div",null,null,-1)),e.createVNode(Ue,{onSizeChange:Ne,onCurrentChange:Ce,"current-page":(ue=e.unref(_))==null?void 0:ue.pageNum,"page-sizes":(pe=e.unref(_))==null?void 0:pe.pageSizes,"page-size":((me=e.unref(_))==null?void 0:me.pageSize)??10,layout:"total, sizes, prev, pager, next, jumper",total:((_e=e.unref(_))==null?void 0:_e.total)??0},null,8,["current-page","page-sizes","page-size","total"])])]),t[13]||(t[13]=e.createElementVNode("div",{class:"footer"},[e.createElementVNode("div",{class:"footer-left"}),e.createElementVNode("div",{class:"footer-right"})],-1))]),e.createVNode(oe.ssDialog,{class:"role-edit-dialog",visible:H.value,title:"角色信息",onBeforeDestroy:ne,showClose:!0,closeOnClickModal:!1,closeOnPressEscape:!1,modalClass:"role-edit-modal",alignCenter:!0,appendToBody:!1},{default:e.withCtx(()=>[e.createElementVNode("div",yt,[t[17]||(t[17]=e.createElementVNode("div",{class:"role-management-header"},[e.createElementVNode("div",{class:"header-left"}),e.createElementVNode("div",{class:"header-right"})],-1)),e.createElementVNode("div",wt,[e.createElementVNode("div",kt,[e.createVNode(Ke,{class:"role-edit-form",ref_key:"roleFormRef",ref:le,model:n.value,rules:we},{default:e.withCtx(()=>[e.createVNode(Y,{gutter:20},{default:e.withCtx(()=>[e.createVNode(O,{span:12},{default:e.withCtx(()=>[e.createVNode(F,{prop:"name",label:"角色名称","label-position":"top"},{default:e.withCtx(()=>[e.createVNode(a,{modelValue:n.value.name,"onUpdate:modelValue":t[2]||(t[2]=l=>n.value.name=l),"aria-label":"角色名称",placeholder:"角色名称"},null,8,["modelValue"])]),_:1})]),_:1}),e.createVNode(O,{span:12},{default:e.withCtx(()=>[e.createVNode(F,{label:"角色编码","label-position":"top"},{default:e.withCtx(()=>[e.createVNode(a,{modelValue:n.value.code,"onUpdate:modelValue":t[3]||(t[3]=l=>n.value.code=l),"aria-label":"角色编码",placeholder:"角色编码"},null,8,["modelValue"])]),_:1})]),_:1})]),_:1}),e.createVNode(Y,{gutter:20},{default:e.withCtx(()=>[e.createVNode(O,{span:12},{default:e.withCtx(()=>[e.createVNode(F,{label:"备注","label-position":"top"},{default:e.withCtx(()=>[e.createVNode(a,{modelValue:n.value.remark,"onUpdate:modelValue":t[4]||(t[4]=l=>n.value.remark=l),"aria-label":"备注",placeholder:"备注"},null,8,["modelValue"])]),_:1})]),_:1})]),_:1}),e.createVNode(Y,{class:"auth-tree-row",gutter:20},{default:e.withCtx(()=>[e.createVNode(O,{span:24},{default:e.withCtx(()=>[e.createVNode(F,{label:"特性权限","label-position":"top"},{default:e.withCtx(()=>[e.createElementVNode("div",Et,[e.createVNode(a,{modelValue:q.value,"onUpdate:modelValue":t[5]||(t[5]=l=>q.value=l)},{prefix:e.withCtx(()=>[e.createVNode(V,{class:"el-input__icon"},{default:e.withCtx(()=>[e.createVNode(e.unref(ee.search_default))]),_:1})]),_:1},8,["modelValue"]),e.createVNode(Me,{ref_key:"propertyTreeRef",ref:I,class:"auth-tree",data:e.unref(m),props:E,"node-key":"id","show-checkbox":"","default-expanded-keys":n.value.checked_ids,"default-checked-keys":n.value.checked_ids,"filter-node-method":ke},{default:e.withCtx(({node:l,data:r})=>{var Z;return[e.createElementVNode("div",xt,[e.createElementVNode("div",bt,[e.createElementVNode("div",Tt,e.toDisplayString(l.label),1)]),r.isPropertyLeaf&&J(r)?(e.openBlock(),e.createElementBlock("div",Pt,[e.createVNode(S,{class:"status-tag",type:e.unref(G)(r.status),title:"点击切换",onClick:x=>$e(x,r)},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(j)(r.status)),1)]),_:2},1032,["type","onClick"])])):e.createCommentVNode("",!0),r.isProperty&&J(r)&&((Z=r.params)==null?void 0:Z.length)>0?(e.openBlock(),e.createElementBlock("div",Bt,[e.createVNode(S,{class:"status-tag",type:"success",onClick:x=>Ee(x,r)},{default:e.withCtx(()=>t[14]||(t[14]=[e.createTextVNode(" 参数设置 ")])),_:2,__:[14]},1032,["onClick"])])):e.createCommentVNode("",!0),r.isPropertyLeaf&&J(r)&&e.unref(fe)(r)?(e.openBlock(),e.createElementBlock("div",Dt,[e.createVNode(S,{class:"status-tag",type:"warning",onClick:x=>de(x,r)},{default:e.withCtx(()=>t[15]||(t[15]=[e.createTextVNode(" 数据权限 ")])),_:2,__:[15]},1032,["onClick"])])):e.createCommentVNode("",!0),l.level==1&&l.checked&&!r.isProperty?(e.openBlock(),e.createElementBlock("div",St,[e.createVNode(S,{class:"status-tag",type:"warning",onClick:x=>de(x,r)},{default:e.withCtx(()=>t[16]||(t[16]=[e.createTextVNode(" 数据权限重置 ")])),_:2,__:[16]},1032,["onClick"])])):e.createCommentVNode("",!0)])]}),_:1},8,["data","default-expanded-keys","default-checked-keys"])])]),_:1})]),_:1})]),_:1})]),_:1},8,["model","rules"])])])])]),footer:e.withCtx(()=>[e.createElementVNode("div",Lt,[t[18]||(t[18]=e.createElementVNode("div",{class:"footer-left"},null,-1)),e.createElementVNode("div",$t,[e.createVNode(b._sfc_main,{class:"cancel",emptyColor:!0,onClickTrigger:ie,modelValue:"取消",buttonType:"info"}),e.createVNode(b._sfc_main,{class:"confirm",emptyColor:!0,onClickTrigger:Te,modelValue:"确定",buttonType:"primary"})])])]),_:1},8,["visible"]),e.createVNode(lt,{ref_key:"paramAuthDialog",ref:R,params:re.value,"checked-params":n.value.params,onUpdateParams:xe},null,8,["params","checked-params"]),e.createVNode(ut,{ref_key:"scopeDialog",ref:ce,onConfirm:Ie},null,512)],64)}}}),qt=z._export_sfc(It,[["__scopeId","data-v-5da1e93d"]]);exports.default=qt;
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),ee=require("./request-Dl8yi2iS.cjs"),N=require("./index-mqL-OFAs.cjs"),L=require("./index-Dom0zBom.cjs"),oe=require("./index-B-pflqKE.cjs");require("./index.vue_vue_type_style_index_0_scoped_6b92e250_lang-DTWSzwUy.cjs");require("./index-D01aQmQY.cjs");require("./index-BpPyaNFa.cjs");const b=require("./index.vue_vue_type_script_setup_true_lang-BKTJR2th.cjs");require("./index-BTEY8ajW.cjs");require("./index-BdOFufFv.cjs");const z=require("./_plugin-vue_export-helper-BHFhmbuH.cjs"),te=require("./clone-7j6nCPRO.cjs"),je={class:"param-auth"},Ge={class:"body"},Qe={class:"node-content-wrapper"},He={class:"node-label-wrapper"},Je={class:"node-label"},We=e.defineComponent({__name:"index",props:{params:{},checkedParams:{}},setup($,{expose:E}){const c=$,y={value:"uniqueKey",label:"label",children:"children",class:f=>{}},{buildParamAuthTree:g}=N.useRole(),p=e.ref(),w=e.computed(()=>g(c.params)),i=e.computed(()=>c.checkedParams.map(f=>`${f.id}_${f.prop}`));return E({getCheckedParams:()=>{var d;return((d=p.value)==null?void 0:d.getCheckedNodes())||[]}}),(f,d)=>{const v=e.resolveComponent("el-tree");return e.openBlock(),e.createElementBlock("div",je,[d[0]||(d[0]=e.createElementVNode("div",{class:"header"},[e.createElementVNode("div",{class:"header-left"}),e.createElementVNode("div",{class:"header-right"})],-1)),e.createElementVNode("div",Ge,[e.createVNode(v,{ref_key:"paramTreeRef",ref:p,class:"param-tree",data:w.value,props:y,"node-key":"uniqueKey","show-checkbox":"","default-expanded-keys":i.value,"default-checked-keys":i.value,height:"100%"},{default:e.withCtx(({node:u,data:P})=>[e.createElementVNode("div",Qe,[e.createElementVNode("div",He,[e.createElementVNode("div",Je,e.toDisplayString(u.label),1)])])]),_:1},8,["data","default-expanded-keys","default-checked-keys"])]),d[1]||(d[1]=e.createElementVNode("div",{class:"footer"},[e.createElementVNode("div",{class:"footer-left"}),e.createElementVNode("div",{class:"footer-right"})],-1))])}}}),Xe=z._export_sfc(We,[["__scopeId","data-v-b7ce5c18"]]),Ye={class:"param-wrapper"},Ze={class:"param-body"},et={class:"role-form-wrapper"},tt={class:"edit-footer"},ot={class:"footer-right"},at=e.defineComponent({__name:"index",props:{params:{},checkedParams:{}},emits:["updateParams"],setup($,{expose:E,emit:c}){const y=c,g=e.ref(),p=e.ref(!1),w=()=>{p.value=!0},i=()=>{p.value=!1},_=()=>{i()},f=()=>{const v=d();y("updateParams",v),i()},d=()=>{var u;return((u=g.value)==null?void 0:u.getCheckedParams())||[]};return E({openEditDialog:w}),(v,u)=>(e.openBlock(),e.createBlock(oe.ssDialog,{class:"param-edit-dialog",visible:p.value,title:"参数权限",onBeforeDestroy:i,showClose:!0,closeOnClickModal:!1,closeOnPressEscape:!1,modalClass:"role-edit-modal",alignCenter:!0,appendToBody:!1},{default:e.withCtx(()=>[e.createElementVNode("div",Ye,[u[0]||(u[0]=e.createElementVNode("div",{class:"param-header"},[e.createElementVNode("div",{class:"header-left"}),e.createElementVNode("div",{class:"header-right"})],-1)),e.createElementVNode("div",Ze,[e.createElementVNode("div",et,[e.createVNode(Xe,{ref_key:"paramAuthTree",ref:g,params:v.params,"checked-params":v.checkedParams},null,8,["params","checked-params"])])])])]),footer:e.withCtx(()=>[e.createElementVNode("div",tt,[u[1]||(u[1]=e.createElementVNode("div",{class:"footer-left"},null,-1)),e.createElementVNode("div",ot,[e.createVNode(b._sfc_main,{class:"cancel",emptyColor:!0,onClickTrigger:_,modelValue:"取消",buttonType:"info"}),e.createVNode(b._sfc_main,{class:"confirm",emptyColor:!0,onClickTrigger:f,modelValue:"确定",buttonType:"primary"})])])]),_:1},8,["visible"]))}}),lt=z._export_sfc(at,[["__scopeId","data-v-875ed466"]]),rt={class:"scope-management-wrapper"},nt={class:"scope-management-body"},st={class:"scope-form-wrapper"},it={class:"edit-footer"},ct={class:"footer-right"},dt=e.defineComponent({__name:"index",emits:["confirm"],setup($,{expose:E,emit:c}){const y=c,{initDepartmentScope:g}=L.useDataPermission(),p=e.ref(),w=e.reactive({departmentScope:[{required:!0,message:"请输入角色名称",trigger:"change"}]}),i=e.ref(g()),_=e.ref(!1),f=()=>{_.value=!0},d=()=>{_.value=!1},v=async h=>{i.value=te.clone(h),f()},u=()=>{i.value=g(),d()},P=async()=>{var h,m;await((m=(h=p.value)==null?void 0:h.validate)==null?void 0:m.call(h)),y("confirm",te.clone(i.value)),u()};return E({handleEdit:v}),(h,m)=>{const U=e.resolveComponent("el-radio"),M=e.resolveComponent("el-radio-group"),K=e.resolveComponent("el-form-item"),j=e.resolveComponent("el-col"),G=e.resolveComponent("el-row"),Q=e.resolveComponent("el-form");return e.openBlock(),e.createBlock(oe.ssDialog,{class:"scope-edit-dialog",visible:_.value,title:"数据权限",onBeforeDestroy:d,showClose:!0,closeOnClickModal:!1,closeOnPressEscape:!1,modalClass:"scope-edit-modal",alignCenter:!0,appendToBody:!1},{default:e.withCtx(()=>[e.createElementVNode("div",rt,[m[1]||(m[1]=e.createElementVNode("div",{class:"scope-management-header"},[e.createElementVNode("div",{class:"header-left"}),e.createElementVNode("div",{class:"header-right"})],-1)),e.createElementVNode("div",nt,[e.createElementVNode("div",st,[e.createVNode(Q,{class:"scope-edit-form",ref_key:"scopeFormRef",ref:p,model:i.value,rules:w},{default:e.withCtx(()=>[e.createVNode(G,{gutter:20},{default:e.withCtx(()=>[e.createVNode(j,{span:24},{default:e.withCtx(()=>[e.createVNode(K,{prop:"departmentScope",label:"部门权限范围","label-position":"top"},{default:e.withCtx(()=>[e.createVNode(M,{modelValue:i.value.departmentScope,"onUpdate:modelValue":m[0]||(m[0]=C=>i.value.departmentScope=C)},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(e.unref(L.departmentScopeOptions),C=>(e.openBlock(),e.createBlock(U,{key:C.value,value:C.value},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(C.label),1)]),_:2},1032,["value"]))),128))]),_:1},8,["modelValue"])]),_:1})]),_:1})]),_:1})]),_:1},8,["model","rules"])])])])]),footer:e.withCtx(()=>[e.createElementVNode("div",it,[m[2]||(m[2]=e.createElementVNode("div",{class:"footer-left"},null,-1)),e.createElementVNode("div",ct,[e.createVNode(b._sfc_main,{class:"cancel",emptyColor:!0,onClickTrigger:u,modelValue:"取消",buttonType:"info"}),e.createVNode(b._sfc_main,{class:"confirm",emptyColor:!0,onClickTrigger:P,modelValue:"确定",buttonType:"primary"})])])]),_:1},8,["visible"])}}}),ut=z._export_sfc(dt,[["__scopeId","data-v-40d37c72"]]),pt={class:"role-management"},mt={class:"header"},_t={class:"header-left"},ft={class:"query-wrapper"},vt={class:"header-right"},Vt={class:"body"},gt={class:"role-table-wrapper"},ht={class:"operate-list"},Ct=["onClick"],Nt={class:"pagination-wrapper"},yt={class:"role-management-wrapper"},wt={class:"role-management-body"},kt={class:"role-form-wrapper"},Et={class:"auth-tree-wrapper"},xt={class:"node-content-wrapper"},bt={class:"node-label-wrapper"},Tt={class:"node-label"},Pt={key:0,class:"status-tag"},Bt={key:1,class:"status-tag"},Dt={key:2,class:"status-tag"},St={key:3,class:"status-tag"},Lt={class:"edit-footer"},$t={class:"footer-right"},It=e.defineComponent({__name:"index",setup($){const E={value:"id",label:"label",children:"children"},c=L.useMenuState(L.pinia),{initDepartmentScope:y,recAndInitNodeDataPermission:g}=L.useDataPermission(),{initRoleItem:p,queryInfo:w,resetQuery:i,pageInfo:_,setPageNum:f,setPageSize:d,initGetByPage:v,initCreate:u,initUpdate:P,initDelete:h,propertyAuthTree:m,initPropertyAuthTree:U,getStatusLabelByValue:M,getStatusTagByValue:K,getFeatureStatusLabelByValue:j,getFeatureStatusTagByValue:G,initRoleConfig:Q,hasRoleEditAuth:C,isTableFeature:fe,initImport:ve,initExport:Ve,exportTemplate:ge}=N.useRole(),ae=e.ref([]),he=async()=>{const o=await v(),{roleData:t=[]}=o;return t},B=async()=>{ae.value=await he()},Ce=o=>{f(o),B()},Ne=o=>{d(o),B()},ye=async()=>{i(),c.setImportLoading(!0),await B().finally(()=>{c.setImportLoading(!1)})},T=async()=>{await B(),await Q()};e.onMounted(()=>{T()});const le=e.ref(),we=e.reactive({name:[{required:!0,message:"请输入角色名称",trigger:"blur"}]}),I=e.ref(),q=e.ref(""),n=e.ref(p());e.watch(q,o=>{I.value.filter(o)});const ke=(o,t)=>o?t.label.includes(o):!0,re=e.ref([]),R=e.ref(),Ee=(o,t)=>{var a;o.stopPropagation(),re.value=t.params||[],(a=R==null?void 0:R.value)==null||a.openEditDialog()},xe=o=>{var s;const t=(s=o==null?void 0:o[0])==null?void 0:s.id,a=n.value.params.filter(V=>V.id!==t);n.value.params=[...a,...o]},H=e.ref(!1),be=()=>{H.value=!0},ne=()=>{q.value="",H.value=!1},se=async o=>{if(!C.value)return;const t=[];o&&t.push(o.role_id),await U(t);let a={};o!=null&&o.role_id||(a={checkAll:!0,tree:m.value}),n.value=p(o,a),be()},ie=()=>{n.value=p(),ne()},Te=async()=>{var a,s,V;await((s=(a=le.value)==null?void 0:a.validate)==null?void 0:s.call(a));let o=((V=I.value)==null?void 0:V.getCheckedNodes())||[];o=o.filter(k=>k.isPropertyLeaf),o=o.map(k=>{const{departmentScope:X}=k.dataPermission||{};return{...k,department_scope:X}}),n.value.main_ids=o;const{role_id:t}=n.value;t?await De():await Be(),ie()},Pe=async o=>{if(!C.value)return;const{status:t}=o;N.statusConstants.ENABLE.value===t?o.status=N.statusConstants.DISABLED.value:o.status=N.statusConstants.ENABLE.value,await P(o),await T()},Be=async()=>{await u(n.value),await T()},De=async()=>{await P(n.value),await T()},Se=async o=>{await h(o),await T()},Le=async(o,t)=>{if(!C.value)return;const{value:a}=o,s=t.row;if(a==="edit"){se(s);return}if(a==="delete"){await Se(s);return}},$e=async(o,t)=>{o.stopPropagation();const{status:a}=t;N.featureStatusConstants.EDITABLE.value===a?t.status=N.featureStatusConstants.DISABLED.value:t.status=N.featureStatusConstants.EDITABLE.value},J=o=>{var a;return(((a=I.value)==null?void 0:a.getCheckedKeys(!0))||[]).includes(o.id)},ce=e.ref(),A=e.ref(),W=e.ref(y()),de=(o,t)=>{var a;o.stopPropagation(),A.value=t,t.isPropertyLeaf&&(W.value=te.clone(t.dataPermission)),t.isProperty||(W.value=y("")),(a=ce.value)==null||a.handleEdit(W.value)},Ie=o=>{const{isProperty:t,isPropertyLeaf:a}=A.value;if(a){A.value.dataPermission=o;return}if(!t){g(A.value,o);return}},qe=async()=>{await Re()},Re=async()=>{const o=document.createElement("input");o.type="file",o.accept=".xlsx",o.onchange=async t=>{var V;const s=(V=t.target.files)==null?void 0:V[0];if(s)try{c.setImportLoading(!0),await ve(s),await T(),c.setImportLoading(!1)}catch{c.setImportLoading(!1)}},o.click()},Ae=async()=>{c.setImportLoading(!0),await Ve().finally(()=>{c.setImportLoading(!1)})},Fe=async()=>{ge()};return(o,t)=>{var ue,pe,me,_e;const a=e.resolveComponent("el-input"),s=e.resolveComponent("el-button"),V=e.resolveComponent("el-icon"),k=e.resolveComponent("el-dropdown-item"),X=e.resolveComponent("el-dropdown-menu"),Oe=e.resolveComponent("el-dropdown"),D=e.resolveComponent("el-table-column"),S=e.resolveComponent("el-tag"),ze=e.resolveComponent("el-table"),Ue=e.resolveComponent("el-pagination"),F=e.resolveComponent("el-form-item"),O=e.resolveComponent("el-col"),Y=e.resolveComponent("el-row"),Me=e.resolveComponent("el-tree"),Ke=e.resolveComponent("el-form");return e.openBlock(),e.createElementBlock(e.Fragment,null,[e.createElementVNode("div",pt,[e.createElementVNode("div",mt,[e.createElementVNode("div",_t,[e.createElementVNode("div",ft,[e.createVNode(a,{modelValue:e.unref(w).name,"onUpdate:modelValue":t[0]||(t[0]=l=>e.unref(w).name=l),style:{width:"240px"},placeholder:"请输入名称"},null,8,["modelValue"]),e.createVNode(s,{type:"primary",onClick:B},{default:e.withCtx(()=>t[6]||(t[6]=[e.createTextVNode("查询")])),_:1,__:[6]}),e.createVNode(s,{type:"primary",plain:"",onClick:ye},{default:e.withCtx(()=>t[7]||(t[7]=[e.createTextVNode("重置")])),_:1,__:[7]})])]),e.createElementVNode("div",vt,[e.createVNode(s,{type:"primary",onClick:qe},{default:e.withCtx(()=>[t[8]||(t[8]=e.createTextVNode(" 导入 ")),e.createVNode(V,{class:"el-icon--right"},{default:e.withCtx(()=>[e.createVNode(e.unref(ee.upload_default))]),_:1})]),_:1,__:[8]}),e.createVNode(Oe,null,{dropdown:e.withCtx(()=>[e.createVNode(X,null,{default:e.withCtx(()=>[e.createVNode(k,{onClick:Fe},{default:e.withCtx(()=>t[10]||(t[10]=[e.createTextVNode("导出模板")])),_:1,__:[10]}),e.createVNode(k,{onClick:Ae},{default:e.withCtx(()=>t[11]||(t[11]=[e.createTextVNode("导出数据")])),_:1,__:[11]})]),_:1})]),default:e.withCtx(()=>[e.createVNode(s,{type:"primary"},{default:e.withCtx(()=>[t[9]||(t[9]=e.createTextVNode(" 导出 ")),e.createVNode(V,{class:"el-icon--right"},{default:e.withCtx(()=>[e.createVNode(e.unref(ee.arrow_down_default))]),_:1})]),_:1,__:[9]})]),_:1}),e.createVNode(b._sfc_main,{emptyColor:!0,onClickTrigger:t[1]||(t[1]=l=>se()),modelValue:"创建角色",buttonType:"primary"})])]),e.createElementVNode("div",Vt,[e.createElementVNode("div",gt,[e.createVNode(ze,{class:"role-table",data:ae.value,"empty-text":""},{default:e.withCtx(()=>[e.createVNode(D,{prop:"name",label:"名称",align:"center"}),e.createVNode(D,{prop:"code",label:"编码",align:"center"}),e.createVNode(D,{prop:"remark",label:"备注",align:"center"}),e.createVNode(D,{prop:"status",label:"状态",align:"center"},{default:e.withCtx(l=>[e.createVNode(S,{class:"status-tag",type:e.unref(K)(l.row.status),title:"点击切换",onClick:r=>Pe(l.row)},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(M)(l.row.status)),1)]),_:2},1032,["type","onClick"])]),_:1}),e.createVNode(D,{label:"操作",align:"center"},{default:e.withCtx(l=>[e.createElementVNode("div",ht,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(e.unref(N.operateList),r=>(e.openBlock(),e.createElementBlock("div",{class:"operate-item",key:r.value,onClick:e.withModifiers(Z=>Le(r,l),["stop"])},e.toDisplayString(r.label),9,Ct))),128))])]),_:1})]),_:1},8,["data"])]),e.createElementVNode("div",Nt,[t[12]||(t[12]=e.createElementVNode("div",null,null,-1)),e.createVNode(Ue,{onSizeChange:Ne,onCurrentChange:Ce,"current-page":(ue=e.unref(_))==null?void 0:ue.pageNum,"page-sizes":(pe=e.unref(_))==null?void 0:pe.pageSizes,"page-size":((me=e.unref(_))==null?void 0:me.pageSize)??10,layout:"total, sizes, prev, pager, next, jumper",total:((_e=e.unref(_))==null?void 0:_e.total)??0},null,8,["current-page","page-sizes","page-size","total"])])]),t[13]||(t[13]=e.createElementVNode("div",{class:"footer"},[e.createElementVNode("div",{class:"footer-left"}),e.createElementVNode("div",{class:"footer-right"})],-1))]),e.createVNode(oe.ssDialog,{class:"role-edit-dialog",visible:H.value,title:"角色信息",onBeforeDestroy:ne,showClose:!0,closeOnClickModal:!1,closeOnPressEscape:!1,modalClass:"role-edit-modal",alignCenter:!0,appendToBody:!1},{default:e.withCtx(()=>[e.createElementVNode("div",yt,[t[17]||(t[17]=e.createElementVNode("div",{class:"role-management-header"},[e.createElementVNode("div",{class:"header-left"}),e.createElementVNode("div",{class:"header-right"})],-1)),e.createElementVNode("div",wt,[e.createElementVNode("div",kt,[e.createVNode(Ke,{class:"role-edit-form",ref_key:"roleFormRef",ref:le,model:n.value,rules:we},{default:e.withCtx(()=>[e.createVNode(Y,{gutter:20},{default:e.withCtx(()=>[e.createVNode(O,{span:12},{default:e.withCtx(()=>[e.createVNode(F,{prop:"name",label:"角色名称","label-position":"top"},{default:e.withCtx(()=>[e.createVNode(a,{modelValue:n.value.name,"onUpdate:modelValue":t[2]||(t[2]=l=>n.value.name=l),"aria-label":"角色名称",placeholder:"角色名称"},null,8,["modelValue"])]),_:1})]),_:1}),e.createVNode(O,{span:12},{default:e.withCtx(()=>[e.createVNode(F,{label:"角色编码","label-position":"top"},{default:e.withCtx(()=>[e.createVNode(a,{modelValue:n.value.code,"onUpdate:modelValue":t[3]||(t[3]=l=>n.value.code=l),"aria-label":"角色编码",placeholder:"角色编码"},null,8,["modelValue"])]),_:1})]),_:1})]),_:1}),e.createVNode(Y,{gutter:20},{default:e.withCtx(()=>[e.createVNode(O,{span:12},{default:e.withCtx(()=>[e.createVNode(F,{label:"备注","label-position":"top"},{default:e.withCtx(()=>[e.createVNode(a,{modelValue:n.value.remark,"onUpdate:modelValue":t[4]||(t[4]=l=>n.value.remark=l),"aria-label":"备注",placeholder:"备注"},null,8,["modelValue"])]),_:1})]),_:1})]),_:1}),e.createVNode(Y,{class:"auth-tree-row",gutter:20},{default:e.withCtx(()=>[e.createVNode(O,{span:24},{default:e.withCtx(()=>[e.createVNode(F,{label:"特性权限","label-position":"top"},{default:e.withCtx(()=>[e.createElementVNode("div",Et,[e.createVNode(a,{modelValue:q.value,"onUpdate:modelValue":t[5]||(t[5]=l=>q.value=l)},{prefix:e.withCtx(()=>[e.createVNode(V,{class:"el-input__icon"},{default:e.withCtx(()=>[e.createVNode(e.unref(ee.search_default))]),_:1})]),_:1},8,["modelValue"]),e.createVNode(Me,{ref_key:"propertyTreeRef",ref:I,class:"auth-tree",data:e.unref(m),props:E,"node-key":"id","show-checkbox":"","default-expanded-keys":n.value.checked_ids,"default-checked-keys":n.value.checked_ids,"filter-node-method":ke},{default:e.withCtx(({node:l,data:r})=>{var Z;return[e.createElementVNode("div",xt,[e.createElementVNode("div",bt,[e.createElementVNode("div",Tt,e.toDisplayString(l.label),1)]),r.isPropertyLeaf&&J(r)?(e.openBlock(),e.createElementBlock("div",Pt,[e.createVNode(S,{class:"status-tag",type:e.unref(G)(r.status),title:"点击切换",onClick:x=>$e(x,r)},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(j)(r.status)),1)]),_:2},1032,["type","onClick"])])):e.createCommentVNode("",!0),r.isProperty&&J(r)&&((Z=r.params)==null?void 0:Z.length)>0?(e.openBlock(),e.createElementBlock("div",Bt,[e.createVNode(S,{class:"status-tag",type:"success",onClick:x=>Ee(x,r)},{default:e.withCtx(()=>t[14]||(t[14]=[e.createTextVNode(" 参数设置 ")])),_:2,__:[14]},1032,["onClick"])])):e.createCommentVNode("",!0),r.isPropertyLeaf&&J(r)&&e.unref(fe)(r)?(e.openBlock(),e.createElementBlock("div",Dt,[e.createVNode(S,{class:"status-tag",type:"warning",onClick:x=>de(x,r)},{default:e.withCtx(()=>t[15]||(t[15]=[e.createTextVNode(" 数据权限 ")])),_:2,__:[15]},1032,["onClick"])])):e.createCommentVNode("",!0),l.level==1&&l.checked&&!r.isProperty?(e.openBlock(),e.createElementBlock("div",St,[e.createVNode(S,{class:"status-tag",type:"warning",onClick:x=>de(x,r)},{default:e.withCtx(()=>t[16]||(t[16]=[e.createTextVNode(" 数据权限重置 ")])),_:2,__:[16]},1032,["onClick"])])):e.createCommentVNode("",!0)])]}),_:1},8,["data","default-expanded-keys","default-checked-keys"])])]),_:1})]),_:1})]),_:1})]),_:1},8,["model","rules"])])])])]),footer:e.withCtx(()=>[e.createElementVNode("div",Lt,[t[18]||(t[18]=e.createElementVNode("div",{class:"footer-left"},null,-1)),e.createElementVNode("div",$t,[e.createVNode(b._sfc_main,{class:"cancel",emptyColor:!0,onClickTrigger:ie,modelValue:"取消",buttonType:"info"}),e.createVNode(b._sfc_main,{class:"confirm",emptyColor:!0,onClickTrigger:Te,modelValue:"确定",buttonType:"primary"})])])]),_:1},8,["visible"]),e.createVNode(lt,{ref_key:"paramAuthDialog",ref:R,params:re.value,"checked-params":n.value.params,onUpdateParams:xe},null,8,["params","checked-params"]),e.createVNode(ut,{ref_key:"scopeDialog",ref:ce,onConfirm:Ie},null,512)],64)}}}),qt=z._export_sfc(It,[["__scopeId","data-v-5da1e93d"]]);exports.default=qt;
|