@yqg/permission 1.0.1-beta.0 → 1.0.1-beta.1

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.
@@ -1,5 +1,5 @@
1
- import { k as S, c as E, y as Le, d as Y, f as ne, w as se, s as V, o as Ee, p as yt, e as xt, j as Me, v as Va, F as be, m as Jt, A as en, H as Ha, q as tn, h as Ie, r as nn, G as Rt, u as k, V as Wa, x as Fn, W as Ga, K as ve, L as mt, z as st, R as Ce, X as jt, Q as Re, O as Er, N as xe, P as Mr, M as Tn, Y as En, Z as ka, U as Ua } from "./index-yyuuant8.js";
2
- import { _ as O, I as Ct, i as Ze, b as _r, S as De, a as _e, c as Fe, g as Xa, e as Ka, d as Nr, f as rn, h as Ya, M as Br, j as Rr, k as jr, o as Qa, l as $t, r as Lr, m as Dr, s as Za, n as Ja, U as Mn, p as an, q as pt, t as on, u as eo, v as zr, w as to, x as qr, y as no, z as ro, A as ao, B as _n, C as oo, K as ln, D as io, E as ze, F as K, G as N, P as Z, H as lo, J as qe, L as Je, N as me, O as We, Q as Lt, R as Vr, T as wt, V as so, W as Hr, X as Wr, Y as Pe, Z as uo, $ as sn, a0 as Gr, a1 as co, a2 as Ye, a3 as un, a4 as cn, a5 as kr, a6 as dn, a7 as fo, a8 as Ur, a9 as mo, aa as po, ab as go, ac as ye, ad as de, ae as Dt, af as vo, ag as he, ah as Ae, ai as St, aj as zt, ak as ho, al as qt, am as Xr, an as bo, ao as yo, ap as xo, aq as Co, ar as $o, as as wo, at as So, au as Kr, av as Oo, aw as Ge, ax as fn, ay as ut, az as Po, aA as Nn, aB as Ao, aC as Bn, aD as Te, aE as Io, aF as mn, aG as Fo, aH as To, aI as Yr, aJ as Rn, aK as jn, aL as Tt, aM as gt, aN as Qr, aO as Eo, aP as Ln, aQ as Mo, aR as _o, aS as No, aT as Bo, aU as Ro, aV as vt, aW as jo, aX as Lo, aY as Zr, aZ as Do, a_ as zo, a$ as qo, b0 as Vo, b1 as Ho, b2 as Wo, b3 as Go, b4 as oe, b5 as Jr, b6 as ko, b7 as Uo, b8 as Dn, b9 as Xo } from "./yqg-permission-DBFdrj20.js";
1
+ import { k as S, c as E, y as Le, d as Y, f as ne, w as se, s as V, o as Ee, p as yt, e as xt, j as Me, v as Va, F as be, m as Jt, A as en, H as Ha, q as tn, h as Ie, r as nn, G as Rt, u as k, V as Wa, x as Fn, W as Ga, K as ve, L as mt, z as st, R as Ce, X as jt, Q as Re, O as Er, N as xe, P as Mr, M as Tn, Y as En, Z as ka, U as Ua } from "./index-9R-US_u5.js";
2
+ import { _ as O, I as Ct, i as Ze, b as _r, S as De, a as _e, c as Fe, g as Xa, e as Ka, d as Nr, f as rn, h as Ya, M as Br, j as Rr, k as jr, o as Qa, l as $t, r as Lr, m as Dr, s as Za, n as Ja, U as Mn, p as an, q as pt, t as on, u as eo, v as zr, w as to, x as qr, y as no, z as ro, A as ao, B as _n, C as oo, K as ln, D as io, E as ze, F as K, G as N, P as Z, H as lo, J as qe, L as Je, N as me, O as We, Q as Lt, R as Vr, T as wt, V as so, W as Hr, X as Wr, Y as Pe, Z as uo, $ as sn, a0 as Gr, a1 as co, a2 as Ye, a3 as un, a4 as cn, a5 as kr, a6 as dn, a7 as fo, a8 as Ur, a9 as mo, aa as po, ab as go, ac as ye, ad as de, ae as Dt, af as vo, ag as he, ah as Ae, ai as St, aj as zt, ak as ho, al as qt, am as Xr, an as bo, ao as yo, ap as xo, aq as Co, ar as $o, as as wo, at as So, au as Kr, av as Oo, aw as Ge, ax as fn, ay as ut, az as Po, aA as Nn, aB as Ao, aC as Bn, aD as Te, aE as Io, aF as mn, aG as Fo, aH as To, aI as Yr, aJ as Rn, aK as jn, aL as Tt, aM as gt, aN as Qr, aO as Eo, aP as Ln, aQ as Mo, aR as _o, aS as No, aT as Bo, aU as Ro, aV as vt, aW as jo, aX as Lo, aY as Zr, aZ as Do, a_ as zo, a$ as qo, b0 as Vo, b1 as Ho, b2 as Wo, b3 as Go, b4 as oe, b5 as Jr, b6 as ko, b7 as Uo, b8 as Dn, b9 as Xo } from "./yqg-permission-D4E6aSVe.js";
3
3
  function zn(e) {
4
4
  return typeof e == "object" && e != null && e.nodeType === 1;
5
5
  }
