paas-component-library 1.0.20 → 1.0.22
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/paas-ui.css +1 -1
- package/dist/paas-ui.js +23 -8
- package/dist/paas-ui.umd.cjs +1 -1
- package/package.json +1 -1
- package/src/components/OrgPathSelector/index.vue +41 -5
package/dist/paas-ui.js
CHANGED
|
@@ -112062,7 +112062,7 @@ const DGt = /* @__PURE__ */ zr($Gt, [["render", RGt]]), LGt = {
|
|
|
112062
112062
|
},
|
|
112063
112063
|
// ==================== 判断叶子节点 ====================
|
|
112064
112064
|
isLeaf(r) {
|
|
112065
|
-
return r
|
|
112065
|
+
return r === this.getMaxLevel() - 1;
|
|
112066
112066
|
},
|
|
112067
112067
|
// ==================== normalize ====================
|
|
112068
112068
|
normalize(r = [], e = 0) {
|
|
@@ -112093,21 +112093,24 @@ const DGt = /* @__PURE__ */ zr($Gt, [["render", RGt]]), LGt = {
|
|
|
112093
112093
|
// ==================== 回显单个值 ====================
|
|
112094
112094
|
async loadPath() {
|
|
112095
112095
|
try {
|
|
112096
|
+
this.isInternalUpdate = !0;
|
|
112096
112097
|
const r = await this.$get("/system/organization/getOrgPathSelect", {
|
|
112097
112098
|
id: String(this.modelValue),
|
|
112098
112099
|
level: this.selectionType
|
|
112099
112100
|
});
|
|
112100
112101
|
if (r.data?.code !== 200) return;
|
|
112101
112102
|
const e = this.normalizePath(r.data.data || [], 0);
|
|
112102
|
-
this.options = this.mergeOptions(this.options, e), this.multiple ? this.innerValue = [this.extractPath(e)] : this.innerValue = this.extractPath(e), this.isOnlyPath = !0
|
|
112103
|
+
this.options = this.mergeOptions(this.options, e), this.multiple ? this.innerValue = [this.extractPath(e)] : this.innerValue = this.extractPath(e), this.isOnlyPath = !0, this.$nextTick(() => {
|
|
112104
|
+
this.isInternalUpdate = !1;
|
|
112105
|
+
});
|
|
112103
112106
|
} catch (r) {
|
|
112104
|
-
console.error("loadPath error:", r);
|
|
112107
|
+
console.error("loadPath error:", r), this.isInternalUpdate = !1;
|
|
112105
112108
|
}
|
|
112106
112109
|
},
|
|
112107
112110
|
// ==================== 回显多个值 ====================
|
|
112108
112111
|
async loadMultiplePaths(r) {
|
|
112109
112112
|
try {
|
|
112110
|
-
this.innerValue = [];
|
|
112113
|
+
this.isInternalUpdate = !0, this.innerValue = [];
|
|
112111
112114
|
const e = r.map(async (n) => {
|
|
112112
112115
|
const i = await this.$get("/system/organization/getOrgPathSelect", {
|
|
112113
112116
|
id: String(n),
|
|
@@ -112121,9 +112124,11 @@ const DGt = /* @__PURE__ */ zr($Gt, [["render", RGt]]), LGt = {
|
|
|
112121
112124
|
const i = this.extractPath(n);
|
|
112122
112125
|
i.length > 0 && this.innerValue.push(i);
|
|
112123
112126
|
}
|
|
112124
|
-
}), this.isOnlyPath = !0
|
|
112127
|
+
}), this.isOnlyPath = !0, this.$nextTick(() => {
|
|
112128
|
+
this.isInternalUpdate = !1;
|
|
112129
|
+
});
|
|
112125
112130
|
} catch (e) {
|
|
112126
|
-
console.error("loadMultiplePaths error:", e);
|
|
112131
|
+
console.error("loadMultiplePaths error:", e), this.isInternalUpdate = !1;
|
|
112127
112132
|
}
|
|
112128
112133
|
},
|
|
112129
112134
|
// ==================== 点击下拉 ====================
|
|
@@ -112178,7 +112183,17 @@ const DGt = /* @__PURE__ */ zr($Gt, [["render", RGt]]), LGt = {
|
|
|
112178
112183
|
// ==================== 事件 ====================
|
|
112179
112184
|
handleChange(r, e) {
|
|
112180
112185
|
let t;
|
|
112181
|
-
|
|
112186
|
+
if (this.multiple)
|
|
112187
|
+
if (Array.isArray(r) && r.length > 0) {
|
|
112188
|
+
const n = this.getMaxLevel(), i = [];
|
|
112189
|
+
r.forEach((o) => {
|
|
112190
|
+
o.length === n && i.push(o);
|
|
112191
|
+
}), t = i.map((o) => o[o.length - 1]).join(","), t || (t = "");
|
|
112192
|
+
} else
|
|
112193
|
+
t = "";
|
|
112194
|
+
else
|
|
112195
|
+
Array.isArray(r) ? t = r.length > 0 ? r[r.length - 1] : null : t = r ?? null;
|
|
112196
|
+
this.isInternalUpdate = !0, this.$emit("update:modelValue", t), this.$emit("change", t, e, r);
|
|
112182
112197
|
},
|
|
112183
112198
|
reset() {
|
|
112184
112199
|
this.innerValue = [], this.options = [], this.isOnlyPath = !1, this.firstLevelLoaded = !1, this.cache.clear(), this.isInternalUpdate = !1;
|
|
@@ -112203,7 +112218,7 @@ function NGt(r, e, t, n, i, o) {
|
|
|
112203
112218
|
"field-names": { label: "label", value: "value", children: "children" }
|
|
112204
112219
|
}), null, 16, ["value", "options", "load-data", "placeholder", "show-search", "disabled", "size", "multiple", "onChange", "onDropdownVisibleChange"]);
|
|
112205
112220
|
}
|
|
112206
|
-
const IGt = /* @__PURE__ */ zr(LGt, [["render", NGt], ["__scopeId", "data-v-
|
|
112221
|
+
const IGt = /* @__PURE__ */ zr(LGt, [["render", NGt], ["__scopeId", "data-v-dbe0394e"]]), BGt = {
|
|
112207
112222
|
name: "PaasImageViewer",
|
|
112208
112223
|
inheritAttrs: !1,
|
|
112209
112224
|
props: {
|
package/dist/paas-ui.umd.cjs
CHANGED
|
@@ -914,4 +914,4 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
|
|
|
914
914
|
constructor(\${params}) {
|
|
915
915
|
\${}
|
|
916
916
|
}
|
|
917
|
-
}`,{label:"class",detail:"definition",type:"keyword"}),ki('import {${names}} from "${module}"\n${}',{label:"import",detail:"named",type:"keyword"}),ki('import ${name} from "${module}"\n${}',{label:"import",detail:"default",type:"keyword"})],uEt=cie.concat([ki("interface ${name} {\n ${}\n}",{label:"interface",detail:"definition",type:"keyword"}),ki("type ${name} = ${type}",{label:"type",detail:"definition",type:"keyword"}),ki("enum ${name} {\n ${}\n}",{label:"enum",detail:"definition",type:"keyword"})]),uie=new dre,fie=new Set(["Script","Block","FunctionExpression","FunctionDeclaration","ArrowFunction","MethodDeclaration","ForStatement"]);function K1(r){return(e,t)=>{let n=e.node.getChild("VariableDefinition");return n&&t(n,r),!0}}const fEt=["FunctionDeclaration"],dEt={FunctionDeclaration:K1("function"),ClassDeclaration:K1("class"),ClassExpression:()=>!0,EnumDeclaration:K1("constant"),TypeAliasDeclaration:K1("type"),NamespaceDeclaration:K1("namespace"),VariableDefinition(r,e){r.matchContext(fEt)||e(r,"variable")},TypeDefinition(r,e){e(r,"type")},__proto__:null};function die(r,e){let t=uie.get(e);if(t)return t;let n=[],i=!0;function o(s,d){let f=r.sliceString(s.from,s.to);n.push({label:f,type:d})}return e.cursor(yr.IncludeAnonymous).iterate(s=>{if(i)i=!1;else if(s.name){let d=dEt[s.name];if(d&&d(s,o)||fie.has(s.name))return!1}else if(s.to-s.from>8192){for(let d of die(r,s.node))n.push(d);return!1}}),uie.set(e,n),n}const hie=/^[\w$\xa1-\uffff][\w$\d\xa1-\uffff]*$/,pie=["TemplateString","String","RegExp","LineComment","BlockComment","VariableDefinition","TypeDefinition","Label","PropertyDefinition","PropertyName","PrivatePropertyDefinition","PrivatePropertyName","JSXText","JSXAttributeValue","JSXOpenTag","JSXCloseTag","JSXSelfClosingTag",".","?."];function hEt(r){let e=ci(r.state).resolveInner(r.pos,-1);if(pie.indexOf(e.name)>-1)return null;let t=e.name=="VariableName"||e.to-e.from<20&&hie.test(r.state.sliceDoc(e.from,e.to));if(!t&&!r.explicit)return null;let n=[];for(let i=e;i;i=i.parent)fie.has(i.name)&&(n=n.concat(die(r.state.doc,i)));return{options:n,from:t?e.from:r.pos,validFor:hie}}const Ho=vc.define({name:"javascript",parser:YMt.configure({props:[U1.add({IfStatement:ku({except:/^\s*({|else\b)/}),TryStatement:ku({except:/^\s*({|catch\b|finally\b)/}),LabeledStatement:wCt,SwitchBody:r=>{let e=r.textAfter,t=/^\s*\}/.test(e),n=/^\s*(case|default)\b/.test(e);return r.baseIndent+(t?0:n?1:2)*r.unit},Block:SCt({closing:"}"}),ArrowFunction:r=>r.baseIndent+r.unit,"TemplateString BlockComment":()=>null,"Statement Property":ku({except:/^\s*{/}),JSXElement(r){let e=/^\s*<\//.test(r.textAfter);return r.lineIndent(r.node.from)+(e?0:r.unit)},JSXEscape(r){let e=/\s*\}/.test(r.textAfter);return r.lineIndent(r.node.from)+(e?0:r.unit)},"JSXOpenTag JSXSelfClosingTag"(r){return r.column(r.node.from)+r.unit}}),f4.add({"Block ClassBody SwitchBody EnumBody ObjectExpression ArrayExpression ObjectType":IA,BlockComment(r){return{from:r.from+2,to:r.to-2}}})]}),languageData:{closeBrackets:{brackets:["(","[","{","'",'"',"`"]},commentTokens:{line:"//",block:{open:"/*",close:"*/"}},indentOnInput:/^\s*(?:case |default:|\{|\}|<\/)$/,wordChars:"$"}}),vie={test:r=>/^JSX/.test(r.name),facet:Pre({commentTokens:{block:{open:"{/*",close:"*/}"}}})},mie=Ho.configure({dialect:"ts"},"typescript"),gie=Ho.configure({dialect:"jsx",props:[NA.add(r=>r.isTop?[vie]:void 0)]}),Oie=Ho.configure({dialect:"jsx ts",props:[NA.add(r=>r.isTop?[vie]:void 0)]},"typescript");let bie=r=>({label:r,type:"keyword"});const yie="break case const continue default delete export extends false finally in instanceof let new return static super switch this throw true typeof var yield".split(" ").map(bie),pEt=yie.concat(["declare","implements","private","protected","public"].map(bie));function Sie(r={}){let e=r.jsx?r.typescript?Oie:gie:r.typescript?mie:Ho,t=r.typescript?uEt.concat(pEt):cie.concat(yie);return new o4(e,[Ho.data.of({autocomplete:KMt(pie,JMt(t))}),Ho.data.of({autocomplete:hEt}),r.jsx?gEt:[]])}function vEt(r){for(;;){if(r.name=="JSXOpenTag"||r.name=="JSXSelfClosingTag"||r.name=="JSXFragmentTag")return r;if(r.name=="JSXEscape"||!r.parent)return null;r=r.parent}}function wie(r,e,t=r.length){for(let n=e?.firstChild;n;n=n.nextSibling)if(n.name=="JSXIdentifier"||n.name=="JSXBuiltin"||n.name=="JSXNamespacedName"||n.name=="JSXMemberExpression")return r.sliceString(n.from,Math.min(n.to,t));return""}const mEt=typeof navigator=="object"&&/Android\b/.test(navigator.userAgent),gEt=Nt.inputHandler.of((r,e,t,n,i)=>{if((mEt?r.composing:r.compositionStarted)||r.state.readOnly||e!=t||n!=">"&&n!="/"||!Ho.isActiveAt(r.state,e,-1))return!1;let o=i(),{state:s}=o,d=s.changeByRange(f=>{var p;let{head:v}=f,m=ci(s).resolveInner(v-1,-1),O;if(m.name=="JSXStartTag"&&(m=m.parent),!(s.doc.sliceString(v-1,v)!=n||m.name=="JSXAttributeValue"&&m.to>v)){if(n==">"&&m.name=="JSXFragmentTag")return{range:f,changes:{from:v,insert:"</>"}};if(n=="/"&&m.name=="JSXStartCloseTag"){let b=m.parent,S=b.parent;if(S&&b.from==v-2&&((O=wie(s.doc,S.firstChild,v))||((p=S.firstChild)===null||p===void 0?void 0:p.name)=="JSXFragmentTag")){let w=`${O}>`;return{range:mt.cursor(v+w.length,-1),changes:{from:v,insert:w}}}}else if(n==">"){let b=vEt(m);if(b&&b.name=="JSXOpenTag"&&!/^\/?>|^<\//.test(s.doc.sliceString(v,v+2))&&(O=wie(s.doc,b,v)))return{range:f,changes:{from:v,insert:`</${O}>`}}}}return{range:f}});return d.changes.empty?!1:(r.dispatch([o,s.update(d,{userEvent:"input.complete",scrollIntoView:!0})]),!0)}),ed=["_blank","_self","_top","_parent"],b_=["ascii","utf-8","utf-16","latin1","latin1"],y_=["get","post","put","delete"],S_=["application/x-www-form-urlencoded","multipart/form-data","text/plain"],Xi=["true","false"],zt={},OEt={a:{attrs:{href:null,ping:null,type:null,media:null,target:ed,hreflang:null}},abbr:zt,address:zt,area:{attrs:{alt:null,coords:null,href:null,target:null,ping:null,media:null,hreflang:null,type:null,shape:["default","rect","circle","poly"]}},article:zt,aside:zt,audio:{attrs:{src:null,mediagroup:null,crossorigin:["anonymous","use-credentials"],preload:["none","metadata","auto"],autoplay:["autoplay"],loop:["loop"],controls:["controls"]}},b:zt,base:{attrs:{href:null,target:ed}},bdi:zt,bdo:zt,blockquote:{attrs:{cite:null}},body:zt,br:zt,button:{attrs:{form:null,formaction:null,name:null,value:null,autofocus:["autofocus"],disabled:["autofocus"],formenctype:S_,formmethod:y_,formnovalidate:["novalidate"],formtarget:ed,type:["submit","reset","button"]}},canvas:{attrs:{width:null,height:null}},caption:zt,center:zt,cite:zt,code:zt,col:{attrs:{span:null}},colgroup:{attrs:{span:null}},command:{attrs:{type:["command","checkbox","radio"],label:null,icon:null,radiogroup:null,command:null,title:null,disabled:["disabled"],checked:["checked"]}},data:{attrs:{value:null}},datagrid:{attrs:{disabled:["disabled"],multiple:["multiple"]}},datalist:{attrs:{data:null}},dd:zt,del:{attrs:{cite:null,datetime:null}},details:{attrs:{open:["open"]}},dfn:zt,div:zt,dl:zt,dt:zt,em:zt,embed:{attrs:{src:null,type:null,width:null,height:null}},eventsource:{attrs:{src:null}},fieldset:{attrs:{disabled:["disabled"],form:null,name:null}},figcaption:zt,figure:zt,footer:zt,form:{attrs:{action:null,name:null,"accept-charset":b_,autocomplete:["on","off"],enctype:S_,method:y_,novalidate:["novalidate"],target:ed}},h1:zt,h2:zt,h3:zt,h4:zt,h5:zt,h6:zt,head:{children:["title","base","link","style","meta","script","noscript","command"]},header:zt,hgroup:zt,hr:zt,html:{attrs:{manifest:null}},i:zt,iframe:{attrs:{src:null,srcdoc:null,name:null,width:null,height:null,sandbox:["allow-top-navigation","allow-same-origin","allow-forms","allow-scripts"],seamless:["seamless"]}},img:{attrs:{alt:null,src:null,ismap:null,usemap:null,width:null,height:null,crossorigin:["anonymous","use-credentials"]}},input:{attrs:{alt:null,dirname:null,form:null,formaction:null,height:null,list:null,max:null,maxlength:null,min:null,name:null,pattern:null,placeholder:null,size:null,src:null,step:null,value:null,width:null,accept:["audio/*","video/*","image/*"],autocomplete:["on","off"],autofocus:["autofocus"],checked:["checked"],disabled:["disabled"],formenctype:S_,formmethod:y_,formnovalidate:["novalidate"],formtarget:ed,multiple:["multiple"],readonly:["readonly"],required:["required"],type:["hidden","text","search","tel","url","email","password","datetime","date","month","week","time","datetime-local","number","range","color","checkbox","radio","file","submit","image","reset","button"]}},ins:{attrs:{cite:null,datetime:null}},kbd:zt,keygen:{attrs:{challenge:null,form:null,name:null,autofocus:["autofocus"],disabled:["disabled"],keytype:["RSA"]}},label:{attrs:{for:null,form:null}},legend:zt,li:{attrs:{value:null}},link:{attrs:{href:null,type:null,hreflang:null,media:null,sizes:["all","16x16","16x16 32x32","16x16 32x32 64x64"]}},map:{attrs:{name:null}},mark:zt,menu:{attrs:{label:null,type:["list","context","toolbar"]}},meta:{attrs:{content:null,charset:b_,name:["viewport","application-name","author","description","generator","keywords"],"http-equiv":["content-language","content-type","default-style","refresh"]}},meter:{attrs:{value:null,min:null,low:null,high:null,max:null,optimum:null}},nav:zt,noscript:zt,object:{attrs:{data:null,type:null,name:null,usemap:null,form:null,width:null,height:null,typemustmatch:["typemustmatch"]}},ol:{attrs:{reversed:["reversed"],start:null,type:["1","a","A","i","I"]},children:["li","script","template","ul","ol"]},optgroup:{attrs:{disabled:["disabled"],label:null}},option:{attrs:{disabled:["disabled"],label:null,selected:["selected"],value:null}},output:{attrs:{for:null,form:null,name:null}},p:zt,param:{attrs:{name:null,value:null}},pre:zt,progress:{attrs:{value:null,max:null}},q:{attrs:{cite:null}},rp:zt,rt:zt,ruby:zt,samp:zt,script:{attrs:{type:["text/javascript"],src:null,async:["async"],defer:["defer"],charset:b_}},section:zt,select:{attrs:{form:null,name:null,size:null,autofocus:["autofocus"],disabled:["disabled"],multiple:["multiple"]}},slot:{attrs:{name:null}},small:zt,source:{attrs:{src:null,type:null,media:null}},span:zt,strong:zt,style:{attrs:{type:["text/css"],media:null,scoped:null}},sub:zt,summary:zt,sup:zt,table:zt,tbody:zt,td:{attrs:{colspan:null,rowspan:null,headers:null}},template:zt,textarea:{attrs:{dirname:null,form:null,maxlength:null,name:null,placeholder:null,rows:null,cols:null,autofocus:["autofocus"],disabled:["disabled"],readonly:["readonly"],required:["required"],wrap:["soft","hard"]}},tfoot:zt,th:{attrs:{colspan:null,rowspan:null,headers:null,scope:["row","col","rowgroup","colgroup"]}},thead:zt,time:{attrs:{datetime:null}},title:zt,tr:zt,track:{attrs:{src:null,label:null,default:null,kind:["subtitles","captions","descriptions","chapters","metadata"],srclang:null}},ul:{children:["li","script","template","ul","ol"]},var:zt,video:{attrs:{src:null,poster:null,width:null,height:null,crossorigin:["anonymous","use-credentials"],preload:["auto","metadata","none"],autoplay:["autoplay"],mediagroup:["movie"],muted:["muted"],controls:["controls"]}},wbr:zt},xie={accesskey:null,class:null,contenteditable:Xi,contextmenu:null,dir:["ltr","rtl","auto"],draggable:["true","false","auto"],dropzone:["copy","move","link","string:","file:"],hidden:["hidden"],id:null,inert:["inert"],itemid:null,itemprop:null,itemref:null,itemscope:["itemscope"],itemtype:null,lang:["ar","bn","de","en-GB","en-US","es","fr","hi","id","ja","pa","pt","ru","tr","zh"],spellcheck:Xi,autocorrect:Xi,autocapitalize:Xi,style:null,tabindex:null,title:null,translate:["yes","no"],rel:["stylesheet","alternate","author","bookmark","help","license","next","nofollow","noreferrer","prefetch","prev","search","tag"],role:"alert application article banner button cell checkbox complementary contentinfo dialog document feed figure form grid gridcell heading img list listbox listitem main navigation region row rowgroup search switch tab table tabpanel textbox timer".split(" "),"aria-activedescendant":null,"aria-atomic":Xi,"aria-autocomplete":["inline","list","both","none"],"aria-busy":Xi,"aria-checked":["true","false","mixed","undefined"],"aria-controls":null,"aria-describedby":null,"aria-disabled":Xi,"aria-dropeffect":null,"aria-expanded":["true","false","undefined"],"aria-flowto":null,"aria-grabbed":["true","false","undefined"],"aria-haspopup":Xi,"aria-hidden":Xi,"aria-invalid":["true","false","grammar","spelling"],"aria-label":null,"aria-labelledby":null,"aria-level":null,"aria-live":["off","polite","assertive"],"aria-multiline":Xi,"aria-multiselectable":Xi,"aria-owns":null,"aria-posinset":null,"aria-pressed":["true","false","mixed","undefined"],"aria-readonly":Xi,"aria-relevant":null,"aria-required":Xi,"aria-selected":["true","false","undefined"],"aria-setsize":null,"aria-sort":["ascending","descending","none","other"],"aria-valuemax":null,"aria-valuemin":null,"aria-valuenow":null,"aria-valuetext":null},Pie="beforeunload copy cut dragstart dragover dragleave dragenter dragend drag paste focus blur change click load mousedown mouseenter mouseleave mouseup keydown keyup resize scroll unload".split(" ").map(r=>"on"+r);for(let r of Pie)xie[r]=null;class C4{constructor(e,t){this.tags={...OEt,...e},this.globalAttrs={...xie,...t},this.allTags=Object.keys(this.tags),this.globalAttrNames=Object.keys(this.globalAttrs)}}C4.default=new C4;function Du(r,e,t=r.length){if(!e)return"";let n=e.firstChild,i=n&&n.getChild("TagName");return i?r.sliceString(i.from,Math.min(i.to,t)):""}function Lu(r,e=!1){for(;r;r=r.parent)if(r.name=="Element")if(e)e=!1;else return r;return null}function Tie(r,e,t){let n=t.tags[Du(r,Lu(e))];return n?.children||t.allTags}function w_(r,e){let t=[];for(let n=Lu(e);n&&!n.type.isTop;n=Lu(n.parent)){let i=Du(r,n);if(i&&n.lastChild.name=="CloseTag")break;i&&t.indexOf(i)<0&&(e.name=="EndTag"||e.from>=n.firstChild.to)&&t.push(i)}return t}const Cie=/^[:\-\.\w\u00b7-\uffff]*$/;function Aie(r,e,t,n,i){let o=/\s*>/.test(r.sliceDoc(i,i+5))?"":">",s=Lu(t,t.name=="StartTag"||t.name=="TagName");return{from:n,to:i,options:Tie(r.doc,s,e).map(d=>({label:d,type:"type"})).concat(w_(r.doc,t).map((d,f)=>({label:"/"+d,apply:"/"+d+o,type:"type",boost:99-f}))),validFor:/^\/?[:\-\.\w\u00b7-\uffff]*$/}}function _ie(r,e,t,n){let i=/\s*>/.test(r.sliceDoc(n,n+5))?"":">";return{from:t,to:n,options:w_(r.doc,e).map((o,s)=>({label:o,apply:o+i,type:"type",boost:99-s})),validFor:Cie}}function bEt(r,e,t,n){let i=[],o=0;for(let s of Tie(r.doc,t,e))i.push({label:"<"+s,type:"type"});for(let s of w_(r.doc,t))i.push({label:"</"+s+">",type:"type",boost:99-o++});return{from:n,to:n,options:i,validFor:/^<\/?[:\-\.\w\u00b7-\uffff]*$/}}function yEt(r,e,t,n,i){let o=Lu(t),s=o?e.tags[Du(r.doc,o)]:null,d=s&&s.attrs?Object.keys(s.attrs):[],f=s&&s.globalAttrs===!1?d:d.length?d.concat(e.globalAttrNames):e.globalAttrNames;return{from:n,to:i,options:f.map(p=>({label:p,type:"property"})),validFor:Cie}}function SEt(r,e,t,n,i){var o;let s=(o=t.parent)===null||o===void 0?void 0:o.getChild("AttributeName"),d=[],f;if(s){let p=r.sliceDoc(s.from,s.to),v=e.globalAttrs[p];if(!v){let m=Lu(t),O=m?e.tags[Du(r.doc,m)]:null;v=O?.attrs&&O.attrs[p]}if(v){let m=r.sliceDoc(n,i).toLowerCase(),O='"',b='"';/^['"]/.test(m)?(f=m[0]=='"'?/^[^"]*$/:/^[^']*$/,O="",b=r.sliceDoc(i,i+1)==m[0]?"":m[0],m=m.slice(1),n++):f=/^[^\s<>='"]*$/;for(let S of v)d.push({label:S,apply:O+S+b,type:"constant"})}}return{from:n,to:i,options:d,validFor:f}}function wEt(r,e){let{state:t,pos:n}=e,i=ci(t).resolveInner(n,-1),o=i.resolve(n);for(let s=n,d;o==i&&(d=i.childBefore(s));){let f=d.lastChild;if(!f||!f.type.isError||f.from<f.to)break;o=i=d,s=f.from}return i.name=="TagName"?i.parent&&/CloseTag$/.test(i.parent.name)?_ie(t,i,i.from,n):Aie(t,r,i,i.from,n):i.name=="StartTag"||i.name=="IncompleteTag"?Aie(t,r,i,n,n):i.name=="StartCloseTag"||i.name=="IncompleteCloseTag"?_ie(t,i,n,n):i.name=="OpenTag"||i.name=="SelfClosingTag"||i.name=="AttributeName"?yEt(t,r,i,i.name=="AttributeName"?i.from:n,n):i.name=="Is"||i.name=="AttributeValue"||i.name=="UnquotedAttributeValue"?SEt(t,r,i,i.name=="Is"?n:i.from,n):e.explicit&&(o.name=="Element"||o.name=="Text"||o.name=="Document")?bEt(t,r,i,n):null}function xEt(r){let{extraTags:e,extraGlobalAttributes:t}=r,n=t||e?new C4(e,t):C4.default;return i=>wEt(n,i)}const PEt=Ho.parser.configure({top:"SingleExpression"}),Mie=[{tag:"script",attrs:r=>r.type=="text/typescript"||r.lang=="ts",parser:mie.parser},{tag:"script",attrs:r=>r.type=="text/babel"||r.type=="text/jsx",parser:gie.parser},{tag:"script",attrs:r=>r.type=="text/typescript-jsx",parser:Oie.parser},{tag:"script",attrs(r){return/^(importmap|speculationrules|application\/(.+\+)?json)$/i.test(r.type)},parser:PEt},{tag:"script",attrs(r){return!r.type||/^(?:text|application)\/(?:x-)?(?:java|ecma)script$|^module$|^$/i.test(r.type)},parser:Ho.parser},{tag:"style",attrs(r){return(!r.lang||r.lang=="css")&&(!r.type||/^(text\/)?(x-)?(stylesheet|css)$/i.test(r.type))},parser:P4.parser}],Eie=[{name:"style",parser:P4.parser.configure({top:"Styles"})}].concat(Pie.map(r=>({name:r,parser:Ho.parser}))),kie=vc.define({name:"html",parser:bMt.configure({props:[U1.add({Element(r){let e=/^(\s*)(<\/)?/.exec(r.textAfter);return r.node.to<=r.pos+e[0].length?r.continue():r.lineIndent(r.node.from)+(e[2]?0:r.unit)},"OpenTag CloseTag SelfClosingTag"(r){return r.column(r.node.from)+r.unit},Document(r){if(r.pos+/\s*/.exec(r.textAfter)[0].length<r.node.to)return r.continue();let e=null,t;for(let n=r.node;;){let i=n.lastChild;if(!i||i.name!="Element"||i.to!=n.to)break;e=n=i}return e&&!((t=e.lastChild)&&(t.name=="CloseTag"||t.name=="SelfClosingTag"))?r.lineIndent(e.from)+r.unit:null}}),f4.add({Element(r){let e=r.firstChild,t=r.lastChild;return!e||e.name!="OpenTag"?null:{from:e.to,to:t.name=="CloseTag"?t.from:r.to}}}),kre.add({"OpenTag CloseTag":r=>r.getChild("TagName")})]}),languageData:{commentTokens:{block:{open:"<!--",close:"-->"}},indentOnInput:/^\s*<\/\w+\W$/,wordChars:"-_"}}),A4=kie.configure({wrap:rie(Mie,Eie)});function TEt(r={}){let e="",t;r.matchClosingTags===!1&&(e="noMatch"),r.selfClosingTags===!0&&(e=(e?e+" ":"")+"selfClosing"),(r.nestedLanguages&&r.nestedLanguages.length||r.nestedAttributes&&r.nestedAttributes.length)&&(t=rie((r.nestedLanguages||[]).concat(Mie),(r.nestedAttributes||[]).concat(Eie)));let n=t?kie.configure({wrap:t,dialect:e}):e?A4.configure({dialect:e}):A4;return new o4(n,[A4.data.of({autocomplete:xEt(r)}),r.autoCloseTags!==!1?CEt:[],Sie().support,Nne().support])}const zie=new Set("area base br col command embed frame hr img input keygen link meta param source track wbr menuitem".split(" ")),CEt=Nt.inputHandler.of((r,e,t,n,i)=>{if(r.composing||r.state.readOnly||e!=t||n!=">"&&n!="/"||!A4.isActiveAt(r.state,e,-1))return!1;let o=i(),{state:s}=o,d=s.changeByRange(f=>{var p,v,m;let O=s.doc.sliceString(f.from-1,f.to)==n,{head:b}=f,S=ci(s).resolveInner(b,-1),w;if(O&&n==">"&&S.name=="EndTag"){let x=S.parent;if(((v=(p=x.parent)===null||p===void 0?void 0:p.lastChild)===null||v===void 0?void 0:v.name)!="CloseTag"&&(w=Du(s.doc,x.parent,b))&&!zie.has(w)){let C=b+(s.doc.sliceString(b,b+1)===">"?1:0),M=`</${w}>`;return{range:f,changes:{from:b,to:C,insert:M}}}}else if(O&&n=="/"&&S.name=="IncompleteCloseTag"){let x=S.parent;if(S.from==b-2&&((m=x.lastChild)===null||m===void 0?void 0:m.name)!="CloseTag"&&(w=Du(s.doc,x,b))&&!zie.has(w)){let C=b+(s.doc.sliceString(b,b+1)===">"?1:0),M=`${w}>`;return{range:mt.cursor(b+M.length,-1),changes:{from:b,to:C,insert:M}}}}return{range:f}});return d.changes.empty?!1:(r.dispatch([o,s.update(d,{userEvent:"input.complete",scrollIntoView:!0})]),!0)}),AEt=H1({String:He.string,Number:He.number,"True False":He.bool,PropertyName:He.propertyName,Null:He.null,", :":He.separator,"[ ]":He.squareBracket,"{ }":He.brace}),_Et=mc.deserialize({version:14,states:"$bOVQPOOOOQO'#Cb'#CbOnQPO'#CeOvQPO'#ClOOQO'#Cr'#CrQOQPOOOOQO'#Cg'#CgO}QPO'#CfO!SQPO'#CtOOQO,59P,59PO![QPO,59PO!aQPO'#CuOOQO,59W,59WO!iQPO,59WOVQPO,59QOqQPO'#CmO!nQPO,59`OOQO1G.k1G.kOVQPO'#CnO!vQPO,59aOOQO1G.r1G.rOOQO1G.l1G.lOOQO,59X,59XOOQO-E6k-E6kOOQO,59Y,59YOOQO-E6l-E6l",stateData:"#O~OeOS~OQSORSOSSOTSOWQO_ROgPO~OVXOgUO~O^[O~PVO[^O~O]_OVhX~OVaO~O]bO^iX~O^dO~O]_OVha~O]bO^ia~O",goto:"!kjPPPPPPkPPkqwPPPPk{!RPPP!XP!e!hXSOR^bQWQRf_TVQ_Q`WRg`QcZRicQTOQZRQe^RhbRYQR]R",nodeNames:"⚠ JsonText True False Null Number String } { Object Property PropertyName : , ] [ Array",maxTerm:25,nodeProps:[["isolate",-2,6,11,""],["openedBy",7,"{",14,"["],["closedBy",8,"}",15,"]"]],propSources:[AEt],skippedNodes:[0],repeatNodeCount:2,tokenData:"(|~RaXY!WYZ!W]^!Wpq!Wrs!]|}$u}!O$z!Q!R%T!R![&c![!]&t!}#O&y#P#Q'O#Y#Z'T#b#c'r#h#i(Z#o#p(r#q#r(w~!]Oe~~!`Wpq!]qr!]rs!xs#O!]#O#P!}#P;'S!];'S;=`$o<%lO!]~!}Og~~#QXrs!]!P!Q!]#O#P!]#U#V!]#Y#Z!]#b#c!]#f#g!]#h#i!]#i#j#m~#pR!Q![#y!c!i#y#T#Z#y~#|R!Q![$V!c!i$V#T#Z$V~$YR!Q![$c!c!i$c#T#Z$c~$fR!Q![!]!c!i!]#T#Z!]~$rP;=`<%l!]~$zO]~~$}Q!Q!R%T!R![&c~%YRT~!O!P%c!g!h%w#X#Y%w~%fP!Q![%i~%nRT~!Q![%i!g!h%w#X#Y%w~%zR{|&T}!O&T!Q![&Z~&WP!Q![&Z~&`PT~!Q![&Z~&hST~!O!P%c!Q![&c!g!h%w#X#Y%w~&yO[~~'OO_~~'TO^~~'WP#T#U'Z~'^P#`#a'a~'dP#g#h'g~'jP#X#Y'm~'rOR~~'uP#i#j'x~'{P#`#a(O~(RP#`#a(U~(ZOS~~(^P#f#g(a~(dP#i#j(g~(jP#X#Y(m~(rOQ~~(wOW~~(|OV~",tokenizers:[0],topRules:{JsonText:[0,1]},tokenPrec:0}),MEt=vc.define({name:"json",parser:_Et.configure({props:[U1.add({Object:ku({except:/^\s*\}/}),Array:ku({except:/^\s*\]/})}),f4.add({"Object Array":IA})]}),languageData:{closeBrackets:{brackets:["[","{",'"']},indentOnInput:/^\s*[\}\]]$/}});function EEt(){return new o4(MEt)}const kEt="#e5c07b",jie="#e06c75",zEt="#56b6c2",jEt="#ffffff",_4="#abb2bf",x_="#7d8799",$Et="#61afef",REt="#98c379",$ie="#d19a66",DEt="#c678dd",LEt="#21252b",Rie="#2c313a",Die="#282c34",P_="#353a42",NEt="#3E4451",Lie="#528bff",VEt=Nt.theme({"&":{color:_4,backgroundColor:Die},".cm-content":{caretColor:Lie},".cm-cursor, .cm-dropCursor":{borderLeftColor:Lie},"&.cm-focused > .cm-scroller > .cm-selectionLayer .cm-selectionBackground, .cm-selectionBackground, .cm-content ::selection":{backgroundColor:NEt},".cm-panels":{backgroundColor:LEt,color:_4},".cm-panels.cm-panels-top":{borderBottom:"2px solid black"},".cm-panels.cm-panels-bottom":{borderTop:"2px solid black"},".cm-searchMatch":{backgroundColor:"#72a1ff59",outline:"1px solid #457dff"},".cm-searchMatch.cm-searchMatch-selected":{backgroundColor:"#6199ff2f"},".cm-activeLine":{backgroundColor:"#6699ff0b"},".cm-selectionMatch":{backgroundColor:"#aafe661a"},"&.cm-focused .cm-matchingBracket, &.cm-focused .cm-nonmatchingBracket":{backgroundColor:"#bad0f847"},".cm-gutters":{backgroundColor:Die,color:x_,border:"none"},".cm-activeLineGutter":{backgroundColor:Rie},".cm-foldPlaceholder":{backgroundColor:"transparent",border:"none",color:"#ddd"},".cm-tooltip":{border:"none",backgroundColor:P_},".cm-tooltip .cm-tooltip-arrow:before":{borderTopColor:"transparent",borderBottomColor:"transparent"},".cm-tooltip .cm-tooltip-arrow:after":{borderTopColor:P_,borderBottomColor:P_},".cm-tooltip-autocomplete":{"& > ul > li[aria-selected]":{backgroundColor:Rie,color:_4}}},{dark:!0}),BEt=d4.define([{tag:He.keyword,color:DEt},{tag:[He.name,He.deleted,He.character,He.propertyName,He.macroName],color:jie},{tag:[He.function(He.variableName),He.labelName],color:$Et},{tag:[He.color,He.constant(He.name),He.standard(He.name)],color:$ie},{tag:[He.definition(He.name),He.separator],color:_4},{tag:[He.typeName,He.className,He.number,He.changed,He.annotation,He.modifier,He.self,He.namespace],color:kEt},{tag:[He.operator,He.operatorKeyword,He.url,He.escape,He.regexp,He.link,He.special(He.string)],color:zEt},{tag:[He.meta,He.comment],color:x_},{tag:He.strong,fontWeight:"bold"},{tag:He.emphasis,fontStyle:"italic"},{tag:He.strikethrough,textDecoration:"line-through"},{tag:He.link,color:x_,textDecoration:"underline"},{tag:He.heading,fontWeight:"bold",color:jie},{tag:[He.atom,He.bool,He.special(He.variableName)],color:$ie},{tag:[He.processingInstruction,He.string,He.inserted],color:REt},{tag:He.invalid,color:jEt}]),IEt=[VEt,PCt(BEt)],Nie=Tr(_.defineComponent({name:"PaasCodeEditor",__name:"index",props:{modelValue:{default:""},language:{default:"json"},readonly:{type:Boolean,default:!1},theme:{default:"light"},height:{default:"300px"},minHeight:{default:"100px"},maxHeight:{default:"none"},placeholder:{default:""}},emits:["update:modelValue"],setup(r,{emit:e}){const t=r,n=e,i=_.ref(null);let o=null;const s=()=>[Nt.lineWrapping,FCt(),AA.of([...XAt,...JCt])],d={javascript:[Sie()],html:[TEt()],css:[Nne()],json:[EEt()],plaintext:[]},f=()=>d[t.language]||d.json,p=()=>{if(!i.value)return;const m=[...s(),...f(),Nt.updateListener.of(b=>{if(b.docChanged){const S=b.state.doc.toString();n("update:modelValue",S)}}),Nt.editable.of(!t.readonly),t.placeholder?FTt(t.placeholder):[],t.theme==="dark"?IEt:[]],O=br.create({doc:t.modelValue,extensions:m});o=new Nt({state:O,parent:i.value})},v=()=>{o&&(o.destroy(),o=null)};return _.watch(()=>t.modelValue,m=>{o&&o.state.doc.toString()!==m&&o.dispatch({changes:{from:0,to:o.state.doc.length,insert:m}})}),_.watch(()=>[t.language,t.theme,t.readonly],()=>{v(),_.nextTick(()=>p())}),_.onMounted(()=>{p()}),_.onUnmounted(()=>{v()}),(m,O)=>(_.openBlock(),_.createElementBlock("div",{ref_key:"editorContainer",ref:i,class:"code-editor",style:_.normalizeStyle({height:r.height,minHeight:r.minHeight,maxHeight:r.maxHeight})},null,4))}}),[["__scopeId","data-v-54449739"]]),HEt={components:{SearchOutlined:Ud,DeleteOutlined:Rf},inheritAttrs:!1,inject:{parentMethods:{from:"parentMethods",default:()=>({})}},name:"PaasForm",provide(){return{labelWidth:this.labelWidth,defaultColSpan:this.colSpan}},props:{refName:{default:"form"},id:{default:"id"},autoPk:{default:!0},model:{type:Object,required:!0},vRules:{type:Object},labelWidth:{type:[String,Number],default:"-1px"},colSpan:{type:Number,default:12},mode:{type:String,default:"form",validator:r=>["form","query"].includes(r)},showMore:{type:Number,default:-1},formatData:{type:Function,default:r=>r},closeGo:{default:-1,type:Number},add:{default:null,type:String},edit:{default:null,type:String}},created(){this.isIframe=window.self==window.top,this.add?this.addUrl=this.add:this.addUrl=this.$store.menus.current,this.edit?this.editUrl=this.edit:this.editUrl=this.$store.menus.current+"/edit"},data(){return{isIframe:!1,addUrl:"",editUrl:"",confirmFlag:!1,internalShowMore:this.showMore}},computed:{see(){return this.$store.forms.see},action(){return this.$store.forms.action}},watch:{showMore(r){this.internalShowMore=r}},methods:{handleQuery(){this.$store.setQueryData(JSON.parse(JSON.stringify(this.model))),this.$bus.emit("loadData")},handleReset(){const r=e=>{for(let t in e)if(typeof e[t]=="object"&&e[t]!==null)e[t]=Array.isArray(e[t])?[]:{},r(e[t]);else switch(typeof e[t]){case"string":e[t]=null;break;case"number":e[t]=null;break;case"boolean":e[t]=!1;break}};r(this.model),this.$emit("update:model",{...this.model})},toggleMore(){this.internalShowMore=this.internalShowMore===1?0:1,this.$emit("update:showMore",this.internalShowMore)},onFinishFailed(r){jr.message.warn(r.errorFields[0].errors,2.5)},submitForm(r){if(this.confirmFlag)return;this.confirmFlag=!0,setTimeout(()=>{this.confirmFlag=!1},2e3);var e=this.$parent.submitForm;if(e||(e=this.parentMethods&&this.parentMethods.submitForm),e&&e instanceof Function){e(this.model);return}let t=this.formatData(this.model);this.action=="add"?this.addClick(t):this.action=="edit"&&this.editClick(t)},addClick(r){this.autoPk&&(r.id=""),this.$post(this.addUrl,r).then(e=>{let t=e.data;this.callback?this.callback(t):this.$dyAlert(t,!0)})},editClick(r){this.$put(this.editUrl,r).then(e=>{let t=e.data;this.callback?this.callback(t):this.$dyAlert(t,!0)})},close(){this.$router.go(this.closeGo)}}};function FEt(r,e,t,n,i,o){const s=_.resolveComponent("SearchOutlined"),d=_.resolveComponent("a-button"),f=_.resolveComponent("DeleteOutlined"),p=_.resolveComponent("a-flex"),v=_.resolveComponent("a-row"),m=_.resolveComponent("CloseCircleOutlined"),O=_.resolveComponent("CheckCircleOutlined"),b=_.resolveComponent("a-form");return _.openBlock(),_.createBlock(b,_.mergeProps(r.$attrs,{ref:t.refName,model:t.model,rules:t.vRules,onFinish:o.submitForm,onFinishFailed:o.onFinishFailed}),{default:_.withCtx(()=>[_.createVNode(v,{gutter:16,style:{"background-color":"var(--background-color)"}},{default:_.withCtx(()=>[_.renderSlot(r.$slots,"default"),t.mode==="query"?(_.openBlock(),_.createBlock(p,{key:0,gap:"small",wrap:"wrap",style:{"margin-left":"10px"}},{default:_.withCtx(()=>[_.createVNode(d,{type:"primary",onClick:o.handleQuery,ghost:""},{icon:_.withCtx(()=>[_.createVNode(s)]),default:_.withCtx(()=>[e[0]||(e[0]=_.createTextVNode(" 查询 ",-1))]),_:1},8,["onClick"]),_.createVNode(d,{type:"default",onClick:o.handleReset},{icon:_.withCtx(()=>[_.createVNode(f)]),default:_.withCtx(()=>[e[1]||(e[1]=_.createTextVNode(" 重置 ",-1))]),_:1},8,["onClick"]),t.showMore!==-1?(_.openBlock(),_.createBlock(d,{key:0,type:"link",onClick:o.toggleMore},{default:_.withCtx(()=>[_.createTextVNode(_.toDisplayString(i.internalShowMore===1?"收起":"更多"),1)]),_:1},8,["onClick"])):_.createCommentVNode("",!0)]),_:1})):_.createCommentVNode("",!0)]),_:3}),t.mode==="form"&&i.isIframe?(_.openBlock(),_.createBlock(p,{key:0,style:{"margin-top":"20px"},gap:"small",wrap:"wrap",justify:"flex-end",align:"center"},{default:_.withCtx(()=>[_.createVNode(d,{type:"default",onClick:o.close},{icon:_.withCtx(()=>[_.createVNode(m)]),default:_.withCtx(()=>[e[2]||(e[2]=_.createTextVNode(" 关闭 ",-1))]),_:1},8,["onClick"]),o.see?_.createCommentVNode("",!0):(_.openBlock(),_.createBlock(d,{key:0,type:"primary","html-type":"submit",loading:r.$store.loading},{icon:_.withCtx(()=>[_.createVNode(O)]),default:_.withCtx(()=>[e[3]||(e[3]=_.createTextVNode(" 确认 ",-1))]),_:1},8,["loading"]))]),_:1})):_.createCommentVNode("",!0)]),_:3},16,["model","rules","onFinish","onFinishFailed"])}const Vie=Tr(HEt,[["render",FEt]]),QEt={name:"OrgPathSelector",inheritAttrs:!1,components:{[jr.Cascader.name]:jr.Cascader},props:{modelValue:[String,Number,Array],selectionType:{type:String,default:"user",validator:r=>["org","dept","user"].includes(r)},showSearch:{type:Boolean,default:!0},disabled:Boolean,size:{type:String,default:"middle"},multiple:{type:Boolean,default:!1},placeholder:String,changeOnSelect:Boolean},data(){return{innerValue:[],options:[],cache:new Map,isOnlyPath:!1,firstLevelLoaded:!1,isInternalUpdate:!1}},mounted(){if(this.modelValue)if(this.multiple&&typeof this.modelValue=="string"){const r=this.modelValue.split(",").filter(e=>e);this.loadMultiplePaths(r)}else if(this.multiple&&Array.isArray(this.modelValue)){const r=this.modelValue.map(String).filter(e=>e);this.loadMultiplePaths(r)}else this.loadPath()},watch:{modelValue:{handler(r){if(this.isInternalUpdate){this.isInternalUpdate=!1;return}if(r)if(this.multiple&&typeof r=="string"){const e=r.split(",").filter(t=>t);this.loadMultiplePaths(e)}else if(this.multiple&&Array.isArray(r)){const e=r.map(String).filter(t=>t);this.loadMultiplePaths(e)}else this.loadPath();else this.reset()},immediate:!0},selectionType(){if(this.reset(),this.modelValue)if(this.multiple&&typeof this.modelValue=="string"){const r=this.modelValue.split(",").filter(e=>e);this.loadMultiplePaths(r)}else if(this.multiple&&Array.isArray(this.modelValue)){const r=this.modelValue.map(String).filter(e=>e);this.loadMultiplePaths(r)}else this.loadPath()}},computed:{filteredAttrs(){const r={...this.$attrs};return Object.keys(r).forEach(e=>{(e.startsWith("on")||e.startsWith("@"))&&delete r[e]}),r}},methods:{getMaxLevel(){return this.selectionType==="org"?1:this.selectionType==="dept"?2:(this.selectionType==="user",3)},isLeaf(r){return r>=this.getMaxLevel()},normalize(r=[],e=0){return r.map(t=>({value:String(t.value),label:t.label,isLeaf:this.isLeaf(e),children:void 0,type:["org","dept","user"][e]||"unknown"}))},normalizePath(r=[],e=0){return r.map(t=>({value:String(t.value),label:t.label,isLeaf:this.isLeaf(e),children:Array.isArray(t.children)?this.normalizePath(t.children,e+1):void 0,type:["org","dept","user"][e]||"unknown"}))},extractPath(r){const e=[];let t=r?.[0];for(;t;)e.push(t.value),t=t.children?.[0];return e},async loadPath(){try{const r=await this.$get("/system/organization/getOrgPathSelect",{id:String(this.modelValue),level:this.selectionType});if(r.data?.code!==200)return;const e=this.normalizePath(r.data.data||[],0);this.options=this.mergeOptions(this.options,e),this.multiple?this.innerValue=[this.extractPath(e)]:this.innerValue=this.extractPath(e),this.isOnlyPath=!0}catch(r){console.error("loadPath error:",r)}},async loadMultiplePaths(r){try{this.innerValue=[];const e=r.map(async n=>{const i=await this.$get("/system/organization/getOrgPathSelect",{id:String(n),level:this.selectionType});return i.data?.code===200?this.normalizePath(i.data.data||[],0):null});(await Promise.all(e)).forEach(n=>{if(n){this.options=this.mergeOptions(this.options,n);const i=this.extractPath(n);i.length>0&&this.innerValue.push(i)}}),this.isOnlyPath=!0}catch(e){console.error("loadMultiplePaths error:",e)}},async handleDropdown(r){if(!(!r||this.firstLevelLoaded))try{const e=await this.fetchList(null,0),t=this.normalize(e,0);this.options=this.mergeOptions(this.options,t),this.firstLevelLoaded=!0}catch(e){console.error("handleDropdown error:",e)}},mergeOptions(r=[],e=[]){const t=new Map;return r.forEach(n=>t.set(n.value,n)),e.forEach(n=>{if(!t.has(n.value))t.set(n.value,n);else{const i=t.get(n.value);!i.children&&n.children&&(i.children=n.children)}}),Array.from(t.values())},async loadData(r){const e=r[r.length-1],t=r.length-1;if(e.isLeaf)return;const n=`${e.value}_${t}`;if(this.cache.has(n)){e.children=this.mergeOptions(e.children||[],this.cache.get(n));return}try{const i=await this.fetchList(e.value,t+1),o=this.normalize(i,t+1);e.children=this.mergeOptions(e.children||[],o),this.cache.set(n,o)}catch(i){console.error("loadData error:",i)}},async fetchList(r,e){let t="";const n={};if(e===0?t="/system/organization/list":e===1&&this.selectionType!=="org"?(t="/system/sysdept/list",n.org_id=r):e===2&&this.selectionType==="user"&&(t="/system/sysusers/list",n.dept_id=r),!t)return[];try{return(await this.$post(t,{page:{current:1,size:1e3},vars:n})).data?.data?.rows||[]}catch(i){return console.error("fetchList error:",i),[]}},handleChange(r,e){let t;this.multiple?Array.isArray(r)&&r.length>0?t=r.map(n=>n[n.length-1]).join(","):t="":Array.isArray(r)?t=r.length>0?r[r.length-1]:null:t=r??null,this.isInternalUpdate=!0,this.$emit("update:modelValue",t),this.$emit("change",t,e,r)},reset(){this.innerValue=[],this.options=[],this.isOnlyPath=!1,this.firstLevelLoaded=!1,this.cache.clear(),this.isInternalUpdate=!1}}};function WEt(r,e,t,n,i,o){const s=_.resolveComponent("a-cascader");return _.openBlock(),_.createBlock(s,_.mergeProps(o.filteredAttrs,{value:i.innerValue,"onUpdate:value":e[0]||(e[0]=d=>i.innerValue=d),options:i.options,"load-data":o.loadData,placeholder:t.placeholder||"请选择","show-search":t.showSearch,disabled:t.disabled,size:t.size,multiple:t.multiple,"change-on-select":!1,onChange:o.handleChange,onDropdownVisibleChange:o.handleDropdown,"field-names":{label:"label",value:"value",children:"children"}}),null,16,["value","options","load-data","placeholder","show-search","disabled","size","multiple","onChange","onDropdownVisibleChange"])}const Bie=Tr(QEt,[["render",WEt],["__scopeId","data-v-97971bba"]]),UEt={name:"PaasImageViewer",inheritAttrs:!1,props:{src:{type:[String,Object,Array],default:null},multiple:{type:Boolean,default:!1},preview:{type:Boolean,default:!1},isOpen:{type:Boolean,default:!1},showUrl:{type:String,default:"/system/secure/minio/preview"},openShowUrl:{type:String,default:"/system/open/minio/preview"},direction:{type:String,default:"normal",validator:function(r){return["normal","horizontal","vertical","grid"].indexOf(r)!==-1}},imageSize:{type:Object,default:()=>({width:100,height:100})},gridColumns:{type:Number,default:3},placeholderText:{type:String,default:"暂无图片"},firstLetterSource:{type:String,default:""},placeholderBgColor:{type:String,default:"#f0f0f0"},placeholderTextColor:{type:String,default:"#ffffff"},placeholderTextSize:{type:String,default:"24px"},placeholderTextWeight:{type:[String,Number],default:"500"},useGradient:{type:Boolean,default:!0},gradientBackground:{type:String,default:"linear-gradient(135deg, #667eea 0%, #764ba2 100%)"},width:{type:[String,Number],default:"100%"},height:{type:[String,Number],default:"auto"}},data(){return{processedImageUrls:[],visible:!1}},computed:{currentShowUrl(){return this.isOpen?this.openShowUrl:this.showUrl},displayedImages(){return this.processedImageUrls.length?this.processedImageUrls:[]},hasValidImages(){return this.displayedImages.length>0&&this.displayedImages.some(r=>r&&r.trim()!=="")},firstLetter(){return this.firstLetterSource?this.firstLetterSource.charAt(0):this.placeholderText.charAt(0)},containerClass(){return["paas-image-viewer-container",`paas-image-viewer-${this.direction}`]},containerStyle(){const r={};return r.width=typeof this.width=="number"?`${this.width}px`:this.width,r.height=typeof this.height=="number"?`${this.height}px`:this.height,r.minWidth="0",r.minHeight="0",r.maxWidth="100%",r.boxSizing="border-box",this.direction==="grid"?(r.display="grid",r["grid-template-columns"]=`repeat(${this.gridColumns}, 1fr)`):this.direction==="horizontal"?(r.display="flex",r["flex-direction"]="row",r["flex-wrap"]="wrap"):this.direction==="vertical"?(r.display="flex",r["flex-direction"]="column"):r.display="block",r.gap="8px",r},imageStyle(){return this.direction==="normal"?{width:"100%",height:"auto",maxWidth:"100%",objectFit:"cover",cursor:"pointer",borderRadius:"4px"}:{width:`${this.imageSize.width}px`,height:`${this.imageSize.height}px`,objectFit:"cover",cursor:"pointer",borderRadius:"4px"}},placeholderStyle(){const r={display:"flex",alignItems:"center",justifyContent:"center",borderRadius:"4px",width:"100%",height:"100%",minHeight:"100%",boxSizing:"border-box"};return this.useGradient?r.background=this.gradientBackground:r.backgroundColor=this.placeholderBgColor,r},placeholderContentStyle(){return{color:this.placeholderTextColor,fontSize:this.placeholderTextSize,fontWeight:this.placeholderTextWeight,textAlign:"center"}}},watch:{src:{handler(r,e){this.processImageUrls()},immediate:!0,deep:!0}},methods:{async processImageUrls(){if(!this.src||this.src==="[]"){this.processedImageUrls=[];return}try{let r=this.src;if(typeof r=="string"&&(r.startsWith("{")||r.startsWith("["))&&(r=JSON.parse(r)),Array.isArray(r)){const e=await Promise.all(r.map(t=>this.extractImageUrl(t)));this.processedImageUrls=e.filter(t=>t)}else{const e=await this.extractImageUrl(r);this.processedImageUrls=e?[e]:[]}}catch(r){console.warn("图片数据解析失败:",r),typeof this.src=="string"?this.processedImageUrls=[this.src]:this.processedImageUrls=[]}},async extractImageUrl(r){if(!r)return"";if(Array.isArray(r)){if(r.length===0)return"";r=r[0]}if(r.newName)try{const e={filename:r.newName,originalName:r.originalName||""},t=await this.$get(this.currentShowUrl,e);return t.data&&(t.data.startsWith("http")||t.data.startsWith("/"))||t.data?t.data:(console.warn("获取图片URL失败,返回数据为空"),"")}catch(e){return console.error("获取图片URL失败:",e),""}return r.url?r.url:r.src?r.src:typeof r=="string"?r:""}}};function XEt(r,e,t,n,i,o){const s=_.resolveComponent("a-image"),d=_.resolveComponent("a-image-preview-group");return _.openBlock(),_.createElementBlock("div",{class:_.normalizeClass(o.containerClass),style:_.normalizeStyle(o.containerStyle)},[o.hasValidImages?(_.openBlock(),_.createBlock(d,{key:0,preview:{visible:i.visible,onVisibleChange:f=>i.visible=f}},{default:_.withCtx(()=>[(_.openBlock(!0),_.createElementBlock(_.Fragment,null,_.renderList(o.displayedImages,(f,p)=>(_.openBlock(),_.createBlock(s,_.mergeProps({preview:t.preview},{ref_for:!0},r.$attrs,{src:f,key:p}),null,16,["preview","src"]))),128))]),_:1},8,["preview"])):(_.openBlock(),_.createElementBlock("div",{key:1,style:_.normalizeStyle(o.placeholderStyle)},[_.createElementVNode("div",{style:_.normalizeStyle(o.placeholderContentStyle)},_.toDisplayString(o.firstLetter),5)],4))],6)}const Iie=Tr(UEt,[["render",XEt],["__scopeId","data-v-76a296b0"]]),Hie=[wk,xk,_U,EU,MU,kU,zU,Bie,NU,VU,BU,IU,HU,FU,WU,QU,UU,oX,aee,oee,Vie,XU,see,Nie,lee,Iie],ZEt={install(r){Hie.forEach(e=>{r.component(e.name,e)}),Object.keys(qx).forEach(e=>{r.component(e,qx[e])})}},qEt=Hie.filter(r=>r.name);tr.FormDate=NU,tr.FormDateRange=QU,tr.FormInput=VU,tr.FormNumber=BU,tr.FormPageSelect=IU,tr.FormSelect=HU,tr.FormSwitch=FU,tr.FormTextarea=XU,tr.FormTree=WU,tr.OrgPathSelector=Bie,tr.PaasCodeEditor=Nie,tr.PaasDate=wk,tr.PaasEditor=oX,tr.PaasForm=Vie,tr.PaasIcon=see,tr.PaasImageViewer=Iie,tr.PaasMdEditor=aee,tr.PaasMenu=xk,tr.PaasPageSelect=EU,tr.PaasPageTable=_U,tr.PaasQueryBar=lee,tr.PaasSelect=MU,tr.PaasTree=kU,tr.PaasTreePanel=oee,tr.PaasUpload=UU,tr.PaasUploadModal=zU,tr.default=ZEt,tr.widgets=qEt,Object.defineProperties(tr,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}})}));
|
|
917
|
+
}`,{label:"class",detail:"definition",type:"keyword"}),ki('import {${names}} from "${module}"\n${}',{label:"import",detail:"named",type:"keyword"}),ki('import ${name} from "${module}"\n${}',{label:"import",detail:"default",type:"keyword"})],uEt=cie.concat([ki("interface ${name} {\n ${}\n}",{label:"interface",detail:"definition",type:"keyword"}),ki("type ${name} = ${type}",{label:"type",detail:"definition",type:"keyword"}),ki("enum ${name} {\n ${}\n}",{label:"enum",detail:"definition",type:"keyword"})]),uie=new dre,fie=new Set(["Script","Block","FunctionExpression","FunctionDeclaration","ArrowFunction","MethodDeclaration","ForStatement"]);function K1(r){return(e,t)=>{let n=e.node.getChild("VariableDefinition");return n&&t(n,r),!0}}const fEt=["FunctionDeclaration"],dEt={FunctionDeclaration:K1("function"),ClassDeclaration:K1("class"),ClassExpression:()=>!0,EnumDeclaration:K1("constant"),TypeAliasDeclaration:K1("type"),NamespaceDeclaration:K1("namespace"),VariableDefinition(r,e){r.matchContext(fEt)||e(r,"variable")},TypeDefinition(r,e){e(r,"type")},__proto__:null};function die(r,e){let t=uie.get(e);if(t)return t;let n=[],i=!0;function o(s,d){let f=r.sliceString(s.from,s.to);n.push({label:f,type:d})}return e.cursor(yr.IncludeAnonymous).iterate(s=>{if(i)i=!1;else if(s.name){let d=dEt[s.name];if(d&&d(s,o)||fie.has(s.name))return!1}else if(s.to-s.from>8192){for(let d of die(r,s.node))n.push(d);return!1}}),uie.set(e,n),n}const hie=/^[\w$\xa1-\uffff][\w$\d\xa1-\uffff]*$/,pie=["TemplateString","String","RegExp","LineComment","BlockComment","VariableDefinition","TypeDefinition","Label","PropertyDefinition","PropertyName","PrivatePropertyDefinition","PrivatePropertyName","JSXText","JSXAttributeValue","JSXOpenTag","JSXCloseTag","JSXSelfClosingTag",".","?."];function hEt(r){let e=ci(r.state).resolveInner(r.pos,-1);if(pie.indexOf(e.name)>-1)return null;let t=e.name=="VariableName"||e.to-e.from<20&&hie.test(r.state.sliceDoc(e.from,e.to));if(!t&&!r.explicit)return null;let n=[];for(let i=e;i;i=i.parent)fie.has(i.name)&&(n=n.concat(die(r.state.doc,i)));return{options:n,from:t?e.from:r.pos,validFor:hie}}const Ho=vc.define({name:"javascript",parser:YMt.configure({props:[U1.add({IfStatement:ku({except:/^\s*({|else\b)/}),TryStatement:ku({except:/^\s*({|catch\b|finally\b)/}),LabeledStatement:wCt,SwitchBody:r=>{let e=r.textAfter,t=/^\s*\}/.test(e),n=/^\s*(case|default)\b/.test(e);return r.baseIndent+(t?0:n?1:2)*r.unit},Block:SCt({closing:"}"}),ArrowFunction:r=>r.baseIndent+r.unit,"TemplateString BlockComment":()=>null,"Statement Property":ku({except:/^\s*{/}),JSXElement(r){let e=/^\s*<\//.test(r.textAfter);return r.lineIndent(r.node.from)+(e?0:r.unit)},JSXEscape(r){let e=/\s*\}/.test(r.textAfter);return r.lineIndent(r.node.from)+(e?0:r.unit)},"JSXOpenTag JSXSelfClosingTag"(r){return r.column(r.node.from)+r.unit}}),f4.add({"Block ClassBody SwitchBody EnumBody ObjectExpression ArrayExpression ObjectType":IA,BlockComment(r){return{from:r.from+2,to:r.to-2}}})]}),languageData:{closeBrackets:{brackets:["(","[","{","'",'"',"`"]},commentTokens:{line:"//",block:{open:"/*",close:"*/"}},indentOnInput:/^\s*(?:case |default:|\{|\}|<\/)$/,wordChars:"$"}}),vie={test:r=>/^JSX/.test(r.name),facet:Pre({commentTokens:{block:{open:"{/*",close:"*/}"}}})},mie=Ho.configure({dialect:"ts"},"typescript"),gie=Ho.configure({dialect:"jsx",props:[NA.add(r=>r.isTop?[vie]:void 0)]}),Oie=Ho.configure({dialect:"jsx ts",props:[NA.add(r=>r.isTop?[vie]:void 0)]},"typescript");let bie=r=>({label:r,type:"keyword"});const yie="break case const continue default delete export extends false finally in instanceof let new return static super switch this throw true typeof var yield".split(" ").map(bie),pEt=yie.concat(["declare","implements","private","protected","public"].map(bie));function Sie(r={}){let e=r.jsx?r.typescript?Oie:gie:r.typescript?mie:Ho,t=r.typescript?uEt.concat(pEt):cie.concat(yie);return new o4(e,[Ho.data.of({autocomplete:KMt(pie,JMt(t))}),Ho.data.of({autocomplete:hEt}),r.jsx?gEt:[]])}function vEt(r){for(;;){if(r.name=="JSXOpenTag"||r.name=="JSXSelfClosingTag"||r.name=="JSXFragmentTag")return r;if(r.name=="JSXEscape"||!r.parent)return null;r=r.parent}}function wie(r,e,t=r.length){for(let n=e?.firstChild;n;n=n.nextSibling)if(n.name=="JSXIdentifier"||n.name=="JSXBuiltin"||n.name=="JSXNamespacedName"||n.name=="JSXMemberExpression")return r.sliceString(n.from,Math.min(n.to,t));return""}const mEt=typeof navigator=="object"&&/Android\b/.test(navigator.userAgent),gEt=Nt.inputHandler.of((r,e,t,n,i)=>{if((mEt?r.composing:r.compositionStarted)||r.state.readOnly||e!=t||n!=">"&&n!="/"||!Ho.isActiveAt(r.state,e,-1))return!1;let o=i(),{state:s}=o,d=s.changeByRange(f=>{var p;let{head:v}=f,m=ci(s).resolveInner(v-1,-1),O;if(m.name=="JSXStartTag"&&(m=m.parent),!(s.doc.sliceString(v-1,v)!=n||m.name=="JSXAttributeValue"&&m.to>v)){if(n==">"&&m.name=="JSXFragmentTag")return{range:f,changes:{from:v,insert:"</>"}};if(n=="/"&&m.name=="JSXStartCloseTag"){let b=m.parent,S=b.parent;if(S&&b.from==v-2&&((O=wie(s.doc,S.firstChild,v))||((p=S.firstChild)===null||p===void 0?void 0:p.name)=="JSXFragmentTag")){let w=`${O}>`;return{range:mt.cursor(v+w.length,-1),changes:{from:v,insert:w}}}}else if(n==">"){let b=vEt(m);if(b&&b.name=="JSXOpenTag"&&!/^\/?>|^<\//.test(s.doc.sliceString(v,v+2))&&(O=wie(s.doc,b,v)))return{range:f,changes:{from:v,insert:`</${O}>`}}}}return{range:f}});return d.changes.empty?!1:(r.dispatch([o,s.update(d,{userEvent:"input.complete",scrollIntoView:!0})]),!0)}),ed=["_blank","_self","_top","_parent"],b_=["ascii","utf-8","utf-16","latin1","latin1"],y_=["get","post","put","delete"],S_=["application/x-www-form-urlencoded","multipart/form-data","text/plain"],Xi=["true","false"],zt={},OEt={a:{attrs:{href:null,ping:null,type:null,media:null,target:ed,hreflang:null}},abbr:zt,address:zt,area:{attrs:{alt:null,coords:null,href:null,target:null,ping:null,media:null,hreflang:null,type:null,shape:["default","rect","circle","poly"]}},article:zt,aside:zt,audio:{attrs:{src:null,mediagroup:null,crossorigin:["anonymous","use-credentials"],preload:["none","metadata","auto"],autoplay:["autoplay"],loop:["loop"],controls:["controls"]}},b:zt,base:{attrs:{href:null,target:ed}},bdi:zt,bdo:zt,blockquote:{attrs:{cite:null}},body:zt,br:zt,button:{attrs:{form:null,formaction:null,name:null,value:null,autofocus:["autofocus"],disabled:["autofocus"],formenctype:S_,formmethod:y_,formnovalidate:["novalidate"],formtarget:ed,type:["submit","reset","button"]}},canvas:{attrs:{width:null,height:null}},caption:zt,center:zt,cite:zt,code:zt,col:{attrs:{span:null}},colgroup:{attrs:{span:null}},command:{attrs:{type:["command","checkbox","radio"],label:null,icon:null,radiogroup:null,command:null,title:null,disabled:["disabled"],checked:["checked"]}},data:{attrs:{value:null}},datagrid:{attrs:{disabled:["disabled"],multiple:["multiple"]}},datalist:{attrs:{data:null}},dd:zt,del:{attrs:{cite:null,datetime:null}},details:{attrs:{open:["open"]}},dfn:zt,div:zt,dl:zt,dt:zt,em:zt,embed:{attrs:{src:null,type:null,width:null,height:null}},eventsource:{attrs:{src:null}},fieldset:{attrs:{disabled:["disabled"],form:null,name:null}},figcaption:zt,figure:zt,footer:zt,form:{attrs:{action:null,name:null,"accept-charset":b_,autocomplete:["on","off"],enctype:S_,method:y_,novalidate:["novalidate"],target:ed}},h1:zt,h2:zt,h3:zt,h4:zt,h5:zt,h6:zt,head:{children:["title","base","link","style","meta","script","noscript","command"]},header:zt,hgroup:zt,hr:zt,html:{attrs:{manifest:null}},i:zt,iframe:{attrs:{src:null,srcdoc:null,name:null,width:null,height:null,sandbox:["allow-top-navigation","allow-same-origin","allow-forms","allow-scripts"],seamless:["seamless"]}},img:{attrs:{alt:null,src:null,ismap:null,usemap:null,width:null,height:null,crossorigin:["anonymous","use-credentials"]}},input:{attrs:{alt:null,dirname:null,form:null,formaction:null,height:null,list:null,max:null,maxlength:null,min:null,name:null,pattern:null,placeholder:null,size:null,src:null,step:null,value:null,width:null,accept:["audio/*","video/*","image/*"],autocomplete:["on","off"],autofocus:["autofocus"],checked:["checked"],disabled:["disabled"],formenctype:S_,formmethod:y_,formnovalidate:["novalidate"],formtarget:ed,multiple:["multiple"],readonly:["readonly"],required:["required"],type:["hidden","text","search","tel","url","email","password","datetime","date","month","week","time","datetime-local","number","range","color","checkbox","radio","file","submit","image","reset","button"]}},ins:{attrs:{cite:null,datetime:null}},kbd:zt,keygen:{attrs:{challenge:null,form:null,name:null,autofocus:["autofocus"],disabled:["disabled"],keytype:["RSA"]}},label:{attrs:{for:null,form:null}},legend:zt,li:{attrs:{value:null}},link:{attrs:{href:null,type:null,hreflang:null,media:null,sizes:["all","16x16","16x16 32x32","16x16 32x32 64x64"]}},map:{attrs:{name:null}},mark:zt,menu:{attrs:{label:null,type:["list","context","toolbar"]}},meta:{attrs:{content:null,charset:b_,name:["viewport","application-name","author","description","generator","keywords"],"http-equiv":["content-language","content-type","default-style","refresh"]}},meter:{attrs:{value:null,min:null,low:null,high:null,max:null,optimum:null}},nav:zt,noscript:zt,object:{attrs:{data:null,type:null,name:null,usemap:null,form:null,width:null,height:null,typemustmatch:["typemustmatch"]}},ol:{attrs:{reversed:["reversed"],start:null,type:["1","a","A","i","I"]},children:["li","script","template","ul","ol"]},optgroup:{attrs:{disabled:["disabled"],label:null}},option:{attrs:{disabled:["disabled"],label:null,selected:["selected"],value:null}},output:{attrs:{for:null,form:null,name:null}},p:zt,param:{attrs:{name:null,value:null}},pre:zt,progress:{attrs:{value:null,max:null}},q:{attrs:{cite:null}},rp:zt,rt:zt,ruby:zt,samp:zt,script:{attrs:{type:["text/javascript"],src:null,async:["async"],defer:["defer"],charset:b_}},section:zt,select:{attrs:{form:null,name:null,size:null,autofocus:["autofocus"],disabled:["disabled"],multiple:["multiple"]}},slot:{attrs:{name:null}},small:zt,source:{attrs:{src:null,type:null,media:null}},span:zt,strong:zt,style:{attrs:{type:["text/css"],media:null,scoped:null}},sub:zt,summary:zt,sup:zt,table:zt,tbody:zt,td:{attrs:{colspan:null,rowspan:null,headers:null}},template:zt,textarea:{attrs:{dirname:null,form:null,maxlength:null,name:null,placeholder:null,rows:null,cols:null,autofocus:["autofocus"],disabled:["disabled"],readonly:["readonly"],required:["required"],wrap:["soft","hard"]}},tfoot:zt,th:{attrs:{colspan:null,rowspan:null,headers:null,scope:["row","col","rowgroup","colgroup"]}},thead:zt,time:{attrs:{datetime:null}},title:zt,tr:zt,track:{attrs:{src:null,label:null,default:null,kind:["subtitles","captions","descriptions","chapters","metadata"],srclang:null}},ul:{children:["li","script","template","ul","ol"]},var:zt,video:{attrs:{src:null,poster:null,width:null,height:null,crossorigin:["anonymous","use-credentials"],preload:["auto","metadata","none"],autoplay:["autoplay"],mediagroup:["movie"],muted:["muted"],controls:["controls"]}},wbr:zt},xie={accesskey:null,class:null,contenteditable:Xi,contextmenu:null,dir:["ltr","rtl","auto"],draggable:["true","false","auto"],dropzone:["copy","move","link","string:","file:"],hidden:["hidden"],id:null,inert:["inert"],itemid:null,itemprop:null,itemref:null,itemscope:["itemscope"],itemtype:null,lang:["ar","bn","de","en-GB","en-US","es","fr","hi","id","ja","pa","pt","ru","tr","zh"],spellcheck:Xi,autocorrect:Xi,autocapitalize:Xi,style:null,tabindex:null,title:null,translate:["yes","no"],rel:["stylesheet","alternate","author","bookmark","help","license","next","nofollow","noreferrer","prefetch","prev","search","tag"],role:"alert application article banner button cell checkbox complementary contentinfo dialog document feed figure form grid gridcell heading img list listbox listitem main navigation region row rowgroup search switch tab table tabpanel textbox timer".split(" "),"aria-activedescendant":null,"aria-atomic":Xi,"aria-autocomplete":["inline","list","both","none"],"aria-busy":Xi,"aria-checked":["true","false","mixed","undefined"],"aria-controls":null,"aria-describedby":null,"aria-disabled":Xi,"aria-dropeffect":null,"aria-expanded":["true","false","undefined"],"aria-flowto":null,"aria-grabbed":["true","false","undefined"],"aria-haspopup":Xi,"aria-hidden":Xi,"aria-invalid":["true","false","grammar","spelling"],"aria-label":null,"aria-labelledby":null,"aria-level":null,"aria-live":["off","polite","assertive"],"aria-multiline":Xi,"aria-multiselectable":Xi,"aria-owns":null,"aria-posinset":null,"aria-pressed":["true","false","mixed","undefined"],"aria-readonly":Xi,"aria-relevant":null,"aria-required":Xi,"aria-selected":["true","false","undefined"],"aria-setsize":null,"aria-sort":["ascending","descending","none","other"],"aria-valuemax":null,"aria-valuemin":null,"aria-valuenow":null,"aria-valuetext":null},Pie="beforeunload copy cut dragstart dragover dragleave dragenter dragend drag paste focus blur change click load mousedown mouseenter mouseleave mouseup keydown keyup resize scroll unload".split(" ").map(r=>"on"+r);for(let r of Pie)xie[r]=null;class C4{constructor(e,t){this.tags={...OEt,...e},this.globalAttrs={...xie,...t},this.allTags=Object.keys(this.tags),this.globalAttrNames=Object.keys(this.globalAttrs)}}C4.default=new C4;function Du(r,e,t=r.length){if(!e)return"";let n=e.firstChild,i=n&&n.getChild("TagName");return i?r.sliceString(i.from,Math.min(i.to,t)):""}function Lu(r,e=!1){for(;r;r=r.parent)if(r.name=="Element")if(e)e=!1;else return r;return null}function Tie(r,e,t){let n=t.tags[Du(r,Lu(e))];return n?.children||t.allTags}function w_(r,e){let t=[];for(let n=Lu(e);n&&!n.type.isTop;n=Lu(n.parent)){let i=Du(r,n);if(i&&n.lastChild.name=="CloseTag")break;i&&t.indexOf(i)<0&&(e.name=="EndTag"||e.from>=n.firstChild.to)&&t.push(i)}return t}const Cie=/^[:\-\.\w\u00b7-\uffff]*$/;function Aie(r,e,t,n,i){let o=/\s*>/.test(r.sliceDoc(i,i+5))?"":">",s=Lu(t,t.name=="StartTag"||t.name=="TagName");return{from:n,to:i,options:Tie(r.doc,s,e).map(d=>({label:d,type:"type"})).concat(w_(r.doc,t).map((d,f)=>({label:"/"+d,apply:"/"+d+o,type:"type",boost:99-f}))),validFor:/^\/?[:\-\.\w\u00b7-\uffff]*$/}}function _ie(r,e,t,n){let i=/\s*>/.test(r.sliceDoc(n,n+5))?"":">";return{from:t,to:n,options:w_(r.doc,e).map((o,s)=>({label:o,apply:o+i,type:"type",boost:99-s})),validFor:Cie}}function bEt(r,e,t,n){let i=[],o=0;for(let s of Tie(r.doc,t,e))i.push({label:"<"+s,type:"type"});for(let s of w_(r.doc,t))i.push({label:"</"+s+">",type:"type",boost:99-o++});return{from:n,to:n,options:i,validFor:/^<\/?[:\-\.\w\u00b7-\uffff]*$/}}function yEt(r,e,t,n,i){let o=Lu(t),s=o?e.tags[Du(r.doc,o)]:null,d=s&&s.attrs?Object.keys(s.attrs):[],f=s&&s.globalAttrs===!1?d:d.length?d.concat(e.globalAttrNames):e.globalAttrNames;return{from:n,to:i,options:f.map(p=>({label:p,type:"property"})),validFor:Cie}}function SEt(r,e,t,n,i){var o;let s=(o=t.parent)===null||o===void 0?void 0:o.getChild("AttributeName"),d=[],f;if(s){let p=r.sliceDoc(s.from,s.to),v=e.globalAttrs[p];if(!v){let m=Lu(t),O=m?e.tags[Du(r.doc,m)]:null;v=O?.attrs&&O.attrs[p]}if(v){let m=r.sliceDoc(n,i).toLowerCase(),O='"',b='"';/^['"]/.test(m)?(f=m[0]=='"'?/^[^"]*$/:/^[^']*$/,O="",b=r.sliceDoc(i,i+1)==m[0]?"":m[0],m=m.slice(1),n++):f=/^[^\s<>='"]*$/;for(let S of v)d.push({label:S,apply:O+S+b,type:"constant"})}}return{from:n,to:i,options:d,validFor:f}}function wEt(r,e){let{state:t,pos:n}=e,i=ci(t).resolveInner(n,-1),o=i.resolve(n);for(let s=n,d;o==i&&(d=i.childBefore(s));){let f=d.lastChild;if(!f||!f.type.isError||f.from<f.to)break;o=i=d,s=f.from}return i.name=="TagName"?i.parent&&/CloseTag$/.test(i.parent.name)?_ie(t,i,i.from,n):Aie(t,r,i,i.from,n):i.name=="StartTag"||i.name=="IncompleteTag"?Aie(t,r,i,n,n):i.name=="StartCloseTag"||i.name=="IncompleteCloseTag"?_ie(t,i,n,n):i.name=="OpenTag"||i.name=="SelfClosingTag"||i.name=="AttributeName"?yEt(t,r,i,i.name=="AttributeName"?i.from:n,n):i.name=="Is"||i.name=="AttributeValue"||i.name=="UnquotedAttributeValue"?SEt(t,r,i,i.name=="Is"?n:i.from,n):e.explicit&&(o.name=="Element"||o.name=="Text"||o.name=="Document")?bEt(t,r,i,n):null}function xEt(r){let{extraTags:e,extraGlobalAttributes:t}=r,n=t||e?new C4(e,t):C4.default;return i=>wEt(n,i)}const PEt=Ho.parser.configure({top:"SingleExpression"}),Mie=[{tag:"script",attrs:r=>r.type=="text/typescript"||r.lang=="ts",parser:mie.parser},{tag:"script",attrs:r=>r.type=="text/babel"||r.type=="text/jsx",parser:gie.parser},{tag:"script",attrs:r=>r.type=="text/typescript-jsx",parser:Oie.parser},{tag:"script",attrs(r){return/^(importmap|speculationrules|application\/(.+\+)?json)$/i.test(r.type)},parser:PEt},{tag:"script",attrs(r){return!r.type||/^(?:text|application)\/(?:x-)?(?:java|ecma)script$|^module$|^$/i.test(r.type)},parser:Ho.parser},{tag:"style",attrs(r){return(!r.lang||r.lang=="css")&&(!r.type||/^(text\/)?(x-)?(stylesheet|css)$/i.test(r.type))},parser:P4.parser}],Eie=[{name:"style",parser:P4.parser.configure({top:"Styles"})}].concat(Pie.map(r=>({name:r,parser:Ho.parser}))),kie=vc.define({name:"html",parser:bMt.configure({props:[U1.add({Element(r){let e=/^(\s*)(<\/)?/.exec(r.textAfter);return r.node.to<=r.pos+e[0].length?r.continue():r.lineIndent(r.node.from)+(e[2]?0:r.unit)},"OpenTag CloseTag SelfClosingTag"(r){return r.column(r.node.from)+r.unit},Document(r){if(r.pos+/\s*/.exec(r.textAfter)[0].length<r.node.to)return r.continue();let e=null,t;for(let n=r.node;;){let i=n.lastChild;if(!i||i.name!="Element"||i.to!=n.to)break;e=n=i}return e&&!((t=e.lastChild)&&(t.name=="CloseTag"||t.name=="SelfClosingTag"))?r.lineIndent(e.from)+r.unit:null}}),f4.add({Element(r){let e=r.firstChild,t=r.lastChild;return!e||e.name!="OpenTag"?null:{from:e.to,to:t.name=="CloseTag"?t.from:r.to}}}),kre.add({"OpenTag CloseTag":r=>r.getChild("TagName")})]}),languageData:{commentTokens:{block:{open:"<!--",close:"-->"}},indentOnInput:/^\s*<\/\w+\W$/,wordChars:"-_"}}),A4=kie.configure({wrap:rie(Mie,Eie)});function TEt(r={}){let e="",t;r.matchClosingTags===!1&&(e="noMatch"),r.selfClosingTags===!0&&(e=(e?e+" ":"")+"selfClosing"),(r.nestedLanguages&&r.nestedLanguages.length||r.nestedAttributes&&r.nestedAttributes.length)&&(t=rie((r.nestedLanguages||[]).concat(Mie),(r.nestedAttributes||[]).concat(Eie)));let n=t?kie.configure({wrap:t,dialect:e}):e?A4.configure({dialect:e}):A4;return new o4(n,[A4.data.of({autocomplete:xEt(r)}),r.autoCloseTags!==!1?CEt:[],Sie().support,Nne().support])}const zie=new Set("area base br col command embed frame hr img input keygen link meta param source track wbr menuitem".split(" ")),CEt=Nt.inputHandler.of((r,e,t,n,i)=>{if(r.composing||r.state.readOnly||e!=t||n!=">"&&n!="/"||!A4.isActiveAt(r.state,e,-1))return!1;let o=i(),{state:s}=o,d=s.changeByRange(f=>{var p,v,m;let O=s.doc.sliceString(f.from-1,f.to)==n,{head:b}=f,S=ci(s).resolveInner(b,-1),w;if(O&&n==">"&&S.name=="EndTag"){let x=S.parent;if(((v=(p=x.parent)===null||p===void 0?void 0:p.lastChild)===null||v===void 0?void 0:v.name)!="CloseTag"&&(w=Du(s.doc,x.parent,b))&&!zie.has(w)){let C=b+(s.doc.sliceString(b,b+1)===">"?1:0),M=`</${w}>`;return{range:f,changes:{from:b,to:C,insert:M}}}}else if(O&&n=="/"&&S.name=="IncompleteCloseTag"){let x=S.parent;if(S.from==b-2&&((m=x.lastChild)===null||m===void 0?void 0:m.name)!="CloseTag"&&(w=Du(s.doc,x,b))&&!zie.has(w)){let C=b+(s.doc.sliceString(b,b+1)===">"?1:0),M=`${w}>`;return{range:mt.cursor(b+M.length,-1),changes:{from:b,to:C,insert:M}}}}return{range:f}});return d.changes.empty?!1:(r.dispatch([o,s.update(d,{userEvent:"input.complete",scrollIntoView:!0})]),!0)}),AEt=H1({String:He.string,Number:He.number,"True False":He.bool,PropertyName:He.propertyName,Null:He.null,", :":He.separator,"[ ]":He.squareBracket,"{ }":He.brace}),_Et=mc.deserialize({version:14,states:"$bOVQPOOOOQO'#Cb'#CbOnQPO'#CeOvQPO'#ClOOQO'#Cr'#CrQOQPOOOOQO'#Cg'#CgO}QPO'#CfO!SQPO'#CtOOQO,59P,59PO![QPO,59PO!aQPO'#CuOOQO,59W,59WO!iQPO,59WOVQPO,59QOqQPO'#CmO!nQPO,59`OOQO1G.k1G.kOVQPO'#CnO!vQPO,59aOOQO1G.r1G.rOOQO1G.l1G.lOOQO,59X,59XOOQO-E6k-E6kOOQO,59Y,59YOOQO-E6l-E6l",stateData:"#O~OeOS~OQSORSOSSOTSOWQO_ROgPO~OVXOgUO~O^[O~PVO[^O~O]_OVhX~OVaO~O]bO^iX~O^dO~O]_OVha~O]bO^ia~O",goto:"!kjPPPPPPkPPkqwPPPPk{!RPPP!XP!e!hXSOR^bQWQRf_TVQ_Q`WRg`QcZRicQTOQZRQe^RhbRYQR]R",nodeNames:"⚠ JsonText True False Null Number String } { Object Property PropertyName : , ] [ Array",maxTerm:25,nodeProps:[["isolate",-2,6,11,""],["openedBy",7,"{",14,"["],["closedBy",8,"}",15,"]"]],propSources:[AEt],skippedNodes:[0],repeatNodeCount:2,tokenData:"(|~RaXY!WYZ!W]^!Wpq!Wrs!]|}$u}!O$z!Q!R%T!R![&c![!]&t!}#O&y#P#Q'O#Y#Z'T#b#c'r#h#i(Z#o#p(r#q#r(w~!]Oe~~!`Wpq!]qr!]rs!xs#O!]#O#P!}#P;'S!];'S;=`$o<%lO!]~!}Og~~#QXrs!]!P!Q!]#O#P!]#U#V!]#Y#Z!]#b#c!]#f#g!]#h#i!]#i#j#m~#pR!Q![#y!c!i#y#T#Z#y~#|R!Q![$V!c!i$V#T#Z$V~$YR!Q![$c!c!i$c#T#Z$c~$fR!Q![!]!c!i!]#T#Z!]~$rP;=`<%l!]~$zO]~~$}Q!Q!R%T!R![&c~%YRT~!O!P%c!g!h%w#X#Y%w~%fP!Q![%i~%nRT~!Q![%i!g!h%w#X#Y%w~%zR{|&T}!O&T!Q![&Z~&WP!Q![&Z~&`PT~!Q![&Z~&hST~!O!P%c!Q![&c!g!h%w#X#Y%w~&yO[~~'OO_~~'TO^~~'WP#T#U'Z~'^P#`#a'a~'dP#g#h'g~'jP#X#Y'm~'rOR~~'uP#i#j'x~'{P#`#a(O~(RP#`#a(U~(ZOS~~(^P#f#g(a~(dP#i#j(g~(jP#X#Y(m~(rOQ~~(wOW~~(|OV~",tokenizers:[0],topRules:{JsonText:[0,1]},tokenPrec:0}),MEt=vc.define({name:"json",parser:_Et.configure({props:[U1.add({Object:ku({except:/^\s*\}/}),Array:ku({except:/^\s*\]/})}),f4.add({"Object Array":IA})]}),languageData:{closeBrackets:{brackets:["[","{",'"']},indentOnInput:/^\s*[\}\]]$/}});function EEt(){return new o4(MEt)}const kEt="#e5c07b",jie="#e06c75",zEt="#56b6c2",jEt="#ffffff",_4="#abb2bf",x_="#7d8799",$Et="#61afef",REt="#98c379",$ie="#d19a66",DEt="#c678dd",LEt="#21252b",Rie="#2c313a",Die="#282c34",P_="#353a42",NEt="#3E4451",Lie="#528bff",VEt=Nt.theme({"&":{color:_4,backgroundColor:Die},".cm-content":{caretColor:Lie},".cm-cursor, .cm-dropCursor":{borderLeftColor:Lie},"&.cm-focused > .cm-scroller > .cm-selectionLayer .cm-selectionBackground, .cm-selectionBackground, .cm-content ::selection":{backgroundColor:NEt},".cm-panels":{backgroundColor:LEt,color:_4},".cm-panels.cm-panels-top":{borderBottom:"2px solid black"},".cm-panels.cm-panels-bottom":{borderTop:"2px solid black"},".cm-searchMatch":{backgroundColor:"#72a1ff59",outline:"1px solid #457dff"},".cm-searchMatch.cm-searchMatch-selected":{backgroundColor:"#6199ff2f"},".cm-activeLine":{backgroundColor:"#6699ff0b"},".cm-selectionMatch":{backgroundColor:"#aafe661a"},"&.cm-focused .cm-matchingBracket, &.cm-focused .cm-nonmatchingBracket":{backgroundColor:"#bad0f847"},".cm-gutters":{backgroundColor:Die,color:x_,border:"none"},".cm-activeLineGutter":{backgroundColor:Rie},".cm-foldPlaceholder":{backgroundColor:"transparent",border:"none",color:"#ddd"},".cm-tooltip":{border:"none",backgroundColor:P_},".cm-tooltip .cm-tooltip-arrow:before":{borderTopColor:"transparent",borderBottomColor:"transparent"},".cm-tooltip .cm-tooltip-arrow:after":{borderTopColor:P_,borderBottomColor:P_},".cm-tooltip-autocomplete":{"& > ul > li[aria-selected]":{backgroundColor:Rie,color:_4}}},{dark:!0}),BEt=d4.define([{tag:He.keyword,color:DEt},{tag:[He.name,He.deleted,He.character,He.propertyName,He.macroName],color:jie},{tag:[He.function(He.variableName),He.labelName],color:$Et},{tag:[He.color,He.constant(He.name),He.standard(He.name)],color:$ie},{tag:[He.definition(He.name),He.separator],color:_4},{tag:[He.typeName,He.className,He.number,He.changed,He.annotation,He.modifier,He.self,He.namespace],color:kEt},{tag:[He.operator,He.operatorKeyword,He.url,He.escape,He.regexp,He.link,He.special(He.string)],color:zEt},{tag:[He.meta,He.comment],color:x_},{tag:He.strong,fontWeight:"bold"},{tag:He.emphasis,fontStyle:"italic"},{tag:He.strikethrough,textDecoration:"line-through"},{tag:He.link,color:x_,textDecoration:"underline"},{tag:He.heading,fontWeight:"bold",color:jie},{tag:[He.atom,He.bool,He.special(He.variableName)],color:$ie},{tag:[He.processingInstruction,He.string,He.inserted],color:REt},{tag:He.invalid,color:jEt}]),IEt=[VEt,PCt(BEt)],Nie=Tr(_.defineComponent({name:"PaasCodeEditor",__name:"index",props:{modelValue:{default:""},language:{default:"json"},readonly:{type:Boolean,default:!1},theme:{default:"light"},height:{default:"300px"},minHeight:{default:"100px"},maxHeight:{default:"none"},placeholder:{default:""}},emits:["update:modelValue"],setup(r,{emit:e}){const t=r,n=e,i=_.ref(null);let o=null;const s=()=>[Nt.lineWrapping,FCt(),AA.of([...XAt,...JCt])],d={javascript:[Sie()],html:[TEt()],css:[Nne()],json:[EEt()],plaintext:[]},f=()=>d[t.language]||d.json,p=()=>{if(!i.value)return;const m=[...s(),...f(),Nt.updateListener.of(b=>{if(b.docChanged){const S=b.state.doc.toString();n("update:modelValue",S)}}),Nt.editable.of(!t.readonly),t.placeholder?FTt(t.placeholder):[],t.theme==="dark"?IEt:[]],O=br.create({doc:t.modelValue,extensions:m});o=new Nt({state:O,parent:i.value})},v=()=>{o&&(o.destroy(),o=null)};return _.watch(()=>t.modelValue,m=>{o&&o.state.doc.toString()!==m&&o.dispatch({changes:{from:0,to:o.state.doc.length,insert:m}})}),_.watch(()=>[t.language,t.theme,t.readonly],()=>{v(),_.nextTick(()=>p())}),_.onMounted(()=>{p()}),_.onUnmounted(()=>{v()}),(m,O)=>(_.openBlock(),_.createElementBlock("div",{ref_key:"editorContainer",ref:i,class:"code-editor",style:_.normalizeStyle({height:r.height,minHeight:r.minHeight,maxHeight:r.maxHeight})},null,4))}}),[["__scopeId","data-v-54449739"]]),HEt={components:{SearchOutlined:Ud,DeleteOutlined:Rf},inheritAttrs:!1,inject:{parentMethods:{from:"parentMethods",default:()=>({})}},name:"PaasForm",provide(){return{labelWidth:this.labelWidth,defaultColSpan:this.colSpan}},props:{refName:{default:"form"},id:{default:"id"},autoPk:{default:!0},model:{type:Object,required:!0},vRules:{type:Object},labelWidth:{type:[String,Number],default:"-1px"},colSpan:{type:Number,default:12},mode:{type:String,default:"form",validator:r=>["form","query"].includes(r)},showMore:{type:Number,default:-1},formatData:{type:Function,default:r=>r},closeGo:{default:-1,type:Number},add:{default:null,type:String},edit:{default:null,type:String}},created(){this.isIframe=window.self==window.top,this.add?this.addUrl=this.add:this.addUrl=this.$store.menus.current,this.edit?this.editUrl=this.edit:this.editUrl=this.$store.menus.current+"/edit"},data(){return{isIframe:!1,addUrl:"",editUrl:"",confirmFlag:!1,internalShowMore:this.showMore}},computed:{see(){return this.$store.forms.see},action(){return this.$store.forms.action}},watch:{showMore(r){this.internalShowMore=r}},methods:{handleQuery(){this.$store.setQueryData(JSON.parse(JSON.stringify(this.model))),this.$bus.emit("loadData")},handleReset(){const r=e=>{for(let t in e)if(typeof e[t]=="object"&&e[t]!==null)e[t]=Array.isArray(e[t])?[]:{},r(e[t]);else switch(typeof e[t]){case"string":e[t]=null;break;case"number":e[t]=null;break;case"boolean":e[t]=!1;break}};r(this.model),this.$emit("update:model",{...this.model})},toggleMore(){this.internalShowMore=this.internalShowMore===1?0:1,this.$emit("update:showMore",this.internalShowMore)},onFinishFailed(r){jr.message.warn(r.errorFields[0].errors,2.5)},submitForm(r){if(this.confirmFlag)return;this.confirmFlag=!0,setTimeout(()=>{this.confirmFlag=!1},2e3);var e=this.$parent.submitForm;if(e||(e=this.parentMethods&&this.parentMethods.submitForm),e&&e instanceof Function){e(this.model);return}let t=this.formatData(this.model);this.action=="add"?this.addClick(t):this.action=="edit"&&this.editClick(t)},addClick(r){this.autoPk&&(r.id=""),this.$post(this.addUrl,r).then(e=>{let t=e.data;this.callback?this.callback(t):this.$dyAlert(t,!0)})},editClick(r){this.$put(this.editUrl,r).then(e=>{let t=e.data;this.callback?this.callback(t):this.$dyAlert(t,!0)})},close(){this.$router.go(this.closeGo)}}};function FEt(r,e,t,n,i,o){const s=_.resolveComponent("SearchOutlined"),d=_.resolveComponent("a-button"),f=_.resolveComponent("DeleteOutlined"),p=_.resolveComponent("a-flex"),v=_.resolveComponent("a-row"),m=_.resolveComponent("CloseCircleOutlined"),O=_.resolveComponent("CheckCircleOutlined"),b=_.resolveComponent("a-form");return _.openBlock(),_.createBlock(b,_.mergeProps(r.$attrs,{ref:t.refName,model:t.model,rules:t.vRules,onFinish:o.submitForm,onFinishFailed:o.onFinishFailed}),{default:_.withCtx(()=>[_.createVNode(v,{gutter:16,style:{"background-color":"var(--background-color)"}},{default:_.withCtx(()=>[_.renderSlot(r.$slots,"default"),t.mode==="query"?(_.openBlock(),_.createBlock(p,{key:0,gap:"small",wrap:"wrap",style:{"margin-left":"10px"}},{default:_.withCtx(()=>[_.createVNode(d,{type:"primary",onClick:o.handleQuery,ghost:""},{icon:_.withCtx(()=>[_.createVNode(s)]),default:_.withCtx(()=>[e[0]||(e[0]=_.createTextVNode(" 查询 ",-1))]),_:1},8,["onClick"]),_.createVNode(d,{type:"default",onClick:o.handleReset},{icon:_.withCtx(()=>[_.createVNode(f)]),default:_.withCtx(()=>[e[1]||(e[1]=_.createTextVNode(" 重置 ",-1))]),_:1},8,["onClick"]),t.showMore!==-1?(_.openBlock(),_.createBlock(d,{key:0,type:"link",onClick:o.toggleMore},{default:_.withCtx(()=>[_.createTextVNode(_.toDisplayString(i.internalShowMore===1?"收起":"更多"),1)]),_:1},8,["onClick"])):_.createCommentVNode("",!0)]),_:1})):_.createCommentVNode("",!0)]),_:3}),t.mode==="form"&&i.isIframe?(_.openBlock(),_.createBlock(p,{key:0,style:{"margin-top":"20px"},gap:"small",wrap:"wrap",justify:"flex-end",align:"center"},{default:_.withCtx(()=>[_.createVNode(d,{type:"default",onClick:o.close},{icon:_.withCtx(()=>[_.createVNode(m)]),default:_.withCtx(()=>[e[2]||(e[2]=_.createTextVNode(" 关闭 ",-1))]),_:1},8,["onClick"]),o.see?_.createCommentVNode("",!0):(_.openBlock(),_.createBlock(d,{key:0,type:"primary","html-type":"submit",loading:r.$store.loading},{icon:_.withCtx(()=>[_.createVNode(O)]),default:_.withCtx(()=>[e[3]||(e[3]=_.createTextVNode(" 确认 ",-1))]),_:1},8,["loading"]))]),_:1})):_.createCommentVNode("",!0)]),_:3},16,["model","rules","onFinish","onFinishFailed"])}const Vie=Tr(HEt,[["render",FEt]]),QEt={name:"OrgPathSelector",inheritAttrs:!1,components:{[jr.Cascader.name]:jr.Cascader},props:{modelValue:[String,Number,Array],selectionType:{type:String,default:"user",validator:r=>["org","dept","user"].includes(r)},showSearch:{type:Boolean,default:!0},disabled:Boolean,size:{type:String,default:"middle"},multiple:{type:Boolean,default:!1},placeholder:String,changeOnSelect:Boolean},data(){return{innerValue:[],options:[],cache:new Map,isOnlyPath:!1,firstLevelLoaded:!1,isInternalUpdate:!1}},mounted(){if(this.modelValue)if(this.multiple&&typeof this.modelValue=="string"){const r=this.modelValue.split(",").filter(e=>e);this.loadMultiplePaths(r)}else if(this.multiple&&Array.isArray(this.modelValue)){const r=this.modelValue.map(String).filter(e=>e);this.loadMultiplePaths(r)}else this.loadPath()},watch:{modelValue:{handler(r){if(this.isInternalUpdate){this.isInternalUpdate=!1;return}if(r)if(this.multiple&&typeof r=="string"){const e=r.split(",").filter(t=>t);this.loadMultiplePaths(e)}else if(this.multiple&&Array.isArray(r)){const e=r.map(String).filter(t=>t);this.loadMultiplePaths(e)}else this.loadPath();else this.reset()},immediate:!0},selectionType(){if(this.reset(),this.modelValue)if(this.multiple&&typeof this.modelValue=="string"){const r=this.modelValue.split(",").filter(e=>e);this.loadMultiplePaths(r)}else if(this.multiple&&Array.isArray(this.modelValue)){const r=this.modelValue.map(String).filter(e=>e);this.loadMultiplePaths(r)}else this.loadPath()}},computed:{filteredAttrs(){const r={...this.$attrs};return Object.keys(r).forEach(e=>{(e.startsWith("on")||e.startsWith("@"))&&delete r[e]}),r}},methods:{getMaxLevel(){return this.selectionType==="org"?1:this.selectionType==="dept"?2:(this.selectionType==="user",3)},isLeaf(r){return r===this.getMaxLevel()-1},normalize(r=[],e=0){return r.map(t=>({value:String(t.value),label:t.label,isLeaf:this.isLeaf(e),children:void 0,type:["org","dept","user"][e]||"unknown"}))},normalizePath(r=[],e=0){return r.map(t=>({value:String(t.value),label:t.label,isLeaf:this.isLeaf(e),children:Array.isArray(t.children)?this.normalizePath(t.children,e+1):void 0,type:["org","dept","user"][e]||"unknown"}))},extractPath(r){const e=[];let t=r?.[0];for(;t;)e.push(t.value),t=t.children?.[0];return e},async loadPath(){try{this.isInternalUpdate=!0;const r=await this.$get("/system/organization/getOrgPathSelect",{id:String(this.modelValue),level:this.selectionType});if(r.data?.code!==200)return;const e=this.normalizePath(r.data.data||[],0);this.options=this.mergeOptions(this.options,e),this.multiple?this.innerValue=[this.extractPath(e)]:this.innerValue=this.extractPath(e),this.isOnlyPath=!0,this.$nextTick(()=>{this.isInternalUpdate=!1})}catch(r){console.error("loadPath error:",r),this.isInternalUpdate=!1}},async loadMultiplePaths(r){try{this.isInternalUpdate=!0,this.innerValue=[];const e=r.map(async n=>{const i=await this.$get("/system/organization/getOrgPathSelect",{id:String(n),level:this.selectionType});return i.data?.code===200?this.normalizePath(i.data.data||[],0):null});(await Promise.all(e)).forEach(n=>{if(n){this.options=this.mergeOptions(this.options,n);const i=this.extractPath(n);i.length>0&&this.innerValue.push(i)}}),this.isOnlyPath=!0,this.$nextTick(()=>{this.isInternalUpdate=!1})}catch(e){console.error("loadMultiplePaths error:",e),this.isInternalUpdate=!1}},async handleDropdown(r){if(!(!r||this.firstLevelLoaded))try{const e=await this.fetchList(null,0),t=this.normalize(e,0);this.options=this.mergeOptions(this.options,t),this.firstLevelLoaded=!0}catch(e){console.error("handleDropdown error:",e)}},mergeOptions(r=[],e=[]){const t=new Map;return r.forEach(n=>t.set(n.value,n)),e.forEach(n=>{if(!t.has(n.value))t.set(n.value,n);else{const i=t.get(n.value);!i.children&&n.children&&(i.children=n.children)}}),Array.from(t.values())},async loadData(r){const e=r[r.length-1],t=r.length-1;if(e.isLeaf)return;const n=`${e.value}_${t}`;if(this.cache.has(n)){e.children=this.mergeOptions(e.children||[],this.cache.get(n));return}try{const i=await this.fetchList(e.value,t+1),o=this.normalize(i,t+1);e.children=this.mergeOptions(e.children||[],o),this.cache.set(n,o)}catch(i){console.error("loadData error:",i)}},async fetchList(r,e){let t="";const n={};if(e===0?t="/system/organization/list":e===1&&this.selectionType!=="org"?(t="/system/sysdept/list",n.org_id=r):e===2&&this.selectionType==="user"&&(t="/system/sysusers/list",n.dept_id=r),!t)return[];try{return(await this.$post(t,{page:{current:1,size:1e3},vars:n})).data?.data?.rows||[]}catch(i){return console.error("fetchList error:",i),[]}},handleChange(r,e){let t;if(this.multiple)if(Array.isArray(r)&&r.length>0){const n=this.getMaxLevel(),i=[];r.forEach(o=>{o.length===n&&i.push(o)}),t=i.map(o=>o[o.length-1]).join(","),t||(t="")}else t="";else Array.isArray(r)?t=r.length>0?r[r.length-1]:null:t=r??null;this.isInternalUpdate=!0,this.$emit("update:modelValue",t),this.$emit("change",t,e,r)},reset(){this.innerValue=[],this.options=[],this.isOnlyPath=!1,this.firstLevelLoaded=!1,this.cache.clear(),this.isInternalUpdate=!1}}};function WEt(r,e,t,n,i,o){const s=_.resolveComponent("a-cascader");return _.openBlock(),_.createBlock(s,_.mergeProps(o.filteredAttrs,{value:i.innerValue,"onUpdate:value":e[0]||(e[0]=d=>i.innerValue=d),options:i.options,"load-data":o.loadData,placeholder:t.placeholder||"请选择","show-search":t.showSearch,disabled:t.disabled,size:t.size,multiple:t.multiple,"change-on-select":!1,onChange:o.handleChange,onDropdownVisibleChange:o.handleDropdown,"field-names":{label:"label",value:"value",children:"children"}}),null,16,["value","options","load-data","placeholder","show-search","disabled","size","multiple","onChange","onDropdownVisibleChange"])}const Bie=Tr(QEt,[["render",WEt],["__scopeId","data-v-dbe0394e"]]),UEt={name:"PaasImageViewer",inheritAttrs:!1,props:{src:{type:[String,Object,Array],default:null},multiple:{type:Boolean,default:!1},preview:{type:Boolean,default:!1},isOpen:{type:Boolean,default:!1},showUrl:{type:String,default:"/system/secure/minio/preview"},openShowUrl:{type:String,default:"/system/open/minio/preview"},direction:{type:String,default:"normal",validator:function(r){return["normal","horizontal","vertical","grid"].indexOf(r)!==-1}},imageSize:{type:Object,default:()=>({width:100,height:100})},gridColumns:{type:Number,default:3},placeholderText:{type:String,default:"暂无图片"},firstLetterSource:{type:String,default:""},placeholderBgColor:{type:String,default:"#f0f0f0"},placeholderTextColor:{type:String,default:"#ffffff"},placeholderTextSize:{type:String,default:"24px"},placeholderTextWeight:{type:[String,Number],default:"500"},useGradient:{type:Boolean,default:!0},gradientBackground:{type:String,default:"linear-gradient(135deg, #667eea 0%, #764ba2 100%)"},width:{type:[String,Number],default:"100%"},height:{type:[String,Number],default:"auto"}},data(){return{processedImageUrls:[],visible:!1}},computed:{currentShowUrl(){return this.isOpen?this.openShowUrl:this.showUrl},displayedImages(){return this.processedImageUrls.length?this.processedImageUrls:[]},hasValidImages(){return this.displayedImages.length>0&&this.displayedImages.some(r=>r&&r.trim()!=="")},firstLetter(){return this.firstLetterSource?this.firstLetterSource.charAt(0):this.placeholderText.charAt(0)},containerClass(){return["paas-image-viewer-container",`paas-image-viewer-${this.direction}`]},containerStyle(){const r={};return r.width=typeof this.width=="number"?`${this.width}px`:this.width,r.height=typeof this.height=="number"?`${this.height}px`:this.height,r.minWidth="0",r.minHeight="0",r.maxWidth="100%",r.boxSizing="border-box",this.direction==="grid"?(r.display="grid",r["grid-template-columns"]=`repeat(${this.gridColumns}, 1fr)`):this.direction==="horizontal"?(r.display="flex",r["flex-direction"]="row",r["flex-wrap"]="wrap"):this.direction==="vertical"?(r.display="flex",r["flex-direction"]="column"):r.display="block",r.gap="8px",r},imageStyle(){return this.direction==="normal"?{width:"100%",height:"auto",maxWidth:"100%",objectFit:"cover",cursor:"pointer",borderRadius:"4px"}:{width:`${this.imageSize.width}px`,height:`${this.imageSize.height}px`,objectFit:"cover",cursor:"pointer",borderRadius:"4px"}},placeholderStyle(){const r={display:"flex",alignItems:"center",justifyContent:"center",borderRadius:"4px",width:"100%",height:"100%",minHeight:"100%",boxSizing:"border-box"};return this.useGradient?r.background=this.gradientBackground:r.backgroundColor=this.placeholderBgColor,r},placeholderContentStyle(){return{color:this.placeholderTextColor,fontSize:this.placeholderTextSize,fontWeight:this.placeholderTextWeight,textAlign:"center"}}},watch:{src:{handler(r,e){this.processImageUrls()},immediate:!0,deep:!0}},methods:{async processImageUrls(){if(!this.src||this.src==="[]"){this.processedImageUrls=[];return}try{let r=this.src;if(typeof r=="string"&&(r.startsWith("{")||r.startsWith("["))&&(r=JSON.parse(r)),Array.isArray(r)){const e=await Promise.all(r.map(t=>this.extractImageUrl(t)));this.processedImageUrls=e.filter(t=>t)}else{const e=await this.extractImageUrl(r);this.processedImageUrls=e?[e]:[]}}catch(r){console.warn("图片数据解析失败:",r),typeof this.src=="string"?this.processedImageUrls=[this.src]:this.processedImageUrls=[]}},async extractImageUrl(r){if(!r)return"";if(Array.isArray(r)){if(r.length===0)return"";r=r[0]}if(r.newName)try{const e={filename:r.newName,originalName:r.originalName||""},t=await this.$get(this.currentShowUrl,e);return t.data&&(t.data.startsWith("http")||t.data.startsWith("/"))||t.data?t.data:(console.warn("获取图片URL失败,返回数据为空"),"")}catch(e){return console.error("获取图片URL失败:",e),""}return r.url?r.url:r.src?r.src:typeof r=="string"?r:""}}};function XEt(r,e,t,n,i,o){const s=_.resolveComponent("a-image"),d=_.resolveComponent("a-image-preview-group");return _.openBlock(),_.createElementBlock("div",{class:_.normalizeClass(o.containerClass),style:_.normalizeStyle(o.containerStyle)},[o.hasValidImages?(_.openBlock(),_.createBlock(d,{key:0,preview:{visible:i.visible,onVisibleChange:f=>i.visible=f}},{default:_.withCtx(()=>[(_.openBlock(!0),_.createElementBlock(_.Fragment,null,_.renderList(o.displayedImages,(f,p)=>(_.openBlock(),_.createBlock(s,_.mergeProps({preview:t.preview},{ref_for:!0},r.$attrs,{src:f,key:p}),null,16,["preview","src"]))),128))]),_:1},8,["preview"])):(_.openBlock(),_.createElementBlock("div",{key:1,style:_.normalizeStyle(o.placeholderStyle)},[_.createElementVNode("div",{style:_.normalizeStyle(o.placeholderContentStyle)},_.toDisplayString(o.firstLetter),5)],4))],6)}const Iie=Tr(UEt,[["render",XEt],["__scopeId","data-v-76a296b0"]]),Hie=[wk,xk,_U,EU,MU,kU,zU,Bie,NU,VU,BU,IU,HU,FU,WU,QU,UU,oX,aee,oee,Vie,XU,see,Nie,lee,Iie],ZEt={install(r){Hie.forEach(e=>{r.component(e.name,e)}),Object.keys(qx).forEach(e=>{r.component(e,qx[e])})}},qEt=Hie.filter(r=>r.name);tr.FormDate=NU,tr.FormDateRange=QU,tr.FormInput=VU,tr.FormNumber=BU,tr.FormPageSelect=IU,tr.FormSelect=HU,tr.FormSwitch=FU,tr.FormTextarea=XU,tr.FormTree=WU,tr.OrgPathSelector=Bie,tr.PaasCodeEditor=Nie,tr.PaasDate=wk,tr.PaasEditor=oX,tr.PaasForm=Vie,tr.PaasIcon=see,tr.PaasImageViewer=Iie,tr.PaasMdEditor=aee,tr.PaasMenu=xk,tr.PaasPageSelect=EU,tr.PaasPageTable=_U,tr.PaasQueryBar=lee,tr.PaasSelect=MU,tr.PaasTree=kU,tr.PaasTreePanel=oee,tr.PaasUpload=UU,tr.PaasUploadModal=zU,tr.default=ZEt,tr.widgets=qEt,Object.defineProperties(tr,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}})}));
|
package/package.json
CHANGED
|
@@ -122,7 +122,9 @@ export default {
|
|
|
122
122
|
|
|
123
123
|
// ==================== 判断叶子节点 ====================
|
|
124
124
|
isLeaf(level) {
|
|
125
|
-
|
|
125
|
+
// level 从 0 开始,maxLevel 是层级数
|
|
126
|
+
// 例如 user 类型: maxLevel=3, 叶子节点是 level=2 (用户层级)
|
|
127
|
+
return level === this.getMaxLevel() - 1
|
|
126
128
|
},
|
|
127
129
|
|
|
128
130
|
// ==================== normalize ====================
|
|
@@ -161,6 +163,9 @@ export default {
|
|
|
161
163
|
// ==================== 回显单个值 ====================
|
|
162
164
|
async loadPath() {
|
|
163
165
|
try {
|
|
166
|
+
// 标记为内部更新,避免触发 watch
|
|
167
|
+
this.isInternalUpdate = true;
|
|
168
|
+
|
|
164
169
|
const res = await this.$get('/system/organization/getOrgPathSelect', {
|
|
165
170
|
id: String(this.modelValue),
|
|
166
171
|
level: this.selectionType,
|
|
@@ -179,15 +184,23 @@ export default {
|
|
|
179
184
|
this.innerValue = this.extractPath(pathTree);
|
|
180
185
|
}
|
|
181
186
|
|
|
182
|
-
this.isOnlyPath = true
|
|
187
|
+
this.isOnlyPath = true;
|
|
188
|
+
|
|
189
|
+
// 使用 nextTick 确保 innerValue 更新完成后再重置标志
|
|
190
|
+
this.$nextTick(() => {
|
|
191
|
+
this.isInternalUpdate = false;
|
|
192
|
+
});
|
|
183
193
|
} catch (err) {
|
|
184
|
-
console.error('loadPath error:', err)
|
|
194
|
+
console.error('loadPath error:', err);
|
|
195
|
+
this.isInternalUpdate = false;
|
|
185
196
|
}
|
|
186
197
|
},
|
|
187
198
|
|
|
188
199
|
// ==================== 回显多个值 ====================
|
|
189
200
|
async loadMultiplePaths(values) {
|
|
190
201
|
try {
|
|
202
|
+
// 标记为内部更新,避免触发 watch
|
|
203
|
+
this.isInternalUpdate = true;
|
|
191
204
|
this.innerValue = [];
|
|
192
205
|
|
|
193
206
|
// 并行加载多个路径
|
|
@@ -217,8 +230,14 @@ export default {
|
|
|
217
230
|
});
|
|
218
231
|
|
|
219
232
|
this.isOnlyPath = true;
|
|
233
|
+
|
|
234
|
+
// 使用 nextTick 确保 innerValue 更新完成后再重置标志
|
|
235
|
+
this.$nextTick(() => {
|
|
236
|
+
this.isInternalUpdate = false;
|
|
237
|
+
});
|
|
220
238
|
} catch (err) {
|
|
221
239
|
console.error('loadMultiplePaths error:', err);
|
|
240
|
+
this.isInternalUpdate = false;
|
|
222
241
|
}
|
|
223
242
|
},
|
|
224
243
|
|
|
@@ -304,9 +323,26 @@ export default {
|
|
|
304
323
|
handleChange(paths, selectedOptions) {
|
|
305
324
|
let finalValue;
|
|
306
325
|
if (this.multiple) {
|
|
307
|
-
//
|
|
326
|
+
// 多选模式下,严格过滤掉非叶子节点的路径,只保留最后一级
|
|
308
327
|
if (Array.isArray(paths) && paths.length > 0) {
|
|
309
|
-
|
|
328
|
+
const maxLevel = this.getMaxLevel();
|
|
329
|
+
const leafPaths = [];
|
|
330
|
+
|
|
331
|
+
paths.forEach(path => {
|
|
332
|
+
// 严格检查:只保留路径长度等于 maxLevel 的路径(叶子节点)
|
|
333
|
+
// 例如 selectionType='user'(maxLevel=3),只有 path.length === 3 才是用户节点
|
|
334
|
+
if (path.length === maxLevel) {
|
|
335
|
+
leafPaths.push(path);
|
|
336
|
+
}
|
|
337
|
+
});
|
|
338
|
+
|
|
339
|
+
// 提取每个路径的最后一个值(叶子节点的值)
|
|
340
|
+
finalValue = leafPaths.map(path => path[path.length - 1]).join(',');
|
|
341
|
+
|
|
342
|
+
// 如果过滤后没有有效路径,返回空字符串
|
|
343
|
+
if (!finalValue) {
|
|
344
|
+
finalValue = '';
|
|
345
|
+
}
|
|
310
346
|
} else {
|
|
311
347
|
finalValue = '';
|
|
312
348
|
}
|