ss-component-new 1.1.365 → 1.1.367
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{array-BR1CuqH1.cjs → array-Cs_qeJ2m.cjs} +1 -1
- package/dist/{array-BMOcJLlQ.js → array-I0ed2wow.js} +2 -2
- package/dist/{cloneDeep-i93zuvZy.cjs → cloneDeep-CYcGhlzG.cjs} +1 -1
- package/dist/{cloneDeep-BIVk1Avp.js → cloneDeep-GOtDTHJH.js} +1 -1
- package/dist/{index-DGrvsPOn.js → index-8EjfXioS.js} +1 -1
- package/dist/{index-DkG-ziRw.cjs → index-8OLisgK0.cjs} +1 -1
- package/dist/{index-DVSMYX5e.js → index-B5VuM8l5.js} +8 -8
- package/dist/{index-BR4RIzFI.cjs → index-B7Wi5BZf.cjs} +1 -1
- package/dist/{index-B5sWzFXy.js → index-BCKmCfQY.js} +3 -3
- package/dist/{index-Bxdkas6q.cjs → index-BDDKdGJX.cjs} +1 -1
- package/dist/{index-D2WirvcT.js → index-BPWbJd07.js} +1 -1
- package/dist/{index-e6bojFY6.js → index-BTsOEEe8.js} +5 -5
- package/dist/{index-Do2_N1IZ.js → index-BUmHqNSQ.js} +5 -5
- package/dist/{index-D_mKafea.cjs → index-BVtKkvlP.cjs} +1 -1
- package/dist/{index-DgM9f4pH.js → index-BWLxiwts.js} +4 -4
- package/dist/{index-CIXaYro4.js → index-BpmoTHTK.js} +887 -886
- package/dist/{index-DVe1W-nQ.js → index-BqCSda61.js} +3 -3
- package/dist/{index-DeIxnrMK.js → index-Bt3Ruo-D.js} +4 -4
- package/dist/{index-D46GYCSK.cjs → index-BvA8vJuJ.cjs} +1 -1
- package/dist/{index-Bw-50_9N.cjs → index-Bwgh1tDh.cjs} +1 -1
- package/dist/{index-D-UqqKSL.cjs → index-C4arHEk-.cjs} +1 -1
- package/dist/{index-CosRm822.cjs → index-CDkcPYW6.cjs} +1 -1
- package/dist/{index-D1xMSVGc.cjs → index-CFOUGn9U.cjs} +1 -1
- package/dist/{index-Liysmasz.cjs → index-CKLAjhdz.cjs} +1 -1
- package/dist/{index-CXroj-hH.js → index-CUw8elUc.js} +3 -3
- package/dist/{index-BVt5BXIs.js → index-C_LjwD8t.js} +6 -6
- package/dist/{index-DpvXSrAU.js → index-CdOw3chz.js} +3 -3
- package/dist/index-CeWS20go.cjs +1 -0
- package/dist/{index-7ctK7qh8.js → index-CpCocC41.js} +1 -1
- package/dist/{index-BuFwRc5V.cjs → index-D6rdau3q.cjs} +1 -1
- package/dist/{index-7eQ2JKtq.cjs → index-D7RMQttr.cjs} +1 -1
- package/dist/{index-Drg-hTZ2.cjs → index-D9bPG3j0.cjs} +1 -1
- package/dist/{index-C-zpQcU-.js → index-DGFAibP8.js} +6 -6
- package/dist/{index-DeAeTFEl.cjs → index-DH0ET7m4.cjs} +1 -1
- package/dist/{index-BkVzKWBf.cjs → index-DPBA1Q25.cjs} +1 -1
- package/dist/{index-Cf4LaEvb.js → index-DPpVsGw9.js} +7 -7
- package/dist/{index-CLaegHPh.js → index-DRUsyai9.js} +5 -5
- package/dist/{index-DQS588Nv.js → index-DTxixBDx.js} +1 -1
- package/dist/{index-B6cdf15e.js → index-Dkb7lD6V.js} +8 -8
- package/dist/{index-DvJSn5c_.js → index-DmyMy020.js} +9 -9
- package/dist/{index-DDyeBnmq.cjs → index-DoPfcd5q.cjs} +1 -1
- package/dist/{index-B5LL1Rbm.cjs → index-Dqzy8-xb.cjs} +1 -1
- package/dist/{index-BNSImW55.js → index-NnlO4vSZ.js} +7 -7
- package/dist/{index-5H8g05lu.cjs → index-OCvy-QIo.cjs} +1 -1
- package/dist/{index-HbUM4Vgp.js → index-Od7_9YnM.js} +4 -4
- package/dist/{index-C8VFIq2w.js → index-PCCtRzDJ.js} +4 -4
- package/dist/{index-CFr2asVq.js → index-Qx0GuwHr.js} +1 -1
- package/dist/{index-CGav2orm.cjs → index-UKfyjk2G.cjs} +1 -1
- package/dist/{index-CXr-J9N3.js → index-Uzbrsz3o.js} +4 -4
- package/dist/{index-DCi5rJxX.js → index-c9nu1Oxk.js} +4 -4
- package/dist/{index-DgZJe2BL.js → index-d44crVNl.js} +6 -6
- package/dist/{index-DLy3AyLn.cjs → index-fULzuqL0.cjs} +1 -1
- package/dist/{index-CHqoZp_W.cjs → index-kxN4kJ1s.cjs} +1 -1
- package/dist/{index-ZErXROGI.cjs → index-mhef-1Zo.cjs} +1 -1
- package/dist/{index-D-6gB2O2.cjs → index-sRwTHKAL.cjs} +1 -1
- package/dist/{index-By9h_JX7.cjs → index-wAG1B1TR.cjs} +1 -1
- package/dist/{index-d_t0t8ds.cjs → index-xjuo15AK.cjs} +1 -1
- package/dist/{index-DfEwhscQ.cjs → index-zvArGV4H.cjs} +1 -1
- package/dist/{index.vue_vue_type_script_setup_true_lang-CurEafxj.cjs → index.vue_vue_type_script_setup_true_lang-CfJGn5rz.cjs} +1 -1
- package/dist/{index.vue_vue_type_script_setup_true_lang-DS1GFsZZ.js → index.vue_vue_type_script_setup_true_lang-D8xCoFmH.js} +1 -1
- package/dist/{index.vue_vue_type_style_index_0_scoped_14b5611b_lang-CXxX24vv.js → index.vue_vue_type_style_index_0_scoped_23015cb0_lang-DDredAHL.js} +13 -13
- package/dist/{index.vue_vue_type_style_index_0_scoped_14b5611b_lang-D0J4hoHm.cjs → index.vue_vue_type_style_index_0_scoped_23015cb0_lang-Db_d3OS1.cjs} +1 -1
- package/dist/{index.vue_vue_type_style_index_0_scoped_3a02a8a3_lang-B5SaBlFy.js → index.vue_vue_type_style_index_0_scoped_3a02a8a3_lang-Cs21Q0vD.js} +55 -39
- package/dist/index.vue_vue_type_style_index_0_scoped_3a02a8a3_lang-i5FsC2rm.cjs +1 -0
- package/dist/{login-CHBoEXBJ.cjs → login-CDUTeSY_.cjs} +1 -1
- package/dist/{login-Y1fP6Ekv.js → login-DMbjMzkS.js} +2 -2
- package/dist/{main-C84t8-AX.cjs → main-CRtBg87K.cjs} +1 -1
- package/dist/{main-BMNN7nF3.js → main-D2KxIY0t.js} +7 -7
- package/dist/{menu-CvfQY_jP.js → menu-D_3gHkG4.js} +1 -1
- package/dist/{menu-CVbEPCMJ.cjs → menu-Da5Ht5hG.cjs} +1 -1
- package/dist/ss-component.cjs +1 -1
- package/dist/ss-component.css +1 -1
- package/dist/ss-component.js +7 -7
- package/dist/ss-component3.cjs +1 -1
- package/dist/ss-component3.js +1 -1
- package/package.json +1 -1
- package/dist/index-C6kn9X1y.cjs +0 -1
- package/dist/index.vue_vue_type_style_index_0_scoped_3a02a8a3_lang-QAtWUHCn.cjs +0 -1
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { ref as n, watch as b } from "vue";
|
|
2
|
-
import { g as y, s as d } from "./menu-
|
|
3
|
-
import { s as g, h as m } from "./index-
|
|
4
|
-
import { u as D } from "./index-
|
|
2
|
+
import { g as y, s as d } from "./menu-D_3gHkG4.js";
|
|
3
|
+
import { s as g, h as m } from "./index-DGFAibP8.js";
|
|
4
|
+
import { u as D } from "./index-C_LjwD8t.js";
|
|
5
5
|
const f = D(), { itemData: i } = d(f), c = n(0), h = n([
|
|
6
6
|
{
|
|
7
7
|
label: "机构名称",
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { defineComponent as g, ref as C, onMounted as _, createElementBlock as v, openBlock as D, createVNode as h } from "vue";
|
|
2
|
-
import { p as c } from "./index-
|
|
3
|
-
import { c as k, e as K, d as I, u as x, s as M, g as S } from "./menu-
|
|
4
|
-
import { K as T } from "./index-
|
|
5
|
-
import { c as y } from "./cloneDeep-
|
|
2
|
+
import { p as c } from "./index-Qx0GuwHr.js";
|
|
3
|
+
import { c as k, e as K, d as I, u as x, s as M, g as S } from "./menu-D_3gHkG4.js";
|
|
4
|
+
import { K as T } from "./index-C_LjwD8t.js";
|
|
5
|
+
import { c as y } from "./cloneDeep-GOtDTHJH.js";
|
|
6
6
|
import { _ as E } from "./_plugin-vue_export-helper-CHgC5LLL.js";
|
|
7
7
|
const q = (a) => {
|
|
8
8
|
const s = {};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const o=require("vue"),_=require("./index-
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const o=require("vue"),_=require("./index-Bwgh1tDh.cjs"),u=require("./menu-Da5Ht5hG.cjs"),C=require("./index-zvArGV4H.cjs"),f=require("./cloneDeep-CYcGhlzG.cjs"),v=require("./_plugin-vue_export-helper-BHFhmbuH.cjs"),D=a=>{const s={};for(let l in a)l!=="id"&&(s[l]=a[l]);const r=s==null?void 0:s.主菜单名称;u.createInsofDataApi({key:{type:"mainEquip",systemKey:sessionStorage.getItem("systemKey"),pageKey:r},value:{tableData:s}})},h=a=>{u.deleteInsofDataApi({id:a==null?void 0:a.id})},q=a=>{const s={};for(let l in a)l!=="id"&&(s[l]=a[l]);const r=s==null?void 0:s.主菜单名称;u.updateInsofDataApi({id:a==null?void 0:a.id,key:{type:"mainEquip",systemKey:sessionStorage.getItem("systemKey"),pageKey:r},value:{tableData:s}})},k={class:"menu-content"},x=o.defineComponent({__name:"index",setup(a){const s=u.useMenuState(_.pinia),{menus:r}=u.storeToRefs(s),l=o.ref([]),g=async()=>{var m,n,p,t;const e=await u.getInsofDataApi({key:{type:"mainEquip",systemKey:sessionStorage.getItem("systemKey")}});if(((m=e==null?void 0:e.data)==null?void 0:m.type)==="success"){let d=(p=(n=e==null?void 0:e.data)==null?void 0:n.result)==null?void 0:p.map(i=>i);return d=(t=f.cloneDeep(d))==null?void 0:t.map(i=>{var b;const y=Object.values((b=i==null?void 0:i.value)==null?void 0:b.tableData);return y.unshift({id:i==null?void 0:i.id}),y}),d}else return[]};o.onMounted(async()=>{var p;const e=await g(),n=[{key:"header",contents:[{label:"主菜单名称",formType:"Select",options:(p=f.cloneDeep(r.value))==null?void 0:p.map(t=>({label:t==null?void 0:t.title,value:t==null?void 0:t.title})),prop:"主菜单名称"},{label:"隐藏三维显示",formType:"Switch",value:!1,prop:"隐藏三维显示"},{label:"操作"}]},{key:"extraButton",contents:[{label:"新增"}]},{key:"rowButton",contents:[{label:"查看"},{label:"编辑"},{label:"删除"}]}];n.push({key:"tableContents",contents:e}),l.value=n});const c=e=>{(e==null?void 0:e.buttonName)==="新增"?D(e==null?void 0:e.singleContent):(e==null?void 0:e.buttonName)==="删除"?h(e==null?void 0:e.singleContent):(e==null?void 0:e.buttonName)==="编辑"&&q(e==null?void 0:e.singleContent)};return(e,m)=>(o.openBlock(),o.createElementBlock("div",k,[o.createVNode(C.ssTable,{itemData:l.value,class:"table-content",onChange:c},null,8,["itemData"])]))}}),S=v._export_sfc(x,[["__scopeId","data-v-43191ad8"]]);exports.default=S;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";const w=require("./menu-
|
|
1
|
+
"use strict";const w=require("./menu-Da5Ht5hG.cjs"),O=/"(?:_|\\u0{2}5[Ff]){2}(?:p|\\u0{2}70)(?:r|\\u0{2}72)(?:o|\\u0{2}6[Ff])(?:t|\\u0{2}74)(?:o|\\u0{2}6[Ff])(?:_|\\u0{2}5[Ff]){2}"\s*:/,$=/"(?:c|\\u0063)(?:o|\\u006[Ff])(?:n|\\u006[Ee])(?:s|\\u0073)(?:t|\\u0074)(?:r|\\u0072)(?:u|\\u0075)(?:c|\\u0063)(?:t|\\u0074)(?:o|\\u006[Ff])(?:r|\\u0072)"\s*:/,E=/^\s*["[{]|^\s*-?\d{1,16}(\.\d{1,17})?([Ee][+-]?\d+)?\s*$/;function P(r,t){if(r==="__proto__"||r==="constructor"&&t&&typeof t=="object"&&"prototype"in t){h(r);return}return t}function h(r){console.warn(`[destr] Dropping "${r}" key to prevent prototype pollution.`)}function z(r,t={}){if(typeof r!="string")return r;if(r[0]==='"'&&r[r.length-1]==='"'&&r.indexOf("\\")===-1)return r.slice(1,-1);const e=r.trim();if(e.length<=9)switch(e.toLowerCase()){case"true":return!0;case"false":return!1;case"undefined":return;case"null":return null;case"nan":return Number.NaN;case"infinity":return Number.POSITIVE_INFINITY;case"-infinity":return Number.NEGATIVE_INFINITY}if(!E.test(r)){if(t.strict)throw new SyntaxError("[destr] Invalid JSON");return r}try{if(O.test(r)||$.test(r)){if(t.strict)throw new Error("[destr] Possible prototype pollution");return JSON.parse(r,P)}return JSON.parse(r)}catch(n){if(t.strict)throw n;return r}}function F(r,t){if(r==null)return;let e=r;for(let n=0;n<t.length;n++){if(e==null||e[t[n]]==null)return;e=e[t[n]]}return e}function d(r,t,e){if(e.length===0)return t;const n=e[0];return e.length>1&&(t=d(typeof r!="object"||r===null||!Object.prototype.hasOwnProperty.call(r,n)?Number.isInteger(Number(e[1]))?[]:{}:r[n],t,Array.prototype.slice.call(e,1))),Number.isInteger(Number(n))&&Array.isArray(r)?r.slice()[n]:Object.assign({},r,{[n]:t})}function N(r,t){if(r==null||t.length===0)return r;if(t.length===1){if(r==null)return r;if(Number.isInteger(t[0])&&Array.isArray(r))return Array.prototype.slice.call(r,0).splice(t[0],1);const e={};for(const n in r)e[n]=r[n];return delete e[t[0]],e}if(r[t[0]]==null){if(Number.isInteger(t[0])&&Array.isArray(r))return Array.prototype.concat.call([],r);const e={};for(const n in r)e[n]=r[n];return e}return d(r,N(r[t[0]],Array.prototype.slice.call(t,1)),[t[0]])}function I(r,t){return t.map(e=>e.split(".")).map(e=>[e,F(r,e)]).filter(e=>e[1]!==void 0).reduce((e,n)=>d(e,n[1],n[0]),{})}function S(r,t){return t.map(e=>e.split(".")).reduce((e,n)=>N(e,n),r)}function g(r,{storage:t,serializer:e,key:n,debug:s,pick:u,omit:f,beforeHydrate:c,afterHydrate:i},o,l=!0){try{l&&(c==null||c(o));const a=t.getItem(n);if(a){const p=e.deserialize(a),y=u?I(p,u):p,A=f?S(y,f):y;r.$patch(A)}l&&(i==null||i(o))}catch(a){s&&console.error("[pinia-plugin-persistedstate]",a)}}function m(r,{storage:t,serializer:e,key:n,debug:s,pick:u,omit:f}){try{const c=u?I(r,u):r,i=f?S(c,f):c,o=e.serialize(i);t.setItem(n,o)}catch(c){s&&console.error("[pinia-plugin-persistedstate]",c)}}function k(r,t,e){const{pinia:n,store:s,options:{persist:u=e}}=r;if(!u)return;if(!(s.$id in n.state.value)){const i=n._s.get(s.$id.replace("__hot:",""));i&&Promise.resolve().then(()=>i.$persist());return}const c=(Array.isArray(u)?u:u===!0?[{}]:[u]).map(t);s.$hydrate=({runHooks:i=!0}={})=>{c.forEach(o=>{g(s,o,r,i)})},s.$persist=()=>{c.forEach(i=>{m(s.$state,i)})},c.forEach(i=>{g(s,i,r),s.$subscribe((o,l)=>m(l,i),{detached:!0})})}function J(r={}){return function(t){k(t,e=>({key:(r.key?r.key:n=>n)(e.key??t.store.$id),debug:e.debug??r.debug??!1,serializer:e.serializer??r.serializer??{serialize:n=>JSON.stringify(n),deserialize:n=>z(n)},storage:e.storage??r.storage??window.localStorage,beforeHydrate:e.beforeHydrate,afterHydrate:e.afterHydrate,pick:e.pick,omit:e.omit}),r.auto??!1)}}var T=J();const _=w.createPinia();_.use(T);exports.pinia=_;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";const s=require("./menu-
|
|
1
|
+
"use strict";const s=require("./menu-Da5Ht5hG.cjs"),x=require("./index-Bwgh1tDh.cjs"),q=require("./login-CDUTeSY_.cjs"),I=require("vue"),w=s.useMenuState(x.pinia),v=q.useLoginState(x.pinia),D=I.ref(!1),E=I.ref(!1),P=async()=>{const K=s.getInsofDataApi({key:{systemKey:sessionStorage.getItem("systemKey"),pageKey:"menu"}}),M=s.getInsofDataApi({key:{systemKey:sessionStorage.getItem("systemKey"),type:"structure"}});return await Promise.all([K,M]).then(a=>{var r,u,n,o,i,l,c,g,y,d,S,f,m,p;const t=a==null?void 0:a[0],e=a==null?void 0:a[1];if(t.data.code===200){const h=(c=(l=(i=(o=(n=(u=(r=t==null?void 0:t.data)==null?void 0:r.result)==null?void 0:u[0])==null?void 0:n.value)==null?void 0:o.pageData)==null?void 0:i.compData)==null?void 0:l[0])==null?void 0:c.contents;w.setRawMenus(h??[]),D.value=((g=t==null?void 0:t.data)==null?void 0:g.result)&&((d=(y=t==null?void 0:t.data)==null?void 0:y.result)==null?void 0:d.length)>0}else s.ElMessage.error("获取模型菜单响应失败");e.data.code===200?e.data.result&&((S=e.data.result)==null?void 0:S.length)>0&&(v.setStructureData(e.data.result),v.setIsStructureExist(!0),E.value=((f=e==null?void 0:e.data)==null?void 0:f.result)&&((p=(m=e==null?void 0:e.data)==null?void 0:m.result)==null?void 0:p.length)>0):s.ElMessage.error("获取模型结构响应失败")}),{menuExist:D.value,structureExist:E.value}};exports.verifyStructureDataToStore=P;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const o=require("vue"),i=require("./menu-
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const o=require("vue"),i=require("./menu-Da5Ht5hG.cjs"),w=require("./index-zvArGV4H.cjs"),C=require("./index-Bwgh1tDh.cjs"),K=require("./index-sRwTHKAL.cjs"),R=require("./login-CDUTeSY_.cjs"),_=require("./cloneDeep-CYcGhlzG.cjs"),N=require("./index-B7Wi5BZf.cjs"),q=require("./_plugin-vue_export-helper-BHFhmbuH.cjs"),S=w.useModelComp(C.pinia),I=w.useUnit(C.pinia),v=i.useMenuState(C.pinia),{menus:x,configMenu:h,activeMenuPath:D,cacheStructures:A}=i.storeToRefs(v),O=o.computed(()=>{var t,e;return[{key:"extraButton",contents:[]},{key:"rowButton",contents:[{label:"修改"}]},{key:"header",contents:[{label:"菜单名称",prop:"title",isFormColHidden:!1},{label:"菜单类型",prop:"menuType",formType:"select",options:[{label:"系统菜单",value:"集团"},{label:"公司",value:"公司"}],isTableColHidden:!1,isFormColHidden:!0},{label:"操作"}]},{key:"tableContents",contents:(e=(t=_.cloneDeep(x.value))==null?void 0:t.map(a=>({...a,menuType:"系统菜单"})))==null?void 0:e.filter(a=>a.title!=="系统管理"&&a.title!=="平台管理")}]}),m=o.ref([]),T=o.ref([{label:"新建"}]),H=o.computed(()=>[{key:"extraButton",contents:T.value},{key:"rowButton",contents:[{label:"修改"},{label:"删除"}]},{key:"header",contents:[{label:"操作类型",prop:"operateType",formType:"select",options:[{label:"新增",value:"新增"},{label:"编辑",value:"编辑"},{label:"删除",value:"删除"}],value:""},{label:"操作图标",prop:"operateIcon",formType:"inputPopover",value:""},{label:"图标触发事件",prop:"trigger",formType:"select",options:[{label:"弹出弹窗",value:"openDialog"}],value:"openDialog"},{label:"配置一:",prop:"dialogConfig",formType:"button",value:"弹窗内容",isTableColHidden:!0},{label:"配置二:",prop:"contentConfig",formType:"button",value:"模块内容",isTableColHidden:!0},{label:"操作"}]},{key:"tableContents",contents:m.value}]),F=o.ref([]),f=o.ref({}),$=o.ref({}),j=o.ref([{label:"菜单",prop:"path",isFormColHidden:!0,value:""},{label:"菜单图标:",prop:"menuIcon",type:"inputPopover",value:""},{label:"操作类型:",prop:"operateType",type:"select",contents:[{label:"新增",value:"新增"},{label:"编辑",value:"编辑"},{label:"删除",value:"删除"}],value:""},{label:"操作图标:",prop:"operateIcon",type:"inputPopover",value:""},{label:"图标触发事件:",prop:"trigger",type:"select",contents:[{label:"弹出弹窗",value:"openDialog"}],value:"openDialog"},{label:"配置一:",prop:"dialogConfig",type:"button",value:"弹窗结构"},{label:"配置二:",prop:"contentConfig",type:"button",value:"生成模块结构"}]),E=t=>{var e;F.value=(e=j.value)==null?void 0:e.map(a=>a.prop==="menu"?{...a,value:t==null?void 0:t[a==null?void 0:a.prop]}:a.prop==="dialogConfig"||a.prop==="contentConfig"||a.prop==="trigger"?a:{...a,value:t==null?void 0:t[a==null?void 0:a.prop]})},z=o.ref([{label:"查询"},{label:"重置"}]),U=async()=>{},B=t=>t.map(e=>e.childMenus&&e.childMenus.length>0?{...e,value:e==null?void 0:e.title,label:e==null?void 0:e.title,children:B(e.childMenus)}:{...e,value:e==null?void 0:e.title,label:e==null?void 0:e.title}),b=o.reactive({show:!1,title:"菜单配置",width:"30%"}),M=o.ref([]),g=o.ref({}),p=o.ref(null),P=o.computed(()=>{var t;return(t=B(x.value))==null?void 0:t.filter(e=>e.title!=="系统管理"&&e.title!=="平台管理")}),W=async t=>{var e;p.value={...t,rootNode:R.findRootNodeByPath(P.value,t.path)},(t==null?void 0:t.level)===0?T.value.splice(0):(T.value=[{label:"新建"}],M.value=(e=t==null?void 0:t.path)==null?void 0:e.split("/")),await v.setConfigMenu(null),k(t)},y=o.ref(""),G=async(t,e)=>{var a,l;if(!p.value)return i.ElMessage.warning("请先选择菜单");if(y.value=t,M.value=[],S.setSubmitCurStructure(!1),I.setSelectTitle([]),await v.setConfigMenu(null),g.value=_.cloneDeep(e),t!=="删除"){switch(t){case"新建":break;case"修改":console.log("修改",t,g.value),E(g.value),await v.setConfigMenu(g.value);break}await o.nextTick(),b.title=`【${t==="新建"?(a=p.value)==null?void 0:a.path:(l=g.value)==null?void 0:l.path}】菜单配置`,b.show=!0}else await V(g.value,t)},J=async t=>{var e;f.value=t,await v.setConfigMenu({...f.value,path:(e=p.value)==null?void 0:e.path})},L=o.ref(null),Q=async t=>{var l,r,s,n,u;v.setButtonTriggerType(t==="弹窗结构"?"dialogConfig":"contentConfig");let e;(l=f.value)!=null&&l.subMenus&&((r=f.value)==null?void 0:r.subMenus.length)>0&&(e=(s=M.value)==null?void 0:s.map(c=>({value:c})),e.unshift({value:(n=g.value)==null?void 0:n.title}));let a;y.value==="新建"?a={...f.value,path:(u=p.value)==null?void 0:u.path}:y.value==="修改"&&(a=h.value),await v.setConfigMenu(a),I.setSelectTitle(e),S.setIsEdit("edit")},k=async t=>{var a,l,r,s,n,u;const e=await i.getInsofDataApi({key:{type:"menuConfigData",systemKey:sessionStorage.getItem("systemKey"),pageKey:D.value+"/"+(t==null?void 0:t.path),tableId:""}});((a=e==null?void 0:e.data)==null?void 0:a.code)===200&&(l=e.data)!=null&&l.result&&(m.value=((s=(r=e.data)==null?void 0:r.result)==null?void 0:s.length)>0?(u=(n=e.data)==null?void 0:n.result)==null?void 0:u.map(c=>{var d;return{id:c==null?void 0:c.id,...(d=c==null?void 0:c.value)==null?void 0:d.tableData}}):[])},X=async(t,e,a="contentConfig")=>{var l,r,s,n;try{let u,c;e==="create"&&(u={key:{systemKey:sessionStorage.getItem("systemKey"),pageKey:(l=p.value)==null?void 0:l.path,type:"structure",rootNodePath:(s=(r=p.value)==null?void 0:r.rootNode)==null?void 0:s.path,structureBelong:a,parentTable:"",version:1},value:{pageData:t}},c=i.createInsofDataApi);const d=await c(u);if(((n=d==null?void 0:d.data)==null?void 0:n.code)===200)return d.data.result;throw i.ElMessage.error("保存响应失败"),new Error("保存响应失败")}catch{i.ElMessage.error("保存响应失败")}},Y=async(t,e)=>{let a=[];t==null||t.forEach(l=>{var r;(r=l==null?void 0:l.data)==null||r.forEach(s=>{var n,u;s&&a.push(X({menuConfig:h.value,structure:s,rootNodePath:(u=(n=p.value)==null?void 0:n.rootNode)==null?void 0:u.path},"create",l==null?void 0:l.key))})}),await Promise.all(a).then(l=>{const r=l==null?void 0:l.every(s=>s);console.log("Promise:",l,r),r&&V({...e,structureIds:l},y.value)}).catch(l=>{i.ElMessage.error(l)})},V=async(t,e)=>{var r,s;let a,l;e==="新增"||e==="新建"?(a={key:{type:"menuConfigData",systemKey:sessionStorage.getItem("systemKey"),pageKey:D.value+"/"+((r=p.value)==null?void 0:r.path),tableId:""},value:{tableData:t}},l=i.createInsofDataApi):e==="编辑"||e==="修改"?(console.log(890,t),a={id:t==null?void 0:t.id,key:{type:"menuConfigData",systemKey:sessionStorage.getItem("systemKey"),pageKey:D.value+"/"+((s=p.value)==null?void 0:s.path),tableId:""},value:{tableData:t}},l=i.updateInsofDataApi):e==="删除"&&(a={ids:[t.id,...t==null?void 0:t.structureIds]},l=i.batchDeleteInsofDataApi),K.handleSubmitAsync(l,a,e).then(n=>{(e==="新增"||e==="新建")&&m.value.push({...t,id:n}),e&&n&&i.ElMessage.success(e+"成功"),k(p.value)})},Z=async()=>{var a,l,r,s,n;const t=_.cloneDeep(A.value);console.log("clickSubmitForm",h.value,t),await o.nextTick();const e=y.value==="新建"?{...h.value,rootNodePath:(l=(a=p.value)==null?void 0:a.rootNode)==null?void 0:l.path}:{...h.value,rootNodePath:(s=(r=p.value)==null?void 0:r.rootNode)==null?void 0:s.path,id:(n=g.value)==null?void 0:n.id};await Y(t,e),f.value={},b.show=!1,v.setCacheStructures([]),await k(p.value)},ee=()=>{b.show=!1},te=Object.freeze(Object.defineProperty({__proto__:null,beforeDialogDestroy:ee,buttonValue:z,changeTrigger:J,changedRow:$,clickNodeTrigger:W,clickRowButton:G,clickSubmitForm:Z,clickTrigger:Q,dialogInfo:b,formatFormData:E,getTableDataAsync:k,handleItemDataChange:U,inputForm:f,menuPageData:H,operatingForm:L,pageData:O,renderFormData:F,treeData:P},Symbol.toStringTag,{value:"Module"})),ae={class:"menu-module"},oe={class:"tree-wrap"},le={class:"table-wrap"},ne={class:"module-dialog-default"},re=o.defineComponent({__name:"index",setup(t){const e=o.reactive({...te}),a=o.ref(null),l=i.useMenuState(C.pinia),{configMenu:r}=i.storeToRefs(l);return o.onMounted(()=>{e.formatFormData(r.value),o.nextTick(()=>{var s,n;(n=a.value)==null||n.setCurrentKey((s=r.value)==null?void 0:s.path)})}),(s,n)=>{const u=o.resolveComponent("el-tree"),c=o.resolveComponent("el-button");return o.openBlock(),o.createElementBlock("div",ae,[o.createElementVNode("div",oe,[o.createVNode(u,{ref_key:"treeRef",ref:a,data:e.treeData,"expand-on-click-node":!1,"node-key":"path",props:{children:"children",label:"label",path:"path"},"highlight-current":"","default-expand-all":"","check-on-click-leaf":!1,"check-strictly":"",onNodeClick:e.clickNodeTrigger},null,8,["data","onNodeClick"])]),o.createElementVNode("div",le,[o.createVNode(w.ssTable,{itemData:e.menuPageData,changedContent:e.changedRow,operatingForm:e.operatingForm,onOnFormChange:e.changeTrigger,onChange:e.handleItemDataChange,onClickTrigger:e.clickTrigger,onOnButtonClick:e.clickRowButton},null,8,["itemData","changedContent","operatingForm","onOnFormChange","onChange","onClickTrigger","onOnButtonClick"])]),o.createVNode(N.ssDialog,{class:"module-dialog",title:e.dialogInfo.title,visible:e.dialogInfo.show,width:e.dialogInfo.width,onBeforeDestroy:e.beforeDialogDestroy},{default:o.withCtx(()=>[o.createElementVNode("div",ne,[o.createVNode(N.ssForm,{rowContents:e.renderFormData,isEnableWrap:!1,isEdit:!0,onChange:e.changeTrigger,onClickTrigger:e.clickTrigger},null,8,["rowContents","onChange","onClickTrigger"])])]),footer:o.withCtx(()=>[o.createElementVNode("div",null,[o.createVNode(c,{onClick:e.beforeDialogDestroy},{default:o.withCtx(()=>n[0]||(n[0]=[o.createTextVNode("取消")])),_:1,__:[0]},8,["onClick"]),o.createVNode(c,{type:"primary",onClick:e.clickSubmitForm},{default:o.withCtx(()=>n[1]||(n[1]=[o.createTextVNode(" 确认 ")])),_:1,__:[1]},8,["onClick"])])]),_:1},8,["title","visible","width","onBeforeDestroy"])])}}}),se=q._export_sfc(re,[["__scopeId","data-v-623990e0"]]);exports.default=se;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";const e=require("vue"),B=require("./index-
|
|
1
|
+
"use strict";const e=require("vue"),B=require("./index-BDDKdGJX.cjs"),y=require("./index-Bwgh1tDh.cjs"),V=require("./index-zvArGV4H.cjs"),g=require("./menu-Da5Ht5hG.cjs");require("./array-Cs_qeJ2m.cjs");const E=require("./_plugin-vue_export-helper-BHFhmbuH.cjs"),v=require("./cloneDeep-CYcGhlzG.cjs"),O=require("./index-C31XRLFj.cjs"),R=require("./index-B7Wi5BZf.cjs"),b=require("./index-D6rdau3q.cjs"),L={class:"type-select"},U=["onClick"],z={class:"list-icon"},H={__name:"index",setup(N){const m=V.useModelComp(y.pinia),{itemData:i}=g.storeToRefs(m),C=_=>{const d=v.cloneDeep(i.value);d.push({comp:_.comp,name:_.name,compData:[]}),m.setItemData(d)};return(_,d)=>{const s=e.resolveComponent("svg-icon");return e.openBlock(),e.createElementBlock("div",L,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(e.unref(B.slotContent),(f,u)=>(e.openBlock(),e.createElementBlock("div",{class:"type-list",key:u},[e.createElementVNode("div",{class:"list-content",onClick:k=>C(f)},[e.createElementVNode("div",z,[e.createVNode(s,{name:f.icon},null,8,["name"])]),e.createElementVNode("div",null,e.toDisplayString(f.name),1)],8,U)]))),128))])}}},j=E._export_sfc(H,[["__scopeId","data-v-1f87163f"]]),A={class:"fill-content"},G={class:"operate-content"},J={class:"collapse-title-content"},K={class:"collapse-title-item"},P={key:1},Q=["onClick"],W={class:"icon-content"},X={key:0,class:"edit-content"},Y=["onClick"],Z={class:"comp-child"},ee={__name:"index",setup(N){const m=V.useModelComp(y.pinia),{itemData:i,originalData:C}=g.storeToRefs(m),_=e.ref([]);e.ref([]);const d=e.ref([]),s=e.ref([]),f=a=>{var n;let c=(n=v.cloneDeep(s.value))==null?void 0:n.map((t,o)=>(a===o&&(t.content=!0),t));s.value=c},u=a=>{var n;let c=(n=v.cloneDeep(s.value))==null?void 0:n.map((t,o)=>(a===o&&(t.content=!1),t));s.value=c,_.value=v.cloneDeep(i.value)},k=(a,c)=>{var h;let n=(h=v.cloneDeep(s.value))==null?void 0:h.map((l,p)=>(a===p&&(l.content=!1),l));s.value=n;const t=v.cloneDeep(i.value),o=t==null?void 0:t.filter((l,p)=>(p===a&&(l.name=c),l));m.setOriginalData(o),m.setItemData(o)};e.watch(()=>i.value,()=>{var a,c,n;!i.value||((a=i.value)==null?void 0:a.length)===0?_.value=[]:_.value=(c=v.cloneDeep(i.value))==null?void 0:c.filter(t=>(t==null?void 0:t.comp)!=="methodButton"),d.value=_.value,s.value=(n=v.cloneDeep(d.value))==null?void 0:n.map((t,o)=>({id:o,content:!1}))},{deep:!0,immediate:!0});const M=a=>B.getComponent(a),T=(a,c,n)=>{var o,h;if(!a)return;let t=v.cloneDeep(i.value);t=(o=t==null?void 0:t.map((l,p)=>(p===n&&(l.compData=a),l)))==null?void 0:o.filter(l=>(l==null?void 0:l.comp)!=="methodButton"),s.value=(h=v.cloneDeep(t))==null?void 0:h.map((l,p)=>({id:p,content:!1})),m.setOriginalData(t),m.setItemData(t)},F=a=>{b.ElMessageBox.confirm("是否确认要删除","",{confirmButtonText:"确认",cancelButtonText:"取消",type:"warning"}).then(()=>{const c=v.cloneDeep(i.value),n=c==null?void 0:c.filter((t,o)=>o!==a);m.setOriginalData(n),m.setItemData(n),g.ElMessage({type:"success",message:"删除成功"})}).catch(()=>{})};return(a,c)=>{const n=e.resolveComponent("svg-icon");return e.openBlock(),e.createElementBlock("div",A,[c[1]||(c[1]=e.createElementVNode("div",{class:"fill-operate"},e.toDisplayString("操作栏"),-1)),e.createElementVNode("div",G,[e.createVNode(O.default,{class:"collapse-content",collapseContents:_.value},{title:e.withCtx(({item:t,index:o})=>{var h,l,p,D,x,w,$,I,q,S;return[e.createElementVNode("div",J,[e.createElementVNode("div",K,[(l=(h=s.value)==null?void 0:h.find(r=>r.id===o))!=null&&l.content?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("div",{key:0,class:"collapse-title",style:e.normalizeStyle({marginRight:t.name&&t.name!==""?"8px":"0px"})},e.toDisplayString(t.name),5)),(D=(p=s.value)==null?void 0:p.find(r=>r.id===o))!=null&&D.content?(e.openBlock(),e.createElementBlock("div",P,[e.createVNode(R._sfc_main$1,{modelValue:t.name,"onUpdate:modelValue":r=>t.name=r,onClick:c[0]||(c[0]=e.withModifiers(()=>{},["stop"]))},null,8,["modelValue","onUpdate:modelValue"])])):e.createCommentVNode("",!0),(w=(x=s.value)==null?void 0:x.find(r=>r.id===o))!=null&&w.content?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("div",{key:2,onClick:e.withModifiers(r=>f(o),["stop"]),class:"icon-content"},[e.createVNode(n,{name:"Edit",style:{width:"16px",height:"16px"}})],8,Q))]),e.createElementVNode("div",W,[(I=($=s.value)==null?void 0:$.find(r=>r.id===o))!=null&&I.content?(e.openBlock(),e.createElementBlock("div",X,[e.createVNode(n,{name:"Cancel",style:{width:"16px",height:"16px"},class:"icon-content",onClick:e.withModifiers(r=>u(o),["stop"])},null,8,["onClick"]),e.createVNode(n,{name:"Save",onClick:e.withModifiers(r=>k(o,t.name),["stop"]),style:{width:"16px",height:"16px",fill:"var(--ssComponent-primary-color)"},class:"icon-content"},null,8,["onClick"])])):e.createCommentVNode("",!0),(S=(q=s.value)==null?void 0:q.find(r=>r.id===o))!=null&&S.content?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("div",{key:1,onClick:e.withModifiers(r=>F(o),["stop"]),class:"icon-content"},[e.createVNode(n,{name:"Delete",style:{width:"16px",height:"16px"}})],8,Y))])])]}),content:e.withCtx(({item:t,index:o})=>{var h,l;return[e.createElementVNode("div",Z,[(e.openBlock(),e.createBlock(e.resolveDynamicComponent(M(t.comp+"Operate")),{itemContents:t==null?void 0:t.compData,originalItemContents:(l=(h=d.value)==null?void 0:h.find((p,D)=>D===o))==null?void 0:l.compData,onChange:p=>T(p,t,o)},null,40,["itemContents","originalItemContents","onChange"]))])]}),_:1},8,["collapseContents"])])])}}},te=E._export_sfc(ee,[["__scopeId","data-v-27bd1564"]]),oe={key:0,class:"show-content"},ne={style:{display:"flex"}},le={__name:"index",setup(N){const m=V.useModelComp(y.pinia),{itemData:i}=g.storeToRefs(m),C=e.ref([]);e.watch(()=>i.value,()=>{var d;!i.value||((d=i.value)==null?void 0:d.length)===0?C.value=[]:C.value=v.cloneDeep(i.value)},{deep:!0,immediate:!0});const _=d=>B.getComponent(d);return(d,s)=>{var f;return((f=C.value)==null?void 0:f.length)>0?(e.openBlock(),e.createElementBlock("div",oe,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(C.value,(u,k)=>(e.openBlock(),e.createElementBlock("div",{class:"item-content",key:k},[e.createElementVNode("div",ne,e.toDisplayString(u.name),1),(e.openBlock(),e.createBlock(e.resolveDynamicComponent(_(u.comp)),{itemData:u==null?void 0:u.compData,childItemData:u==null?void 0:u.itemChildData,key:k},null,8,["itemData","childItemData"]))]))),128))])):e.createCommentVNode("",!0)}}},ce=E._export_sfc(le,[["__scopeId","data-v-bfa22d29"]]);exports.modelFill=te;exports.modelSelect=j;exports.modelShow=ce;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";const c=require("vue"),r=require("./menu-
|
|
1
|
+
"use strict";const c=require("vue"),r=require("./menu-Da5Ht5hG.cjs"),F=require("./login-CDUTeSY_.cjs"),q=require("./index-zvArGV4H.cjs"),D=require("./cloneDeep-CYcGhlzG.cjs"),z=r.useMenuState(),{activeMenuPath:b}=r.storeToRefs(z),w=F.useLoginState(),{structureData:O}=r.storeToRefs(w),_=q.useModelComp(),{itemData:j}=r.storeToRefs(_),H=c.ref([{label:"角色名称",value:"",name:"roleName"}]),L=c.ref([{label:"查询"},{label:"重置"}]),S=c.reactive({isFilter:!1,filterForm:{}}),Q=c.ref(!1),U=a=>{console.log("handleQueryChange",a),S.isFilter=!0,S.filterForm=a},f=c.ref([{key:"extraButton",contents:[{label:"新增"}]},{key:"rowButton",contents:[{label:"授权",textColor:"blue"},{label:"编辑"},{label:"删除",textColor:"red"}]},{key:"header",contents:[{label:"角色名称",prop:"roleName"},{label:"角色状态",formType:"Radio",prop:"roleStatus",options:[{label:"启用",value:"启用"},{label:"禁用",value:"禁用"}]},{label:"角色排序",prop:"roleOrder",formType:"Number"},{label:"备注",prop:"remark",formType:"TextArea"},{label:"权限",prop:"roleAuthority",isTableColHidden:!0,isFormColHidden:!0},{label:"操作"}]},{key:"tableContents",contents:[]}]),V=c.computed(()=>f.value),$=a=>{m(a.singleContent,a.buttonName)},B=c.ref({}),k=c.ref(),g=async(a,e,l)=>{var t,n;try{const s=await a(e);return((t=s==null?void 0:s.data)==null?void 0:t.code)===200?(l!=="查询"&&await w.setLogRecordAsync({type:l,data:e},b.value),s.data.result||((n=s==null?void 0:s.data)==null?void 0:n.code)===200):null}catch(s){r.ElMessage.error(s)}},I=(a,e)=>{e==null||e.forEach(l=>{a==null||a.forEach(t=>{var n;t.path==l.path&&(t.checkedButtons=l.checkedButtons),t.children&&((n=t.children)==null?void 0:n.length)>0&&I(t.children,e)})})},T=a=>a==null?void 0:a.map(e=>{var t;const l={...e,checkedButtons:[]};return l.children&&((t=l.children)==null?void 0:t.length)>0&&(l.children=T(l.children)),l}),G=async(a,e)=>{switch(B.value=D.cloneDeep(e),a){case"授权":u.title=`【${e.roleName}】授权`,u.show=!0,await c.nextTick(),e.roleAuthority&&Array.isArray(e.roleAuthority)&&I(p.value,e.roleAuthority);break}},J=()=>{u.show=!1},d=c.ref(),W=async a=>{const e=await g(r.getInsofDataApi,{key:{systemKey:sessionStorage.getItem("systemKey"),type:"data",pageKey:a}},"查询"),l=e==null?void 0:e.map(t=>{var n;return{id:t.id,tableData:(n=t==null?void 0:t.value)==null?void 0:n.tableData}});return l==null?void 0:l.map(t=>{var n;if(Array.isArray(t==null?void 0:t.tableData)){let s={id:t.id};return(n=t==null?void 0:t.tableData)==null||n.forEach((o,y)=>{s[`a${y}`]=o}),s}else return{...t.tableData,id:t.id}})},m=(a,e)=>{const l=D.cloneDeep(a);l!=null&&l.id&&delete l.id,e==="新增"?g(r.createInsofDataApi,{key:{type:"data",systemKey:sessionStorage.getItem("systemKey"),pageKey:b.value,tableId:v.value},value:{tableData:l}},e).then(t=>{d.value={...a,newId:t},e&&t&&r.ElMessage.success(e+"成功")}):e==="编辑"?(console.log("编辑角色",l),g(r.updateInsofDataApi,{id:a.id,key:{type:"data",systemKey:sessionStorage.getItem("systemKey"),pageKey:b.value,tableId:v.value},value:{tableData:l}},e).then(t=>{e&&t&&r.ElMessage.success(e+"成功"),u.show=!1})):e==="删除"&&g(r.deleteInsofDataApi,{id:a.id},e).then(t=>{e&&t&&r.ElMessage.success(e+"成功")})},K=a=>{let e=[];return a==null||a.forEach(l=>{var t;if(l.checkedButtons&&((t=l.checkedButtons)==null?void 0:t.length)>0){const n={path:l.path,checkedButtons:l.checkedButtons};e=e.concat(n)}l.children&&(e=e.concat(K(l.children)))}),e},X=()=>{d.value={...B.value,roleAuthority:K(p.value)},c.nextTick(()=>{console.log("clickSubmitAuthority",d.value,f.value),m(d.value,"编辑")})},u=c.reactive({show:!1,title:"角色授权",width:"35%",draggable:!0}),Y=({isPenultimate:a},e)=>{var l,t;return console.log("isPenultimate",a,e),((t=(l=e==null?void 0:e.data)==null?void 0:l.renderButtons)==null?void 0:t.length)>0?"is-penultimate":""},v=c.ref(0),M=async()=>{var l,t,n,s,o;let a;const e=await r.getInsofDataApi({key:{systemKey:sessionStorage.getItem("systemKey"),type:"structure",pageKey:b.value}});return((l=e==null?void 0:e.data)==null?void 0:l.code)===200&&(t=e==null?void 0:e.data)!=null&&t.result&&((n=e==null?void 0:e.data)==null?void 0:n.result.length)>0&&(a=(o=(s=e==null?void 0:e.data.result)==null?void 0:s[0])==null?void 0:o.id),a},p=c.ref([]),Z=c.ref([{path:"资源管理",buttons:["查询","新增","编辑","删除"]},{path:"资源管理/人员",buttons:["查询","新增","编辑","删除"]}]),ee=(a,e)=>{var l;a.checkedButtons=e?(l=a.renderButtons)==null?void 0:l.map(t=>t.path):[],console.log("handleNodeCheckChange",a,e)},h=c.ref([]),te=(a,e)=>{var l,t,n;e.checkedButtons=a,((l=e.checkedButtons)==null?void 0:l.length)===((t=e.renderButtons)==null?void 0:t.length)?h.value.push(e.path):(a==null?void 0:a.length)===0&&(h.value=(n=h.value)==null?void 0:n.filter(s=>s!==e.path))};c.watch(()=>h.value.length,()=>{var e,l;const a=(e=k.value)==null?void 0:e.getCheckedKeys();console.log(112,h.value,a),(l=k.value)==null||l.setCheckedKeys([...h.value])});c.watch(()=>u.show,a=>{a||(p.value=T(p.value))});const P=c.computed(()=>{var l;const a=(l=D.cloneDeep(O.value))==null?void 0:l.filter(t=>{var n,s;return((s=(n=t==null?void 0:t.key)==null?void 0:n.pageKey)==null?void 0:s.toUpperCase())!=="MENU"});return[...a==null?void 0:a.map(t=>{var o,y,A,C;const n=/button/i;let s=(A=(y=(o=t==null?void 0:t.value)==null?void 0:o.pageData)==null?void 0:y.compData)==null?void 0:A.filter(i=>n.test(i==null?void 0:i.key));return s=Array.from(new Set(s==null?void 0:s.flatMap(i=>i.contents.map(R=>R.label)))),{path:(C=t==null?void 0:t.key)==null?void 0:C.pageKey,buttons:s}}),...x.value]}),x=c.ref([]),E=(a,e)=>{if(Array.isArray(a))return a==null?void 0:a.map(l=>{var n,s;const t=e==null?void 0:e.find(o=>(o==null?void 0:o.path)===(l==null?void 0:l.path));return l.children&&l.children.length>0?{...l,renderButtons:l.carryData?(n=t==null?void 0:t.buttons)==null?void 0:n.map(o=>({title:o,path:l.path+"/"+o})):[],checkedButtons:[],children:E(l.children,P.value)}:{...l,renderButtons:l.carryData?(s=t==null?void 0:t.buttons)==null?void 0:s.map(o=>({title:o,path:l.path+"/"+o})):[],checkedButtons:[]}})},N={comp:"Group",name:"/系统管理/角色管理",compData:[{key:"groupContents",contents:[{comp:"Table",compData:f.value,name:""}]}]};c.watch(()=>j.value,a=>{var e;a&&(a==null?void 0:a.length)>0&&(f.value=(e=a==null?void 0:a[0])==null?void 0:e.compData)});const ae=Object.freeze(Object.defineProperty({__proto__:null,addButtonsToTree:E,authorizeDialog:u,buttonValue:L,changedRow:d,clickRow:B,clickRowButton:G,clickSubmitAuthority:X,closeAuthorizeDialog:J,customNodeClass:Y,getActivePageStructureId:M,getPageDataAsync:W,handleItemDataChange:$,handleNodeBtnChange:te,handleNodeCheckChange:ee,handleQueryChange:U,handleSubmitAsync:g,isPageDataExist:Q,menuData:p,menusButtons:Z,pageData:f,pageDataFiltered:V,queryFormData:H,structureButtons:P,structureId:v,submitTableAsyncByVerify:m,tempRolePageData:N,tempSysMenus:x,treeRef:k},Symbol.toStringTag,{value:"Module"}));exports.State=ae;exports.authorizeDialog=u;exports.getActivePageStructureId=M;exports.tempRolePageData=N;
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { computed as b, getCurrentInstance as qe, inject as ve, unref as u, ref as A, onMounted as ie, watch as W, toRef as Ke, onUnmounted as Vn, shallowRef as Ve, nextTick as V, defineComponent as Z, useAttrs as _n, useSlots as un, createElementBlock as F, openBlock as E, normalizeStyle as Ye, normalizeClass as w, createCommentVNode as k, Fragment as _e, createElementVNode as P, renderSlot as Y, createBlock as M, withCtx as L, resolveDynamicComponent as K, mergeProps as ut, withModifiers as ke, createVNode as oe, toDisplayString as J, onBeforeUnmount as xe, provide as cn, Text as Dn, reactive as dn, h as Un, watchEffect as Kn, isRef as Yn, onScopeDispose as Wn, markRaw as ct, toRefs as Gn, resolveComponent as Ce, Transition as qn, withDirectives as tt, withKeys as Re, createTextVNode as nt, vShow as ot, isVNode as fn, render as vn } from "vue";
|
|
2
|
-
import { S as Ft, i as pn, c as bt, t as hn, d as Pt, f as Xn, g as se, h as Ht, j as Xe, k as de, m as ye, n as We, o as gn, p as fe, q as jn, v as Jn, w as Zn, x as Qn, y as Te, z as Ie, A as Me, _ as Be, B as pe, V as eo, C as to, D as no, F as oo, G as ae, N as De, H as ao, I as Ge, J as mn, K as yt, L as ro, M as dt, O as so, P as $t, Q as io, R as zt, T as lo, U as uo, W as co, X as fo, Y as vo, Z as po, $ as Vt, a0 as _t, a1 as ho } from "./index-
|
|
2
|
+
import { S as Ft, i as pn, c as bt, t as hn, d as Pt, f as Xn, g as se, h as Ht, j as Xe, k as de, m as ye, n as We, o as gn, p as fe, q as jn, v as Jn, w as Zn, x as Qn, y as Te, z as Ie, A as Me, _ as Be, B as pe, V as eo, C as to, D as no, F as oo, G as ae, N as De, H as ao, I as Ge, J as mn, K as yt, L as ro, M as dt, O as so, P as $t, Q as io, R as zt, T as lo, U as uo, W as co, X as fo, Y as vo, Z as po, $ as Vt, a0 as _t, a1 as ho } from "./index-DmyMy020.js";
|
|
3
3
|
import { m as go } from "./typescript-BpuhIBuJ.js";
|
|
4
|
-
import { d as Dt, i as bn, a as mo, b as bo, e as yn, f as yo } from "./cloneDeep-
|
|
5
|
-
import { i as En } from "./index.vue_vue_type_script_setup_true_lang-
|
|
4
|
+
import { d as Dt, i as bn, a as mo, b as bo, e as yn, f as yo } from "./cloneDeep-GOtDTHJH.js";
|
|
5
|
+
import { i as En } from "./index.vue_vue_type_script_setup_true_lang-D8xCoFmH.js";
|
|
6
6
|
function Eo(e) {
|
|
7
7
|
return e;
|
|
8
8
|
}
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import { ref as wt, watch as Lr, nextTick as gd, resolveComponent as gh, createBlock as Cl, openBlock as Ln, withCtx as kn, createElementVNode as rn, renderSlot as sc, onMounted as Pl, createElementBlock as fi, toDisplayString as qi, createCommentVNode as _h, Fragment as vh, renderList as yh, normalizeStyle as xh, createVNode as Yn, unref as _d, defineComponent as vd, createSlots as yd } from "vue";
|
|
2
|
-
import { p as Cr } from "./index-
|
|
3
|
-
import { f as Aa, b as ac, s as is, i as oc, g as Dn, c as Mh, d as ga, u as Sh, e as xd } from "./menu-
|
|
4
|
-
import { a2 as Md, S as lc, a3 as Sd, i as cc, a4 as uc, a5 as bd } from "./index-
|
|
5
|
-
import { b as _a, g as va, k as hc, l as Ed, n as Td, s as dc } from "./index-
|
|
2
|
+
import { p as Cr } from "./index-Qx0GuwHr.js";
|
|
3
|
+
import { f as Aa, b as ac, s as is, i as oc, g as Dn, c as Mh, d as ga, u as Sh, e as xd } from "./menu-D_3gHkG4.js";
|
|
4
|
+
import { a2 as Md, S as lc, a3 as Sd, i as cc, a4 as uc, a5 as bd } from "./index-DmyMy020.js";
|
|
5
|
+
import { b as _a, g as va, k as hc, l as Ed, n as Td, s as dc } from "./index-Od7_9YnM.js";
|
|
6
6
|
import { _ as Ll } from "./_plugin-vue_export-helper-CHgC5LLL.js";
|
|
7
|
-
import { U as fc, g as pc, h as mc, j as gc, S as Oa, k as wd, c as He } from "./cloneDeep-
|
|
8
|
-
import { d as Ad } from "./index-
|
|
7
|
+
import { U as fc, g as pc, h as mc, j as gc, S as Oa, k as wd, c as He } from "./cloneDeep-GOtDTHJH.js";
|
|
8
|
+
import { d as Ad } from "./index-CpCocC41.js";
|
|
9
9
|
var Rd = "__lodash_hash_undefined__";
|
|
10
10
|
function Cd(r) {
|
|
11
11
|
return this.__data__.set(r, Rd), this;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { g as S, u as P, E as v } from "./menu-
|
|
2
|
-
import { p as K } from "./index-
|
|
3
|
-
import { u as k } from "./login-
|
|
1
|
+
import { g as S, u as P, E as v } from "./menu-D_3gHkG4.js";
|
|
2
|
+
import { p as K } from "./index-Qx0GuwHr.js";
|
|
3
|
+
import { u as k } from "./login-DMbjMzkS.js";
|
|
4
4
|
import { ref as h } from "vue";
|
|
5
5
|
const A = P(K), E = k(K), x = h(!1), D = h(!1), q = async () => {
|
|
6
6
|
const I = S({
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),Ne=require("./index-CFOUGn9U.cjs"),We=require("./index-D9bPG3j0.cjs"),R=require("./index.vue_vue_type_style_index_0_scoped_23015cb0_lang-Db_d3OS1.cjs"),Pe=require("./_plugin-vue_export-helper-BHFhmbuH.cjs"),N=require("./menu-Da5Ht5hG.cjs"),st=require("./login-CDUTeSY_.cjs"),Te=require("./index-BpPyaNFa.cjs"),a=require("./index-zvArGV4H.cjs"),xe=require("./index-Bwgh1tDh.cjs"),$e=require("./index-B7Wi5BZf.cjs"),lt=require("./index-kxN4kJ1s.cjs"),Ie=require("./cloneDeep-CYcGhlzG.cjs"),ut=require("./index-BDDKdGJX.cjs"),ot=require("./index-OCvy-QIo.cjs"),Fe=require("./array-Cs_qeJ2m.cjs"),nt=require("./index.vue_vue_type_style_index_0_scoped_3a02a8a3_lang-i5FsC2rm.cjs"),ht={class:"tree-container"},pt=e.defineComponent({__name:"index",props:{treeData:Array,expand:{type:Boolean,default:!1}},emits:["nodeClick"],setup(i,{emit:t}){const o=t,n=i,c={children:"children",label:"label"},s=l=>{o("nodeClick",l)};return(l,r)=>{const d=e.resolveComponent("el-tree");return e.openBlock(),e.createElementBlock("div",ht,[e.createVNode(d,{data:n==null?void 0:n.treeData,props:c,"default-expand-all":i.expand,onNodeClick:s},null,8,["data","default-expand-all"])])}}}),mt=Pe._export_sfc(pt,[["__scopeId","data-v-b4bd4658"]]),ft={class:"client-robot-side"},_t=e.defineComponent({__name:"robotMenu",props:{model:Object},setup(i){const t=i,o=e.ref(0),n=e.ref([]),c=l=>{let r=[];return Array.isArray(l)&&(l==null?void 0:l.length)>0&&(o.value++,l.forEach(d=>{!(d!=null&&d.isMesh)&&((d==null?void 0:d.type)==="URDFJoint"||(d==null?void 0:d.type)==="URDFLink")&&r.push({name:d==null?void 0:d.name,label:d==null?void 0:d.name,show:!0,level:o.value,isPenultimate:!1,type:d==null?void 0:d.type,id:d==null?void 0:d.id,limit:(d==null?void 0:d.limit)??"",children:c(d==null?void 0:d.children),path:d==null?void 0:d.name})})),r},s=l=>{let r=[];return o.value++,r.push({name:l==null?void 0:l.name,label:l==null?void 0:l.name,show:!0,level:o.value,isPenultimate:!1,type:l==null?void 0:l.type,id:l==null?void 0:l.id,limit:(l==null?void 0:l.limit)??"",children:c(l==null?void 0:l.children),path:l==null?void 0:l.name}),r};return e.watch(()=>t==null?void 0:t.model,()=>{t!=null&&t.model&&(n.value=s(t==null?void 0:t.model))},{deep:!0,immediate:!0}),(l,r)=>(e.openBlock(),e.createElementBlock("div",ft,[e.createVNode(mt,{treeData:n.value,expand:!0},null,8,["treeData"])]))}}),gt=Pe._export_sfc(_t,[["__scopeId","data-v-0411c59a"]]),at={type:"change"},tt={type:"start"},rt={type:"end"},Xe=new a.Ray,it=new a.Plane,yt=Math.cos(70*a.MathUtils.DEG2RAD),re=new a.Vector3,Ce=2*Math.PI,$={NONE:-1,ROTATE:0,DOLLY:1,PAN:2,TOUCH_ROTATE:3,TOUCH_PAN:4,TOUCH_DOLLY_PAN:5,TOUCH_DOLLY_ROTATE:6},et=1e-6;class wt extends a.Controls{constructor(t,o=null){super(t,o),this.state=$.NONE,this.target=new a.Vector3,this.cursor=new a.Vector3,this.minDistance=0,this.maxDistance=1/0,this.minZoom=0,this.maxZoom=1/0,this.minTargetRadius=0,this.maxTargetRadius=1/0,this.minPolarAngle=0,this.maxPolarAngle=Math.PI,this.minAzimuthAngle=-1/0,this.maxAzimuthAngle=1/0,this.enableDamping=!1,this.dampingFactor=.05,this.enableZoom=!0,this.zoomSpeed=1,this.enableRotate=!0,this.rotateSpeed=1,this.keyRotateSpeed=1,this.enablePan=!0,this.panSpeed=1,this.screenSpacePanning=!0,this.keyPanSpeed=7,this.zoomToCursor=!1,this.autoRotate=!1,this.autoRotateSpeed=2,this.keys={LEFT:"ArrowLeft",UP:"ArrowUp",RIGHT:"ArrowRight",BOTTOM:"ArrowDown"},this.mouseButtons={LEFT:a.MOUSE.ROTATE,MIDDLE:a.MOUSE.DOLLY,RIGHT:a.MOUSE.PAN},this.touches={ONE:a.TOUCH.ROTATE,TWO:a.TOUCH.DOLLY_PAN},this.target0=this.target.clone(),this.position0=this.object.position.clone(),this.zoom0=this.object.zoom,this._domElementKeyEvents=null,this._lastPosition=new a.Vector3,this._lastQuaternion=new a.Quaternion,this._lastTargetPosition=new a.Vector3,this._quat=new a.Quaternion().setFromUnitVectors(t.up,new a.Vector3(0,1,0)),this._quatInverse=this._quat.clone().invert(),this._spherical=new a.Spherical,this._sphericalDelta=new a.Spherical,this._scale=1,this._panOffset=new a.Vector3,this._rotateStart=new a.Vector2,this._rotateEnd=new a.Vector2,this._rotateDelta=new a.Vector2,this._panStart=new a.Vector2,this._panEnd=new a.Vector2,this._panDelta=new a.Vector2,this._dollyStart=new a.Vector2,this._dollyEnd=new a.Vector2,this._dollyDelta=new a.Vector2,this._dollyDirection=new a.Vector3,this._mouse=new a.Vector2,this._performCursorZoom=!1,this._pointers=[],this._pointerPositions={},this._controlActive=!1,this._onPointerMove=vt.bind(this),this._onPointerDown=Ct.bind(this),this._onPointerUp=bt.bind(this),this._onContextMenu=Nt.bind(this),this._onMouseWheel=Et.bind(this),this._onKeyDown=Tt.bind(this),this._onTouchStart=Vt.bind(this),this._onTouchMove=Bt.bind(this),this._onMouseDown=kt.bind(this),this._onMouseMove=xt.bind(this),this._interceptControlDown=Pt.bind(this),this._interceptControlUp=St.bind(this),this.domElement!==null&&this.connect(this.domElement),this.update()}connect(t){super.connect(t),this.domElement.addEventListener("pointerdown",this._onPointerDown),this.domElement.addEventListener("pointercancel",this._onPointerUp),this.domElement.addEventListener("contextmenu",this._onContextMenu),this.domElement.addEventListener("wheel",this._onMouseWheel,{passive:!1}),this.domElement.getRootNode().addEventListener("keydown",this._interceptControlDown,{passive:!0,capture:!0}),this.domElement.style.touchAction="none"}disconnect(){this.domElement.removeEventListener("pointerdown",this._onPointerDown),this.domElement.removeEventListener("pointermove",this._onPointerMove),this.domElement.removeEventListener("pointerup",this._onPointerUp),this.domElement.removeEventListener("pointercancel",this._onPointerUp),this.domElement.removeEventListener("wheel",this._onMouseWheel),this.domElement.removeEventListener("contextmenu",this._onContextMenu),this.stopListenToKeyEvents(),this.domElement.getRootNode().removeEventListener("keydown",this._interceptControlDown,{capture:!0}),this.domElement.style.touchAction="auto"}dispose(){this.disconnect()}getPolarAngle(){return this._spherical.phi}getAzimuthalAngle(){return this._spherical.theta}getDistance(){return this.object.position.distanceTo(this.target)}listenToKeyEvents(t){t.addEventListener("keydown",this._onKeyDown),this._domElementKeyEvents=t}stopListenToKeyEvents(){this._domElementKeyEvents!==null&&(this._domElementKeyEvents.removeEventListener("keydown",this._onKeyDown),this._domElementKeyEvents=null)}saveState(){this.target0.copy(this.target),this.position0.copy(this.object.position),this.zoom0=this.object.zoom}reset(){this.target.copy(this.target0),this.object.position.copy(this.position0),this.object.zoom=this.zoom0,this.object.updateProjectionMatrix(),this.dispatchEvent(at),this.update(),this.state=$.NONE}update(t=null){const o=this.object.position;re.copy(o).sub(this.target),re.applyQuaternion(this._quat),this._spherical.setFromVector3(re),this.autoRotate&&this.state===$.NONE&&this._rotateLeft(this._getAutoRotationAngle(t)),this.enableDamping?(this._spherical.theta+=this._sphericalDelta.theta*this.dampingFactor,this._spherical.phi+=this._sphericalDelta.phi*this.dampingFactor):(this._spherical.theta+=this._sphericalDelta.theta,this._spherical.phi+=this._sphericalDelta.phi);let n=this.minAzimuthAngle,c=this.maxAzimuthAngle;isFinite(n)&&isFinite(c)&&(n<-Math.PI?n+=Ce:n>Math.PI&&(n-=Ce),c<-Math.PI?c+=Ce:c>Math.PI&&(c-=Ce),n<=c?this._spherical.theta=Math.max(n,Math.min(c,this._spherical.theta)):this._spherical.theta=this._spherical.theta>(n+c)/2?Math.max(n,this._spherical.theta):Math.min(c,this._spherical.theta)),this._spherical.phi=Math.max(this.minPolarAngle,Math.min(this.maxPolarAngle,this._spherical.phi)),this._spherical.makeSafe(),this.enableDamping===!0?this.target.addScaledVector(this._panOffset,this.dampingFactor):this.target.add(this._panOffset),this.target.sub(this.cursor),this.target.clampLength(this.minTargetRadius,this.maxTargetRadius),this.target.add(this.cursor);let s=!1;if(this.zoomToCursor&&this._performCursorZoom||this.object.isOrthographicCamera)this._spherical.radius=this._clampDistance(this._spherical.radius);else{const l=this._spherical.radius;this._spherical.radius=this._clampDistance(this._spherical.radius*this._scale),s=l!=this._spherical.radius}if(re.setFromSpherical(this._spherical),re.applyQuaternion(this._quatInverse),o.copy(this.target).add(re),this.object.lookAt(this.target),this.enableDamping===!0?(this._sphericalDelta.theta*=1-this.dampingFactor,this._sphericalDelta.phi*=1-this.dampingFactor,this._panOffset.multiplyScalar(1-this.dampingFactor)):(this._sphericalDelta.set(0,0,0),this._panOffset.set(0,0,0)),this.zoomToCursor&&this._performCursorZoom){let l=null;if(this.object.isPerspectiveCamera){const r=re.length();l=this._clampDistance(r*this._scale);const d=r-l;this.object.position.addScaledVector(this._dollyDirection,d),this.object.updateMatrixWorld(),s=!!d}else if(this.object.isOrthographicCamera){const r=new a.Vector3(this._mouse.x,this._mouse.y,0);r.unproject(this.object);const d=this.object.zoom;this.object.zoom=Math.max(this.minZoom,Math.min(this.maxZoom,this.object.zoom/this._scale)),this.object.updateProjectionMatrix(),s=d!==this.object.zoom;const C=new a.Vector3(this._mouse.x,this._mouse.y,0);C.unproject(this.object),this.object.position.sub(C).add(r),this.object.updateMatrixWorld(),l=re.length()}else console.warn("WARNING: OrbitControls.js encountered an unknown camera type - zoom to cursor disabled."),this.zoomToCursor=!1;l!==null&&(this.screenSpacePanning?this.target.set(0,0,-1).transformDirection(this.object.matrix).multiplyScalar(l).add(this.object.position):(Xe.origin.copy(this.object.position),Xe.direction.set(0,0,-1).transformDirection(this.object.matrix),Math.abs(this.object.up.dot(Xe.direction))<yt?this.object.lookAt(this.target):(it.setFromNormalAndCoplanarPoint(this.object.up,this.target),Xe.intersectPlane(it,this.target))))}else if(this.object.isOrthographicCamera){const l=this.object.zoom;this.object.zoom=Math.max(this.minZoom,Math.min(this.maxZoom,this.object.zoom/this._scale)),l!==this.object.zoom&&(this.object.updateProjectionMatrix(),s=!0)}return this._scale=1,this._performCursorZoom=!1,s||this._lastPosition.distanceToSquared(this.object.position)>et||8*(1-this._lastQuaternion.dot(this.object.quaternion))>et||this._lastTargetPosition.distanceToSquared(this.target)>et?(this.dispatchEvent(at),this._lastPosition.copy(this.object.position),this._lastQuaternion.copy(this.object.quaternion),this._lastTargetPosition.copy(this.target),!0):!1}_getAutoRotationAngle(t){return t!==null?Ce/60*this.autoRotateSpeed*t:Ce/60/60*this.autoRotateSpeed}_getZoomScale(t){const o=Math.abs(t*.01);return Math.pow(.95,this.zoomSpeed*o)}_rotateLeft(t){this._sphericalDelta.theta-=t}_rotateUp(t){this._sphericalDelta.phi-=t}_panLeft(t,o){re.setFromMatrixColumn(o,0),re.multiplyScalar(-t),this._panOffset.add(re)}_panUp(t,o){this.screenSpacePanning===!0?re.setFromMatrixColumn(o,1):(re.setFromMatrixColumn(o,0),re.crossVectors(this.object.up,re)),re.multiplyScalar(t),this._panOffset.add(re)}_pan(t,o){const n=this.domElement;if(this.object.isPerspectiveCamera){const c=this.object.position;re.copy(c).sub(this.target);let s=re.length();s*=Math.tan(this.object.fov/2*Math.PI/180),this._panLeft(2*t*s/n.clientHeight,this.object.matrix),this._panUp(2*o*s/n.clientHeight,this.object.matrix)}else this.object.isOrthographicCamera?(this._panLeft(t*(this.object.right-this.object.left)/this.object.zoom/n.clientWidth,this.object.matrix),this._panUp(o*(this.object.top-this.object.bottom)/this.object.zoom/n.clientHeight,this.object.matrix)):(console.warn("WARNING: OrbitControls.js encountered an unknown camera type - pan disabled."),this.enablePan=!1)}_dollyOut(t){this.object.isPerspectiveCamera||this.object.isOrthographicCamera?this._scale/=t:(console.warn("WARNING: OrbitControls.js encountered an unknown camera type - dolly/zoom disabled."),this.enableZoom=!1)}_dollyIn(t){this.object.isPerspectiveCamera||this.object.isOrthographicCamera?this._scale*=t:(console.warn("WARNING: OrbitControls.js encountered an unknown camera type - dolly/zoom disabled."),this.enableZoom=!1)}_updateZoomParameters(t,o){if(!this.zoomToCursor)return;this._performCursorZoom=!0;const n=this.domElement.getBoundingClientRect(),c=t-n.left,s=o-n.top,l=n.width,r=n.height;this._mouse.x=c/l*2-1,this._mouse.y=-(s/r)*2+1,this._dollyDirection.set(this._mouse.x,this._mouse.y,1).unproject(this.object).sub(this.object.position).normalize()}_clampDistance(t){return Math.max(this.minDistance,Math.min(this.maxDistance,t))}_handleMouseDownRotate(t){this._rotateStart.set(t.clientX,t.clientY)}_handleMouseDownDolly(t){this._updateZoomParameters(t.clientX,t.clientX),this._dollyStart.set(t.clientX,t.clientY)}_handleMouseDownPan(t){this._panStart.set(t.clientX,t.clientY)}_handleMouseMoveRotate(t){this._rotateEnd.set(t.clientX,t.clientY),this._rotateDelta.subVectors(this._rotateEnd,this._rotateStart).multiplyScalar(this.rotateSpeed);const o=this.domElement;this._rotateLeft(Ce*this._rotateDelta.x/o.clientHeight),this._rotateUp(Ce*this._rotateDelta.y/o.clientHeight),this._rotateStart.copy(this._rotateEnd),this.update()}_handleMouseMoveDolly(t){this._dollyEnd.set(t.clientX,t.clientY),this._dollyDelta.subVectors(this._dollyEnd,this._dollyStart),this._dollyDelta.y>0?this._dollyOut(this._getZoomScale(this._dollyDelta.y)):this._dollyDelta.y<0&&this._dollyIn(this._getZoomScale(this._dollyDelta.y)),this._dollyStart.copy(this._dollyEnd),this.update()}_handleMouseMovePan(t){this._panEnd.set(t.clientX,t.clientY),this._panDelta.subVectors(this._panEnd,this._panStart).multiplyScalar(this.panSpeed),this._pan(this._panDelta.x,this._panDelta.y),this._panStart.copy(this._panEnd),this.update()}_handleMouseWheel(t){this._updateZoomParameters(t.clientX,t.clientY),t.deltaY<0?this._dollyIn(this._getZoomScale(t.deltaY)):t.deltaY>0&&this._dollyOut(this._getZoomScale(t.deltaY)),this.update()}_handleKeyDown(t){let o=!1;switch(t.code){case this.keys.UP:t.ctrlKey||t.metaKey||t.shiftKey?this.enableRotate&&this._rotateUp(Ce*this.keyRotateSpeed/this.domElement.clientHeight):this.enablePan&&this._pan(0,this.keyPanSpeed),o=!0;break;case this.keys.BOTTOM:t.ctrlKey||t.metaKey||t.shiftKey?this.enableRotate&&this._rotateUp(-Ce*this.keyRotateSpeed/this.domElement.clientHeight):this.enablePan&&this._pan(0,-this.keyPanSpeed),o=!0;break;case this.keys.LEFT:t.ctrlKey||t.metaKey||t.shiftKey?this.enableRotate&&this._rotateLeft(Ce*this.keyRotateSpeed/this.domElement.clientHeight):this.enablePan&&this._pan(this.keyPanSpeed,0),o=!0;break;case this.keys.RIGHT:t.ctrlKey||t.metaKey||t.shiftKey?this.enableRotate&&this._rotateLeft(-Ce*this.keyRotateSpeed/this.domElement.clientHeight):this.enablePan&&this._pan(-this.keyPanSpeed,0),o=!0;break}o&&(t.preventDefault(),this.update())}_handleTouchStartRotate(t){if(this._pointers.length===1)this._rotateStart.set(t.pageX,t.pageY);else{const o=this._getSecondPointerPosition(t),n=.5*(t.pageX+o.x),c=.5*(t.pageY+o.y);this._rotateStart.set(n,c)}}_handleTouchStartPan(t){if(this._pointers.length===1)this._panStart.set(t.pageX,t.pageY);else{const o=this._getSecondPointerPosition(t),n=.5*(t.pageX+o.x),c=.5*(t.pageY+o.y);this._panStart.set(n,c)}}_handleTouchStartDolly(t){const o=this._getSecondPointerPosition(t),n=t.pageX-o.x,c=t.pageY-o.y,s=Math.sqrt(n*n+c*c);this._dollyStart.set(0,s)}_handleTouchStartDollyPan(t){this.enableZoom&&this._handleTouchStartDolly(t),this.enablePan&&this._handleTouchStartPan(t)}_handleTouchStartDollyRotate(t){this.enableZoom&&this._handleTouchStartDolly(t),this.enableRotate&&this._handleTouchStartRotate(t)}_handleTouchMoveRotate(t){if(this._pointers.length==1)this._rotateEnd.set(t.pageX,t.pageY);else{const n=this._getSecondPointerPosition(t),c=.5*(t.pageX+n.x),s=.5*(t.pageY+n.y);this._rotateEnd.set(c,s)}this._rotateDelta.subVectors(this._rotateEnd,this._rotateStart).multiplyScalar(this.rotateSpeed);const o=this.domElement;this._rotateLeft(Ce*this._rotateDelta.x/o.clientHeight),this._rotateUp(Ce*this._rotateDelta.y/o.clientHeight),this._rotateStart.copy(this._rotateEnd)}_handleTouchMovePan(t){if(this._pointers.length===1)this._panEnd.set(t.pageX,t.pageY);else{const o=this._getSecondPointerPosition(t),n=.5*(t.pageX+o.x),c=.5*(t.pageY+o.y);this._panEnd.set(n,c)}this._panDelta.subVectors(this._panEnd,this._panStart).multiplyScalar(this.panSpeed),this._pan(this._panDelta.x,this._panDelta.y),this._panStart.copy(this._panEnd)}_handleTouchMoveDolly(t){const o=this._getSecondPointerPosition(t),n=t.pageX-o.x,c=t.pageY-o.y,s=Math.sqrt(n*n+c*c);this._dollyEnd.set(0,s),this._dollyDelta.set(0,Math.pow(this._dollyEnd.y/this._dollyStart.y,this.zoomSpeed)),this._dollyOut(this._dollyDelta.y),this._dollyStart.copy(this._dollyEnd);const l=(t.pageX+o.x)*.5,r=(t.pageY+o.y)*.5;this._updateZoomParameters(l,r)}_handleTouchMoveDollyPan(t){this.enableZoom&&this._handleTouchMoveDolly(t),this.enablePan&&this._handleTouchMovePan(t)}_handleTouchMoveDollyRotate(t){this.enableZoom&&this._handleTouchMoveDolly(t),this.enableRotate&&this._handleTouchMoveRotate(t)}_addPointer(t){this._pointers.push(t.pointerId)}_removePointer(t){delete this._pointerPositions[t.pointerId];for(let o=0;o<this._pointers.length;o++)if(this._pointers[o]==t.pointerId){this._pointers.splice(o,1);return}}_isTrackingPointer(t){for(let o=0;o<this._pointers.length;o++)if(this._pointers[o]==t.pointerId)return!0;return!1}_trackPointer(t){let o=this._pointerPositions[t.pointerId];o===void 0&&(o=new a.Vector2,this._pointerPositions[t.pointerId]=o),o.set(t.pageX,t.pageY)}_getSecondPointerPosition(t){const o=t.pointerId===this._pointers[0]?this._pointers[1]:this._pointers[0];return this._pointerPositions[o]}_customWheelEvent(t){const o=t.deltaMode,n={clientX:t.clientX,clientY:t.clientY,deltaY:t.deltaY};switch(o){case 1:n.deltaY*=16;break;case 2:n.deltaY*=100;break}return t.ctrlKey&&!this._controlActive&&(n.deltaY*=10),n}}function Ct(i){this.enabled!==!1&&(this._pointers.length===0&&(this.domElement.setPointerCapture(i.pointerId),this.domElement.addEventListener("pointermove",this._onPointerMove),this.domElement.addEventListener("pointerup",this._onPointerUp)),!this._isTrackingPointer(i)&&(this._addPointer(i),i.pointerType==="touch"?this._onTouchStart(i):this._onMouseDown(i)))}function vt(i){this.enabled!==!1&&(i.pointerType==="touch"?this._onTouchMove(i):this._onMouseMove(i))}function bt(i){switch(this._removePointer(i),this._pointers.length){case 0:this.domElement.releasePointerCapture(i.pointerId),this.domElement.removeEventListener("pointermove",this._onPointerMove),this.domElement.removeEventListener("pointerup",this._onPointerUp),this.dispatchEvent(rt),this.state=$.NONE;break;case 1:const t=this._pointers[0],o=this._pointerPositions[t];this._onTouchStart({pointerId:t,pageX:o.x,pageY:o.y});break}}function kt(i){let t;switch(i.button){case 0:t=this.mouseButtons.LEFT;break;case 1:t=this.mouseButtons.MIDDLE;break;case 2:t=this.mouseButtons.RIGHT;break;default:t=-1}switch(t){case a.MOUSE.DOLLY:if(this.enableZoom===!1)return;this._handleMouseDownDolly(i),this.state=$.DOLLY;break;case a.MOUSE.ROTATE:if(i.ctrlKey||i.metaKey||i.shiftKey){if(this.enablePan===!1)return;this._handleMouseDownPan(i),this.state=$.PAN}else{if(this.enableRotate===!1)return;this._handleMouseDownRotate(i),this.state=$.ROTATE}break;case a.MOUSE.PAN:if(i.ctrlKey||i.metaKey||i.shiftKey){if(this.enableRotate===!1)return;this._handleMouseDownRotate(i),this.state=$.ROTATE}else{if(this.enablePan===!1)return;this._handleMouseDownPan(i),this.state=$.PAN}break;default:this.state=$.NONE}this.state!==$.NONE&&this.dispatchEvent(tt)}function xt(i){switch(this.state){case $.ROTATE:if(this.enableRotate===!1)return;this._handleMouseMoveRotate(i);break;case $.DOLLY:if(this.enableZoom===!1)return;this._handleMouseMoveDolly(i);break;case $.PAN:if(this.enablePan===!1)return;this._handleMouseMovePan(i);break}}function Et(i){this.enabled===!1||this.enableZoom===!1||this.state!==$.NONE||(i.preventDefault(),this.dispatchEvent(tt),this._handleMouseWheel(this._customWheelEvent(i)),this.dispatchEvent(rt))}function Tt(i){this.enabled!==!1&&this._handleKeyDown(i)}function Vt(i){switch(this._trackPointer(i),this._pointers.length){case 1:switch(this.touches.ONE){case a.TOUCH.ROTATE:if(this.enableRotate===!1)return;this._handleTouchStartRotate(i),this.state=$.TOUCH_ROTATE;break;case a.TOUCH.PAN:if(this.enablePan===!1)return;this._handleTouchStartPan(i),this.state=$.TOUCH_PAN;break;default:this.state=$.NONE}break;case 2:switch(this.touches.TWO){case a.TOUCH.DOLLY_PAN:if(this.enableZoom===!1&&this.enablePan===!1)return;this._handleTouchStartDollyPan(i),this.state=$.TOUCH_DOLLY_PAN;break;case a.TOUCH.DOLLY_ROTATE:if(this.enableZoom===!1&&this.enableRotate===!1)return;this._handleTouchStartDollyRotate(i),this.state=$.TOUCH_DOLLY_ROTATE;break;default:this.state=$.NONE}break;default:this.state=$.NONE}this.state!==$.NONE&&this.dispatchEvent(tt)}function Bt(i){switch(this._trackPointer(i),this.state){case $.TOUCH_ROTATE:if(this.enableRotate===!1)return;this._handleTouchMoveRotate(i),this.update();break;case $.TOUCH_PAN:if(this.enablePan===!1)return;this._handleTouchMovePan(i),this.update();break;case $.TOUCH_DOLLY_PAN:if(this.enableZoom===!1&&this.enablePan===!1)return;this._handleTouchMoveDollyPan(i),this.update();break;case $.TOUCH_DOLLY_ROTATE:if(this.enableZoom===!1&&this.enableRotate===!1)return;this._handleTouchMoveDollyRotate(i),this.update();break;default:this.state=$.NONE}}function Nt(i){this.enabled!==!1&&i.preventDefault()}function Pt(i){i.key==="Control"&&(this._controlActive=!0,this.domElement.getRootNode().addEventListener("keyup",this._interceptControlUp,{passive:!0,capture:!0}))}function St(i){i.key==="Control"&&(this._controlActive=!1,this.domElement.getRootNode().removeEventListener("keyup",this._interceptControlUp,{passive:!0,capture:!0}))}function Mt(i){let t=null,o=null,n=null,c=null,s=null,l=null;const r=e.ref([]),d=e.ref(new a.Vector3),C=e.ref(new a.Vector3),A=()=>{if(!i.value)return;t=new a.Scene,t.background=new a.Color(15790320);const f=i.value;o=new a.PerspectiveCamera(75,f.clientWidth/f.clientHeight,.1,1e4),n=new a.WebGLRenderer({antialias:!0,alpha:!0}),n.setSize(f.clientWidth,f.clientHeight),n.localClippingEnabled=!0,n.shadowMap.enabled=!0,n.shadowMap.type=a.PCFSoftShadowMap,n.toneMapping=a.ACESFilmicToneMapping,n.toneMappingExposure=1,n.outputColorSpace=a.SRGBColorSpace,f.appendChild(n.domElement),c=new wt(o,n.domElement),c.enableDamping=!0,c.dampingFactor=.05,s=new a.Xe(o,n,{container:f,type:"cube",placement:"bottom-left",offset:{left:350,bottom:22},background:{color:"#D1D1D1"}}),s.attachControls(c),J(),X()},J=()=>{const f=new a.AmbientLight(4210752,.6);t.add(f);const _=new a.DirectionalLight(16777215,2);_.position.set(10,10,8),_.castShadow=!0,_.shadow.mapSize.width=2048,_.shadow.mapSize.height=2048,_.shadow.camera.near=.5,_.shadow.camera.far=50,t.add(_);const b=new a.DirectionalLight(16777215,.8);b.position.set(-8,-8,6),t.add(b);const v=new a.DirectionalLight(16777215,.6);v.position.set(0,-15,2),t.add(v);const L=new a.HemisphereLight(16777215,4473924,.8);t.add(L);const U=new a.PointLight(16777215,1,50);U.position.set(15,15,15),t.add(U);const z=new a.PointLight(16777215,.5,50);z.position.set(-15,-15,15),t.add(z)},X=()=>{l=requestAnimationFrame(X),c&&c.update(),n&&t&&o&&n.render(t,o),s&&s.render()},Q=f=>{["map","normalMap","bumpMap","roughnessMap","metalnessMap","emissiveMap","specularMap","envMap","lightMap","aoMap","displacementMap"].forEach(b=>{f[b]&&f[b].dispose&&f[b].dispose()}),f.dispose&&f.dispose()},H=f=>{f.traverse(_=>{_.geometry&&_.geometry.dispose(),_.material&&(Array.isArray(_.material)?_.material.forEach(b=>{Q(b)}):Q(_.material))})};return{currentModels:r,initialCameraPosition:d,initialTargetPosition:C,initThreeJS:A,handleResize:()=>{if(!i.value||!o||!n||!s)return;const f=i.value,_=f.clientWidth,b=f.clientHeight;o.aspect=_/b,o.updateProjectionMatrix(),n.setSize(_,b),s.update()},fitCameraToAllModels:()=>{if(!o||!c||r.value.length===0)return;const f=new a.Box3;r.value.forEach(ce=>{f.expandByObject(ce)});const _=f.getSize(new a.Vector3),b=f.getCenter(new a.Vector3),L=Math.max(_.x,_.y,_.z)*.8,U=new a.Vector3(b.x+L,b.y+L,b.z+L),z=b.clone();o.position.copy(U),o.lookAt(z),c.target.copy(z),c.update(),d.value.copy(U),C.value.copy(z)},getThreeJSObjects:()=>({scene:t,camera:o,renderer:n,controls:c,gizmo:s}),clearAllModels:()=>{if(!t)return;r.value.forEach(_=>{t.remove(_),H(_)});const f=[];t.children.forEach(_=>{!_.isLight&&!_.isCamera&&f.push(_)}),f.forEach(_=>{t.remove(_),H(_)}),r.value=[]},cleanup:()=>{l&&cancelAnimationFrame(l),n&&n.dispose(),c&&c.dispose(),s&&s.dispose()}}}function Dt(i,t){const o=e.ref(!1);let n=null,c=12700,s=new a.Vector3,l=new a.Vector3,r=new a.Vector3,d=0,C=null;const A=u=>u<.5?4*u*u*u:1-Math.pow(-2*u+2,3)/2,J=u=>{const y=new a.Vector3,h=d*1.2,E=new a.Vector3(r.x+h,r.y,r.z),f=new a.Vector3(r.x,r.y+h,r.z),_=new a.Vector3(r.x,r.y-h,r.z);if(u<=.567){const v=u/.567*Math.PI*2;y.x=r.x+Math.cos(v)*h,y.z=r.z+Math.sin(v)*h,y.y=r.y}else if(u<=.724){const b=(u-.567)/.157,v=A(b);y.lerpVectors(E,f,v)}else if(u<=.881){const b=(u-.724)/.157,L=A(b)*Math.PI;y.x=r.x+Math.sin(L)*h,y.y=r.y+Math.cos(L)*h,y.z=r.z}else{const b=(u-.881)/.119,v=A(b);y.lerpVectors(_,s,v)}return y},X=()=>{const{camera:u,controls:y}=i();if(!u||!y)return;n||(n=Date.now());const h=Date.now()-n,E=Math.min(h/c,1);if(E>=1){H();return}const f=J(E);u.position.copy(f),u.lookAt(r),y.target.copy(r),C=requestAnimationFrame(X)},Q=()=>{if(t.value.length===0)return;const{camera:u,controls:y}=i();if(!u||!y)return;s.copy(u.position),l.copy(y.target);const h=new a.Box3;t.value.forEach(U=>{h.expandByObject(U)});const E=h.getSize(new a.Vector3);r=h.getCenter(new a.Vector3),d=Math.max(E.x,E.y,E.z)*1.2;const f=new a.Vector3(r.x+d*1.2,r.y,r.z);y.enabled=!1;const _=u.position.clone(),b=1e3,v=Date.now(),L=()=>{const U=Date.now()-v,z=Math.min(U/b,1),ce=A(z);u.position.lerpVectors(_,f,ce),u.lookAt(r),y.target.copy(r),z<1?requestAnimationFrame(L):(o.value=!0,n=null,X())};L()},H=()=>{o.value=!1,n=null,C&&(cancelAnimationFrame(C),C=null);const{controls:u}=i();u&&(u.enabled=!0,u.target.copy(l))};return{isAnimating:o,toggleAnimation:()=>{if(o.value){o.value=!1,n=null,C&&(cancelAnimationFrame(C),C=null);const{camera:u,controls:y}=i();if(!u||!y)return;y.enabled=!0;const h=u.position.clone(),E=y.target.clone(),f=1500,_=Date.now(),b=()=>{const v=Date.now()-_,L=Math.min(v/f,1),U=A(L);u.position.lerpVectors(h,s,U),y.target.lerpVectors(E,l,U),L<1&&requestAnimationFrame(b)};b()}else Q()},startAnimation:Q,stopAnimation:H}}function Rt(i,t){const o=e.ref(!1),n=e.ref("none");let c=[],s=[],l=new a.Box3,r=new a.Vector3;const d=()=>{c=[new a.Plane(new a.Vector3(1,0,0),0),new a.Plane(new a.Vector3(0,1,0),0),new a.Plane(new a.Vector3(0,0,1),0)]},C=()=>{l.makeEmpty(),t.value.forEach(F=>{l.expandByObject(F)}),r=l.getCenter(new a.Vector3)},A=F=>{const u=l.getSize(new a.Vector3);let y,h,E;F==="x"?(y=new a.PlaneGeometry(u.z*1.2,u.y*1.2),h=new a.Vector3(r.x,r.y,r.z),E=new a.Euler(0,Math.PI/2,0)):F==="y"?(y=new a.PlaneGeometry(u.x*1.2,u.z*1.2),h=new a.Vector3(r.x,r.y,r.z),E=new a.Euler(Math.PI/2,0,0)):F==="z"&&(y=new a.PlaneGeometry(u.x*1.2,u.y*1.2),h=new a.Vector3(r.x,r.y,r.z),E=new a.Euler(0,0,0));const f=new a.MeshPhongMaterial({color:8900331,transparent:!0,opacity:.3,side:a.DoubleSide,depthWrite:!1}),_=new a.Mesh(y,f);return _.position.copy(h),_.rotation.copy(E),_},J=()=>{if(X(),Q(),n.value==="none")return;C();let F=null;if(n.value==="x"?(c[0].constant=-r.x,F=c[0]):n.value==="y"?(c[1].constant=-r.y,F=c[1]):n.value==="z"&&(c[2].constant=-r.z,F=c[2]),F){t.value.forEach(y=>{y.traverse(h=>{h.isMesh&&h.material&&(Array.isArray(h.material)?h.material.forEach(E=>{E.clippingPlanes=[F]}):h.material.clippingPlanes=[F])})});const{scene:u}=i();if(u){const y=A(n.value);u.add(y),s.push(y)}}},X=()=>{t.value.forEach(F=>{F.traverse(u=>{u.isMesh&&u.material&&(Array.isArray(u.material)?u.material.forEach(y=>{y.clippingPlanes=[]}):u.material.clippingPlanes=[])})})},Q=()=>{const{scene:F}=i();F&&s.forEach(u=>{F.remove(u),u.geometry.dispose(),u.material.dispose()}),s=[]};return{isClipping:o,activeClippingAxis:n,toggleClipping:()=>{o.value=!o.value,o.value?(d(),t.value.length>0&&C()):(n.value="none",X(),Q())},updateClippingPlanes:J,clearClippingPlanes:X,clearClippingMeshes:Q}}const At={class:"obj-viewer-container"},Ft={class:"floating-controls"},Lt=["disabled"],Ot=["disabled","title"],jt={key:0,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2"},Ut={key:1,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2"},zt=["disabled"],It=["title"],$t={key:0,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2"},Yt={key:1,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2"},Ht={key:1,class:"clipping-panel"},Kt={class:"panel-content"},Zt={class:"radio-group"},qt={class:"radio-label"},Xt={class:"radio-label"},Wt={class:"radio-label"},Gt={class:"radio-label"},Jt={key:2,class:"loading-overlay"},Qt={__name:"threeModel",setup(i,{expose:t}){const o=e.ref(null),n=e.ref(!1),c=e.ref(""),s=e.ref(!1),l=e.ref(!1),{currentModels:r,initialCameraPosition:d,initialTargetPosition:C,initThreeJS:A,handleResize:J,fitCameraToAllModels:X,getThreeJSObjects:Q,clearAllModels:H,cleanup:F}=Mt(o),{isAnimating:u,toggleAnimation:y,stopAnimation:h}=Dt(Q,r),{isClipping:E,activeClippingAxis:f,toggleClipping:_,updateClippingPlanes:b}=Rt(Q,r),{addModelsFromUrls:v,loadModelByDefaultPath:L,urdfModel:U}=a.useModelLoader(Q,r,n,c,H),z=()=>{if(l.value||r.value.length===0)return;l.value=!0,u.value&&h();const{camera:q,controls:w}=Q();if(!q||!w)return;w.enabled=!0;const I=k=>k<.5?4*k*k*k:1-Math.pow(-2*k+2,3)/2,Ge=q.position.clone(),Ye=w.target.clone(),Je=1500,m=Date.now(),p=()=>{const k=Date.now()-m,j=Math.min(k/Je,1),B=I(j);q.position.lerpVectors(Ge,d.value,B),w.target.lerpVectors(Ye,C.value,B),j<1?requestAnimationFrame(p):l.value=!1};p()},ce=()=>{document.fullscreenElement?document.exitFullscreen().then(()=>{s.value=!1,e.nextTick(()=>{J()})}).catch(q=>{console.error("无法退出全屏:",q)}):o.value.requestFullscreen().then(()=>{s.value=!0,e.nextTick(()=>{J()})}).catch(q=>{console.error("无法进入全屏:",q)})},se=()=>{s.value=!!document.fullscreenElement,s.value||e.nextTick(()=>{J()})},me=async(q,w)=>{try{u.value&&h(),E.value&&_();const I=await w(q);return X(),I}catch(I){throw console.error("加载模型失败:",I),I}},T=async q=>me(q,v),ve=async q=>me(q,L);return e.onMounted(async()=>{await e.nextTick(),A(),window.addEventListener("resize",J),document.addEventListener("fullscreenchange",se)}),e.onBeforeUnmount(()=>{window.removeEventListener("resize",J),document.removeEventListener("fullscreenchange",se),u.value&&h(),F()}),t({addModelsFromUrls:T,loadModelByDefaultPath:ve}),(q,w)=>(e.openBlock(),e.createElementBlock("div",At,[e.unref(U)?(e.openBlock(),e.createBlock(gt,{key:0,class:"client-robot-side",model:e.unref(U)},null,8,["model"])):e.createCommentVNode("",!0),e.createElementVNode("div",{ref_key:"threejsContainer",ref:o,class:"threejs-container"},null,512),e.createElementVNode("div",Ft,[e.createElementVNode("button",{onClick:z,class:e.normalizeClass(["control-btn","reset-btn"]),disabled:n.value||e.unref(r).length===0||l.value,title:"重置"},w[10]||(w[10]=[e.createElementVNode("svg",{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2"},[e.createElementVNode("path",{d:"M3 9l9-7 9 7v11a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2z"}),e.createElementVNode("polyline",{points:"9,22 9,12 15,12 15,22"})],-1)]),8,Lt),e.createElementVNode("button",{onClick:w[0]||(w[0]=(...I)=>e.unref(y)&&e.unref(y)(...I)),class:e.normalizeClass(["control-btn","animation-btn",{active:e.unref(u)}]),disabled:n.value||e.unref(r).length===0,title:e.unref(u)?"停止动画":"动画视图"},[e.unref(u)?(e.openBlock(),e.createElementBlock("svg",Ut,w[12]||(w[12]=[e.createElementVNode("circle",{cx:"12",cy:"12",r:"10"},null,-1),e.createElementVNode("rect",{x:"9.5",y:"8",width:"2",height:"8",fill:"currentColor"},null,-1),e.createElementVNode("rect",{x:"12.5",y:"8",width:"2",height:"8",fill:"currentColor"},null,-1)]))):(e.openBlock(),e.createElementBlock("svg",jt,w[11]||(w[11]=[e.createElementVNode("circle",{cx:"12",cy:"12",r:"10"},null,-1),e.createElementVNode("polygon",{points:"10,8 16,12 10,16",fill:"currentColor"},null,-1)])))],10,Ot),e.createElementVNode("button",{onClick:w[1]||(w[1]=(...I)=>e.unref(_)&&e.unref(_)(...I)),class:e.normalizeClass(["control-btn","clipping-btn",{active:e.unref(E)}]),disabled:n.value||e.unref(r).length===0,title:"剖面视图"},w[13]||(w[13]=[e.createElementVNode("svg",{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2"},[e.createElementVNode("rect",{x:"3",y:"3",width:"18",height:"18"}),e.createElementVNode("line",{x1:"-14",y1:"12",x2:"30",y2:"12","stroke-dasharray":"4,2"})],-1)]),10,zt),e.createElementVNode("button",{onClick:ce,class:e.normalizeClass(["control-btn","fullscreen-btn"]),title:s.value?"退出全屏":"全屏"},[s.value?(e.openBlock(),e.createElementBlock("svg",Yt,w[15]||(w[15]=[e.createElementVNode("path",{d:"M8 3v3a2 2 0 0 1-2 2H3m18 0h-3a2 2 0 0 1-2-2V3m0 18v-3a2 2 0 0 1 2-2h3M3 16h3a2 2 0 0 1 2 2v3"},null,-1)]))):(e.openBlock(),e.createElementBlock("svg",$t,w[14]||(w[14]=[e.createElementVNode("path",{d:"M8 3H5a2 2 0 0 0-2 2v3m18 0V5a2 2 0 0 0-2-2h-3m0 18h3a2 2 0 0 0 2-2v-3M3 16v3a2 2 0 0 0 2 2h3"},null,-1)])))],8,It)]),e.unref(E)?(e.openBlock(),e.createElementBlock("div",Ht,[e.createElementVNode("div",Kt,[e.createElementVNode("div",Zt,[e.createElementVNode("label",qt,[e.withDirectives(e.createElementVNode("input",{type:"radio",name:"clipping-axis",value:"none","onUpdate:modelValue":w[2]||(w[2]=I=>e.isRef(f)?f.value=I:null),onChange:w[3]||(w[3]=(...I)=>e.unref(b)&&e.unref(b)(...I))},null,544),[[e.vModelRadio,e.unref(f)]]),w[16]||(w[16]=e.createElementVNode("span",{class:"radio-text"},"无切割",-1))]),e.createElementVNode("label",Xt,[e.withDirectives(e.createElementVNode("input",{type:"radio",name:"clipping-axis",value:"x","onUpdate:modelValue":w[4]||(w[4]=I=>e.isRef(f)?f.value=I:null),onChange:w[5]||(w[5]=(...I)=>e.unref(b)&&e.unref(b)(...I))},null,544),[[e.vModelRadio,e.unref(f)]]),w[17]||(w[17]=e.createElementVNode("span",{class:"radio-text"},"X轴切割",-1))]),e.createElementVNode("label",Wt,[e.withDirectives(e.createElementVNode("input",{type:"radio",name:"clipping-axis",value:"y","onUpdate:modelValue":w[6]||(w[6]=I=>e.isRef(f)?f.value=I:null),onChange:w[7]||(w[7]=(...I)=>e.unref(b)&&e.unref(b)(...I))},null,544),[[e.vModelRadio,e.unref(f)]]),w[18]||(w[18]=e.createElementVNode("span",{class:"radio-text"},"Y轴切割",-1))]),e.createElementVNode("label",Gt,[e.withDirectives(e.createElementVNode("input",{type:"radio",name:"clipping-axis",value:"z","onUpdate:modelValue":w[8]||(w[8]=I=>e.isRef(f)?f.value=I:null),onChange:w[9]||(w[9]=(...I)=>e.unref(b)&&e.unref(b)(...I))},null,544),[[e.vModelRadio,e.unref(f)]]),w[19]||(w[19]=e.createElementVNode("span",{class:"radio-text"},"Z轴切割",-1))])])])])):e.createCommentVNode("",!0),n.value?(e.openBlock(),e.createElementBlock("div",Jt,[w[20]||(w[20]=e.createElementVNode("div",{class:"loading-spinner"},null,-1)),e.createElementVNode("p",null,e.toDisplayString(c.value),1)])):e.createCommentVNode("",!0)]))}},eo=Pe._export_sfc(Qt,[["__scopeId","data-v-0595ce23"]]);function to(i,t,o,n,c,s){const l=e.resolveComponent("svg-icon"),r=e.resolveComponent("ssMenu");return e.openBlock(),e.createBlock(r,{mode:i.mode,menuList:i.renderMenuList,onClickMenu:i.clickMenu,onOpenMenu:i.openMenu,onCloseMenu:i.closeMenu},{title:e.withCtx(({menu:d})=>[e.createVNode(l,{name:d.icon??"Fold",style:{width:"clamp(16px, 1.25rem, 20px)",height:"clamp(16px, 1.25rem, 20px)","margin-right":"8px"}},null,8,["name"]),e.createElementVNode("span",null,e.toDisplayString(d.title??""),1)]),_:1},8,["mode","menuList","onClickMenu","onOpenMenu","onCloseMenu"])}const ct=Pe._export_sfc(R._sfc_main,[["render",to],["__scopeId","data-v-5c2d7ed2"]]),oo={class:"bread-content"},no=["onClick"],ao={key:0,class:"split-title"},io={__name:"index",props:{breadArray:{type:Array,default:()=>[]}},emits:["click"],setup(i,{emit:t}){const o=i,n=e.ref([]),c=t;e.onMounted(()=>{n.value=o==null?void 0:o.breadArray}),e.watch(()=>o==null?void 0:o.breadArray,()=>{n.value=o==null?void 0:o.breadArray},{deep:!0,immediate:!0});const s=l=>{c("click",l)};return(l,r)=>(e.openBlock(),e.createElementBlock("div",oo,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(n.value,(d,C)=>{var A;return e.openBlock(),e.createElementBlock("div",{key:C,class:"bread-item"},[e.createElementVNode("div",{class:"bread-title",onClick:J=>s(d),style:e.normalizeStyle({opacity:((A=n.value)==null?void 0:A.length)-1===C?"0.7":"1"})},e.toDisplayString(d.value),13,no),C!==n.value.length-1&&Array.isArray(n.value)?(e.openBlock(),e.createElementBlock("div",ao,e.toDisplayString("/"))):e.createCommentVNode("",!0)])}),128))]))}},dt=Pe._export_sfc(io,[["__scopeId","data-v-ded7e2bd"]]),so={class:"structure-buttons"},lo={class:"structure-paths"},ro={class:"client-header-user"},co={class:"model-select"},uo={class:"model-show"},ho={class:"model-fill"},po={class:"client-header-logo"},mo={class:"client-header-menu"},fo={class:"client-header-user"},_o={class:"client-main-operate"},go={key:0,class:"item-view-group"},yo={key:0,class:"calculator"},wo={key:1,class:"calculator"},Co={class:"client-main-operate"},vo=e.defineComponent({__name:"index2",props:{windowConfig:{type:Object,default:()=>{}},showButton:{type:Boolean,default:!0}},setup(i){const t=a.useUnit(xe.pinia),o=e.ref(!1),{selectTitle:n}=N.storeToRefs(t),c=e.ref(!1),s=e.ref(!1),l=e.ref(!1),r=e.ref(!1),d=st.useLoginState(),{loginUserInfo:C}=N.storeToRefs(d),A=a.useModelComp(xe.pinia),{isEdit:J}=N.storeToRefs(A),X=N.useMenuState(xe.pinia),Q=e.ref(!1),{importLoading:H,platName:F}=N.storeToRefs(X),u=e.ref("");return(y,h)=>{const E=e.resolveComponent("el-button"),f=e.resolveComponent("el-avatar"),_=e.resolveComponent("el-header"),b=e.resolveComponent("el-container"),v=e.resolveComponent("el-icon"),L=e.resolveComponent("el-input"),U=e.resolveComponent("el-aside"),z=e.resolveComponent("el-main"),ce=e.resolveComponent("router-view"),se=e.resolveDirective("loading");return e.unref(J)==="edit"?(e.openBlock(),e.createBlock(b,{key:0,class:"client-container"},{default:e.withCtx(()=>[e.createVNode(_,{class:"client-structure-header"},{default:e.withCtx(()=>{var me;return[e.createElementVNode("div",so,[e.createVNode(E,{id:"transparentBgButton",onClick:e.unref(R.onBack)},{default:e.withCtx(()=>h[3]||(h[3]=[e.createTextVNode(" 返回页面 ")])),_:1,__:[3]},8,["onClick"]),e.createVNode(E,{id:"transparentBgButton",onClick:h[0]||(h[0]=T=>{var ve,q;return e.unref(R.clickSavePage)((q=(ve=e.unref(n))==null?void 0:ve.map(w=>w.value))==null?void 0:q.join("/"))})},{icon:e.withCtx(()=>[e.createVNode(Te.SvgIcon,{name:"Store"})]),default:e.withCtx(()=>[h[4]||(h[4]=e.createTextVNode(" 保存页面 "))]),_:1,__:[4]})]),e.createElementVNode("div",lo,[(e.openBlock(),e.createBlock(dt,{key:e.unref(n),breadArray:e.unref(n),onClick:e.unref(R.onClick)},null,8,["breadArray","onClick"]))]),e.createElementVNode("div",ro,[e.renderSlot(y.$slots,"default",{},void 0,!0),e.createVNode(f,{size:35,src:(me=e.unref(C))==null?void 0:me.avatarUrl},{default:e.withCtx(()=>{var T;return[e.createTextVNode(e.toDisplayString(((T=e.unref(C))==null?void 0:T.account)??"未知"),1)]}),_:1},8,["src"])])]}),_:3}),e.unref(J)==="edit"?(e.openBlock(),e.createBlock(b,{key:0,class:"model-operate",style:{"margin-top":"10px",height:"0px"}},{default:e.withCtx(()=>[e.createElementVNode("div",co,[e.createVNode(Ne.modelSelect)]),e.createElementVNode("div",uo,[e.createVNode(Ne.modelShow)]),e.createElementVNode("div",ho,[e.createVNode(Ne.modelFill)])]),_:1})):e.createCommentVNode("",!0)]),_:3})):e.withDirectives((e.openBlock(),e.createBlock(b,{key:1,class:"client-container","element-loading-text":"正在加载页面数据..."},{default:e.withCtx(()=>[e.createVNode(_,{class:"client-header"},{default:e.withCtx(()=>{var me;return[e.createElementVNode("div",po,[e.createVNode(Te.SvgIcon,{name:"logo",style:{width:"clamp(18px, 1.5rem, 24px)",height:"clamp(18px, 1.5rem, 24px)","margin-right":"8px"}}),h[5]||(h[5]=e.createTextVNode(" ISIP "))]),e.createElementVNode("div",mo,[e.createVNode(ct,{mode:"horizontal"})]),e.createElementVNode("div",fo,[e.createVNode(L,{modelValue:u.value,"onUpdate:modelValue":h[1]||(h[1]=T=>u.value=T),clearable:"",placeholder:"搜索",style:{width:"130px"}},{prefix:e.withCtx(()=>[e.createVNode(v,{class:"el-input__icon"},{default:e.withCtx(()=>[e.createVNode(e.unref(lt.search_default))]),_:1})]),_:1},8,["modelValue"]),i.showButton?(e.openBlock(),e.createBlock(E,{key:0,id:"transparentBgButton"},{icon:e.withCtx(()=>[e.createVNode(Te.SvgIcon,{name:"App"})]),default:e.withCtx(()=>[h[6]||(h[6]=e.createTextVNode(" 生成APP "))]),_:1,__:[6]})):e.createCommentVNode("",!0),i.showButton&&e.unref(J)==="view"?(e.openBlock(),e.createBlock(E,{key:1,id:"transparentBgButton",onClick:e.unref(R.onSelectFixContent)},{icon:e.withCtx(()=>[e.createVNode(Te.SvgIcon,{name:"write"})]),default:e.withCtx(()=>[h[7]||(h[7]=e.createTextVNode(" 修改布局 "))]),_:1,__:[7]},8,["onClick"])):e.createCommentVNode("",!0),e.renderSlot(y.$slots,"default",{},void 0,!0),e.createVNode(f,{size:35,src:(me=e.unref(C))==null?void 0:me.avatarUrl},{default:e.withCtx(()=>{var T;return[e.createTextVNode(e.toDisplayString(((T=e.unref(C))==null?void 0:T.account)??"未知"),1)]}),_:1},8,["src"])])]}),_:3}),e.createVNode(b,{class:"client-body"},{default:e.withCtx(()=>[y.$route.path==="/"?(e.openBlock(),e.createBlock(z,{key:0,class:"client-main"},{default:e.withCtx(()=>{var me;return[e.createVNode(U,{class:"client-aside"},{default:e.withCtx(()=>[e.createVNode(We.default,{mode:"vertical"})]),_:1}),e.createElementVNode("div",_o,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList((me=e.unref(Ie.cloneDeep)(e.unref(R.showItems)))==null?void 0:me.filter(T=>T.comp!=="FormTop"),(T,ve)=>{var q;return e.openBlock(),e.createElementBlock("div",{class:"item-view-content",key:ve},[((q=T==null?void 0:T.comp)==null?void 0:q.toUpperCase())!=="TABLE"?(e.openBlock(),e.createElementBlock("div",go,e.toDisplayString(T.name),1)):e.createCommentVNode("",!0),(e.openBlock(),e.createBlock(e.resolveDynamicComponent(e.unref(R.getComponents)(T.comp)),{compName:T.name,itemData:T==null?void 0:T.compData,childItemData:T==null?void 0:T.itemChildData,key:(T==null?void 0:T.id)??ve,onChange:e.unref(R.onChange),index:(T==null?void 0:T.id)??ve,onContentChange:e.unref(R.onContentChange),onPageChange:e.unref(R.onPageChange)},null,40,["compName","itemData","childItemData","onChange","index","onContentChange","onPageChange"]))])}),128)),c.value?(e.openBlock(),e.createElementBlock("div",yo,[s.value?(e.openBlock(),e.createBlock($e._sfc_main,{key:0,class:"calculator-content",onClickTrigger:y.clickPreview,loading:l.value,modelValue:"预览"},null,8,["onClickTrigger","loading"])):e.createCommentVNode("",!0),e.createVNode($e._sfc_main,{class:"calculator-content",onClickTrigger:h[2]||(h[2]=T=>y.showThreeContent()),loading:o.value,modelValue:"调用方法"},null,8,["loading"])])):e.createCommentVNode("",!0),r.value?(e.openBlock(),e.createElementBlock("div",wo,[e.createVNode($e._sfc_main,{class:"calculator-content",modelValue:"执行方法",onClickTrigger:y.clickExecute,loading:Q.value},null,8,["onClickTrigger","loading"])])):e.createCommentVNode("",!0)])]}),_:1})):(e.openBlock(),e.createBlock(z,{key:1,class:"client-main"},{default:e.withCtx(()=>[e.createVNode(U,{class:"client-aside"},{default:e.withCtx(()=>[e.createVNode(We.default,{mode:"vertical"})]),_:1}),e.createElementVNode("div",Co,[e.createVNode(ce)])]),_:1}))]),_:1})]),_:3})),[[se,e.unref(H)]])}}}),bo=Pe._export_sfc(vo,[["__scopeId","data-v-1f0f879a"]]),M=[{key:"FitCurve_Eleven",value:"http://139.196.154.85:20024/api/algorithmRun/verificationAlgorithm/35326658522693",resources:"http://139.196.154.85:20024/api/algorithmRun/allFilesByFolderName/35326658522693",download:"http://139.196.154.85:20024/api/algorithmRun/downloadFileByFileName/35326658522693/outputResources"},{key:"MakeShape",value:"http://139.196.154.85:20024/api/algorithmRun/verificationAlgorithm/35018179530309",resources:"http://139.196.154.85:20024/api/algorithmRun/allFilesByFolderName/35018179530309",download:"http://139.196.154.85:20024/api/algorithmRun/downloadFileByFileName/35018179530309/outputResources"},{key:"FillEmpty",value:"http://139.196.154.85:20024/api/algorithmRun/verificationAlgorithm/35018289382469",resources:"http://139.196.154.85:20024/api/algorithmRun/allFilesByFolderName/35018289382469",download:"http://139.196.154.85:20024/api/algorithmRun/downloadFileByFileName/35018289382469/outputResources"},{key:"ToolPathFakeFast",value:"http://139.196.154.85:20024/api/algorithmRun/verificationAlgorithm/35484063607109",resources:"http://139.196.154.85:20024/api/algorithmRun/allFilesByFolderName/35484063607109",download:"http://139.196.154.85:20024/api/algorithmRun/downloadFileByFileName/35484063607109/outputResources"},{key:"FiveAxisCalculator",value:"http://139.196.154.85:20024/api/algorithmRun/verificationAlgorithm/35237389477957",resources:"http://139.196.154.85:20024/api/algorithmRun/allFilesByFolderName/35237389477957",download:"http://139.196.154.85:20024/api/algorithmRun/downloadFileByFileName/35237389477957/outputResources"},{key:"DetectionAlgorithm",value:"http://139.196.154.85:20024/api/algorithmRun/verificationAlgorithm/35459977498949",resources:"http://139.196.154.85:20024/api/algorithmRun/allFilesByFolderName/35459977498949",download:"http://139.196.154.85:20024/api/algorithmRun/downloadFileByFileName/35459977498949/outputResources"},{key:"FeatureSelectionAlgorithm_FFS",value:"http://139.196.154.85:20024/api/algorithmRun/verificationAlgorithm/35277984187973",resources:"http://139.196.154.85:20024/api/algorithmRun/allFilesByFolderName/35277984187973",download:"http://139.196.154.85:20024/api/algorithmRun/downloadFileByFileName/35277984187973/outputResources"},{key:"AIParameterOptimization",value:"http://139.196.154.85:20024/api/algorithmRun/verificationAlgorithm/35788169784389",resources:"http://139.196.154.85:20024/api/algorithmRun/allFilesByFolderName/35788169784389"}],ze=[{key:"型线生成",value:"http://139.196.154.85:20024/api/algorithmRun/downloadFileByFileName/35326658522693/outputResources/sampling_points_20.cpt"},{key:"曲面生成",value:"http://139.196.154.85:20024/api/algorithmRun/downloadFileByFileName/35018179530309/outputResources/output.obj"},{key:"叶片生成",value:"http://139.196.154.85:20024/api/algorithmRun/downloadFileByFileName/35018289382469/outputResources/output_TwoSections_completed.obj"},{key:"轨迹规划",value:"http://139.196.154.85:20024/api/algorithmRun/downloadFileByFileName/35484063607109/outputResources/complete_data.txt"},{key:"加工规划",value:"http://139.196.154.85:20024/api/algorithmRun/downloadFileByFileName/35237389477957/outputResources/NC_BC.NC"},{key:"产品检测",value:"http://139.196.154.85:20024/api/algorithmRun/downloadFileByFileName/35459977498949/outputResources/source.pcd,http://139.196.154.85:20024/api/algorithmRun/downloadFileByFileName/35459977498949/outputResources/target.pcd"},{key:"参数筛选训练方法",value:"http://139.196.154.85:20024/api/algorithmRun/downloadFileByFileName/35277984187973/outputResources/fitness_iteration.png"}],ko={class:"structure-buttons"},xo={class:"structure-paths"},Eo={class:"client-header-user"},To={class:"model-select"},Vo={class:"model-show"},Bo={class:"model-fill"},No={class:"client-header-logo"},Po={class:"client-header-menu"},So={class:"client-header-user"},Mo={class:"client-main-content"},Do={key:0,class:"item-view-group"},Ro={key:0,class:"calculator"},Ao={key:1,class:"calculator"},Fo={class:"router-aside"},Lo={class:"router-main"},Oo=e.defineComponent({__name:"index",props:{windowConfig:{type:Object,default:()=>{}},showButton:{type:Boolean,default:!0}},setup(i){const t=a.useUnit(xe.pinia),o=e.ref(0),n=e.ref(!1),{selectTitle:c}=N.storeToRefs(t),s=e.ref(!1),l=e.ref(!1),r=e.ref(!1),d=a.useTableComp(xe.pinia),C=e.ref(!1),{tableShowThree:A}=N.storeToRefs(d),J=st.useLoginState(),{loginUserInfo:X}=N.storeToRefs(J),Q=a.useModelComp(xe.pinia),{isEdit:H}=N.storeToRefs(Q),F=N.useMenuState(xe.pinia),u=ut.useFormComp(xe.pinia),{objUrl:y,blobUrls:h}=N.storeToRefs(u),E=e.ref(null),f=e.ref(!0),_=e.ref(!1),{importLoading:b,activeMenuPath:v,platName:L}=N.storeToRefs(F),U=e.ref(!1);e.watch(()=>v.value,async m=>{m&&(U.value=!0),ze!=null&&ze.find(p=>{var k;return(p==null?void 0:p.key)===((k=m==null?void 0:m.split("/"))==null?void 0:k[(m==null?void 0:m.split("/").length)-1])})?C.value=!0:C.value=!1},{immediate:!0});const z=async()=>{var P,g,ee,oe,x;_.value=!0;const m=sessionStorage.getItem("magicToken")===""?"123456":sessionStorage.getItem("magicToken");let p=((ee=(g=(P=ze==null?void 0:ze.find(ne=>{var fe,de,be;return(ne==null?void 0:ne.key)===((be=(fe=v.value)==null?void 0:fe.split("/"))==null?void 0:be[((de=v.value)==null?void 0:de.split("/").length)-1])}))==null?void 0:P.value)==null?void 0:g.split(","))==null?void 0:ee[0])??"";const k=await N.axios.post(p,null,{responseType:"blob",headers:{Authorization:m,"Content-Type":"application/json"}}),j=new Blob([k.data],{type:"application/octet-stream;charset=UTF-8"});let B={suffix:"."+((x=p==null?void 0:p.split("."))==null?void 0:x[((oe=p==null?void 0:p.split("."))==null?void 0:oe.length)-1]),blob:j,mtlBlobs:[]};_.value=!1,E.value.loadModelByDefaultPath([B])},ce=async m=>{var j,B,P,g,ee,oe,x;const p=(j=m==null?void 0:m.split("/"))==null?void 0:j[0],k=await N.getInsofDataApi({key:{type:"mainEquip",systemKey:sessionStorage.getItem("systemKey"),pageKey:p}});return((B=k==null?void 0:k.data)==null?void 0:B.type)==="success"?((x=(oe=(ee=(g=(P=k==null?void 0:k.data)==null?void 0:P.result)==null?void 0:g[0])==null?void 0:ee.value)==null?void 0:oe.tableData)==null?void 0:x.隐藏三维显示)!==!0:!0};e.watch(()=>R.showItems.value,()=>{var m,p,k,j,B;if(((m=R.showItems.value)==null?void 0:m.length)===2&&((p=R.showItems.value)!=null&&p.find(P=>(P==null?void 0:P.name)==="输入"))&&((k=R.showItems.value)!=null&&k.find(P=>(P==null?void 0:P.name)==="输出"))){const P=(j=R.showItems.value)==null?void 0:j.find(g=>(g==null?void 0:g.name)==="输出");l.value=((B=P==null?void 0:P.comp)==null?void 0:B.toUpperCase())==="FORM",s.value=!0}else s.value=!1,l.value=!1},{deep:!0,immediate:!0}),e.watch(()=>v.value,async()=>{v.value&&(f.value=await ce(v.value))},{deep:!0,immediate:!0}),e.watch(()=>[y.value,E.value],()=>{var m;((m=y.value)==null?void 0:m.length)>0&&E.value&&E.value.addModelsFromUrls(y.value)},{immediate:!0,deep:!0}),e.watch(()=>h==null?void 0:h.value,async()=>{var m,p,k,j;if(h!=null&&h.value&&((m=h==null?void 0:h.value)==null?void 0:m.length)>0&&!C.value&&!((p=R.showItems.value)!=null&&p.find(B=>(B==null?void 0:B.name)==="输入")&&((k=R.showItems.value)!=null&&k.find(B=>(B==null?void 0:B.name)==="输出")))){let B=[];const P=await((j=Ie.cloneDeep(h==null?void 0:h.value))==null?void 0:j.map(async g=>{var fe,de,be,ae,V,ge,we,Ve,Se,Me;let ee,oe;const x=(de=(fe=g==null?void 0:g.blob)==null?void 0:fe.split("undefined,"))==null?void 0:de[1];let ne=x==null?void 0:x.split(",");if((ne==null?void 0:ne.length)>1){let ke=await(ne==null?void 0:ne.map(async W=>{var K,He,Ee,ue,D,ye;ee=await N.axios.get(W,{responseType:"blob",headers:{"Content-Type":"application/json"}});let ie=[];if(((K=g==null?void 0:g.mtlBlobs)==null?void 0:K.length)>0){let Le=await((He=g==null?void 0:g.mtlBlobs)==null?void 0:He.map(async G=>{let De=await N.axios.get(G,{responseType:"blob",headers:{"Content-Type":"application/json"}});return ie.push(new Blob([De.data],{type:"application/octet-stream;charset=UTF-8"})),De}));await Promise.all(Le)}return((ue=W==null?void 0:W.split("."))==null?void 0:ue[((Ee=W==null?void 0:W.split("."))==null?void 0:Ee.length)-1])!=="undefined"&&B.push({suffix:"."+((ye=W==null?void 0:W.split("."))==null?void 0:ye[((D=W==null?void 0:W.split("."))==null?void 0:D.length)-1]),blob:new Blob([ee.data],{type:"application/octet-stream;charset=UTF-8"}),mtlBlobs:ie}),ee}));await Promise.all(ke)}else if(!(x!=null&&x.includes("https://"))&&!(x!=null&&x.includes("http://"))){ee=await ot.downloadAvatarApi({url:x});let ke=[];if(((be=g==null?void 0:g.mtlBlobs)==null?void 0:be.length)>0){let W=await((ae=g==null?void 0:g.mtlBlobs)==null?void 0:ae.map(async ie=>{let K=await ot.downloadAvatarApi({url:ie});return ke.push(new Blob([K.data],{type:"application/octet-stream;charset=UTF-8"})),K}));await Promise.all(W)}oe={suffix:"."+((ge=x==null?void 0:x.split("."))==null?void 0:ge[((V=x==null?void 0:x.split("."))==null?void 0:V.length)-1]),blob:new Blob([ee.data],{type:"application/octet-stream;charset=UTF-8"}),mtlBlobs:ke}}else{ee=await N.axios.get(x,{responseType:"blob",headers:{"Content-Type":"application/json"}});let ke=[];if(((we=g==null?void 0:g.mtlBlobs)==null?void 0:we.length)>0){let W=await((Ve=g==null?void 0:g.mtlBlobs)==null?void 0:Ve.map(async ie=>{let K=await N.axios.get(ie,{responseType:"blob",headers:{"Content-Type":"application/json"}});return ke.push(new Blob([K.data],{type:"application/octet-stream;charset=UTF-8"})),K}));await Promise.all(W)}oe={suffix:"."+((Me=x==null?void 0:x.split("."))==null?void 0:Me[((Se=x==null?void 0:x.split("."))==null?void 0:Se.length)-1]),blob:new Blob([ee.data],{type:"application/octet-stream;charset=UTF-8"}),mtlBlobs:ke}}oe&&B.push(oe)}));await Promise.all(P),E.value.loadModelByDefaultPath(B)}},{immediate:!0,deep:!0}),e.watch(()=>A.value,async()=>{var p,k,j,B;if(A.value!==""&&A.value){let P=(p=v.value)==null?void 0:p.split("/"),g=P[(P==null?void 0:P.length)-2];const oe=(((k=M==null?void 0:M.find(de=>(de==null?void 0:de.key)===g))==null?void 0:k.download)??"")+"/"+A.value,x=sessionStorage.getItem("magicToken")===""?"123456":sessionStorage.getItem("magicToken"),ne=await N.axios.post(oe,null,{responseType:"blob",headers:{Authorization:x,baseURL:"http://139.196.154.85:20025","Content-Type":"application/json"}});var m=new Blob([ne.data],{type:"application/octet-stream;charset=UTF-8"});const fe=[{suffix:"."+((B=(j=A.value)==null?void 0:j.split("."))==null?void 0:B[1]),blob:m,mtlBlobs:[]}];E.value.loadModelByDefaultPath(fe)}},{deep:!0,immediate:!0});const se=async()=>{var ee,oe,x,ne,fe,de,be,ae,V,ge,we,Ve,Se,Me,ke,W,ie;n.value=!0;let m=(ee=v.value)==null?void 0:ee.split("/"),p=m[(m==null?void 0:m.length)-2];const k=((oe=M==null?void 0:M.find(K=>(K==null?void 0:K.key)===p))==null?void 0:oe.value)??"";let j="";const B=await N.axios.post("http://139.196.154.85:20024/api/sysAuth/login",{account:"superadmin",password:"9bf00809059adc7f57bd290bf73ddf4d16f4c83b5937e2d68144ab0bd60d045d22d70afeed8f2fa071cda536e1fac0daf12b8e63dd870c3ca8b308f23be6e693bb32ebd3d013116dc8338d6854b1332701a522a7c43706a6db4162fbe991c8c08aa842fbbc34",codeId:0,code:""});((x=B==null?void 0:B.data)==null?void 0:x.code)===200&&(j=`Bearer ${(fe=(ne=B.data)==null?void 0:ne.result)==null?void 0:fe.accessToken}`,sessionStorage.setItem("magicToken",j));const P=j===""?"123456":j,g=await N.axios.post(k,null,{headers:{Authorization:P,baseURL:"http://139.196.154.85:20025","Content-Type":"multipart/form-data"}});if(((de=g==null?void 0:g.data)==null?void 0:de.type)==="success"&&a.IsJson((ae=(be=g==null?void 0:g.data)==null?void 0:be.result)==null?void 0:ae.result)){const K=(Se=(Ve=(we=JSON.parse((ge=(V=g==null?void 0:g.data)==null?void 0:V.result)==null?void 0:ge.result))==null?void 0:we.lines_file_paths)==null?void 0:Ve[0])==null?void 0:Se.split("\\"),Ee=(((Me=M==null?void 0:M.find(D=>(D==null?void 0:D.key)===p))==null?void 0:Me.resources)??"")+"/"+(((K==null?void 0:K[(K==null?void 0:K.length)-2])==="inputResources"?"outputResources":K==null?void 0:K[(K==null?void 0:K.length)-2])??"outputResources"),ue=await N.axios.post(Ee,null,{headers:{Authorization:P,baseURL:"http://139.196.154.85:20025","Content-Type":"multipart/form-data"}});if(((ke=ue==null?void 0:ue.data)==null?void 0:ke.type)==="success"){const D=(W=ue==null?void 0:ue.data)==null?void 0:W.result,ye=R.showItems.value,Le=await((ie=Ie.cloneDeep(ye))==null?void 0:ie.map(async G=>{var De,Ke,Ze,he,Y,Be;if((G==null?void 0:G.name)==="输出"){if((G==null?void 0:G.comp)==="Table")G.compData=(De=G==null?void 0:G.compData)==null?void 0:De.map(S=>{var Z,_e;return(S==null?void 0:S.key)==="tableContents"&&(S.contents=(_e=(Z=S==null?void 0:S.contents)==null?void 0:Z.map(te=>(te=te==null?void 0:te.map((O,pe)=>{var le,Re,Oe;return typeof O=="string"&&pe>1?((le=S==null?void 0:S.contents)==null?void 0:le.length)>1?O=((Re=D==null?void 0:D[pe-1])!=null&&Re.includes("input")?O:D==null?void 0:D[pe-1])??O:O=D==null?void 0:D[0]:O=((Oe=D==null?void 0:D[pe-1])!=null&&Oe.includes("input")?O:D==null?void 0:D[pe-1])??O,O}),te)))==null?void 0:_e.filter((te,O)=>O<=(D==null?void 0:D.length)-1)),S});else if((G==null?void 0:G.comp)==="Form"){let S="";if(D==null||D.forEach(Z=>{S=S===""?S+Z:S+","+Z}),G.compData=(Ke=G==null?void 0:G.compData)==null?void 0:Ke.map(Z=>{var _e;return(Z==null?void 0:Z.key)==="formContent"&&(Z.contents=(_e=Z.contents)==null?void 0:_e.map(te=>(te.value=S,te))),Z}),(Ze=S==null?void 0:S.split(","))!=null&&Ze.find(Z=>Z.includes(".obj"))){let Z={};Z.suffix=".obj";const _e=[];let te=await((Y=(he=S==null?void 0:S.split(","))==null?void 0:he.filter(O=>O.includes(".obj")||O.includes(".mtl")))==null?void 0:Y.map(async O=>{var le,Re;if(O.includes(".obj")){const qe=(((le=M==null?void 0:M.find(Ae=>(Ae==null?void 0:Ae.key)===p))==null?void 0:le.download)??"")+"/"+O,je=sessionStorage.getItem("magicToken")===""?"123456":sessionStorage.getItem("magicToken"),Ue=await N.axios.post(qe,null,{responseType:"blob",headers:{Authorization:je,baseURL:"http://139.196.154.85:20025","Content-Type":"application/json"}});var pe=new Blob([Ue.data],{type:"application/octet-stream;charset=UTF-8"});Z.blob=pe}else if(O.includes(".mtl")){const qe=(((Re=M==null?void 0:M.find(Qe=>(Qe==null?void 0:Qe.key)===p))==null?void 0:Re.download)??"")+"/"+O,je=sessionStorage.getItem("magicToken")===""?"123456":sessionStorage.getItem("magicToken"),Ue=await N.axios.post(qe,null,{responseType:"blob",headers:{Authorization:je,baseURL:"http://139.196.154.85:20025","Content-Type":"application/json"}});var pe=new Blob([Ue.data],{type:"application/octet-stream;charset=UTF-8"});_e.push(pe)}}));await Promise.all(te),Z.mtlBlobs=_e,E.value.loadModelByDefaultPath([Z])}else{const Z=[];let _e=await((Be=S==null?void 0:S.split(","))==null?void 0:Be.map(async te=>{var je,Ue;let O={};O.suffix="."+((je=te==null?void 0:te.split("."))==null?void 0:je[1]);const le=(((Ue=M==null?void 0:M.find(Ae=>(Ae==null?void 0:Ae.key)===p))==null?void 0:Ue.download)??"")+"/"+te,Re=sessionStorage.getItem("magicToken")===""?"123456":sessionStorage.getItem("magicToken"),Oe=await N.axios.post(le,null,{responseType:"blob",headers:{Authorization:Re,baseURL:"http://139.196.154.85:20025","Content-Type":"application/json"}});var qe=new Blob([Oe.data],{type:"application/octet-stream;charset=UTF-8"});O.blob=qe,Z.push(O)}));await Promise.all(_e),E.value.loadModelByDefaultPath(Z)}}}return G}));R.showItems.value=await Promise.all(Le)}}o.value++,n.value=!1},me=e.ref(""),T=e.ref("open"),ve=e.ref("open"),q=e.ref(!1),w=()=>{const m=document.getElementById("menuCollapse");T.value==="open"?(m.style.width="18.75rem",m.style.height="96%",m.style.overflow="auto"):(m.style.width="50px",m.style.height="50px",m.style.overflow="hidden")},I=()=>{const m=document.getElementById("operateCollapse");ve.value==="open"?(m.style.width="25rem",m.style.height="96%",m.style.overflow="auto"):(m.style.width="50px",m.style.height="50px",m.style.overflow="hidden")},Ge=()=>{q.value=!q.value;const m=document.getElementById("operateCollapse"),p=document.getElementById("menuCollapse");q.value?(p.style.width="18.75rem",m.style.width="calc(100% - 24rem)"):m.style.width="400px"},Ye=m=>{const p=URL.createObjectURL(m),k=document.createElement("a");k.href=p,k.download="file.txt",document.body.appendChild(k),k.click(),document.body.removeChild(k),URL.revokeObjectURL(p),r.value=!1},Je=async()=>{var ee,oe,x,ne,fe,de,be,ae,V,ge,we,Ve,Se,Me,ke,W;r.value=!0;let m=(ee=v.value)==null?void 0:ee.split("/"),p=m[(m==null?void 0:m.length)-2];const k=((oe=M==null?void 0:M.find(ie=>(ie==null?void 0:ie.key)===p))==null?void 0:oe.value)??"";let j="";const B=await N.axios.post("http://139.196.154.85:20024/api/sysAuth/login",{account:"superadmin",password:"9bf00809059adc7f57bd290bf73ddf4d16f4c83b5937e2d68144ab0bd60d045d22d70afeed8f2fa071cda536e1fac0daf12b8e63dd870c3ca8b308f23be6e693bb32ebd3d013116dc8338d6854b1332701a522a7c43706a6db4162fbe991c8c08aa842fbbc34",codeId:0,code:""});if(((x=B==null?void 0:B.data)==null?void 0:x.code)===200)j=`Bearer ${(fe=(ne=B.data)==null?void 0:ne.result)==null?void 0:fe.accessToken}`,sessionStorage.setItem("magicToken",j);else throw N.ElMessage.error("响应出错了"),new Error("响应出错了");const P=j===""?"123456":j,g=await N.axios.post(k,null,{headers:{Authorization:P,baseURL:"http://139.196.154.85:20025","Content-Type":"multipart/form-data"}});if(((de=g==null?void 0:g.data)==null?void 0:de.code)===200){if(a.IsJson((ae=(be=g==null?void 0:g.data)==null?void 0:be.result)==null?void 0:ae.result)){const ie=(Se=(Ve=(we=JSON.parse((ge=(V=g==null?void 0:g.data)==null?void 0:V.result)==null?void 0:ge.result))==null?void 0:we.lines_file_paths)==null?void 0:Ve[0])==null?void 0:Se.split("\\"),He=(((Me=M==null?void 0:M.find(ue=>(ue==null?void 0:ue.key)===p))==null?void 0:Me.resources)??"")+"/"+((ie==null?void 0:ie[(ie==null?void 0:ie.length)-2])??"outputResources"),Ee=await N.axios.post(He,null,{headers:{Authorization:P,baseURL:"http://139.196.154.85:20025","Content-Type":"multipart/form-data"}});if(((ke=Ee==null?void 0:Ee.data)==null?void 0:ke.code)===200){const ue=(W=Ee==null?void 0:Ee.data)==null?void 0:W.result,D=Ie.cloneDeep(R.showItems.value);D==null||D.map(async ye=>{var Le,G,De,Ke,Ze;if((ye==null?void 0:ye.name)==="输出"&&(ye==null?void 0:ye.comp)==="Form"){let he="";ue==null||ue.forEach(Y=>{he=he===""?he+Y:he+","+Y}),ye.compData=(Le=ye==null?void 0:ye.compData)==null?void 0:Le.map(Y=>{var Be;return(Y==null?void 0:Y.key)==="formContent"&&(Y.contents=(Be=Y.contents)==null?void 0:Be.map(S=>(S.value=he,S))),Y}),(G=he==null?void 0:he.split(","))!=null&&G.find(Y=>Y.includes(".obj"))?(Ke=(De=he==null?void 0:he.split(","))==null?void 0:De.filter(Y=>Y.includes(".obj")||Y.includes(".mtl")))==null||Ke.map(async Y=>{var Be,S;if(Y.includes(".obj")){const _e=(((Be=M==null?void 0:M.find(le=>(le==null?void 0:le.key)===p))==null?void 0:Be.download)??"")+"/"+Y,te=sessionStorage.getItem("magicToken")===""?"123456":sessionStorage.getItem("magicToken"),O=await N.axios.post(_e,null,{responseType:"blob",headers:{Authorization:te,baseURL:"http://139.196.154.85:20025","Content-Type":"application/json"}});let pe=new Blob([O.data],{type:"application/octet-stream;charset=UTF-8"});Ye(pe)}else if(Y.includes(".mtl")){const _e=(((S=M==null?void 0:M.find(le=>(le==null?void 0:le.key)===p))==null?void 0:S.download)??"")+"/"+Y,te=sessionStorage.getItem("magicToken")===""?"123456":sessionStorage.getItem("magicToken"),O=await N.axios.post(_e,null,{responseType:"blob",headers:{Authorization:te,baseURL:"http://139.196.154.85:20025","Content-Type":"application/json"}});let pe=new Blob([O.data],{type:"application/octet-stream;charset=UTF-8"});Ye(pe)}}):(Ze=he==null?void 0:he.split(","))==null||Ze.map(async Y=>{var O,pe;""+((O=Y==null?void 0:Y.split("."))==null?void 0:O[1]);const S=(((pe=M==null?void 0:M.find(le=>(le==null?void 0:le.key)===p))==null?void 0:pe.download)??"")+"/"+Y,Z=sessionStorage.getItem("magicToken")===""?"123456":sessionStorage.getItem("magicToken"),_e=await N.axios.post(S,null,{responseType:"blob",headers:{Authorization:Z,baseURL:"http://139.196.154.85:20025","Content-Type":"application/json"}});let te=new Blob([_e.data],{type:"application/octet-stream;charset=UTF-8"});Ye(te)})}})}else throw N.ElMessage.error("响应出错了"),new Error("响应出错了")}}else throw N.ElMessage.error("响应出错了"),new Error("响应出错了")};return(m,p)=>{const k=e.resolveComponent("el-button"),j=e.resolveComponent("el-avatar"),B=e.resolveComponent("el-header"),P=e.resolveComponent("el-container"),g=e.resolveComponent("el-icon"),ee=e.resolveComponent("el-input"),oe=e.resolveComponent("el-aside"),x=e.resolveComponent("el-collapse-item"),ne=e.resolveComponent("el-collapse"),fe=e.resolveComponent("el-main"),de=e.resolveComponent("router-view"),be=e.resolveDirective("loading");return e.unref(H)==="edit"?(e.openBlock(),e.createBlock(P,{key:0,class:"client-container"},{default:e.withCtx(()=>[e.createVNode(B,{class:"client-structure-header"},{default:e.withCtx(()=>{var ae;return[e.createElementVNode("div",ko,[e.createVNode(k,{id:"transparentBgButton",onClick:e.unref(R.onBack)},{default:e.withCtx(()=>p[5]||(p[5]=[e.createTextVNode(" 返回页面 ")])),_:1,__:[5]},8,["onClick"]),e.createVNode(k,{id:"transparentBgButton",onClick:p[0]||(p[0]=V=>{var ge,we;return e.unref(R.clickSavePage)((we=(ge=e.unref(c))==null?void 0:ge.map(Ve=>Ve.value))==null?void 0:we.join("/"))})},{icon:e.withCtx(()=>[e.createVNode(Te.SvgIcon,{name:"Store"})]),default:e.withCtx(()=>[p[6]||(p[6]=e.createTextVNode(" 保存页面 "))]),_:1,__:[6]})]),e.createElementVNode("div",xo,[(e.openBlock(),e.createBlock(dt,{key:e.unref(c),breadArray:e.unref(c),onClick:e.unref(R.onClick)},null,8,["breadArray","onClick"]))]),e.createElementVNode("div",Eo,[e.renderSlot(m.$slots,"default",{},void 0,!0),e.createVNode(j,{size:35,src:(ae=e.unref(X))==null?void 0:ae.avatarUrl},{default:e.withCtx(()=>{var V;return[e.createTextVNode(e.toDisplayString(((V=e.unref(X))==null?void 0:V.account)??"未知"),1)]}),_:1},8,["src"])])]}),_:3}),e.unref(H)==="edit"?(e.openBlock(),e.createBlock(P,{key:0,class:"model-operate",style:{"margin-top":"10px",height:"0px"}},{default:e.withCtx(()=>[e.createElementVNode("div",To,[e.createVNode(Ne.modelSelect)]),e.createElementVNode("div",Vo,[e.createVNode(Ne.modelShow)]),e.createElementVNode("div",Bo,[e.createVNode(Ne.modelFill)])]),_:1})):e.createCommentVNode("",!0)]),_:3})):e.withDirectives((e.openBlock(),e.createBlock(P,{key:1,class:"client-container","element-loading-text":"正在加载页面数据..."},{default:e.withCtx(()=>[e.createVNode(B,{class:"client-header"},{default:e.withCtx(()=>{var ae;return[e.createElementVNode("div",No,[e.createVNode(Te.SvgIcon,{name:"logo",style:{width:"clamp(18px, 1.5rem, 24px)",height:"clamp(18px, 1.5rem, 24px)","margin-right":"8px"}}),e.createTextVNode(" "+e.toDisplayString(e.unref(L)===""?"CPMPIP":e.unref(L)),1)]),e.createElementVNode("div",Po,[e.createVNode(ct,{mode:"horizontal"})]),e.createElementVNode("div",So,[e.createVNode(ee,{modelValue:me.value,"onUpdate:modelValue":p[1]||(p[1]=V=>me.value=V),clearable:"",placeholder:"搜索",style:{width:"130px"}},{prefix:e.withCtx(()=>[e.createVNode(g,{class:"el-input__icon"},{default:e.withCtx(()=>[e.createVNode(e.unref(lt.search_default))]),_:1})]),_:1},8,["modelValue"]),i.showButton?(e.openBlock(),e.createBlock(k,{key:0,id:"transparentBgButton"},{icon:e.withCtx(()=>[e.createVNode(Te.SvgIcon,{name:"App"})]),default:e.withCtx(()=>[p[7]||(p[7]=e.createTextVNode(" 生成APP "))]),_:1,__:[7]})):e.createCommentVNode("",!0),i.showButton&&e.unref(H)==="view"?(e.openBlock(),e.createBlock(k,{key:1,id:"transparentBgButton",onClick:e.unref(R.onSelectFixContent)},{icon:e.withCtx(()=>[e.createVNode(Te.SvgIcon,{name:"write"})]),default:e.withCtx(()=>[p[8]||(p[8]=e.createTextVNode(" 修改布局 "))]),_:1,__:[8]},8,["onClick"])):e.createCommentVNode("",!0),e.renderSlot(m.$slots,"default",{},void 0,!0),e.createVNode(j,{size:35,src:(ae=e.unref(X))==null?void 0:ae.avatarUrl},{default:e.withCtx(()=>{var V;return[e.createTextVNode(e.toDisplayString(((V=e.unref(X))==null?void 0:V.account)??"未知"),1)]}),_:1},8,["src"])])]}),_:3}),e.createVNode(P,{class:"client-body"},{default:e.withCtx(()=>[m.$route.path==="/"?(e.openBlock(),e.createBlock(fe,{key:0,class:"client-main"},{default:e.withCtx(()=>[e.createVNode(ne,{modelValue:T.value,"onUpdate:modelValue":p[2]||(p[2]=ae=>T.value=ae),accordion:"",class:"client-aside",id:"menuCollapse",onChange:w},{default:e.withCtx(()=>[e.createVNode(x,{name:"open"},{icon:e.withCtx(()=>[e.createVNode(Te.SvgIcon,{name:T.value===""?"Right":"Left",style:{width:"20px",height:"20px"}},null,8,["name"])]),default:e.withCtx(()=>[e.createVNode(oe,{style:{width:"100%"}},{default:e.withCtx(()=>[e.createVNode(We.default,{mode:"vertical"})]),_:1})]),_:1})]),_:1},8,["modelValue"]),e.createElementVNode("div",Mo,[e.createVNode(eo,{isShow:U.value,windowConfig:i.windowConfig,ref_key:"threeModelRef",ref:E},null,8,["isShow","windowConfig"])]),e.createVNode(ne,{modelValue:ve.value,"onUpdate:modelValue":p[4]||(p[4]=ae=>ve.value=ae),accordion:"",class:"client-main-operate",id:"operateCollapse",onChange:I},{default:e.withCtx(()=>[e.createVNode(x,{name:"open"},{icon:e.withCtx(()=>[e.createVNode(Te.SvgIcon,{name:ve.value==="open"?"Right":"Left",style:{width:"20px",height:"20px"}},null,8,["name"])]),default:e.withCtx(()=>{var ae;return[e.createElementVNode("div",null,[e.createVNode(Te.SvgIcon,{class:"fold-icon",name:q.value?"Right":"Left",onClick:Ge},null,8,["name"]),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList((ae=e.unref(Ie.cloneDeep)(e.unref(R.showItems)))==null?void 0:ae.filter(V=>V.comp!=="FormTop"),(V,ge)=>{var we;return e.openBlock(),e.createElementBlock("div",{class:"item-view-content",key:ge},[((we=V==null?void 0:V.comp)==null?void 0:we.toUpperCase())!=="TABLE"?(e.openBlock(),e.createElementBlock("div",Do,e.toDisplayString(V.name),1)):e.createCommentVNode("",!0),(e.openBlock(),e.createBlock(e.resolveDynamicComponent(e.unref(R.getComponents)(V.comp)),{compName:V.name,itemData:V==null?void 0:V.compData,childItemData:V==null?void 0:V.itemChildData,key:(V==null?void 0:V.id)??ge,onChange:e.unref(R.onChange),index:(V==null?void 0:V.id)??ge,onContentChange:e.unref(R.onContentChange),onPageChange:e.unref(R.onPageChange)},null,40,["compName","itemData","childItemData","onChange","index","onContentChange","onPageChange"]))])}),128)),s.value?(e.openBlock(),e.createElementBlock("div",Ro,[l.value?(e.openBlock(),e.createBlock($e._sfc_main,{key:0,class:"calculator-content",onClickTrigger:Je,loading:r.value,modelValue:"预览"},null,8,["loading"])):e.createCommentVNode("",!0),e.createVNode($e._sfc_main,{class:"calculator-content",onClickTrigger:p[3]||(p[3]=V=>se()),loading:n.value,modelValue:"调用方法"},null,8,["loading"])])):e.createCommentVNode("",!0),C.value?(e.openBlock(),e.createElementBlock("div",Ao,[e.createVNode($e._sfc_main,{class:"calculator-content",modelValue:"执行方法",onClickTrigger:z,loading:_.value},null,8,["loading"])])):e.createCommentVNode("",!0)])]}),_:1})]),_:1},8,["modelValue"])]),_:1})):(e.openBlock(),e.createBlock(fe,{key:1,class:"client-router"},{default:e.withCtx(()=>[e.createElementVNode("div",Fo,[e.createVNode(oe,{width:"300px"},{default:e.withCtx(()=>[e.createVNode(We.default,{mode:"vertical"})]),_:1})]),e.createElementVNode("div",Lo,[e.createVNode(de)])]),_:1}))]),_:1})]),_:3})),[[be,e.unref(b)]])}}}),jo=Pe._export_sfc(Oo,[["__scopeId","data-v-43eddef1"]]),Uo={class:"system-wrap"},zo={__name:"index",props:{windowConfig:{type:Object,default:()=>{}},platform:{type:String,default:"browser"},showButton:{type:Boolean,default:!0},content:String,jsonContents:Array},setup(i){const t=a.useModelComp(xe.pinia),o=a.useUnit(xe.pinia),n=N.useMenuState();e.ref(!1);const c=e.ref(!0),s=i,l=e.computed(()=>{switch(s==null?void 0:s.platform){case"browser":return nt.browserThemeConfig;case"client":return nt.clientThemeConfig}}),r=d=>{const C=document.documentElement;d==null||d.forEach(A=>{C.style.setProperty(A.name,A.value)})};return e.watch(()=>s.platform,(d,C)=>{d&&r(l.value)},{immediate:!0}),e.watch(()=>[s==null?void 0:s.content,s==null?void 0:s.jsonContents],async()=>{var A,J,X,Q;if(((A=s==null?void 0:s.jsonContents)==null?void 0:A.length)>0){t.setOriginalData(s==null?void 0:s.jsonContents);return}if(!(s!=null&&s.content)||((J=s==null?void 0:s.content)==null?void 0:J.length)===0)return;c.value=!0,n.setImportLoading(!0);let d=[],C=[];o.setSelectTitle([]),o.setSelectIndex(""),o.setSelectMenu(""),(Q=(X=s==null?void 0:s.content)==null?void 0:X.filter(H=>H!==""))==null||Q.forEach(H=>{Fe.isExpandStringToJson(H)?C.push(Fe.expandStringToJson(H)):Fe.expandNewStringToJson(H)?C.push(Fe.expandNewStringToJson(H)):Fe.expandContentStringToJson(H)?C.push(Fe.expandContentStringToJson(H)):C.push(R.expandToNewContents(H))}),d=C==null?void 0:C[0],await R.savePageDataAsync(d),await a.loadingSystemType(),t.setOriginalData(d),n.setImportLoading(!1)},{deep:!0,immediate:!0}),(d,C)=>(e.openBlock(),e.createElementBlock("div",Uo,[i.platform==="browser"?(e.openBlock(),e.createBlock(bo,{key:0,showButton:i.showButton},{default:e.withCtx(()=>[e.renderSlot(d.$slots,"default",{},void 0,!0)]),_:3},8,["showButton"])):(e.openBlock(),e.createBlock(jo,{key:1,windowConfig:i.windowConfig,showButton:i.showButton},{default:e.withCtx(()=>[e.renderSlot(d.$slots,"default",{},void 0,!0)]),_:3},8,["windowConfig","showButton"]))]))}},Io=Pe._export_sfc(zo,[["__scopeId","data-v-63e718b2"]]),$o={class:"add-model-content"},Yo={key:0,class:"model-operate"},Ho={class:"model-select"},Ko={class:"model-fill"},Zo={key:1,class:"model-view"},qo={__name:"index",props:{mode:{type:String,default:"view"},content:{type:String,default:""},jsonContents:{type:Array,default:()=>[]},showButton:{type:Boolean,default:!0},pathContent:{type:String,default:""}},emits:["change","contentChange"],setup(i,{emit:t}){const o=i,n=t,c=e.ref([]),s=e.ref(0),l=e.ref([]),r=e.ref([]),d=e.ref(0),C=a.useModelComp(xe.pinia),A=N.useMenuState(xe.pinia),{itemData:J,originalData:X}=N.storeToRefs(C),{activeMenuPath:Q,platform:H}=N.storeToRefs(A),F=e.ref(null),u=e.ref(0),y=e.ref([]);e.ref("");const h=e.ref(0);e.watch(()=>o==null?void 0:o.pathContent,()=>{(o==null?void 0:o.pathContent)!==""&&C.setSystemPath(o==null?void 0:o.pathContent)},{deep:!0,immediate:!0});const E=v=>{n("contentChange",v)},f=v=>{var U;const L=(U=Ie.cloneDeep(v==null?void 0:v.wholeValue))==null?void 0:U.map(z=>{var ce;return(z==null?void 0:z.comp)==="Form"&&(z.compData=(ce=z.compData)==null?void 0:ce.map(se=>((se==null?void 0:se.key)==="formContent"&&(se.contents=Fe.arrayToNumberArray(se==null?void 0:se.contents)),se))),z});n("change",{originalContents:X.value,currentContents:v==null?void 0:v.wholeValue,editContent:v==null?void 0:v.editValue,arrayToContents:L})};e.watch(()=>l.value,()=>{h.value===l.value.length&&l.value.length!==0&&(c.value=l.value)},{deep:!0,immediate:!0});const _=()=>{console.log(232,F.value),F.value!==null&&F.value.click()},b=async v=>{const L=v.target.files;if(!L)return;new FileReader,c.value=[],l.value=[],h.value=L.length;const U=Array.from(L).map(async z=>await new Promise(ce=>{const se=new FileReader;se.onload=me=>{try{l.value.push(me.target.result),u.value++}catch(T){console.error("解析失败:",T);return}},se.onerror=()=>ce(`读取 ${z.name} 失败`),se.readAsText(z),v.target.value="",F.value=null,s.value++}));await Promise.all(U)};return e.watch(()=>[o==null?void 0:o.content,o==null?void 0:o.jsonContents],async()=>{await a.loadingSystemType(),c.value=o.content,r.value=o==null?void 0:o.jsonContents},{deep:!0,immediate:!0}),e.watch(()=>u.value,()=>{var v;((v=y.value)==null?void 0:v.length)!==0&&(C.setOriginalData(y.value),C.setItemData(y.value))},{deep:!0,immediate:!0}),(v,L)=>{const U=e.resolveComponent("svg-icon"),z=e.resolveComponent("el-button");return e.openBlock(),e.createElementBlock("div",$o,[(o==null?void 0:o.mode)==="edit"?(e.openBlock(),e.createElementBlock("div",Yo,[e.createElementVNode("div",Ho,[e.createVNode(Ne.modelSelect)]),(e.openBlock(),e.createElementBlock("div",{class:"model-show",key:d.value},[e.createVNode(Ne.modelShow)])),e.createElementVNode("div",Ko,[e.createVNode(Ne.modelFill)])])):e.createCommentVNode("",!0),(o==null?void 0:o.mode)==="view"?(e.openBlock(),e.createElementBlock("div",Zo,[(e.openBlock(),e.createBlock(Io,{showButton:i.showButton,platform:e.unref(H),content:c.value,onChange:f,jsonContents:r.value,onContentChange:E,key:d.value},{default:e.withCtx(()=>{var ce;return[((ce=o==null?void 0:o.jsonContents)==null?void 0:ce.length)===0&&(o!=null&&o.showButton)?(e.openBlock(),e.createBlock(z,{key:0,id:"transparentBgButton",onClick:_},{icon:e.withCtx(()=>[e.createVNode(U,{name:"import"})]),default:e.withCtx(()=>[(e.openBlock(),e.createElementBlock("input",{type:"file",key:s.value,ref_key:"fileInput",ref:F,accept:".txt, .inm",onChange:b,style:{display:"none"},multiple:""},null,32)),L[0]||(L[0]=e.createTextVNode(" 导入模型 "))]),_:1,__:[0]})):e.createCommentVNode("",!0)]}),_:1},8,["showButton","platform","content","jsonContents"]))])):e.createCommentVNode("",!0)])}}},Xo=Pe._export_sfc(qo,[["__scopeId","data-v-23015cb0"]]);exports.default=Xo;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
"use strict";const t=require("vue"),l=require("./index-
|
|
1
|
+
"use strict";const t=require("vue"),l=require("./index-kxN4kJ1s.cjs"),Nt=require("./typescript-PERVJsDy.cjs"),_=require("./cloneDeep-CYcGhlzG.cjs"),it=require("./index.vue_vue_type_script_setup_true_lang-CfJGn5rz.cjs");function It(e){return e}function xt(e,n,o){switch(o.length){case 0:return e.call(n);case 1:return e.call(n,o[0]);case 2:return e.call(n,o[0],o[1]);case 3:return e.call(n,o[0],o[1],o[2])}return e.apply(n,o)}var Mt=800,At=16,Vt=Date.now;function Rt(e){var n=0,o=0;return function(){var r=Vt(),a=At-(r-o);if(o=r,a>0){if(++n>=Mt)return arguments[0]}else n=0;return e.apply(void 0,arguments)}}function Lt(e){return function(){return e}}var zt=_.defineProperty?function(e,n){return _.defineProperty(e,"toString",{configurable:!0,enumerable:!1,value:Lt(n),writable:!0})}:It,Ot=Rt(zt),$e=Math.max;function Pt(e,n,o){return n=$e(n===void 0?e.length-1:n,0),function(){for(var r=arguments,a=-1,s=$e(r.length-n,0),i=Array(s);++a<s;)i[a]=r[n+a];a=-1;for(var u=Array(n+1);++a<n;)u[a]=r[a];return u[n]=o(i),xt(e,this,u)}}var Ue=l.Symbol?l.Symbol.isConcatSpreadable:void 0;function Ft(e){return l.isArray(e)||_.isArguments(e)||!!(Ue&&e&&e[Ue])}function _t(e,n,o,r,a){var s=-1,i=e.length;for(o||(o=Ft),a||(a=[]);++s<i;){var u=e[s];o(u)?_.arrayPush(a,u):a[a.length]=u}return a}function Ht(e){var n=e==null?0:e.length;return n?_t(e):[]}function Dt(e){return Ot(Pt(e,void 0,Ht),e+"")}function $t(e,n){return e!=null&&n in Object(e)}function Ut(e,n,o){n=l.castPath(n,e);for(var r=-1,a=n.length,s=!1;++r<a;){var i=l.toKey(n[r]);if(!(s=e!=null&&o(e,i)))break;e=e[i]}return s||++r!=a?s:(a=e==null?0:e.length,!!a&&_.isLength(a)&&_.isIndex(i,a)&&(l.isArray(e)||_.isArguments(e)))}function Kt(e,n){return e!=null&&Ut(e,n,$t)}function Wt(e,n,o,r){if(!l.isObject(e))return e;n=l.castPath(n,e);for(var a=-1,s=n.length,i=s-1,u=e;u!=null&&++a<s;){var p=l.toKey(n[a]),d=o;if(p==="__proto__"||p==="constructor"||p==="prototype")return e;if(a!=i){var g=u[p];d=void 0,d===void 0&&(d=l.isObject(g)?g:_.isIndex(n[a+1])?[]:{})}_.assignValue(u,p,d),u=u[p]}return e}function Yt(e,n,o){for(var r=-1,a=n.length,s={};++r<a;){var i=n[r],u=l.baseGet(e,i);o(u,i)&&Wt(s,l.castPath(i,e),u)}return s}function Gt(e,n){return Yt(e,n,function(o,r){return Kt(e,r)})}var jt=Dt(function(e,n){return e==null?{}:Gt(e,n)});const Ce="update:modelValue",Ke="change",We="input";let re;const qt=e=>{var n;if(!l.isClient)return 0;if(re!==void 0)return re;const o=document.createElement("div");o.className=`${e}-scrollbar__wrap`,o.style.visibility="hidden",o.style.width="100px",o.style.position="absolute",o.style.top="-9999px",document.body.appendChild(o);const r=o.offsetWidth;o.style.overflow="scroll";const a=document.createElement("div");a.style.width="100%",o.appendChild(a);const s=a.offsetWidth;return(n=o.parentNode)==null||n.removeChild(o),re=r-s,re},Xt=()=>l.isClient&&/firefox/i.test(window.navigator.userAgent);let M;const Jt={height:"0",visibility:"hidden",overflow:Xt()?"":"hidden",position:"absolute","z-index":"-1000",top:"0",right:"0"},Zt=["letter-spacing","line-height","padding-top","padding-bottom","font-family","font-weight","font-size","text-rendering","text-transform","width","text-indent","padding-left","padding-right","border-width","box-sizing"];function Qt(e){const n=window.getComputedStyle(e),o=n.getPropertyValue("box-sizing"),r=Number.parseFloat(n.getPropertyValue("padding-bottom"))+Number.parseFloat(n.getPropertyValue("padding-top")),a=Number.parseFloat(n.getPropertyValue("border-bottom-width"))+Number.parseFloat(n.getPropertyValue("border-top-width"));return{contextStyle:Zt.map(i=>[i,n.getPropertyValue(i)]),paddingSize:r,borderSize:a,boxSizing:o}}function Ye(e,n=1,o){var r;M||(M=document.createElement("textarea"),document.body.appendChild(M));const{paddingSize:a,borderSize:s,boxSizing:i,contextStyle:u}=Qt(e);u.forEach(([m,S])=>M==null?void 0:M.style.setProperty(m,S)),Object.entries(Jt).forEach(([m,S])=>M==null?void 0:M.style.setProperty(m,S,"important")),M.value=e.value||e.placeholder||"";let p=M.scrollHeight;const d={};i==="border-box"?p=p+s:i==="content-box"&&(p=p-a),M.value="";const g=M.scrollHeight-a;if(l.isNumber(n)){let m=g*n;i==="border-box"&&(m=m+a+s),p=Math.max(m,p),d.minHeight=`${m}px`}if(l.isNumber(o)){let m=g*o;i==="border-box"&&(m=m+a+s),p=Math.min(m,p)}return d.height=`${p}px`,(r=M.parentNode)==null||r.removeChild(M),M=void 0,d}const en=l.buildProps({ariaLabel:String,ariaOrientation:{type:String,values:["horizontal","vertical","undefined"]},ariaControls:String}),tn=e=>jt(en,e),nn=l.buildProps({id:{type:String,default:void 0},size:l.useSizeProp,disabled:Boolean,modelValue:{type:l.definePropType([String,Number,Object]),default:""},maxlength:{type:[String,Number]},minlength:{type:[String,Number]},type:{type:String,default:"text"},resize:{type:String,values:["none","both","horizontal","vertical"]},autosize:{type:l.definePropType([Boolean,Object]),default:!1},autocomplete:{type:String,default:"off"},formatter:{type:Function},parser:{type:Function},placeholder:{type:String},form:{type:String},readonly:Boolean,clearable:Boolean,showPassword:Boolean,showWordLimit:Boolean,suffixIcon:{type:l.iconPropType},prefixIcon:{type:l.iconPropType},containerRole:{type:String,default:void 0},tabindex:{type:[String,Number],default:0},validateEvent:{type:Boolean,default:!0},inputStyle:{type:l.definePropType([Object,Array,String]),default:()=>Nt.mutable({})},autofocus:Boolean,rows:{type:Number,default:2},...tn(["ariaLabel"])}),on={[Ce]:e=>l.isString(e),input:e=>l.isString(e),change:e=>l.isString(e),focus:e=>e instanceof FocusEvent,blur:e=>e instanceof FocusEvent,clear:()=>!0,mouseleave:e=>e instanceof MouseEvent,mouseenter:e=>e instanceof MouseEvent,keydown:e=>e instanceof Event,compositionstart:e=>e instanceof CompositionEvent,compositionupdate:e=>e instanceof CompositionEvent,compositionend:e=>e instanceof CompositionEvent},rn=["class","style"],an=/^on[A-Z]/,sn=(e={})=>{const{excludeListeners:n=!1,excludeKeys:o}=e,r=t.computed(()=>((o==null?void 0:o.value)||[]).concat(rn)),a=t.getCurrentInstance();return a?t.computed(()=>{var s;return l.fromPairs(Object.entries((s=a.proxy)==null?void 0:s.$attrs).filter(([i])=>!r.value.includes(i)&&!(n&&an.test(i))))}):(l.debugWarn("use-attrs","getCurrentInstance() returned null. useAttrs() must be called at the top of a setup function"),t.computed(()=>({})))},we={prefix:Math.floor(Math.random()*1e4),current:0},ln=Symbol("elIdInjection"),un=()=>t.getCurrentInstance()?t.inject(ln,we):we,Se=e=>{const n=un();!l.isClient&&n===we&&l.debugWarn("IdInjection",`Looks like you are using server rendering, you must provide a id provider to ensure the hydration process to be succeed
|
|
2
2
|
usage: app.provide(ID_INJECTION_KEY, {
|
|
3
3
|
prefix: number,
|
|
4
4
|
current: number,
|