@@ -6675,7 +6675,7 @@ const Fd = /* @__PURE__ */ Y({
6675
6675
  emits: /* @__PURE__ */ En(["onSuccess"], ["update:modelValue"]),
6676
6676
  setup(e, { emit: t }) {
6677
6677
  const n = Ua(
6678
- () => import("./checkbox-item-DpihGkb7.js")
6678
+ () => import("./checkbox-item-UGMn0mJf.js")
6679
6679
  ), r = [
6680
6680
  oe("applyReason1"),
6681
6681
  oe("applyReason2"),
@@ -1,6 +1,6 @@
1
- import { d as ue, c as R, f as ve, k as y, i as jn, v as Qt, e as We, p as qe, b as Jt, s as G, w as ie, h as Me, o as Oe, P as we, F as Be, j as je, W as Un, r as Ae, I as Yn, G as pt, y as _e, a as Gn, z as Ce, K as Le, R as Xn, N as be, O as Ee, L as Ge, u as pe, Q as ge, M as Xe, _ as kn, m as qn, A as Qn } from "./index-yyuuant8.js";
2
- import { _ as S, Q as Jn, P as A, G as Y, F as se, ba as Zn, aE as eo, aw as Zt, bb as vt, aP as K, E as gt, R as ze, an as en, bc as xe, bd as Ie, aD as Qe, be as to, bf as ye, bg as Vt, bh as Lt, bi as Ht, I as no, a6 as oo, a7 as lo, bj as io, au as ao, C as tn, K as ce, Y as ht, bk as dt, L as $e, bl as nn, J as ro, bm as so, ai as uo, a2 as co, aG as fo, bn as mo, N as po, aH as vo, am as go, aV as ho, bo, aL as yo, bp as So, O as _t, ae as He, ad as wo, ag as Io, b4 as Se, bq as Co, b7 as it, b5 as xo } from "./yqg-permission-DBFdrj20.js";
3
- import { p as bt, S as Oo, T as Bt, C as $o, Q as To } from "./apply-modal-BwBRAOgh.js";
1
+ import { d as ue, c as R, f as ve, k as y, i as jn, v as Qt, e as We, p as qe, b as Jt, s as G, w as ie, h as Me, o as Oe, P as we, F as Be, j as je, W as Un, r as Ae, I as Yn, G as pt, y as _e, a as Gn, z as Ce, K as Le, R as Xn, N as be, O as Ee, L as Ge, u as pe, Q as ge, M as Xe, _ as kn, m as qn, A as Qn } from "./index-9R-US_u5.js";
2
+ import { _ as S, Q as Jn, P as A, G as Y, F as se, ba as Zn, aE as eo, aw as Zt, bb as vt, aP as K, E as gt, R as ze, an as en, bc as xe, bd as Ie, aD as Qe, be as to, bf as ye, bg as Vt, bh as Lt, bi as Ht, I as no, a6 as oo, a7 as lo, bj as io, au as ao, C as tn, K as ce, Y as ht, bk as dt, L as $e, bl as nn, J as ro, bm as so, ai as uo, a2 as co, aG as fo, bn as mo, N as po, aH as vo, am as go, aV as ho, bo, aL as yo, bp as So, O as _t, ae as He, ad as wo, ag as Io, b4 as Se, bq as Co, b7 as it, b5 as xo } from "./yqg-permission-D4E6aSVe.js";
3
+ import { p as bt, S as Oo, T as Bt, C as $o, Q as To } from "./apply-modal-BGEJ1VGl.js";
4
4
  function zt(e, n) {
5
5
  const {
6
6
  key: o
@@ -6069,7 +6069,7 @@ function bu() {
6069
6069
  If();
6070
6070
  }
6071
6071
  process.env.NODE_ENV !== "production" && bu();
6072
- const Ou = /* @__PURE__ */ vc(() => import("./yqg-permission-DBFdrj20.js").then((e) => e.br)), Du = (e) => {
6072
+ const Ou = /* @__PURE__ */ vc(() => import("./yqg-permission-D4E6aSVe.js").then((e) => e.br)), Du = (e) => {
6073
6073
  customElements.define(
6074
6074
  e,
6075
6075
  /* @__PURE__ */ iu(Ou, {
package/dist/index.js CHANGED
@@ -1,5 +1,5 @@
1
- (function(){"use strict";try{if(typeof document<"u"){var a=document.createElement("style");a.appendChild(document.createTextNode(".crane-wraper[data-v-b76ce408]{display:flex;align-items:center;flex-direction:column;font-size:14px;white-space:nowrap}[data-v-d803332d] .success-modal-wrap .yqg-permission-modal-confirm-btns{text-align:center}.crane-step-wraper[data-v-6b35bb95]{display:flex;align-items:center;width:100%;overflow-x:scroll;line-height:32px;padding-bottom:8px}.crane-step-node[data-v-6b35bb95]{display:flex;align-items:center}.crane-step-icon[data-v-6b35bb95]{margin:0 8px;height:auto;max-width:none}.crane-flex-center[data-v-da0d7c0c]{display:flex;align-items:center}.crane-checkbox-line[data-v-da0d7c0c]{margin-bottom:12px;display:flex;align-items:center}.crane-checkbox-line[data-v-da0d7c0c]:last-child{margin-bottom:0}.crane-checkbox-label[data-v-da0d7c0c]{max-width:346px}.crane-tag-position[data-v-da0d7c0c]{margin-right:4px;font-size:10px;padding:2px 4px;line-height:12px;font-weight:500}.crane-margin-right-0[data-v-da0d7c0c]{margin-right:0}.crane-margin-left-4[data-v-da0d7c0c]{margin-left:4px}.crane-margin-right-4[data-v-da0d7c0c]{margin-right:4px}.crane-margin-left-12[data-v-da0d7c0c]{margin-left:12px}.crane-disabled-color[data-v-da0d7c0c]{color:#c9cdd4}.crane-week-color[data-v-da0d7c0c]{color:#86909c}.crane-text-overflow[data-v-da0d7c0c]{flex:1;overflow:hidden;text-overflow:ellipsis}")),document.head.appendChild(a)}}catch(e){console.error("vite-plugin-css-injected-by-js",e)}})();
2
- import { $ as f } from "./index-yyuuant8.js";
1
+ (function(){"use strict";try{if(typeof document<"u"){var a=document.createElement("style");a.appendChild(document.createTextNode(".crane-wraper[data-v-dafce49e]{display:flex;align-items:center;flex-direction:column;font-size:14px;white-space:nowrap}[data-v-d803332d] .success-modal-wrap .yqg-permission-modal-confirm-btns{text-align:center}.crane-step-wraper[data-v-6b35bb95]{display:flex;align-items:center;width:100%;overflow-x:scroll;line-height:32px;padding-bottom:8px}.crane-step-node[data-v-6b35bb95]{display:flex;align-items:center}.crane-step-icon[data-v-6b35bb95]{margin:0 8px;height:auto;max-width:none}.crane-flex-center[data-v-da0d7c0c]{display:flex;align-items:center}.crane-checkbox-line[data-v-da0d7c0c]{margin-bottom:12px;display:flex;align-items:center}.crane-checkbox-line[data-v-da0d7c0c]:last-child{margin-bottom:0}.crane-checkbox-label[data-v-da0d7c0c]{max-width:346px}.crane-tag-position[data-v-da0d7c0c]{margin-right:4px;font-size:10px;padding:2px 4px;line-height:12px;font-weight:500}.crane-margin-right-0[data-v-da0d7c0c]{margin-right:0}.crane-margin-left-4[data-v-da0d7c0c]{margin-left:4px}.crane-margin-right-4[data-v-da0d7c0c]{margin-right:4px}.crane-margin-left-12[data-v-da0d7c0c]{margin-left:12px}.crane-disabled-color[data-v-da0d7c0c]{color:#c9cdd4}.crane-week-color[data-v-da0d7c0c]{color:#86909c}.crane-text-overflow[data-v-da0d7c0c]{flex:1;overflow:hidden;text-overflow:ellipsis}")),document.head.appendChild(a)}}catch(e){console.error("vite-plugin-css-injected-by-js",e)}})();
2
+ import { $ as f } from "./index-9R-US_u5.js";
3
3
  export {
4
4
  f as default
5
5
  };
@@ -1,4 +1,4 @@
1
- (function(){"use strict";try{if(typeof document<"u"){var a=document.createElement("style");a.appendChild(document.createTextNode(".crane-wraper[data-v-b76ce408]{display:flex;align-items:center;flex-direction:column;font-size:14px;white-space:nowrap}[data-v-d803332d] .success-modal-wrap .yqg-permission-modal-confirm-btns{text-align:center}.crane-step-wraper[data-v-6b35bb95]{display:flex;align-items:center;width:100%;overflow-x:scroll;line-height:32px;padding-bottom:8px}.crane-step-node[data-v-6b35bb95]{display:flex;align-items:center}.crane-step-icon[data-v-6b35bb95]{margin:0 8px;height:auto;max-width:none}.crane-flex-center[data-v-da0d7c0c]{display:flex;align-items:center}.crane-checkbox-line[data-v-da0d7c0c]{margin-bottom:12px;display:flex;align-items:center}.crane-checkbox-line[data-v-da0d7c0c]:last-child{margin-bottom:0}.crane-checkbox-label[data-v-da0d7c0c]{max-width:346px}.crane-tag-position[data-v-da0d7c0c]{margin-right:4px;font-size:10px;padding:2px 4px;line-height:12px;font-weight:500}.crane-margin-right-0[data-v-da0d7c0c]{margin-right:0}.crane-margin-left-4[data-v-da0d7c0c]{margin-left:4px}.crane-margin-right-4[data-v-da0d7c0c]{margin-right:4px}.crane-margin-left-12[data-v-da0d7c0c]{margin-left:12px}.crane-disabled-color[data-v-da0d7c0c]{color:#c9cdd4}.crane-week-color[data-v-da0d7c0c]{color:#86909c}.crane-text-overflow[data-v-da0d7c0c]{flex:1;overflow:hidden;text-overflow:ellipsis}")),document.head.appendChild(a)}}catch(e){console.error("vite-plugin-css-injected-by-js",e)}})();
1
+ (function(){"use strict";try{if(typeof document<"u"){var a=document.createElement("style");a.appendChild(document.createTextNode(".crane-wraper[data-v-dafce49e]{display:flex;align-items:center;flex-direction:column;font-size:14px;white-space:nowrap}[data-v-d803332d] .success-modal-wrap .yqg-permission-modal-confirm-btns{text-align:center}.crane-step-wraper[data-v-6b35bb95]{display:flex;align-items:center;width:100%;overflow-x:scroll;line-height:32px;padding-bottom:8px}.crane-step-node[data-v-6b35bb95]{display:flex;align-items:center}.crane-step-icon[data-v-6b35bb95]{margin:0 8px;height:auto;max-width:none}.crane-flex-center[data-v-da0d7c0c]{display:flex;align-items:center}.crane-checkbox-line[data-v-da0d7c0c]{margin-bottom:12px;display:flex;align-items:center}.crane-checkbox-line[data-v-da0d7c0c]:last-child{margin-bottom:0}.crane-checkbox-label[data-v-da0d7c0c]{max-width:346px}.crane-tag-position[data-v-da0d7c0c]{margin-right:4px;font-size:10px;padding:2px 4px;line-height:12px;font-weight:500}.crane-margin-right-0[data-v-da0d7c0c]{margin-right:0}.crane-margin-left-4[data-v-da0d7c0c]{margin-left:4px}.crane-margin-right-4[data-v-da0d7c0c]{margin-right:4px}.crane-margin-left-12[data-v-da0d7c0c]{margin-left:12px}.crane-disabled-color[data-v-da0d7c0c]{color:#c9cdd4}.crane-week-color[data-v-da0d7c0c]{color:#86909c}.crane-text-overflow[data-v-da0d7c0c]{flex:1;overflow:hidden;text-overflow:ellipsis}")),document.head.appendChild(a)}}catch(e){console.error("vite-plugin-css-injected-by-js",e)}})();
2
2
  (function(gt,Se){typeof exports=="object"&&typeof module<"u"?module.exports=Se():typeof define=="function"&&define.amd?define(Se):(gt=typeof globalThis<"u"?globalThis:gt||self,gt["yqg-permission"]=Se())})(this,function(){"use strict";var M5=Object.defineProperty;var H5=(gt,Se,Qn)=>Se in gt?M5(gt,Se,{enumerable:!0,configurable:!0,writable:!0,value:Qn}):gt[Se]=Qn;var Dd=(gt,Se,Qn)=>H5(gt,typeof Se!="symbol"?Se+"":Se,Qn);/**
3
3
  * @vue/shared v3.5.12
4
4
  * (c) 2018-present Yuxi (Evan) You and Vue contributors
@@ -268,4 +268,4 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
268
268
  `)}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(t){return t instanceof this?t:new this(t)}static concat(t,...n){const o=new this(t);return n.forEach(r=>o.set(r)),o}static accessor(t){const o=(this[pb]=this[pb]={accessors:{}}).accessors,r=this.prototype;function i(a){const l=za(a);o[l]||(IL(r,a),o[l]=!0)}return W.isArray(t)?t.forEach(i):i(t),this}}Wt.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]),W.reduceDescriptors(Wt.prototype,({value:e},t)=>{let n=t[0].toUpperCase()+t.slice(1);return{get:()=>e,set(o){this[n]=o}}}),W.freezeMethods(Wt);function md(e,t){const n=this||ja,o=t||n,r=Wt.from(o.headers);let i=o.data;return W.forEach(e,function(l){i=l.call(n,i,r.normalize(),t?t.status:void 0)}),r.normalize(),i}function hb(e){return!!(e&&e.__CANCEL__)}function Ci(e,t,n){Pe.call(this,e??"canceled",Pe.ERR_CANCELED,t,n),this.name="CanceledError"}W.inherits(Ci,Pe,{__CANCEL__:!0});function mb(e,t,n){const o=n.config.validateStatus;!n.status||!o||o(n.status)?e(n):t(new Pe("Request failed with status code "+n.status,[Pe.ERR_BAD_REQUEST,Pe.ERR_BAD_RESPONSE][Math.floor(n.status/100)-4],n.config,n.request,n))}function wL(e){const t=/^([-+\w]{1,25})(:?\/\/|:)/.exec(e);return t&&t[1]||""}function QL(e,t){e=e||10;const n=new Array(e),o=new Array(e);let r=0,i=0,a;return t=t!==void 0?t:1e3,function(s){const u=Date.now(),c=o[i];a||(a=u),n[r]=s,o[r]=u;let A=i,f=0;for(;A!==r;)f+=n[A++],A=A%e;if(r=(r+1)%e,r===i&&(i=(i+1)%e),u-a<t)return;const d=c&&u-c;return d?Math.round(f*1e3/d):void 0}}function SL(e,t){let n=0,o=1e3/t,r,i;const a=(u,c=Date.now())=>{n=c,r=null,i&&(clearTimeout(i),i=null),e.apply(null,u)};return[(...u)=>{const c=Date.now(),A=c-n;A>=o?a(u,c):(r=u,i||(i=setTimeout(()=>{i=null,a(r)},o-A)))},()=>r&&a(r)]}const rc=(e,t,n=3)=>{let o=0;const r=QL(50,250);return SL(i=>{const a=i.loaded,l=i.lengthComputable?i.total:void 0,s=a-o,u=r(s),c=a<=l;o=a;const A={loaded:a,total:l,progress:l?a/l:void 0,bytes:s,rate:u||void 0,estimated:u&&l&&c?(l-a)/u:void 0,event:i,lengthComputable:l!=null,[t?"download":"upload"]:!0};e(A)},n)},vb=(e,t)=>{const n=e!=null;return[o=>t[0]({lengthComputable:n,total:e,loaded:o}),t[1]]},Cb=e=>(...t)=>W.asap(()=>e(...t)),xL=Ut.hasStandardBrowserEnv?function(){const t=Ut.navigator&&/(msie|trident)/i.test(Ut.navigator.userAgent),n=document.createElement("a");let o;function r(i){let a=i;return t&&(n.setAttribute("href",a),a=n.href),n.setAttribute("href",a),{href:n.href,protocol:n.protocol?n.protocol.replace(/:$/,""):"",host:n.host,search:n.search?n.search.replace(/^\?/,""):"",hash:n.hash?n.hash.replace(/^#/,""):"",hostname:n.hostname,port:n.port,pathname:n.pathname.charAt(0)==="/"?n.pathname:"/"+n.pathname}}return o=r(window.location.href),function(a){const l=W.isString(a)?r(a):a;return l.protocol===o.protocol&&l.host===o.host}}():function(){return function(){return!0}}(),OL=Ut.hasStandardBrowserEnv?{write(e,t,n,o,r,i){const a=[e+"="+encodeURIComponent(t)];W.isNumber(n)&&a.push("expires="+new Date(n).toGMTString()),W.isString(o)&&a.push("path="+o),W.isString(r)&&a.push("domain="+r),i===!0&&a.push("secure"),document.cookie=a.join("; ")},read(e){const t=document.cookie.match(new RegExp("(^|;\\s*)("+e+")=([^;]*)"));return t?decodeURIComponent(t[3]):null},remove(e){this.write(e,"",Date.now()-864e5)}}:{write(){},read(){return null},remove(){}};function PL(e){return/^([a-z][a-z\d+\-.]*:)?\/\//i.test(e)}function DL(e,t){return t?e.replace(/\/?\/$/,"")+"/"+t.replace(/^\/+/,""):e}function Eb(e,t){return e&&!PL(t)?DL(e,t):t}const yb=e=>e instanceof Wt?{...e}:e;function Pr(e,t){t=t||{};const n={};function o(u,c,A){return W.isPlainObject(u)&&W.isPlainObject(c)?W.merge.call({caseless:A},u,c):W.isPlainObject(c)?W.merge({},c):W.isArray(c)?c.slice():c}function r(u,c,A){if(W.isUndefined(c)){if(!W.isUndefined(u))return o(void 0,u,A)}else return o(u,c,A)}function i(u,c){if(!W.isUndefined(c))return o(void 0,c)}function a(u,c){if(W.isUndefined(c)){if(!W.isUndefined(u))return o(void 0,u)}else return o(void 0,c)}function l(u,c,A){if(A in t)return o(u,c);if(A in e)return o(void 0,u)}const s={url:i,method:i,data:i,baseURL:a,transformRequest:a,transformResponse:a,paramsSerializer:a,timeout:a,timeoutMessage:a,withCredentials:a,withXSRFToken:a,adapter:a,responseType:a,xsrfCookieName:a,xsrfHeaderName:a,onUploadProgress:a,onDownloadProgress:a,decompress:a,maxContentLength:a,maxBodyLength:a,beforeRedirect:a,transport:a,httpAgent:a,httpsAgent:a,cancelToken:a,socketPath:a,responseEncoding:a,validateStatus:l,headers:(u,c)=>r(yb(u),yb(c),!0)};return W.forEach(Object.keys(Object.assign({},e,t)),function(c){const A=s[c]||r,f=A(e[c],t[c],c);W.isUndefined(f)&&A!==l||(n[c]=f)}),n}const bb=e=>{const t=Pr({},e);let{data:n,withXSRFToken:o,xsrfHeaderName:r,xsrfCookieName:i,headers:a,auth:l}=t;t.headers=a=Wt.from(a),t.url=Ab(Eb(t.baseURL,t.url),e.params,e.paramsSerializer),l&&a.set("Authorization","Basic "+btoa((l.username||"")+":"+(l.password?unescape(encodeURIComponent(l.password)):"")));let s;if(W.isFormData(n)){if(Ut.hasStandardBrowserEnv||Ut.hasStandardBrowserWebWorkerEnv)a.setContentType(void 0);else if((s=a.getContentType())!==!1){const[u,...c]=s?s.split(";").map(A=>A.trim()).filter(Boolean):[];a.setContentType([u||"multipart/form-data",...c].join("; "))}}if(Ut.hasStandardBrowserEnv&&(o&&W.isFunction(o)&&(o=o(t)),o||o!==!1&&xL(t.url))){const u=r&&i&&OL.read(i);u&&a.set(r,u)}return t},TL=typeof XMLHttpRequest<"u"&&function(e){return new Promise(function(n,o){const r=bb(e);let i=r.data;const a=Wt.from(r.headers).normalize();let{responseType:l,onUploadProgress:s,onDownloadProgress:u}=r,c,A,f,d,g;function p(){d&&d(),g&&g(),r.cancelToken&&r.cancelToken.unsubscribe(c),r.signal&&r.signal.removeEventListener("abort",c)}let v=new XMLHttpRequest;v.open(r.method.toUpperCase(),r.url,!0),v.timeout=r.timeout;function E(){if(!v)return;const m=Wt.from("getAllResponseHeaders"in v&&v.getAllResponseHeaders()),y={data:!l||l==="text"||l==="json"?v.responseText:v.response,status:v.status,statusText:v.statusText,headers:m,config:e,request:v};mb(function(C){n(C),p()},function(C){o(C),p()},y),v=null}"onloadend"in v?v.onloadend=E:v.onreadystatechange=function(){!v||v.readyState!==4||v.status===0&&!(v.responseURL&&v.responseURL.indexOf("file:")===0)||setTimeout(E)},v.onabort=function(){v&&(o(new Pe("Request aborted",Pe.ECONNABORTED,e,v)),v=null)},v.onerror=function(){o(new Pe("Network Error",Pe.ERR_NETWORK,e,v)),v=null},v.ontimeout=function(){let I=r.timeout?"timeout of "+r.timeout+"ms exceeded":"timeout exceeded";const y=r.transitional||db;r.timeoutErrorMessage&&(I=r.timeoutErrorMessage),o(new Pe(I,y.clarifyTimeoutError?Pe.ETIMEDOUT:Pe.ECONNABORTED,e,v)),v=null},i===void 0&&a.setContentType(null),"setRequestHeader"in v&&W.forEach(a.toJSON(),function(I,y){v.setRequestHeader(y,I)}),W.isUndefined(r.withCredentials)||(v.withCredentials=!!r.withCredentials),l&&l!=="json"&&(v.responseType=r.responseType),u&&([f,g]=rc(u,!0),v.addEventListener("progress",f)),s&&v.upload&&([A,d]=rc(s),v.upload.addEventListener("progress",A),v.upload.addEventListener("loadend",d)),(r.cancelToken||r.signal)&&(c=m=>{v&&(o(!m||m.type?new Ci(null,e,v):m),v.abort(),v=null)},r.cancelToken&&r.cancelToken.subscribe(c),r.signal&&(r.signal.aborted?c():r.signal.addEventListener("abort",c)));const b=wL(r.url);if(b&&Ut.protocols.indexOf(b)===-1){o(new Pe("Unsupported protocol "+b+":",Pe.ERR_BAD_REQUEST,e));return}v.send(i||null)})},NL=(e,t)=>{const{length:n}=e=e?e.filter(Boolean):[];if(t||n){let o=new AbortController,r;const i=function(u){if(!r){r=!0,l();const c=u instanceof Error?u:this.reason;o.abort(c instanceof Pe?c:new Ci(c instanceof Error?c.message:c))}};let a=t&&setTimeout(()=>{a=null,i(new Pe(`timeout ${t} of ms exceeded`,Pe.ETIMEDOUT))},t);const l=()=>{e&&(a&&clearTimeout(a),a=null,e.forEach(u=>{u.unsubscribe?u.unsubscribe(i):u.removeEventListener("abort",i)}),e=null)};e.forEach(u=>u.addEventListener("abort",i));const{signal:s}=o;return s.unsubscribe=()=>W.asap(l),s}},ML=function*(e,t){let n=e.byteLength;if(n<t){yield e;return}let o=0,r;for(;o<n;)r=o+t,yield e.slice(o,r),o=r},HL=async function*(e,t){for await(const n of RL(e))yield*ML(n,t)},RL=async function*(e){if(e[Symbol.asyncIterator]){yield*e;return}const t=e.getReader();try{for(;;){const{done:n,value:o}=await t.read();if(n)break;yield o}}finally{await t.cancel()}},Bb=(e,t,n,o)=>{const r=HL(e,t);let i=0,a,l=s=>{a||(a=!0,o&&o(s))};return new ReadableStream({async pull(s){try{const{done:u,value:c}=await r.next();if(u){l(),s.close();return}let A=c.byteLength;if(n){let f=i+=A;n(f)}s.enqueue(new Uint8Array(c))}catch(u){throw l(u),u}},cancel(s){return l(s),r.return()}},{highWaterMark:2})},ic=typeof fetch=="function"&&typeof Request=="function"&&typeof Response=="function",Ib=ic&&typeof ReadableStream=="function",FL=ic&&(typeof TextEncoder=="function"?(e=>t=>e.encode(t))(new TextEncoder):async e=>new Uint8Array(await new Response(e).arrayBuffer())),wb=(e,...t)=>{try{return!!e(...t)}catch{return!1}},LL=Ib&&wb(()=>{let e=!1;const t=new Request(Ut.origin,{body:new ReadableStream,method:"POST",get duplex(){return e=!0,"half"}}).headers.has("Content-Type");return e&&!t}),Qb=64*1024,vd=Ib&&wb(()=>W.isReadableStream(new Response("").body)),ac={stream:vd&&(e=>e.body)};ic&&(e=>{["text","arrayBuffer","blob","formData","stream"].forEach(t=>{!ac[t]&&(ac[t]=W.isFunction(e[t])?n=>n[t]():(n,o)=>{throw new Pe(`Response type '${t}' is not supported`,Pe.ERR_NOT_SUPPORT,o)})})})(new Response);const jL=async e=>{if(e==null)return 0;if(W.isBlob(e))return e.size;if(W.isSpecCompliantForm(e))return(await new Request(Ut.origin,{method:"POST",body:e}).arrayBuffer()).byteLength;if(W.isArrayBufferView(e)||W.isArrayBuffer(e))return e.byteLength;if(W.isURLSearchParams(e)&&(e=e+""),W.isString(e))return(await FL(e)).byteLength},zL=async(e,t)=>{const n=W.toFiniteNumber(e.getContentLength());return n??jL(t)},Cd={http:lL,xhr:TL,fetch:ic&&(async e=>{let{url:t,method:n,data:o,signal:r,cancelToken:i,timeout:a,onDownloadProgress:l,onUploadProgress:s,responseType:u,headers:c,withCredentials:A="same-origin",fetchOptions:f}=bb(e);u=u?(u+"").toLowerCase():"text";let d=NL([r,i&&i.toAbortSignal()],a),g;const p=d&&d.unsubscribe&&(()=>{d.unsubscribe()});let v;try{if(s&&LL&&n!=="get"&&n!=="head"&&(v=await zL(c,o))!==0){let y=new Request(t,{method:"POST",body:o,duplex:"half"}),w;if(W.isFormData(o)&&(w=y.headers.get("content-type"))&&c.setContentType(w),y.body){const[C,S]=vb(v,rc(Cb(s)));o=Bb(y.body,Qb,C,S)}}W.isString(A)||(A=A?"include":"omit");const E="credentials"in Request.prototype;g=new Request(t,{...f,signal:d,method:n.toUpperCase(),headers:c.normalize().toJSON(),body:o,duplex:"half",credentials:E?A:void 0});let b=await fetch(g);const m=vd&&(u==="stream"||u==="response");if(vd&&(l||m&&p)){const y={};["status","statusText","headers"].forEach(O=>{y[O]=b[O]});const w=W.toFiniteNumber(b.headers.get("content-length")),[C,S]=l&&vb(w,rc(Cb(l),!0))||[];b=new Response(Bb(b.body,Qb,C,()=>{S&&S(),p&&p()}),y)}u=u||"text";let I=await ac[W.findKey(ac,u)||"text"](b,e);return!m&&p&&p(),await new Promise((y,w)=>{mb(y,w,{data:I,headers:Wt.from(b.headers),status:b.status,statusText:b.statusText,config:e,request:g})})}catch(E){throw p&&p(),E&&E.name==="TypeError"&&/fetch/i.test(E.message)?Object.assign(new Pe("Network Error",Pe.ERR_NETWORK,e,g),{cause:E.cause||E}):Pe.from(E,E&&E.code,e,g)}})};W.forEach(Cd,(e,t)=>{if(e){try{Object.defineProperty(e,"name",{value:t})}catch{}Object.defineProperty(e,"adapterName",{value:t})}});const Sb=e=>`- ${e}`,$L=e=>W.isFunction(e)||e===null||e===!1,xb={getAdapter:e=>{e=W.isArray(e)?e:[e];const{length:t}=e;let n,o;const r={};for(let i=0;i<t;i++){n=e[i];let a;if(o=n,!$L(n)&&(o=Cd[(a=String(n)).toLowerCase()],o===void 0))throw new Pe(`Unknown adapter '${a}'`);if(o)break;r[a||"#"+i]=o}if(!o){const i=Object.entries(r).map(([l,s])=>`adapter ${l} `+(s===!1?"is not supported by the environment":"is not available in the build"));let a=t?i.length>1?`since :
269
269
  `+i.map(Sb).join(`
270
270
  `):" "+Sb(i[0]):"as no adapter specified";throw new Pe("There is no suitable adapter to dispatch the request "+a,"ERR_NOT_SUPPORT")}return o},adapters:Cd};function Ed(e){if(e.cancelToken&&e.cancelToken.throwIfRequested(),e.signal&&e.signal.aborted)throw new Ci(null,e)}function Ob(e){return Ed(e),e.headers=Wt.from(e.headers),e.data=md.call(e,e.transformRequest),["post","put","patch"].indexOf(e.method)!==-1&&e.headers.setContentType("application/x-www-form-urlencoded",!1),xb.getAdapter(e.adapter||ja.adapter)(e).then(function(o){return Ed(e),o.data=md.call(e,e.transformResponse,o),o.headers=Wt.from(o.headers),o},function(o){return hb(o)||(Ed(e),o&&o.response&&(o.response.data=md.call(e,e.transformResponse,o.response),o.response.headers=Wt.from(o.response.headers))),Promise.reject(o)})}const Pb="1.7.7",yd={};["object","boolean","number","function","string","symbol"].forEach((e,t)=>{yd[e]=function(o){return typeof o===e||"a"+(t<1?"n ":" ")+e}});const Db={};yd.transitional=function(t,n,o){function r(i,a){return"[Axios v"+Pb+"] Transitional option '"+i+"'"+a+(o?". "+o:"")}return(i,a,l)=>{if(t===!1)throw new Pe(r(a," has been removed"+(n?" in "+n:"")),Pe.ERR_DEPRECATED);return n&&!Db[a]&&(Db[a]=!0,console.warn(r(a," has been deprecated since v"+n+" and will be removed in the near future"))),t?t(i,a,l):!0}};function kL(e,t,n){if(typeof e!="object")throw new Pe("options must be an object",Pe.ERR_BAD_OPTION_VALUE);const o=Object.keys(e);let r=o.length;for(;r-- >0;){const i=o[r],a=t[i];if(a){const l=e[i],s=l===void 0||a(l,i,e);if(s!==!0)throw new Pe("option "+i+" must be "+s,Pe.ERR_BAD_OPTION_VALUE);continue}if(n!==!0)throw new Pe("Unknown option "+i,Pe.ERR_BAD_OPTION)}}const bd={assertOptions:kL,validators:yd},Vo=bd.validators;class Dr{constructor(t){this.defaults=t,this.interceptors={request:new fb,response:new fb}}async request(t,n){try{return await this._request(t,n)}catch(o){if(o instanceof Error){let r;Error.captureStackTrace?Error.captureStackTrace(r={}):r=new Error;const i=r.stack?r.stack.replace(/^.+\n/,""):"";try{o.stack?i&&!String(o.stack).endsWith(i.replace(/^.+\n.+\n/,""))&&(o.stack+=`
271
- `+i):o.stack=i}catch{}}throw o}}_request(t,n){typeof t=="string"?(n=n||{},n.url=t):n=t||{},n=Pr(this.defaults,n);const{transitional:o,paramsSerializer:r,headers:i}=n;o!==void 0&&bd.assertOptions(o,{silentJSONParsing:Vo.transitional(Vo.boolean),forcedJSONParsing:Vo.transitional(Vo.boolean),clarifyTimeoutError:Vo.transitional(Vo.boolean)},!1),r!=null&&(W.isFunction(r)?n.paramsSerializer={serialize:r}:bd.assertOptions(r,{encode:Vo.function,serialize:Vo.function},!0)),n.method=(n.method||this.defaults.method||"get").toLowerCase();let a=i&&W.merge(i.common,i[n.method]);i&&W.forEach(["delete","get","head","post","put","patch","common"],g=>{delete i[g]}),n.headers=Wt.concat(a,i);const l=[];let s=!0;this.interceptors.request.forEach(function(p){typeof p.runWhen=="function"&&p.runWhen(n)===!1||(s=s&&p.synchronous,l.unshift(p.fulfilled,p.rejected))});const u=[];this.interceptors.response.forEach(function(p){u.push(p.fulfilled,p.rejected)});let c,A=0,f;if(!s){const g=[Ob.bind(this),void 0];for(g.unshift.apply(g,l),g.push.apply(g,u),f=g.length,c=Promise.resolve(n);A<f;)c=c.then(g[A++],g[A++]);return c}f=l.length;let d=n;for(A=0;A<f;){const g=l[A++],p=l[A++];try{d=g(d)}catch(v){p.call(this,v);break}}try{c=Ob.call(this,d)}catch(g){return Promise.reject(g)}for(A=0,f=u.length;A<f;)c=c.then(u[A++],u[A++]);return c}getUri(t){t=Pr(this.defaults,t);const n=Eb(t.baseURL,t.url);return Ab(n,t.params,t.paramsSerializer)}}W.forEach(["delete","get","head","options"],function(t){Dr.prototype[t]=function(n,o){return this.request(Pr(o||{},{method:t,url:n,data:(o||{}).data}))}}),W.forEach(["post","put","patch"],function(t){function n(o){return function(i,a,l){return this.request(Pr(l||{},{method:t,headers:o?{"Content-Type":"multipart/form-data"}:{},url:i,data:a}))}}Dr.prototype[t]=n(),Dr.prototype[t+"Form"]=n(!0)});class Bd{constructor(t){if(typeof t!="function")throw new TypeError("executor must be a function.");let n;this.promise=new Promise(function(i){n=i});const o=this;this.promise.then(r=>{if(!o._listeners)return;let i=o._listeners.length;for(;i-- >0;)o._listeners[i](r);o._listeners=null}),this.promise.then=r=>{let i;const a=new Promise(l=>{o.subscribe(l),i=l}).then(r);return a.cancel=function(){o.unsubscribe(i)},a},t(function(i,a,l){o.reason||(o.reason=new Ci(i,a,l),n(o.reason))})}throwIfRequested(){if(this.reason)throw this.reason}subscribe(t){if(this.reason){t(this.reason);return}this._listeners?this._listeners.push(t):this._listeners=[t]}unsubscribe(t){if(!this._listeners)return;const n=this._listeners.indexOf(t);n!==-1&&this._listeners.splice(n,1)}toAbortSignal(){const t=new AbortController,n=o=>{t.abort(o)};return this.subscribe(n),t.signal.unsubscribe=()=>this.unsubscribe(n),t.signal}static source(){let t;return{token:new Bd(function(r){t=r}),cancel:t}}}function VL(e){return function(n){return e.apply(null,n)}}function _L(e){return W.isObject(e)&&e.isAxiosError===!0}const Id={Continue:100,SwitchingProtocols:101,Processing:102,EarlyHints:103,Ok:200,Created:201,Accepted:202,NonAuthoritativeInformation:203,NoContent:204,ResetContent:205,PartialContent:206,MultiStatus:207,AlreadyReported:208,ImUsed:226,MultipleChoices:300,MovedPermanently:301,Found:302,SeeOther:303,NotModified:304,UseProxy:305,Unused:306,TemporaryRedirect:307,PermanentRedirect:308,BadRequest:400,Unauthorized:401,PaymentRequired:402,Forbidden:403,NotFound:404,MethodNotAllowed:405,NotAcceptable:406,ProxyAuthenticationRequired:407,RequestTimeout:408,Conflict:409,Gone:410,LengthRequired:411,PreconditionFailed:412,PayloadTooLarge:413,UriTooLong:414,UnsupportedMediaType:415,RangeNotSatisfiable:416,ExpectationFailed:417,ImATeapot:418,MisdirectedRequest:421,UnprocessableEntity:422,Locked:423,FailedDependency:424,TooEarly:425,UpgradeRequired:426,PreconditionRequired:428,TooManyRequests:429,RequestHeaderFieldsTooLarge:431,UnavailableForLegalReasons:451,InternalServerError:500,NotImplemented:501,BadGateway:502,ServiceUnavailable:503,GatewayTimeout:504,HttpVersionNotSupported:505,VariantAlsoNegotiates:506,InsufficientStorage:507,LoopDetected:508,NotExtended:510,NetworkAuthenticationRequired:511};Object.entries(Id).forEach(([e,t])=>{Id[t]=e});function Tb(e){const t=new Dr(e),n=X0(Dr.prototype.request,t);return W.extend(n,Dr.prototype,t,{allOwnKeys:!0}),W.extend(n,t,null,{allOwnKeys:!0}),n.create=function(r){return Tb(Pr(e,r))},n}const ot=Tb(ja);ot.Axios=Dr,ot.CanceledError=Ci,ot.CancelToken=Bd,ot.isCancel=hb,ot.VERSION=Pb,ot.toFormData=nc,ot.AxiosError=Pe,ot.Cancel=ot.CanceledError,ot.all=function(t){return Promise.all(t)},ot.spread=VL,ot.isAxiosError=_L,ot.mergeConfig=Pr,ot.AxiosHeaders=Wt,ot.formToJSON=e=>gb(W.isHTMLForm(e)?new FormData(e):e),ot.getAdapter=xb.getAdapter,ot.HttpStatusCode=Id,ot.default=ot;const YL=0,UL=10008;ot.defaults.withCredentials=!0,ot.defaults.headers.common["Accept-Language"]=localStorage.getItem("permission_locale"),ot.interceptors.response.use(e=>{var i,a;const{status:t}=(e==null?void 0:e.data)||{},n=(e==null?void 0:e.data)||{},{code:o,detail:r}=t||{};if(((i=e==null?void 0:e.config)==null?void 0:i.responseType)==="blob")if(((a=e==null?void 0:e.data)==null?void 0:a.type)==="application/json"){const l=new FileReader;return l.readAsText(e.data,"utf-8"),l.onload=()=>{var u;const s=JSON.parse(l.result);ko.info((u=s==null?void 0:s.status)==null?void 0:u.detail)},Promise.reject()}else return e;if(e.headers&&e.headers["content-type"]==="image/jpeg")return e;switch(o){case YL:return Promise.resolve(n);case UL:return Promise.reject(n);default:return ko.error(r),Promise.reject(n)}},e=>{var n,o;const t=((o=(n=e==null?void 0:e.data)==null?void 0:n.status)==null?void 0:o.detail)||"Unknown error";return ko.error(t),Promise.reject(e)});const wd="/admin/crane",Qd={getPermissions:e=>ot.get(`${wd}/permission/apply`,{params:e}),getFlowPreview:e=>ot.post(`${wd}/permission/apply/oa/flow/submit/preview`,e),submitApply:e=>ot.post(`${wd}/permission/apply/oa/flow/submit`,e)},Nb={"zh-CN":{permissionApply:"权限申请",applyPermission:"申请权限",applyReason:"申请理由",approvalProcess:"审批流程",applyReason1:"新入职员工申请",applyReason2:"临时项目",applyReason3:"数据查询与分析",applyReasonPlaceholder:"请尽可能详细描述申请理由",cancel:"取消",submit:"确定",close:"关闭",viewApprovalDetail:"查看审批详情",applyMore:"继续申请其他权限",successTips:"已提交申请,审批通过后可拥有相关权限",resoultTitle:"操作结果反馈",start:"发起",end:"结束",noNeed:"无需审批",adaptDepartment:"适用部门",noApprovalProcess:"无审批流程",excessTips:"一次最多可申请{number}个权限",unavailableTips:"您暂无权限查看/操作该页面,请点击按钮进行申请",appliedTips:"权限已申请,正在{status}...",unapplyTips:"您暂无权限查看/操作该页面,且该页面中没有您可以申请的权限,",callManager:"如有需要请联系系统管理员",manager:"系统管理员",availableTime:"有效期",selectPlaceholder:"请选择权限点",reasonPlaceholder:"请输入申请理由",availiables:{SEVEN_DAYS:"7天",THIRTY_DAYS:"30天",SIXTY_DAYS:"60天",NINETY_DAYS:"90天",FOREVER:"永久有效"},levels:{L1:"低",L2:"中",L3:"高"},status:{PENDING:"审批中",NO:"不可申请",OWNER:"已拥有"},operationType:{QUERY:"查询",MANAGE:"操作"}},"en-US":{permissionApply:"权限申请",applyPermission:"申请权限",applyReason:"申请理由",approvalProcess:"审批流程",applyReason1:"新入职员工申请",applyReason2:"临时项目",applyReason3:"数据查询与分析",applyReasonPlaceholder:"请尽可能详细描述申请理由",cancel:"取消",submit:"确定",close:"关闭",viewApprovalDetail:"查看审批详情",applyMore:"继续申请其他权限",successTips:"已提交申请,审批通过后可拥有相关权限",resoultTitle:"操作结果反馈",start:"发起",end:"结束",noNeed:"无需审批",adaptDepartment:"适用部门",noApprovalProcess:"无审批流程",excessTips:"一次最多可申请{number}个权限",unavailableTips:"您暂无权限查看/操作该页面,请点击按钮进行申请",appliedTips:"权限已申请,正在{status}...",unapplyTips:"您暂无权限查看/操作该页面,且该页面中没有您可以申请的权限,",callManager:"如有需要请联系系统管理员",manager:"系统管理员",availableTime:"有效期",selectPlaceholder:"请选择权限点",reasonPlaceholder:"请输入申请理由",availiables:{SEVEN_DAYS:"7天",THIRTY_DAYS:"30天",SIXTY_DAYS:"60天",NINETY_DAYS:"90天",FOREVER:"永久有效"},levels:{L1:"低",L2:"中",L3:"高"},status:{PENDING:"审批中",NO:"不可申请",OWNER:"已拥有"},operationType:{QUERY:"查询",MANAGE:"操作"}}},De=(e,t)=>{const n=localStorage.getItem("permission_locale")||"en-US",o=e.split(".");let r=Nb[n]||Nb["en-US"];for(let i=0;i<o.length;i++)r=r[o[i]];return t&&Object.keys(t).forEach(i=>{r=r.replace(new RegExp(`{${i}}`,"g"),t[i])}),r||e},WL=(e,t)=>{let n=null;return function(){n||(n=setTimeout(()=>{e(arguments),n=null},t*1e3))}},GL=e=>{const t=De(e);return Object.keys(t).map(n=>({label:t[n],value:n}))},XL={class:"crane-wraper"},KL=["src"],JL={style:{margin:"10px"}},qL={style:{margin:"10px"}},ZL=["innerHTML"],e5={key:2,style:{margin:"10px"}},t5={style:{color:"#1677ff"}},n5=ae({__name:"yqg-permission",props:{workNumber:{type:String,default:""},permissions:{type:[String,Array],default:[]},businessCode:{type:String,default:""},locale:{type:String,default:"zh-CN"},color:{type:String,default:"#1677ff"},type:{type:String,default:"default"}},emits:["onSuccess"],setup(e,{emit:t}){const n=zc(()=>Promise.resolve().then(()=>d5)),o={DEFAULT:"DEFAULT",PENDING:"PENDING",NO:"NO"},r=e,i=Ae(!1);let a=Ae([]),l=Ae({imageUrl:G0,status:o.DEFAULT});const s=P(()=>Array.isArray(r.permissions)?r.permissions:r.permissions.split(",")),u=d=>{const g=[],p=b=>{b.forEach(m=>{m.children?p(m.children):g.push(m)})};p(d);const v=[null,"PENDING","OWNER","NO"],E=["L1","L2","L3"];return g.sort((b,m)=>v.indexOf(b.businessApplyType)-v.indexOf(m.businessApplyType)||E.indexOf(b.securityLevel)-E.indexOf(m.securityLevel)),g},c=d=>{var v,E;if(!d.length)return l.value;const g=d.find(b=>b.businessApplyType===o.PENDING),p=d.every(b=>b.businessApplyType===o.NO);return g?{imageUrl:y6,status:o.PENDING,tips:De("status.PENDING"),url:g.oaFlowUrl}:p?{imageUrl:G0,status:o.NO,tips:(E=(v=d[0].admin)==null?void 0:v.map(b=>b.name))==null?void 0:E.join("、")}:l.value},A=async()=>{if(!s.value.length||!r.businessCode||!r.workNumber)return;const d={businessCode:r.businessCode,features:s.value.toString(),workNumber:r.workNumber};let g=await Qd.getPermissions(d);a.value=u(g.body||[]),l.value=c(a.value)},f=()=>{i.value=!i.value};return Ye(A),me(()=>r.locale,(d,g)=>{d!==g&&localStorage.setItem("permission_locale",r.locale)},{immediate:!0}),(d,g)=>s.value.length?(Ue(),Jt(pe(Qr),{key:0,prefixCls:"yqg-permission",theme:{token:{colorPrimary:r.color}}},{default:Ke(()=>[mt("div",XL,[e.type==="text"?(Ue(),Jt(pe(mi),{key:0,onClick:f},{default:Ke(()=>[Ct(Xe(pe(De)("permissionApply")),1)]),_:1})):e.type==="custom"?(Ue(),kt("div",{key:1,onClick:f},[BI(d.$slots,"custom",{},void 0,!0)])):(Ue(),kt(xe,{key:2},[mt("img",{src:pe(l).imageUrl,height:"200",width:"200",style:{"margin-top":"calc(50vh - 273px)"}},null,8,KL),pe(l).status===o.DEFAULT?(Ue(),kt(xe,{key:0},[mt("div",JL,Xe(pe(De)("unavailableTips")),1),mt("div",null,[B(pe(jn),{type:"primary",onClick:f},{default:Ke(()=>[Ct("+ "+Xe(pe(De)("applyPermission")),1)]),_:1})])],64)):pe(l).status===o.PENDING?(Ue(),kt(xe,{key:1},[mt("div",qL,[mt("span",{class:"crane-unapply",innerHTML:pe(De)("appliedTips",{status:`<style>.crane-unapply span {color: orange;}</style><span>${pe(l).tips}</span>`})},null,8,ZL)]),mt("div",null,[B(pe(jn),{style:{"margin-right":"10px"}},{default:Ke(()=>[Ct(Xe(pe(De)("viewApprovalDetail")),1)]),_:1}),B(pe(jn),{type:"primary",onClick:f},{default:Ke(()=>[Ct("+ "+Xe(pe(De)("applyMore")),1)]),_:1})])],64)):(Ue(),kt("div",e5,[Ct(Xe(pe(De)("unapplyTips"))+" ",1),B(pe(Ia),null,{content:Ke(()=>[Ct(Xe(pe(De)("manager"))+": "+Xe(pe(l).tips),1)]),default:Ke(()=>[mt("span",t5,Xe(pe(De)("callManager")),1)]),_:1})]))],64))]),B(pe(n),{modelValue:i.value,"onUpdate:modelValue":g[0]||(g[0]=p=>i.value=p),permissionList:pe(a),workNumber:e.workNumber,businessCode:e.businessCode,onOnSuccess:A},null,8,["modelValue","permissionList","workNumber","businessCode"])]),_:3},8,["theme"])):rr("",!0)}}),lc=(e,t)=>{const n=e.__vccOpts||e;for(const[o,r]of t)n[o]=r;return n},o5=Object.freeze(Object.defineProperty({__proto__:null,default:lc(n5,[["__scopeId","data-v-b76ce408"]])},Symbol.toStringTag,{value:"Module"})),r5=lc(ae({__name:"success-modal",setup(e,{expose:t}){const[n,o]=_t.useModal();return t({countDown:i=>{let a=10;const l=n.confirm({title:De("resoultTitle"),content:De("successTips"),cancelText:`${De("close")}(${a}s)`,okText:`${De("viewApprovalDetail")}>>`,wrapClassName:"success-modal-wrap",icon:B(Co,{style:"color: #52c41a;"}),onOk:()=>{window.open(i),location.reload()},onCancel:()=>{l.destroy(),location.reload()}}),s=setInterval(()=>{a-=1,l.update({cancelText:`${De("close")}(${a}s)`})},1e3);setTimeout(()=>{clearInterval(s),l.destroy()},a*1e3)}}),(i,a)=>(Ue(),Jt(pe(o)))}}),[["__scopeId","data-v-d803332d"]]),i5="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABYAAAAGCAYAAADHYm6gAAAACXBIWXMAAAsTAAALEwEAmpwYAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAACASURBVHgBrY/BDUBAEEX/DicnJ66UoAQdcEd0oAQ6oQOtKGGPjquBHbPhInHbfclPZjLJmxnAg2zg2eVvRvBAMS4wlrznvRg5/czgSdbxIpZZchChPTelg4hfeSOmVUpDEWonV/nAk7zTwBMGCjzRSYQqthYlBbhbFNpJZYFx/Q2MWyJuE54BvwAAAABJRU5ErkJggg==",a5={key:0,class:"crane-step-wraper"},l5={style:{"white-space":"nowrap"}},s5=["src"],c5={key:1},u5={key:2},A5=lc(ae({__name:"approval-steps",props:{stepNodes:{type:Array,required:!0,default:()=>[]}},setup(e){const n=Xt(e,"stepNodes"),o=r=>r===n.value.length-1?`[${De("end")}]`:r===0?`[${De("start")}]`:"";return(r,i)=>{var a,l;return((a=n.value)==null?void 0:a.length)>1?(Ue(),kt("div",a5,[(Ue(!0),kt(xe,null,kc(n.value,(s,u)=>{var c;return Ue(),kt("div",{key:s.auditorName,class:"crane-step-node"},[mt("span",l5,Xe(s.auditorName)+" "+Xe(o(u)),1),(c=s.employeeNameList)!=null&&c.length?(Ue(),Jt(pe(Ia),{key:0},{content:Ke(()=>[Ct(Xe(s.auditorName)+":"+Xe(s.employeeNameList.join(",")),1)]),default:Ke(()=>[B(pe(Ts),{style:{margin:"0 2px"}})]),_:2},1024)):rr("",!0),u!==n.value.length-1?(Ue(),kt("img",{key:1,src:pe(i5),class:"crane-step-icon"},null,8,s5)):rr("",!0)])}),128))])):((l=n.value)==null?void 0:l.length)===1?(Ue(),kt("span",c5,Xe(pe(De)("noNeed")),1)):(Ue(),kt("span",u5,"-"))}}}),[["__scopeId","data-v-6b35bb95"]]),f5={style:{"margin-top":"4px"}},d5=Object.freeze(Object.defineProperty({__proto__:null,default:ae({__name:"apply-modal",props:zg({permissionList:{type:Array,default:()=>[]},businessCode:{type:String,default:""},workNumber:{type:String,default:""}},{modelValue:{required:!0,default:!1},modelModifiers:{}}),emits:zg(["onSuccess"],["update:modelValue"]),setup(e,{emit:t}){const n=zc(()=>Promise.resolve().then(()=>B5)),o=[De("applyReason1"),De("applyReason2"),De("applyReason3")],r=e,i=t,a=ow(e,"modelValue"),l=Xt(r,"permissionList"),s=Xt(r,"businessCode"),u=Xt(r,"workNumber"),c=Ae(),A=Ae();let f=Ae([]);const d=at({applyBusinessCode:s.value,roleIds:[],roleVoList:[],applyReason:"",submitWorkNumber:u.value}),g=b=>{d.applyReason.includes(b)||(!d.applyReason||d.applyReason.endsWith("、")?d.applyReason+=b:d.applyReason+=`、${b}`)},p=async()=>{A.value.validate().then(async()=>{var y,w;const b=v();let m=await Qd.submitApply(b);const I=(y=m==null?void 0:m.body)==null?void 0:y.oaFlowUrl;a.value=!1,i("onSuccess"),(w=c.value)==null||w.countDown(I)})},v=()=>(d.roleVoList=d.roleIds.map(b=>{var m;return{roleId:b,validTime:(m=l.value.find(I=>I.roleId===b))==null?void 0:m.validTime}}),d),E=WL(async()=>{var I;if(!d.roleIds.length){f.value=[];return}const b=v();let m=await Qd.getFlowPreview(b);f.value=((I=m==null?void 0:m.body)==null?void 0:I.nodes)||[]},0);return me(()=>a.value,b=>{var m;b&&((m=A.value)==null||m.resetFields(),f.value=[])}),(b,m)=>(Ue(),Jt(pe(_t),{open:a.value,"onUpdate:open":m[2]||(m[2]=I=>a.value=I),title:pe(De)("permissionApply"),width:"800px",onOk:p,okText:pe(De)("submit"),cancelText:pe(De)("cancel")},{default:Ke(()=>[B(pe($o),{ref_key:"formRef",ref:A,model:d,labelCol:{span:4},wrapperCol:{span:19}},{default:Ke(()=>[B(pe(_s),{label:pe(De)("applyPermission"),name:"roleIds",rules:[{required:!0,message:pe(De)("selectPlaceholder")}]},{default:Ke(()=>[B(pe(Ys),{value:d.roleIds,"onUpdate:value":m[0]||(m[0]=I=>d.roleIds=I),style:{display:"block"},onChange:pe(E)},{default:Ke(()=>[(Ue(!0),kt(xe,null,kc(l.value,I=>(Ue(),Jt(pe(n),{key:I.roleId,item:I,checkedIds:d.roleIds,onChangeTime:pe(E)},null,8,["item","checkedIds","onChangeTime"]))),128))]),_:1},8,["value","onChange"])]),_:1},8,["label","rules"]),B(pe(_s),{name:"applyReason",label:pe(De)("applyReason"),rules:[{required:!0,message:pe(De)("reasonPlaceholder")}]},{default:Ke(()=>[B(pe(ed),{value:d.applyReason,"onUpdate:value":m[1]||(m[1]=I=>d.applyReason=I),placeholder:pe(De)("applyReasonPlaceholder"),"auto-size":{minRows:2,maxRows:5}},null,8,["value","placeholder"]),mt("div",f5,[(Ue(),kt(xe,null,kc(o,I=>B(pe(Sr),{bordered:!1,style:{cursor:"pointer"},onClick:y=>g(I),key:I},{default:Ke(()=>[Ct(Xe(I),1)]),_:2},1032,["onClick"])),64))])]),_:1},8,["label","rules"]),B(pe(_s),{label:pe(De)("approvalProcess")},{default:Ke(()=>[B(A5,{stepNodes:pe(f)},null,8,["stepNodes"])]),_:1},8,["label"])]),_:1},8,["model"]),B(r5,{ref_key:"successModal",ref:c},null,512)]),_:1},8,["open","title","okText","cancelText"]))}})},Symbol.toStringTag,{value:"Module"})),g5="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABIAAAASCAYAAABWzo5XAAAACXBIWXMAAAsTAAALEwEAmpwYAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAGXSURBVHgBlVNLTgJBEK1qOrjtI4w34AhwAuQEZBJc4yyVBbCRxE2HrZoQT4CcAI7AEeYIbDUM5asGZYj0KJX0J1WvX9eXqUIm/qUpbNp6ZzHT+yzNY1iOGR796w2sc1w3B5Ujoc5D1ns/hzcxImb2OPJPqV3rwn0NYh/DR4mEJBGhxShLN7pEZAF1EsPbmAExr7C1kad9KGy6oF/RpR6R1FIGkzAvw4KPqqv4OC4jP3N1LpZ6R55aGiJd7JES4SF+CquK5JdHWnKE48o6YenjcCw8PtGTbMqtwGWSQ9/8X0p9ZY+M7DShLNKCOq9m2Cb7Ahy9P1N+m1eNgsrEz7AXJ7qQ7Cf/3IBLw71rxQzApIIkUUyAsgzDWyXSEhdcm2tY6N4xuqXxDTwrsCkGXT/VPtuyWSqHuaJtQ8cBuUkH2e0IgDcAmzEeteHD6SDr3eHMoHLKYT/IruuIF0PaR+UczjaIc4rLGpguRmfFTN1dUNncHAZyDEUoP0iclV0nxgLbz+joG32rxeGTJKKs6uFfXaw50XDK2C8hpcmbpfjHLAAAAABJRU5ErkJggg==",p5={class:"crane-checkbox-line"},h5={class:"crane-flex-center crane-checkbox-label"},m5={class:"crane-text-overflow"},v5={class:"crane-flex-center crane-margin-left-4"},C5=["src"],E5={class:"crane-week-color crane-margin-left-4"},y5={class:"crane-week-color crane-margin-left-12"},b5="PENDING",B5=Object.freeze(Object.defineProperty({__proto__:null,default:lc(ae({__name:"checkbox-item",props:{item:{type:Object,default:()=>{}},checkedIds:{type:Array,default:[]},onChangeTime:{type:Function,default:()=>{}}},setup(e){const t={L1:{color:"green",text:De("levels.L1")},L2:{color:"orange",text:De("levels.L2")},L3:{color:"red",text:De("levels.L3")}},n={PENDING:{color:"orange",text:De("status.PENDING")},OWNER:{color:"green",text:De("status.OWNER")},NO:{color:"red",text:De("status.NO")}};let o=e;const r=GL("availiables"),i=Ae(""),a=u=>{const c={L1:"SIXTY_DAYS",L2:"THIRTY_DAYS",L3:"SEVEN_DAYS"},{relatedDepartmentIds:A=[],curDepartmentId:f=0,securityLevel:d}=u;return A.includes(f)?u.validTime="NINETY_DAYS":u.validTime=c[d],u.validTime},l=u=>{o.item.validTime=u,o.onChangeTime()},s=u=>{u.target.checked&&(i.value=a(o.item))};return(u,c)=>(Ue(),kt("div",p5,[B(pe(di),{value:e.item.roleId,disabled:!!e.item.businessApplyType,onChange:s},{default:Ke(()=>[mt("div",h5,[e.item.securityLevel?(Ue(),Jt(pe(Sr),{key:0,bordered:!1,color:t[e.item.securityLevel].color,class:"crane-tag-position"},{default:Ke(()=>[Ct(Xe(t[e.item.securityLevel].text),1)]),_:1},8,["color"])):rr("",!0),mt("span",null,Xe(pe(De)(`operationType.${e.item.operationType}`))+"| ",1),B(pe(Ia),null,{content:Ke(()=>[Ct(Xe(e.item.name),1)]),default:Ke(()=>[mt("span",m5,Xe(e.item.name),1)]),_:1}),e.item.businessApplyType?(Ue(),Jt(pe(Sr),{key:1,bordered:!1,class:Wa(["crane-tag-position crane-margin-left-4 crane-margin-right-0",e.item.businessApplyType!==b5?"crane-disabled-color":""])},{default:Ke(()=>[Ct(Xe(n[e.item.businessApplyType].text),1)]),_:1},8,["class"])):rr("",!0)])]),_:1},8,["value","disabled"]),e.item.desc?(Ue(),Jt(pe(Ia),{key:0},{content:Ke(()=>[Ct(Xe(e.item.desc),1)]),default:Ke(()=>[B(pe(Vs),{class:"crane-week-color"})]),_:1})):rr("",!0),e.item.relatedDepartments?(Ue(),Jt(pe(Ia),{key:1},{content:Ke(()=>[Ct(Xe(pe(De)("adaptDepartment"))+":"+Xe(e.item.relatedDepartments.map(A=>A.name).join(",")),1)]),default:Ke(()=>[mt("span",v5,[mt("img",{src:pe(g5),height:"14",width:"14"},null,8,C5),mt("span",E5,Xe(e.item.relatedDepartments.length),1)])]),_:1})):rr("",!0),jr(mt("span",y5,[Ct(Xe(pe(De)("availableTime"))+": ",1),B(pe(Jn),{value:i.value,"onUpdate:value":c[0]||(c[0]=A=>i.value=A),style:{width:"100px"},options:pe(r),onChange:l,size:"small"},null,8,["value","options"])],512),[[Yr,e.checkedIds.includes(e.item.roleId)]])]))}}),[["__scopeId","data-v-da0d7c0c"]])},Symbol.toStringTag,{value:"Module"}));return uQ});
271
+ `+i):o.stack=i}catch{}}throw o}}_request(t,n){typeof t=="string"?(n=n||{},n.url=t):n=t||{},n=Pr(this.defaults,n);const{transitional:o,paramsSerializer:r,headers:i}=n;o!==void 0&&bd.assertOptions(o,{silentJSONParsing:Vo.transitional(Vo.boolean),forcedJSONParsing:Vo.transitional(Vo.boolean),clarifyTimeoutError:Vo.transitional(Vo.boolean)},!1),r!=null&&(W.isFunction(r)?n.paramsSerializer={serialize:r}:bd.assertOptions(r,{encode:Vo.function,serialize:Vo.function},!0)),n.method=(n.method||this.defaults.method||"get").toLowerCase();let a=i&&W.merge(i.common,i[n.method]);i&&W.forEach(["delete","get","head","post","put","patch","common"],g=>{delete i[g]}),n.headers=Wt.concat(a,i);const l=[];let s=!0;this.interceptors.request.forEach(function(p){typeof p.runWhen=="function"&&p.runWhen(n)===!1||(s=s&&p.synchronous,l.unshift(p.fulfilled,p.rejected))});const u=[];this.interceptors.response.forEach(function(p){u.push(p.fulfilled,p.rejected)});let c,A=0,f;if(!s){const g=[Ob.bind(this),void 0];for(g.unshift.apply(g,l),g.push.apply(g,u),f=g.length,c=Promise.resolve(n);A<f;)c=c.then(g[A++],g[A++]);return c}f=l.length;let d=n;for(A=0;A<f;){const g=l[A++],p=l[A++];try{d=g(d)}catch(v){p.call(this,v);break}}try{c=Ob.call(this,d)}catch(g){return Promise.reject(g)}for(A=0,f=u.length;A<f;)c=c.then(u[A++],u[A++]);return c}getUri(t){t=Pr(this.defaults,t);const n=Eb(t.baseURL,t.url);return Ab(n,t.params,t.paramsSerializer)}}W.forEach(["delete","get","head","options"],function(t){Dr.prototype[t]=function(n,o){return this.request(Pr(o||{},{method:t,url:n,data:(o||{}).data}))}}),W.forEach(["post","put","patch"],function(t){function n(o){return function(i,a,l){return this.request(Pr(l||{},{method:t,headers:o?{"Content-Type":"multipart/form-data"}:{},url:i,data:a}))}}Dr.prototype[t]=n(),Dr.prototype[t+"Form"]=n(!0)});class Bd{constructor(t){if(typeof t!="function")throw new TypeError("executor must be a function.");let n;this.promise=new Promise(function(i){n=i});const o=this;this.promise.then(r=>{if(!o._listeners)return;let i=o._listeners.length;for(;i-- >0;)o._listeners[i](r);o._listeners=null}),this.promise.then=r=>{let i;const a=new Promise(l=>{o.subscribe(l),i=l}).then(r);return a.cancel=function(){o.unsubscribe(i)},a},t(function(i,a,l){o.reason||(o.reason=new Ci(i,a,l),n(o.reason))})}throwIfRequested(){if(this.reason)throw this.reason}subscribe(t){if(this.reason){t(this.reason);return}this._listeners?this._listeners.push(t):this._listeners=[t]}unsubscribe(t){if(!this._listeners)return;const n=this._listeners.indexOf(t);n!==-1&&this._listeners.splice(n,1)}toAbortSignal(){const t=new AbortController,n=o=>{t.abort(o)};return this.subscribe(n),t.signal.unsubscribe=()=>this.unsubscribe(n),t.signal}static source(){let t;return{token:new Bd(function(r){t=r}),cancel:t}}}function VL(e){return function(n){return e.apply(null,n)}}function _L(e){return W.isObject(e)&&e.isAxiosError===!0}const Id={Continue:100,SwitchingProtocols:101,Processing:102,EarlyHints:103,Ok:200,Created:201,Accepted:202,NonAuthoritativeInformation:203,NoContent:204,ResetContent:205,PartialContent:206,MultiStatus:207,AlreadyReported:208,ImUsed:226,MultipleChoices:300,MovedPermanently:301,Found:302,SeeOther:303,NotModified:304,UseProxy:305,Unused:306,TemporaryRedirect:307,PermanentRedirect:308,BadRequest:400,Unauthorized:401,PaymentRequired:402,Forbidden:403,NotFound:404,MethodNotAllowed:405,NotAcceptable:406,ProxyAuthenticationRequired:407,RequestTimeout:408,Conflict:409,Gone:410,LengthRequired:411,PreconditionFailed:412,PayloadTooLarge:413,UriTooLong:414,UnsupportedMediaType:415,RangeNotSatisfiable:416,ExpectationFailed:417,ImATeapot:418,MisdirectedRequest:421,UnprocessableEntity:422,Locked:423,FailedDependency:424,TooEarly:425,UpgradeRequired:426,PreconditionRequired:428,TooManyRequests:429,RequestHeaderFieldsTooLarge:431,UnavailableForLegalReasons:451,InternalServerError:500,NotImplemented:501,BadGateway:502,ServiceUnavailable:503,GatewayTimeout:504,HttpVersionNotSupported:505,VariantAlsoNegotiates:506,InsufficientStorage:507,LoopDetected:508,NotExtended:510,NetworkAuthenticationRequired:511};Object.entries(Id).forEach(([e,t])=>{Id[t]=e});function Tb(e){const t=new Dr(e),n=X0(Dr.prototype.request,t);return W.extend(n,Dr.prototype,t,{allOwnKeys:!0}),W.extend(n,t,null,{allOwnKeys:!0}),n.create=function(r){return Tb(Pr(e,r))},n}const ot=Tb(ja);ot.Axios=Dr,ot.CanceledError=Ci,ot.CancelToken=Bd,ot.isCancel=hb,ot.VERSION=Pb,ot.toFormData=nc,ot.AxiosError=Pe,ot.Cancel=ot.CanceledError,ot.all=function(t){return Promise.all(t)},ot.spread=VL,ot.isAxiosError=_L,ot.mergeConfig=Pr,ot.AxiosHeaders=Wt,ot.formToJSON=e=>gb(W.isHTMLForm(e)?new FormData(e):e),ot.getAdapter=xb.getAdapter,ot.HttpStatusCode=Id,ot.default=ot;const YL=0,UL=10008;ot.defaults.withCredentials=!0,ot.defaults.headers.common["Accept-Language"]=localStorage.getItem("permission_locale"),ot.interceptors.response.use(e=>{var i,a;const{status:t}=(e==null?void 0:e.data)||{},n=(e==null?void 0:e.data)||{},{code:o,detail:r}=t||{};if(((i=e==null?void 0:e.config)==null?void 0:i.responseType)==="blob")if(((a=e==null?void 0:e.data)==null?void 0:a.type)==="application/json"){const l=new FileReader;return l.readAsText(e.data,"utf-8"),l.onload=()=>{var u;const s=JSON.parse(l.result);ko.info((u=s==null?void 0:s.status)==null?void 0:u.detail)},Promise.reject()}else return e;if(e.headers&&e.headers["content-type"]==="image/jpeg")return e;switch(o){case YL:return Promise.resolve(n);case UL:return Promise.reject(n);default:return ko.error(r),Promise.reject(n)}},e=>{var n,o;const t=((o=(n=e==null?void 0:e.data)==null?void 0:n.status)==null?void 0:o.detail)||"Unknown error";return ko.error(t),Promise.reject(e)});const wd="/admin/crane",Qd={getPermissions:e=>ot.get(`${wd}/permission/apply`,{params:e}),getFlowPreview:e=>ot.post(`${wd}/permission/apply/oa/flow/submit/preview`,e),submitApply:e=>ot.post(`${wd}/permission/apply/oa/flow/submit`,e)},Nb={"zh-CN":{permissionApply:"权限申请",applyPermission:"申请权限",applyReason:"申请理由",approvalProcess:"审批流程",applyReason1:"新入职员工申请",applyReason2:"临时项目",applyReason3:"数据查询与分析",applyReasonPlaceholder:"请尽可能详细描述申请理由",cancel:"取消",submit:"确定",close:"关闭",viewApprovalDetail:"查看审批详情",applyMore:"继续申请其他权限",successTips:"已提交申请,审批通过后可拥有相关权限",resoultTitle:"操作结果反馈",start:"发起",end:"结束",noNeed:"无需审批",adaptDepartment:"适用部门",noApprovalProcess:"无审批流程",excessTips:"一次最多可申请{number}个权限",unavailableTips:"您暂无权限查看/操作该页面,请点击按钮进行申请",appliedTips:"权限已申请,正在{status}...",unapplyTips:"您暂无权限查看/操作该页面,且该页面中没有您可以申请的权限,",callManager:"如有需要请联系系统管理员",manager:"系统管理员",availableTime:"有效期",selectPlaceholder:"请选择权限点",reasonPlaceholder:"请输入申请理由",availiables:{SEVEN_DAYS:"7天",THIRTY_DAYS:"30天",SIXTY_DAYS:"60天",NINETY_DAYS:"90天",FOREVER:"永久有效"},levels:{L1:"低",L2:"中",L3:"高"},status:{PENDING:"审批中",NO:"不可申请",OWNER:"已拥有"},operationType:{QUERY:"查询",MANAGE:"操作"}},"en-US":{permissionApply:"权限申请",applyPermission:"申请权限",applyReason:"申请理由",approvalProcess:"审批流程",applyReason1:"新入职员工申请",applyReason2:"临时项目",applyReason3:"数据查询与分析",applyReasonPlaceholder:"请尽可能详细描述申请理由",cancel:"取消",submit:"确定",close:"关闭",viewApprovalDetail:"查看审批详情",applyMore:"继续申请其他权限",successTips:"已提交申请,审批通过后可拥有相关权限",resoultTitle:"操作结果反馈",start:"发起",end:"结束",noNeed:"无需审批",adaptDepartment:"适用部门",noApprovalProcess:"无审批流程",excessTips:"一次最多可申请{number}个权限",unavailableTips:"您暂无权限查看/操作该页面,请点击按钮进行申请",appliedTips:"权限已申请,正在{status}...",unapplyTips:"您暂无权限查看/操作该页面,且该页面中没有您可以申请的权限,",callManager:"如有需要请联系系统管理员",manager:"系统管理员",availableTime:"有效期",selectPlaceholder:"请选择权限点",reasonPlaceholder:"请输入申请理由",availiables:{SEVEN_DAYS:"7天",THIRTY_DAYS:"30天",SIXTY_DAYS:"60天",NINETY_DAYS:"90天",FOREVER:"永久有效"},levels:{L1:"低",L2:"中",L3:"高"},status:{PENDING:"审批中",NO:"不可申请",OWNER:"已拥有"},operationType:{QUERY:"查询",MANAGE:"操作"}}},De=(e,t)=>{const n=localStorage.getItem("permission_locale")||"en-US",o=e.split(".");let r=Nb[n]||Nb["en-US"];for(let i=0;i<o.length;i++)r=r[o[i]];return t&&Object.keys(t).forEach(i=>{r=r.replace(new RegExp(`{${i}}`,"g"),t[i])}),r||e},WL=(e,t)=>{let n=null;return function(){n||(n=setTimeout(()=>{e(arguments),n=null},t*1e3))}},GL=e=>{const t=De(e);return Object.keys(t).map(n=>({label:t[n],value:n}))},XL={class:"crane-wraper"},KL=["src"],JL={style:{margin:"10px"}},qL={style:{margin:"10px"}},ZL=["innerHTML"],e5={key:2,style:{margin:"10px"}},t5={style:{color:"#1677ff"}},n5=ae({__name:"yqg-permission",props:{workNumber:{type:String,default:""},permissions:{type:[String,Array],default:[]},businessCode:{type:String,default:""},locale:{type:String,default:"zh-CN"},color:{type:String,default:"#1677ff"},type:{type:String,default:"default"}},emits:["onSuccess"],setup(e,{emit:t}){const n=zc(()=>Promise.resolve().then(()=>d5)),o={DEFAULT:"DEFAULT",PENDING:"PENDING",NO:"NO"},r=e,i=Ae(!1);let a=Ae([]),l=Ae({imageUrl:G0,status:""});const s=P(()=>Array.isArray(r.permissions)?r.permissions:r.permissions.split(",")),u=d=>{const g=[],p=b=>{b.forEach(m=>{m.children?p(m.children):g.push(m)})};p(d);const v=[null,"PENDING","OWNER","NO"],E=["L1","L2","L3"];return g.sort((b,m)=>v.indexOf(b.businessApplyType)-v.indexOf(m.businessApplyType)||E.indexOf(b.securityLevel)-E.indexOf(m.securityLevel)),g},c=d=>{var v,E;if(!d.length)return l.value;const g=d.find(b=>b.businessApplyType===o.PENDING),p=d.every(b=>b.businessApplyType===o.NO);return g?{imageUrl:y6,status:o.PENDING,tips:De("status.PENDING"),url:g.oaFlowUrl}:p?{imageUrl:G0,status:o.NO,tips:(E=(v=d[0].admin)==null?void 0:v.map(b=>b.name))==null?void 0:E.join("、")}:l.value},A=async()=>{if(!s.value.length||!r.businessCode||!r.workNumber)return;const d={businessCode:r.businessCode,features:s.value.toString(),workNumber:r.workNumber};let g=await Qd.getPermissions(d);a.value=u(g.body||[]),l.value=c(a.value)},f=()=>{i.value=!i.value};return Ye(A),me(()=>r.locale,(d,g)=>{d!==g&&localStorage.setItem("permission_locale",r.locale)},{immediate:!0}),(d,g)=>s.value.length?(Ue(),Jt(pe(Qr),{key:0,prefixCls:"yqg-permission",theme:{token:{colorPrimary:r.color}}},{default:Ke(()=>[mt("div",XL,[e.type==="text"?(Ue(),Jt(pe(mi),{key:0,onClick:f},{default:Ke(()=>[Ct(Xe(pe(De)("permissionApply")),1)]),_:1})):e.type==="custom"?(Ue(),kt("div",{key:1,onClick:f},[BI(d.$slots,"custom",{},void 0,!0)])):(Ue(),kt(xe,{key:2},[mt("img",{src:pe(l).imageUrl,height:"200",width:"200",style:{"margin-top":"calc(50vh - 273px)"}},null,8,KL),pe(l).status===o.DEFAULT?(Ue(),kt(xe,{key:0},[mt("div",JL,Xe(pe(De)("unavailableTips")),1),mt("div",null,[B(pe(jn),{type:"primary",onClick:f},{default:Ke(()=>[Ct("+ "+Xe(pe(De)("applyPermission")),1)]),_:1})])],64)):pe(l).status===o.PENDING?(Ue(),kt(xe,{key:1},[mt("div",qL,[mt("span",{class:"crane-unapply",innerHTML:pe(De)("appliedTips",{status:`<style>.crane-unapply span {color: orange;}</style><span>${pe(l).tips}</span>`})},null,8,ZL)]),mt("div",null,[B(pe(jn),{style:{"margin-right":"10px"}},{default:Ke(()=>[Ct(Xe(pe(De)("viewApprovalDetail")),1)]),_:1}),B(pe(jn),{type:"primary",onClick:f},{default:Ke(()=>[Ct("+ "+Xe(pe(De)("applyMore")),1)]),_:1})])],64)):(Ue(),kt("div",e5,[Ct(Xe(pe(De)("unapplyTips"))+" ",1),B(pe(Ia),null,{content:Ke(()=>[Ct(Xe(pe(De)("manager"))+": "+Xe(pe(l).tips),1)]),default:Ke(()=>[mt("span",t5,Xe(pe(De)("callManager")),1)]),_:1})]))],64))]),B(pe(n),{modelValue:i.value,"onUpdate:modelValue":g[0]||(g[0]=p=>i.value=p),permissionList:pe(a),workNumber:e.workNumber,businessCode:e.businessCode,onOnSuccess:A},null,8,["modelValue","permissionList","workNumber","businessCode"])]),_:3},8,["theme"])):rr("",!0)}}),lc=(e,t)=>{const n=e.__vccOpts||e;for(const[o,r]of t)n[o]=r;return n},o5=Object.freeze(Object.defineProperty({__proto__:null,default:lc(n5,[["__scopeId","data-v-dafce49e"]])},Symbol.toStringTag,{value:"Module"})),r5=lc(ae({__name:"success-modal",setup(e,{expose:t}){const[n,o]=_t.useModal();return t({countDown:i=>{let a=10;const l=n.confirm({title:De("resoultTitle"),content:De("successTips"),cancelText:`${De("close")}(${a}s)`,okText:`${De("viewApprovalDetail")}>>`,wrapClassName:"success-modal-wrap",icon:B(Co,{style:"color: #52c41a;"}),onOk:()=>{window.open(i),location.reload()},onCancel:()=>{l.destroy(),location.reload()}}),s=setInterval(()=>{a-=1,l.update({cancelText:`${De("close")}(${a}s)`})},1e3);setTimeout(()=>{clearInterval(s),l.destroy()},a*1e3)}}),(i,a)=>(Ue(),Jt(pe(o)))}}),[["__scopeId","data-v-d803332d"]]),i5="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABYAAAAGCAYAAADHYm6gAAAACXBIWXMAAAsTAAALEwEAmpwYAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAACASURBVHgBrY/BDUBAEEX/DicnJ66UoAQdcEd0oAQ6oQOtKGGPjquBHbPhInHbfclPZjLJmxnAg2zg2eVvRvBAMS4wlrznvRg5/czgSdbxIpZZchChPTelg4hfeSOmVUpDEWonV/nAk7zTwBMGCjzRSYQqthYlBbhbFNpJZYFx/Q2MWyJuE54BvwAAAABJRU5ErkJggg==",a5={key:0,class:"crane-step-wraper"},l5={style:{"white-space":"nowrap"}},s5=["src"],c5={key:1},u5={key:2},A5=lc(ae({__name:"approval-steps",props:{stepNodes:{type:Array,required:!0,default:()=>[]}},setup(e){const n=Xt(e,"stepNodes"),o=r=>r===n.value.length-1?`[${De("end")}]`:r===0?`[${De("start")}]`:"";return(r,i)=>{var a,l;return((a=n.value)==null?void 0:a.length)>1?(Ue(),kt("div",a5,[(Ue(!0),kt(xe,null,kc(n.value,(s,u)=>{var c;return Ue(),kt("div",{key:s.auditorName,class:"crane-step-node"},[mt("span",l5,Xe(s.auditorName)+" "+Xe(o(u)),1),(c=s.employeeNameList)!=null&&c.length?(Ue(),Jt(pe(Ia),{key:0},{content:Ke(()=>[Ct(Xe(s.auditorName)+":"+Xe(s.employeeNameList.join(",")),1)]),default:Ke(()=>[B(pe(Ts),{style:{margin:"0 2px"}})]),_:2},1024)):rr("",!0),u!==n.value.length-1?(Ue(),kt("img",{key:1,src:pe(i5),class:"crane-step-icon"},null,8,s5)):rr("",!0)])}),128))])):((l=n.value)==null?void 0:l.length)===1?(Ue(),kt("span",c5,Xe(pe(De)("noNeed")),1)):(Ue(),kt("span",u5,"-"))}}}),[["__scopeId","data-v-6b35bb95"]]),f5={style:{"margin-top":"4px"}},d5=Object.freeze(Object.defineProperty({__proto__:null,default:ae({__name:"apply-modal",props:zg({permissionList:{type:Array,default:()=>[]},businessCode:{type:String,default:""},workNumber:{type:String,default:""}},{modelValue:{required:!0,default:!1},modelModifiers:{}}),emits:zg(["onSuccess"],["update:modelValue"]),setup(e,{emit:t}){const n=zc(()=>Promise.resolve().then(()=>B5)),o=[De("applyReason1"),De("applyReason2"),De("applyReason3")],r=e,i=t,a=ow(e,"modelValue"),l=Xt(r,"permissionList"),s=Xt(r,"businessCode"),u=Xt(r,"workNumber"),c=Ae(),A=Ae();let f=Ae([]);const d=at({applyBusinessCode:s.value,roleIds:[],roleVoList:[],applyReason:"",submitWorkNumber:u.value}),g=b=>{d.applyReason.includes(b)||(!d.applyReason||d.applyReason.endsWith("、")?d.applyReason+=b:d.applyReason+=`、${b}`)},p=async()=>{A.value.validate().then(async()=>{var y,w;const b=v();let m=await Qd.submitApply(b);const I=(y=m==null?void 0:m.body)==null?void 0:y.oaFlowUrl;a.value=!1,i("onSuccess"),(w=c.value)==null||w.countDown(I)})},v=()=>(d.roleVoList=d.roleIds.map(b=>{var m;return{roleId:b,validTime:(m=l.value.find(I=>I.roleId===b))==null?void 0:m.validTime}}),d),E=WL(async()=>{var I;if(!d.roleIds.length){f.value=[];return}const b=v();let m=await Qd.getFlowPreview(b);f.value=((I=m==null?void 0:m.body)==null?void 0:I.nodes)||[]},0);return me(()=>a.value,b=>{var m;b&&((m=A.value)==null||m.resetFields(),f.value=[])}),(b,m)=>(Ue(),Jt(pe(_t),{open:a.value,"onUpdate:open":m[2]||(m[2]=I=>a.value=I),title:pe(De)("permissionApply"),width:"800px",onOk:p,okText:pe(De)("submit"),cancelText:pe(De)("cancel")},{default:Ke(()=>[B(pe($o),{ref_key:"formRef",ref:A,model:d,labelCol:{span:4},wrapperCol:{span:19}},{default:Ke(()=>[B(pe(_s),{label:pe(De)("applyPermission"),name:"roleIds",rules:[{required:!0,message:pe(De)("selectPlaceholder")}]},{default:Ke(()=>[B(pe(Ys),{value:d.roleIds,"onUpdate:value":m[0]||(m[0]=I=>d.roleIds=I),style:{display:"block"},onChange:pe(E)},{default:Ke(()=>[(Ue(!0),kt(xe,null,kc(l.value,I=>(Ue(),Jt(pe(n),{key:I.roleId,item:I,checkedIds:d.roleIds,onChangeTime:pe(E)},null,8,["item","checkedIds","onChangeTime"]))),128))]),_:1},8,["value","onChange"])]),_:1},8,["label","rules"]),B(pe(_s),{name:"applyReason",label:pe(De)("applyReason"),rules:[{required:!0,message:pe(De)("reasonPlaceholder")}]},{default:Ke(()=>[B(pe(ed),{value:d.applyReason,"onUpdate:value":m[1]||(m[1]=I=>d.applyReason=I),placeholder:pe(De)("applyReasonPlaceholder"),"auto-size":{minRows:2,maxRows:5}},null,8,["value","placeholder"]),mt("div",f5,[(Ue(),kt(xe,null,kc(o,I=>B(pe(Sr),{bordered:!1,style:{cursor:"pointer"},onClick:y=>g(I),key:I},{default:Ke(()=>[Ct(Xe(I),1)]),_:2},1032,["onClick"])),64))])]),_:1},8,["label","rules"]),B(pe(_s),{label:pe(De)("approvalProcess")},{default:Ke(()=>[B(A5,{stepNodes:pe(f)},null,8,["stepNodes"])]),_:1},8,["label"])]),_:1},8,["model"]),B(r5,{ref_key:"successModal",ref:c},null,512)]),_:1},8,["open","title","okText","cancelText"]))}})},Symbol.toStringTag,{value:"Module"})),g5="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABIAAAASCAYAAABWzo5XAAAACXBIWXMAAAsTAAALEwEAmpwYAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAGXSURBVHgBlVNLTgJBEK1qOrjtI4w34AhwAuQEZBJc4yyVBbCRxE2HrZoQT4CcAI7AEeYIbDUM5asGZYj0KJX0J1WvX9eXqUIm/qUpbNp6ZzHT+yzNY1iOGR796w2sc1w3B5Ujoc5D1ns/hzcxImb2OPJPqV3rwn0NYh/DR4mEJBGhxShLN7pEZAF1EsPbmAExr7C1kad9KGy6oF/RpR6R1FIGkzAvw4KPqqv4OC4jP3N1LpZ6R55aGiJd7JES4SF+CquK5JdHWnKE48o6YenjcCw8PtGTbMqtwGWSQ9/8X0p9ZY+M7DShLNKCOq9m2Cb7Ahy9P1N+m1eNgsrEz7AXJ7qQ7Cf/3IBLw71rxQzApIIkUUyAsgzDWyXSEhdcm2tY6N4xuqXxDTwrsCkGXT/VPtuyWSqHuaJtQ8cBuUkH2e0IgDcAmzEeteHD6SDr3eHMoHLKYT/IruuIF0PaR+UczjaIc4rLGpguRmfFTN1dUNncHAZyDEUoP0iclV0nxgLbz+joG32rxeGTJKKs6uFfXaw50XDK2C8hpcmbpfjHLAAAAABJRU5ErkJggg==",p5={class:"crane-checkbox-line"},h5={class:"crane-flex-center crane-checkbox-label"},m5={class:"crane-text-overflow"},v5={class:"crane-flex-center crane-margin-left-4"},C5=["src"],E5={class:"crane-week-color crane-margin-left-4"},y5={class:"crane-week-color crane-margin-left-12"},b5="PENDING",B5=Object.freeze(Object.defineProperty({__proto__:null,default:lc(ae({__name:"checkbox-item",props:{item:{type:Object,default:()=>{}},checkedIds:{type:Array,default:[]},onChangeTime:{type:Function,default:()=>{}}},setup(e){const t={L1:{color:"green",text:De("levels.L1")},L2:{color:"orange",text:De("levels.L2")},L3:{color:"red",text:De("levels.L3")}},n={PENDING:{color:"orange",text:De("status.PENDING")},OWNER:{color:"green",text:De("status.OWNER")},NO:{color:"red",text:De("status.NO")}};let o=e;const r=GL("availiables"),i=Ae(""),a=u=>{const c={L1:"SIXTY_DAYS",L2:"THIRTY_DAYS",L3:"SEVEN_DAYS"},{relatedDepartmentIds:A=[],curDepartmentId:f=0,securityLevel:d}=u;return A.includes(f)?u.validTime="NINETY_DAYS":u.validTime=c[d],u.validTime},l=u=>{o.item.validTime=u,o.onChangeTime()},s=u=>{u.target.checked&&(i.value=a(o.item))};return(u,c)=>(Ue(),kt("div",p5,[B(pe(di),{value:e.item.roleId,disabled:!!e.item.businessApplyType,onChange:s},{default:Ke(()=>[mt("div",h5,[e.item.securityLevel?(Ue(),Jt(pe(Sr),{key:0,bordered:!1,color:t[e.item.securityLevel].color,class:"crane-tag-position"},{default:Ke(()=>[Ct(Xe(t[e.item.securityLevel].text),1)]),_:1},8,["color"])):rr("",!0),mt("span",null,Xe(pe(De)(`operationType.${e.item.operationType}`))+"| ",1),B(pe(Ia),null,{content:Ke(()=>[Ct(Xe(e.item.name),1)]),default:Ke(()=>[mt("span",m5,Xe(e.item.name),1)]),_:1}),e.item.businessApplyType?(Ue(),Jt(pe(Sr),{key:1,bordered:!1,class:Wa(["crane-tag-position crane-margin-left-4 crane-margin-right-0",e.item.businessApplyType!==b5?"crane-disabled-color":""])},{default:Ke(()=>[Ct(Xe(n[e.item.businessApplyType].text),1)]),_:1},8,["class"])):rr("",!0)])]),_:1},8,["value","disabled"]),e.item.desc?(Ue(),Jt(pe(Ia),{key:0},{content:Ke(()=>[Ct(Xe(e.item.desc),1)]),default:Ke(()=>[B(pe(Vs),{class:"crane-week-color"})]),_:1})):rr("",!0),e.item.relatedDepartments?(Ue(),Jt(pe(Ia),{key:1},{content:Ke(()=>[Ct(Xe(pe(De)("adaptDepartment"))+":"+Xe(e.item.relatedDepartments.map(A=>A.name).join(",")),1)]),default:Ke(()=>[mt("span",v5,[mt("img",{src:pe(g5),height:"14",width:"14"},null,8,C5),mt("span",E5,Xe(e.item.relatedDepartments.length),1)])]),_:1})):rr("",!0),jr(mt("span",y5,[Ct(Xe(pe(De)("availableTime"))+": ",1),B(pe(Jn),{value:i.value,"onUpdate:value":c[0]||(c[0]=A=>i.value=A),style:{width:"100px"},options:pe(r),onChange:l,size:"small"},null,8,["value","options"])],512),[[Yr,e.checkedIds.includes(e.item.roleId)]])]))}}),[["__scopeId","data-v-da0d7c0c"]])},Symbol.toStringTag,{value:"Module"}));return uQ});
@@ -1,4 +1,4 @@
1
- import { F as Qe, i as Kn, C as cg, T as Xs, d as k, r as Je, o as Pe, a as Vn, b as HA, w as K, g as at, p as fe, c as D, e as pe, f as G, u as $, s as Y, h as Se, j as Xe, t as ug, k as I, l as Zt, m as Gs, n as gg, q as qn, v as Ws, x as $t, y as Ne, z as fg, A as dg, B as wi, D as pg, E as Ks, G as TA, H as Vs, I as Cg, J as Bg, K as Bt, L as bi, M as hg, N as ht, O as ct, P as Ut, Q as tt, R as vn, S as Eg, U as vg } from "./index-yyuuant8.js";
1
+ import { F as Qe, i as Kn, C as cg, T as Xs, d as k, r as Je, o as Pe, a as Vn, b as HA, w as K, g as at, p as fe, c as D, e as pe, f as G, u as $, s as Y, h as Se, j as Xe, t as ug, k as I, l as Zt, m as Gs, n as gg, q as qn, v as Ws, x as $t, y as Ne, z as fg, A as dg, B as wi, D as pg, E as Ks, G as TA, H as Vs, I as Cg, J as Bg, K as Bt, L as bi, M as hg, N as ht, O as ct, P as Ut, Q as tt, R as vn, S as Eg, U as vg } from "./index-9R-US_u5.js";
2
2
  function Mn(e) {
3
3
  "@babel/helpers - typeof";
4
4
  return Mn = typeof Symbol == "function" && typeof Symbol.iterator == "symbol" ? function(t) {
@@ -16580,7 +16580,7 @@ const Xr = "/admin/crane", Gy = {
16580
16580
  emits: ["onSuccess"],
16581
16581
  setup(e, { emit: t }) {
16582
16582
  const n = vg(
16583
- () => import("./apply-modal-BwBRAOgh.js").then((d) => d.a)
16583
+ () => import("./apply-modal-BGEJ1VGl.js").then((d) => d.a)
16584
16584
  ), o = {
16585
16585
  DEFAULT: "DEFAULT",
16586
16586
  PENDING: "PENDING",
@@ -16588,7 +16588,7 @@ const Xr = "/admin/crane", Gy = {
16588
16588
  }, r = e, A = G(!1);
16589
16589
  let i = G([]), a = G({
16590
16590
  imageUrl: Ds,
16591
- status: o.DEFAULT
16591
+ status: ""
16592
16592
  });
16593
16593
  const s = D(() => Array.isArray(r.permissions) ? r.permissions : r.permissions.split(",")), l = (d) => {
16594
16594
  const p = [], C = (v) => {
@@ -16728,7 +16728,7 @@ const Xr = "/admin/crane", Gy = {
16728
16728
  for (const [o, r] of t)
16729
16729
  n[o] = r;
16730
16730
  return n;
16731
- }, rw = /* @__PURE__ */ ow(nw, [["__scopeId", "data-v-b76ce408"]]), bw = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
16731
+ }, rw = /* @__PURE__ */ ow(nw, [["__scopeId", "data-v-dafce49e"]]), bw = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
16732
16732
  __proto__: null,
16733
16733
  default: rw
16734
16734
  }, Symbol.toStringTag, { value: "Module" }));
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@yqg/permission",
3
- "version": "1.0.1-beta.0",
3
+ "version": "1.0.1-beta.1",
4
4
  "main": "dist/index.js",
5
5
  "module": "dist/index.js",
6
6
  "type": "module",
@@ -116,7 +116,7 @@
116
116
  let permissionList = ref<PermissionListType>([]);
117
117
  let curStatus = ref<Record<string, any>>({
118
118
  imageUrl: noauthority,
119
- status: statusMap.DEFAULT,
119
+ status: '',
120
120
  })
121
121
  const allPermissions = computed(() => {
122
122
  if (Array.isArray(props.permissions)) {