ss-component-new 1.1.821 → 1.1.823

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.
Files changed (141) hide show
  1. package/dist/{OrbitControls-D6pgin7s.js → OrbitControls-Cm4Xs_Bq.js} +1 -1
  2. package/dist/{OrbitControls-Ff5ikkUQ.cjs → OrbitControls-D-XDZGf-.cjs} +1 -1
  3. package/dist/{STLLoader-BNh7D2zV.cjs → STLLoader-BxpEhvEg.cjs} +161 -161
  4. package/dist/{STLLoader-LGKv5i3H.js → STLLoader-DofhZbOw.js} +522 -593
  5. package/dist/{array-D1hKYLwI.cjs → array-Bfmx0w6P.cjs} +2 -2
  6. package/dist/{array-C60T9pDZ.js → array-DbAuNWGt.js} +1 -1
  7. package/dist/{iconfont-v9CcCMwF.js → iconfont-DQodgJo8.js} +73 -75
  8. package/dist/iconfont-Di4uXnX1.cjs +1 -0
  9. package/dist/icons/svg/editTable.svg +1 -1
  10. package/dist/icons/svg/export.svg +1 -0
  11. package/dist/icons/svg/model.svg +1 -0
  12. package/dist/icons/svg/three.svg +1 -0
  13. package/dist/index-1i-XlS2m.js +101 -0
  14. package/dist/{index-BdsJiFeW.cjs → index-6jSC3unU.cjs} +1 -1
  15. package/dist/{index-2kzGjuzu.js → index-6zbHinQ6.js} +10 -9
  16. package/dist/index-B-oe2x1V.cjs +109 -0
  17. package/dist/index-B-qent3l.cjs +1 -0
  18. package/dist/{index-CukZ8eDZ.js → index-BBo52W9F.js} +4 -4
  19. package/dist/index-BOev8isw.cjs +21 -0
  20. package/dist/index-BQgnYD51.js +6492 -0
  21. package/dist/{index-owcnOlVq.js → index-BYW-ix_Q.js} +5 -5
  22. package/dist/{index-4_M1SpeV.js → index-Bi1gr72d.js} +14 -14
  23. package/dist/{index-DnVaHi8q.js → index-BmHmnXS9.js} +7 -7
  24. package/dist/index-BoS30LXH.cjs +1 -0
  25. package/dist/index-BuBMi9JA.cjs +1 -0
  26. package/dist/{index-Zi9xLtwj.js → index-BvE05H-i.js} +2 -2
  27. package/dist/index-BwpOMKef.cjs +1 -0
  28. package/dist/index-C18ZPRC7.cjs +1 -0
  29. package/dist/{index-HVJSfh2g.js → index-CJx2DcDb.js} +21 -19
  30. package/dist/{index-B3cUSGXB.js → index-CL59qQ_W.js} +9 -8
  31. package/dist/{index-DDsJpzfR.js → index-CLdN0W98.js} +47 -47
  32. package/dist/index-CPP7L10q.cjs +1 -0
  33. package/dist/index-CSWIBSmo.cjs +1 -0
  34. package/dist/{index-DEobyz7r.js → index-CTgZZ96L.js} +6 -5
  35. package/dist/{index-WXpPDsev.js → index-CZ1ui4mT.js} +1 -1
  36. package/dist/index-CfQvGqaX.cjs +1 -0
  37. package/dist/index-CgJYAzeA.cjs +1 -0
  38. package/dist/{index-Cuj-fGNO.cjs → index-ChZHGw_N.cjs} +1 -1
  39. package/dist/index-ChtmIuBu.js +29771 -0
  40. package/dist/index-CjFcaJcL.cjs +1 -0
  41. package/dist/index-CjTmkzBO.js +24 -0
  42. package/dist/{index-Dtw4WkUo.cjs → index-CngO0AUc.cjs} +1 -1
  43. package/dist/index-CqCPdyGu.js +1248 -0
  44. package/dist/index-Cr6pWv0l.cjs +1 -0
  45. package/dist/{index-Cw95lvvp.js → index-D8Msszln.js} +223 -223
  46. package/dist/index-DDvUG6fk.js +22 -0
  47. package/dist/{index-CdMrhxHS.js → index-DMlIMlyC.js} +10 -10
  48. package/dist/{index-3Cdyqd1B.cjs → index-DOBeGYzT.cjs} +1 -1
  49. package/dist/index-DP0k43fj.cjs +1 -0
  50. package/dist/index-DTxccgVM.cjs +1 -0
  51. package/dist/{index-JAJeIBYE.cjs → index-DVAGljX0.cjs} +1 -1
  52. package/dist/{index-B5Vi6RBj.cjs → index-DVCrYVKw.cjs} +1 -1
  53. package/dist/{index-CY2iphpd.cjs → index-DbniLh9G.cjs} +1 -1
  54. package/dist/index-Dj_ofPeK.cjs +1 -0
  55. package/dist/{index-DtogzZej.js → index-DocnYz5P.js} +1 -1
  56. package/dist/index-DrL7vroa.js +319 -0
  57. package/dist/index-Dt2McMki.js +13668 -0
  58. package/dist/{index-Cphx1eY1.js → index-Gba1Qfcc.js} +7 -8
  59. package/dist/{index-DMb9Vu-7.js → index-IUkCD4R_.js} +1 -1
  60. package/dist/{index-DAyzDsjs.js → index-K6BRW_Bw.js} +1 -1
  61. package/dist/{index-DzM8zZqe.js → index-OH9t-y2p.js} +4 -4
  62. package/dist/index-PNDdZKYG.cjs +1 -0
  63. package/dist/{index-Dn04IPFM.js → index-QETLKFyV.js} +10 -10
  64. package/dist/{index-BWHtpT9o.cjs → index-RgTvyK54.cjs} +1 -1
  65. package/dist/{index-CF_0RdqV.cjs → index-dukFqRog.cjs} +1 -1
  66. package/dist/{index-C9Boo2Cw.cjs → index-dyoOdMKX.cjs} +1 -1
  67. package/dist/index-f9bwREQl.cjs +1 -0
  68. package/dist/{index-Dxoxm0Cc.js → index-mmWAqzR5.js} +25 -25
  69. package/dist/index-rPc9VS0S.cjs +1 -0
  70. package/dist/index-tPamnhR2.js +236 -0
  71. package/dist/{index-H3kf9EQv.js → index-tX2Hs05F.js} +11 -10
  72. package/dist/{index-DEU-pXeW.js → index-uvns6W6E.js} +1838 -1812
  73. package/dist/index-weauvEnW.cjs +4 -0
  74. package/dist/{index-B8xEed7C.cjs → index-wlnPb2aB.cjs} +1 -1
  75. package/dist/{index.vue_vue_type_script_setup_true_lang-iyZtrhDf.js → index.vue_vue_type_script_setup_true_lang-C4G6mB7R.js} +28 -28
  76. package/dist/{index.vue_vue_type_script_setup_true_lang-CaYQQb8M.cjs → index.vue_vue_type_script_setup_true_lang-CWi4UVPF.cjs} +1 -1
  77. package/dist/{index.vue_vue_type_style_index_0_scoped_0f027c8c_lang-qefZ9E5G.js → index.vue_vue_type_style_index_0_scoped_0f027c8c_lang-CtN9Ij0Y.js} +53 -23
  78. package/dist/{index.vue_vue_type_style_index_0_scoped_0f027c8c_lang-CTcahF4Z.cjs → index.vue_vue_type_style_index_0_scoped_0f027c8c_lang-mQIxU0SD.cjs} +90 -90
  79. package/dist/{index.vue_vue_type_style_index_0_scoped_6bfd62db_lang-Cxjh1E1z.js → index.vue_vue_type_style_index_0_scoped_1966237d_lang-D3xcEtDT.js} +6488 -6474
  80. package/dist/{index.vue_vue_type_style_index_0_scoped_6bfd62db_lang-0eNHRdYw.cjs → index.vue_vue_type_style_index_0_scoped_1966237d_lang-DwIFJsxs.cjs} +14 -14
  81. package/dist/{index.vue_vue_type_style_index_0_scoped_86d2b6b8_lang-kymzIBO8.js → index.vue_vue_type_style_index_0_scoped_86d2b6b8_lang-D5CTJUDi.js} +17 -17
  82. package/dist/{index.vue_vue_type_style_index_0_scoped_86d2b6b8_lang-GlR2V0TC.cjs → index.vue_vue_type_style_index_0_scoped_86d2b6b8_lang-VPQBXOPW.cjs} +1 -1
  83. package/dist/index.vue_vue_type_style_index_1_lang-DraQDAAw.cjs +32 -0
  84. package/dist/index.vue_vue_type_style_index_1_lang-hffXwR3x.js +7028 -0
  85. package/dist/isUndefined-4Qg9wncf.js +84 -0
  86. package/dist/isUndefined-BEt4O79g.cjs +1 -0
  87. package/dist/{main-C6I42yaU.js → main-CBCk94h5.js} +30 -29
  88. package/dist/main-DO_PN7jt.cjs +1 -0
  89. package/dist/ss-component.cjs +1 -1
  90. package/dist/ss-component.css +2 -2
  91. package/dist/ss-component.js +11 -11
  92. package/dist/ss-component2.cjs +1 -1
  93. package/dist/ss-component2.js +12 -12
  94. package/dist/threeModel-GKSAzHfe.cjs +1 -0
  95. package/dist/{threeModel-BEt5OVCP.js → threeModel-RJwJMtfW.js} +91 -92
  96. package/dist/{threePreview-BUZRvBRx.js → threePreview-BSqdALPK.js} +3 -3
  97. package/dist/{threePreview-Dyzqu5s7.cjs → threePreview-CKvbwCiX.cjs} +1 -1
  98. package/dist/threeSceneView-BVbVe_Et.js +1277 -0
  99. package/dist/threeSceneView-KvCERteS.cjs +5 -0
  100. package/dist/{threeViewerHost-IhSFkCeD.js → threeViewerHost-AuhfL2Cn.js} +55 -57
  101. package/dist/threeViewerHost-D0pu5wk5.cjs +1 -0
  102. package/package.json +1 -1
  103. package/public/icons/svg/editTable.svg +1 -1
  104. package/public/icons/svg/export.svg +1 -0
  105. package/public/icons/svg/model.svg +1 -0
  106. package/public/icons/svg/three.svg +1 -0
  107. package/dist/animationData-B2T3Oamw.js +0 -108
  108. package/dist/animationData-Db_9HBoM.cjs +0 -1
  109. package/dist/iconfont-CZj6ltAs.cjs +0 -1
  110. package/dist/index-2KKrCkl8.cjs +0 -1
  111. package/dist/index-2OWkrGDh.js +0 -24
  112. package/dist/index-B1iXzkUF.cjs +0 -1
  113. package/dist/index-BBB4VObc.cjs +0 -11
  114. package/dist/index-BIVWMqJQ.cjs +0 -1
  115. package/dist/index-BWpZSzL1.cjs +0 -1
  116. package/dist/index-BllULnvx.cjs +0 -1
  117. package/dist/index-BvO1uTn0.js +0 -21
  118. package/dist/index-C2bI4adc.js +0 -8628
  119. package/dist/index-C9pN8_un.js +0 -548
  120. package/dist/index-CPdKWCSo.cjs +0 -1
  121. package/dist/index-CQfFbeTJ.cjs +0 -1
  122. package/dist/index-CZJOPfp5.js +0 -1152
  123. package/dist/index-Cb0q1Y5b.cjs +0 -1
  124. package/dist/index-Cfomm0G1.cjs +0 -109
  125. package/dist/index-CvvFU_QA.cjs +0 -1
  126. package/dist/index-DYMLmifU.cjs +0 -1
  127. package/dist/index-DfPyuGyq.js +0 -101
  128. package/dist/index-Dm2qfeUm.cjs +0 -1
  129. package/dist/index-DtX1F0sz.cjs +0 -4
  130. package/dist/index-Du3VUDcF.cjs +0 -1
  131. package/dist/index-VWNqRYy9.js +0 -36270
  132. package/dist/index-kmj8K3JX.cjs +0 -1
  133. package/dist/index-ndZw4AQJ.cjs +0 -1
  134. package/dist/index-y5FEcncv.cjs +0 -1
  135. package/dist/index.vue_vue_type_style_index_1_lang-Bmwy3cgo.cjs +0 -42
  136. package/dist/index.vue_vue_type_style_index_1_lang-Rs1M3B8e.js +0 -11984
  137. package/dist/main-2gDZp_zL.cjs +0 -1
  138. package/dist/threeModel-DgOcIXVI.cjs +0 -1
  139. package/dist/threeSceneView-BZx98QgN.js +0 -1450
  140. package/dist/threeSceneView-DSkGJN5d.cjs +0 -5
  141. package/dist/threeViewerHost-T_51aUg5.cjs +0 -1
@@ -0,0 +1,5 @@
1
+ "use strict";var ke=Object.defineProperty;var _e=(h,s,a)=>s in h?ke(h,s,{enumerable:!0,configurable:!0,writable:!0,value:a}):h[s]=a;var ue=(h,s,a)=>_e(h,typeof s!="symbol"?s+"":s,a);Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),C=require("./iconfont-Di4uXnX1.cjs"),Ve=require("./index-B-oe2x1V.cjs"),_=require("./STLLoader-BxpEhvEg.cjs"),q=require("./index-weauvEnW.cjs"),de=require("./index.vue_vue_type_style_index_1_lang-DraQDAAw.cjs"),R=require("./index-BOev8isw.cjs"),ge=require("./index-f9bwREQl.cjs"),le=require("./_plugin-vue_export-helper-BHFhmbuH.cjs"),Ne="http://222.92.178.198:60000/chfs/shared/Insofrobot/urdf";function me(h){if(h==null||!isFinite(h))return"";const s=h/(1024*1024);if(s>=1)return`${s.toFixed(1)} MB`;const a=h/1024;return a>=1?`${a.toFixed(1)} KB`:`${h} B`}function he(h){try{const s=h.split("?")[0].split("#")[0];return s.substring(s.lastIndexOf("/")+1)||s}catch{return h}}function Ce(h){const{manager:s,baseFolderUrl:a,onFileProgress:c}=h,v=new Ve.URDFLoader(s);return v.packages=f=>`${a.endsWith("/")?a:a+"/"}${f}/`,v.loadMeshCb=(f,V,d)=>{const E=(()=>{const y=f.split("?")[0].split("#")[0],m=y.lastIndexOf(".");return m>=0?y.slice(m+1).toLowerCase():void 0})();switch(E){case"obj":{const y=(()=>{try{return new URL(".",f).toString()}catch{const t=f.lastIndexOf("/");return t>=0?f.slice(0,t+1):f}})(),m=(()=>{var i;return(((i=f.split("/").pop())==null?void 0:i.split("?")[0].split("#")[0])??"").replace(/\.[^/.?#]+$/,"")})(),g=`${y}${m}.mtl`,r=t=>{const i=new _.OBJLoader(V);t&&i.setMaterials(t),i.load(f,o=>d(o),o=>c==null?void 0:c(f,o==null?void 0:o.loaded,o==null?void 0:o.total),o=>{console.error(`[URDF 资源加载失败,已跳过] 无法加载 OBJ 模型: ${f}`,o),d(new _.Group)})},l=new _.MTLLoader(V);l.setResourcePath(y),l.load(g,t=>{try{t.preload()}catch{}r(t)},t=>c==null?void 0:c(g,t==null?void 0:t.loaded,t==null?void 0:t.total),t=>{console.warn(`[URDF 资源警告] 未找到或加载材质失败: ${g}。将尝试无材质加载。`),r(void 0)});break}case"stl":{new _.STLLoader(V).load(f,m=>{const g=new _.MeshPhongMaterial({color:12303291,shininess:30}),r=new _.Mesh(m,g);r.castShadow=!0,r.receiveShadow=!0,d(r)},m=>c==null?void 0:c(f,m==null?void 0:m.loaded,m==null?void 0:m.total),m=>{console.error(`[URDF 资源加载失败,已跳过] 无法加载 STL 模型: ${f}`,m),d(new _.Group)});break}default:console.error(`[URDF 资源加载失败,已跳过] 不支持的网格格式: .${E} (路径: ${f})`),d(new _.Group)}},v}function $e(h,s,a,c){return{loadSceneFromFile:f=>new Promise((V,d)=>{a.value=!0,c.value="正在初始化 URDF 加载器...";let E=0,y=0,m=null;const g=new _.LoadingManager;g.onStart=(l,t,i)=>{E=i||0,y=t||0,c.value=E>0?`开始下载资源: 0 / ${E}`:"开始下载资源...",a.value=!0},g.onProgress=(l,t,i)=>{y=t,E=i;const o=`正在加载 ${t} / ${i} 个文件: ${he(l)}`;c.value=o,t===i&&(c.value="资源加载完成,正在处理模型...",setTimeout(()=>{if(m){m.updateMatrixWorld(!0);const b=new _.Box3().setFromObject(m);b.isEmpty()&&console.warn("模型加载完成,但所有可视化网格均加载失败,模型将不可见。"),m.userData.boundingBox=b,m.traverse($=>{$.isMesh&&($.castShadow=!0,$.receiveShadow=!0)}),V(m)}else d(new Error("URDF 文件本身加载失败。"));c.value="模型加载完成",setTimeout(()=>{c.value==="模型加载完成"&&(a.value=!1,c.value="")},500)},100))},g.onError=l=>{console.warn(`LoadingManager 报告一个资源加载失败: ${l}。加载流程将继续。`)};const r=(l,t,i)=>{const o=he(l);let b;i&&i>0?b=`${o}(${me(t)} / ${me(i)})`:t&&t>0?b=`${o}(已下载 ${me(t)})`:b=`${o}`,c.value=`正在下载第 ${y+1} / ${E} 个文件: ${b}`};try{const l=URL.createObjectURL(f);Ce({manager:g,baseFolderUrl:Ne,onFileProgress:r}).load(l,i=>{m=i},void 0,i=>{console.error(`加载 URDF 文件 (${f.name}) 时发生致命错误:`,i),c.value="URDF 文件解析失败",a.value=!1,d(new Error(`加载 URDF 文件失败: ${f.name}`,{cause:i}))})}catch(l){console.error("初始化 URDF 加载时发生致命错误:",l),c.value="模型加载失败",a.value=!1,d(l)}})}}class Se{constructor(s){ue(this,"robot");ue(this,"movableJoints");this.robot=s,this.movableJoints=this.getMovableJoints()}getMovableJoints(){return Object.values(this.robot.joints).filter(s=>s.jointType!=="fixed")}getMovableJointNames(){return this.movableJoints.map(s=>s.name)}setJointAngle(s,a){const c=this.robot.joints[s];if(!c||c.jointType==="fixed")return console.warn(`关节 ${s} 不存在或不可动`),!1;if(c.limit){const v=Math.max(c.limit.lower,Math.min(c.limit.upper,a));v!==a&&console.warn(`关节 ${s} 角度被限制在 [${c.limit.lower}, ${c.limit.upper}]`),c.setJointValue(v)}else c.setJointValue(a);return!0}setJointAngles(s){Object.entries(s).forEach(([a,c])=>{typeof c=="number"&&!isNaN(c)&&this.setJointAngle(a,c)})}getCurrentJointStates(){const s={};return this.movableJoints.forEach(a=>{s[a.name]=a.angle||0}),s}resetToZero(){this.movableJoints.forEach(s=>{s.setJointValue(0)})}getJointLimits(s){const a=this.robot.joints[s];return!a||!a.limit?null:{lower:a.limit.lower,upper:a.limit.upper}}async animateToState(s,a=1e3,c){const v=this.getCurrentJointStates(),f=Date.now();return new Promise(V=>{const d=()=>{const E=Date.now()-f,y=Math.min(E/a,1),m=this.easeInOutCubic(y),g={};Object.keys(s).forEach(r=>{const l=v[r]||0,t=s[r];g[r]=l+(t-l)*m}),this.setJointAngles(g),c&&c(y),y<1?requestAnimationFrame(d):V()};d()})}easeInOutCubic(s){return s<.5?4*s*s*s:1-Math.pow(-2*s+2,3)/2}async playSequence(s,a=1e3,c){for(let v=0;v<s.length;v++)await this.animateToState(s[v],a,f=>{c&&c(v,f)})}}const oe=.001,ee=_.MathUtils.degToRad,xe=h=>h.reduce((s,a)=>{let c=0;const v=a.Y??0,f=a.C??0,V=a.R??0;return v>0&&(c+=v),f>0&&V>0&&(c+=V*ee(f)),s+c},0),Me=h=>{const s=[],a=h.Y??0,c=h.B??0,v=h.C??0,f=h.R??0,V={pos:new _.Vector3(0,0,0),localY:new _.Vector3(0,1,0),localX:new _.Vector3(1,0,0),localZ:new _.Vector3(0,0,1)};if(!a&&!v)return s;if(s.push(V.pos.clone()),c!==0){const d=new _.Matrix4().makeRotationAxis(V.localY,ee(c));V.localX.applyMatrix4(d),V.localZ.applyMatrix4(d)}if(a>0&&(V.pos.add(V.localY.clone().multiplyScalar(a*oe)),s.push(V.pos.clone())),v>0&&f>0){const d=ee(v),E=f*oe,y=V.pos.clone().add(V.localX.clone().multiplyScalar(-E)),m=Math.max(16,Math.ceil(v/5));for(let g=1;g<=m;g++){const r=d*g/m,l=new _.Matrix4().makeRotationAxis(V.localZ,r),i=V.localX.clone().multiplyScalar(E).applyMatrix4(l),o=y.clone().add(i);s.push(o)}}return s};function te(h,s,a,c,v,f=0){let V=s.slice(0,v+1);const d=s[v+1];if(d&&f>0){const t={...d,B:(d.B??0)*f,C:(d.C??0)*f};V.push(t)}const E=xe(V),y=Math.max(0,a-E),m=[];m.push(new _.Vector3(0,0,0));const g=new _.Vector3(0,y*oe,0);y>0&&m.push(g);let r={pos:g.clone(),localY:new _.Vector3(0,1,0),localX:new _.Vector3(1,0,0),localZ:new _.Vector3(0,0,1)};const l=[];for(let t=V.length-1;t>=0;t--){const i=V[t],o=Me(i);if(o.length>0){const b=o.map(z=>{const J=z.clone(),Y=new _.Matrix4;return Y.makeBasis(r.localX,r.localY,r.localZ),J.applyMatrix4(Y),J.add(r.pos)});l.push(b);const $=b[b.length-1];r.pos=$.clone();const I=i.B??0,H=i.C??0;if(I!==0){const z=new _.Matrix4().makeRotationAxis(r.localY,ee(I));r.localX.applyMatrix4(z),r.localZ.applyMatrix4(z)}if(H>0){const z=ee(H),J=new _.Matrix4().makeRotationAxis(r.localZ,z);r.localY.applyMatrix4(J),r.localX.applyMatrix4(J)}}}for(const t of l)t.length>1&&m.push(...t.slice(1));m.length<2&&m.push(new _.Vector3(0,.001,0));try{const t=new _.CatmullRomCurve3(m,!1,"catmullrom",.01),i=new _.TubeGeometry(t,Math.max(2,m.length*4),c*oe,18,!1);h.geometry.dispose(),h.geometry=i}catch(t){console.error("管件更新失败",t)}}const De={class:"panel-content"},Re={class:"action-bar"},Te={key:0,class:"animation-controls"},Fe={class:"control-row"},Le={class:"control-row"},Be={class:"control-row"},Ie={class:"frame-info"},ze={class:"control-row"},Je={class:"progress-bar"},Ue={key:1,class:"table-footer"},je={class:"dialog-footer"},Ae=e.defineComponent({__name:"animationPanel",props:{model:{},threeData:{}},emits:["getThreeData"],setup(h,{emit:s}){const a=h,c=s;e.watch(()=>a.threeData,()=>{if(a.threeData){const u=R.cloneDeep(a.threeData);d.value=(u==null?void 0:u["输出(动画数据)"])||[],console.log("aniamtion tableData",d.value);const n=(u==null?void 0:u.extra)||{};console.log("aniamtion extraForm",n);let w=n.管长,x=n.外径;console.log("管长",w,"外径",x,n),$.value=w,I.value=x/2}});const v=e.ref(),f=e.ref(),V=async()=>{if(!sessionStorage.getItem("systemKey")){c("getThreeData");return}const n=await de.getItemData("弯管仿真加工分析/管件解析",sessionStorage.getItem("systemKey"),"");let w=["管长","外径"],x={};n==null||n.forEach(k=>{var M;(k==null?void 0:k.comp)==="Form"&&((M=k==null?void 0:k.compData)==null||M.forEach(P=>{var W;(P==null?void 0:P.key)==="formContent"&&((W=P==null?void 0:P.contents)==null||W.forEach(K=>{w.includes(K==null?void 0:K.key)&&(x[K.key]=K.value)}))}))});let N=x.管长,L=x.外径;console.log("管长",N,"外径",L,x),$.value=N,I.value=L/2;let U={};const j=await de.getItemData("弯管仿真加工分析/仿真动画生成",sessionStorage.getItem("systemKey"),"");j==null||j.forEach(k=>{var M,P,W,K,pe,fe;if((k==null?void 0:k.comp)==="Table"){let ve=[],ie=(W=(P=(M=k==null?void 0:k.compData)==null?void 0:M.find(F=>(F==null?void 0:F.key)==="header"))==null?void 0:P.contents)==null?void 0:W.map(F=>F==null?void 0:F.label),ce=(fe=(pe=(K=k==null?void 0:k.compData)==null?void 0:K.find(F=>(F==null?void 0:F.key)==="tableContents"))==null?void 0:pe.contents)==null?void 0:fe.map(F=>(F=F==null?void 0:F.filter(Q=>!(Q!=null&&Q.id)),F));ce==null||ce.forEach(F=>{ve.push(de.getValueToObjectValue(F,ie==null?void 0:ie.filter(Q=>Q!=="操作")))}),U[k.name]=ve,U[k.name+"Content"]=k}}),v.value=U;const B=R.cloneDeep(v.value);d.value=(B==null?void 0:B["输出(动画数据)"])||[];let O=(B==null?void 0:B["输出(动画数据)Content"])??[];O&&(f.value=O)},d=e.ref([]),E=e.ref(!1),y=e.ref(""),m=e.ref(!1),g=e.ref(0),r=e.ref(0),l=e.ref(1e3),t=e.ref(null);let i=!1;const o=e.shallowRef(null),b=e.shallowRef(null),$=e.ref(1302),I=e.ref(12.5),H=e.ref(30),z=e.ref([]),J=e.ref(null),Y=e.computed(()=>a.model?Object.values(a.model.joints).filter(u=>u.jointType!=="fixed").map(u=>u.name):[]),ne=e.ref(["Y","B","C","R"]),D=e.computed(()=>[...Y.value,...ne.value]),ae=e.computed(()=>D.value.length>0?`请按以下格式粘贴数据 (第一行为表头,使用 Tab 分隔):
2
+ ${D.value.join(" ")}
3
+ 0 0 0 ...
4
+ 1 2 3 ...`:"请先加载模型。"),A=(u,n)=>{if(!n)return null;const w=u.links[n];if(!w)return console.warn(`在模型中未找到名为 '${n}' 的 link`),console.log("可用的链接:",Object.keys(u.links)),null;let x=null;return w.traverse(N=>{N instanceof _.Mesh&&!x&&(x=N)}),x||console.warn(`在 link '${n}' 中未找到可用的 Mesh 对象`),x},G=()=>{b.value&&(b.value.visible=!0),o.value&&o.value.parent&&o.value.parent.remove(o.value),b.value=null,o.value=null};e.watch(D,(u,n)=>{if(JSON.stringify(u)!==JSON.stringify(n))if(u.length>0){const w=u.reduce((x,N)=>(x[N]="0",x),{});d.value=[w]}else d.value=[]},{immediate:!0}),e.watch(()=>a.model,u=>{G(),u?(t.value=new Se(u),z.value=Object.keys(u.links),z.value.includes("Pipe_Link")?J.value="Pipe_Link":J.value=null):(t.value=null,z.value=[],J.value=null)},{immediate:!0}),e.watch(J,u=>{if(G(),a.model&&u){const n=A(a.model,u);if(console.log(n,"meshToReplace"),n&&n.parent){b.value=n;const w=new _.Mesh(n.geometry.clone(),n.material);w.name="managed_pipe_clone",n.parent.add(w),w.position.copy(n.position),w.rotation.copy(n.rotation),w.scale.copy(n.scale),n.visible=!1,w.position.y-=H.value*.001,o.value=w,R.ElMessage.success(`已将 Link: "${u}" 设置为当前管件`)}else u&&console.warn(`在 link '${u}' 中未找到可替换的网格或其没有父级。`)}});const Z=()=>d.value.map(u=>({Y:parseFloat(u.Y)||0,B:parseFloat(u.B)||0,C:parseFloat(u.C)||0,R:parseFloat(u.R)||0})),se=u=>{if(u<0||u>=d.value.length){console.error(`帧索引 ${u} 超出范围`);return}const n=d.value[u];if(console.log(`应用第 ${u} 帧数据 ${n.value}`),t.value){const w={};Y.value.forEach(x=>{const N=parseFloat(n[x]);isNaN(N)||(w[x]=N)}),t.value.setJointAngles(w)}if(o.value){const w=Z();console.log("ybcr数据:",w),te(o.value,w,$.value,I.value,u,0)}g.value=u},re=async()=>{if(d.value.length===0){R.ElMessage.error("无法播放动画:无数据");return}m.value=!0,i=!1,g.value=0;const u=o.value?Z():[];try{for(let n=0;n<d.value.length&&!i;n++){g.value=n;const w=d.value[n],x={};t.value&&Y.value.forEach(N=>{const L=parseFloat(w[N]);isNaN(L)||(x[N]=L)}),t.value?await t.value.animateToState(x,l.value,N=>{r.value=(n+N)/d.value.length*100,o.value&&te(o.value,u,$.value,I.value,n-1,N)}):o.value?await new Promise(N=>{const L=performance.now();let U;const j=B=>{if(i){cancelAnimationFrame(U),N();return}const O=B-L,k=Math.min(O/l.value,1);r.value=(n+k)/d.value.length*100,te(o.value,u,$.value,I.value,n-1,k),k<1?U=requestAnimationFrame(j):N()};U=requestAnimationFrame(j)}):(await new Promise(N=>setTimeout(N,l.value)),r.value=(n+1)/d.value.length*100)}i||R.ElMessage.success("动画播放完成")}catch(n){console.error("动画播放出错:",n),R.ElMessage.error("动画播放出错")}finally{m.value=!1,r.value=0}},T=()=>{i=!0,m.value=!1,r.value=0,R.ElMessage.info("动画已停止")},p=()=>{if(t.value&&t.value.resetToZero(),console.log("pipeMesh.value",o.value),o.value){const u=Z();te(o.value,u,$.value,I.value,-1,0)}g.value=0,R.ElMessage.success("机器人和管件已重置")},X=()=>{console.log("当前管件Mesh:",o.value)},S=u=>{m.value&&T(),se(u)},ye=async()=>{if(D.value.length===0){R.ElMessage.warning("没有可导出的表头");return}const u=D.value.join(" ");try{await navigator.clipboard.writeText(u),R.ElMessage.success("表头已成功复制到剪贴板!")}catch(n){console.error("复制失败:",n),R.ElMessage.error("复制失败,请检查浏览器权限或手动复制。")}},be=()=>{if(!y.value.trim()){R.ElMessage.warning("导入内容不能为空");return}const u=y.value.trim().split(`
5
+ `).filter(L=>L.trim()!=="");if(u.length<2){R.ElMessage.error("导入数据至少需要包含表头行和一行数据");return}const n=u[0].split(" ").map(L=>L.trim()),w={};if(n.forEach((L,U)=>{D.value.includes(L)&&(w[U]=L)}),Object.keys(w).length===0){R.ElMessage.error("没有找到匹配的表头,请检查表头名称是否正确");return}const N=u.slice(1).map(L=>{const U=L.split(" "),j={};return D.value.forEach(B=>{j[B]="0"}),Object.entries(w).forEach(([B,O])=>{const k=U[parseInt(B)];k!==void 0&&k.trim()!==""&&(j[O]=k.trim())}),j});N.length>0?(d.value=N,R.ElMessage.success(`成功导入 ${N.length} 行数据!`),E.value=!1,y.value=""):R.ElMessage.error("未能解析到有效数据,请检查格式。")},we=()=>{const u=D.value.reduce((n,w)=>(n[w]="0",n),{});d.value.push(u)},Ee=u=>`第 ${u+1} 帧`;return e.onUnmounted(()=>{G(),i=!0}),(u,n)=>{var B,O,k;const w=e.resolveComponent("el-icon"),x=e.resolveComponent("el-input-number"),N=e.resolveComponent("el-slider"),L=e.resolveComponent("el-progress"),U=e.resolveComponent("el-input"),j=e.resolveComponent("el-dialog");return e.openBlock(),e.createElementBlock("div",De,[e.createElementVNode("div",Re,[e.createVNode(q._sfc_main$1,{onClick:V,modelValue:"获取数据"}),e.createVNode(q._sfc_main$1,{onClick:ye,disabled:D.value.length===0,modelValue:"导出表头"},null,8,["disabled"]),e.createVNode(q._sfc_main$1,{modelValue:"播放",onClick:re,disabled:d.value.length===0||m.value,buttonType:"primary"},{default:e.withCtx(()=>[m.value?(e.openBlock(),e.createBlock(w,{key:0,class:"is-loading"},{default:e.withCtx(()=>[e.createVNode(e.unref(R.loading_default))]),_:1})):e.createCommentVNode("",!0)]),_:1},8,["disabled"]),e.createVNode(q._sfc_main$1,{onClick:T,modelValue:"停止",buttonType:"danger"}),e.createVNode(q._sfc_main$1,{onClick:p,modelValue:"重置",buttonType:"primary"}),e.createVNode(q._sfc_main$1,{onClick:X,modelValue:"测试功能",buttonType:"primary"})]),d.value.length>0?(e.openBlock(),e.createElementBlock("div",Te,[e.createElementVNode("div",Fe,[n[8]||(n[8]=e.createElementVNode("label",null,"帧间隔 (ms):",-1)),e.createVNode(x,{modelValue:l.value,"onUpdate:modelValue":n[0]||(n[0]=M=>l.value=M),min:100,max:5e3,step:100,size:"small",style:{width:"120px"}},null,8,["modelValue"]),n[9]||(n[9]=e.createElementVNode("label",null,"管件总长 (mm):",-1)),e.createVNode(x,{modelValue:$.value,"onUpdate:modelValue":n[1]||(n[1]=M=>$.value=M),min:0,size:"small",style:{width:"120px"}},null,8,["modelValue"]),n[10]||(n[10]=e.createElementVNode("label",null,"管件半径 (mm):",-1)),e.createVNode(x,{modelValue:I.value,"onUpdate:modelValue":n[2]||(n[2]=M=>I.value=M),min:0,size:"small",style:{width:"120px"}},null,8,["modelValue"])]),e.createElementVNode("div",Le,[n[11]||(n[11]=e.createElementVNode("label",null,"管件 Mesh:",-1)),e.createVNode(e.unref(ge.ElSelect),{modelValue:J.value,"onUpdate:modelValue":n[3]||(n[3]=M=>J.value=M),placeholder:"选择管件Link",size:"small",disabled:"",style:{width:"180px"}},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(z.value,M=>(e.openBlock(),e.createBlock(e.unref(ge.ElOption),{key:M,label:M,value:M},null,8,["label","value"]))),128))]),_:1},8,["modelValue","disabled"])]),e.createElementVNode("div",Be,[n[12]||(n[12]=e.createElementVNode("label",null,"当前帧:",-1)),e.createElementVNode("span",Ie,e.toDisplayString(g.value+1)+" / "+e.toDisplayString(d.value.length),1)]),e.createElementVNode("div",ze,[n[13]||(n[13]=e.createElementVNode("label",null,"动画进度:",-1)),e.createVNode(N,{modelValue:g.value,"onUpdate:modelValue":n[4]||(n[4]=M=>g.value=M),min:0,max:d.value.length>0?d.value.length-1:0,step:1,"format-tooltip":Ee,onInput:S,disabled:d.value.length===0,style:{"flex-grow":"1",margin:"0 10px"}},null,8,["modelValue","max","disabled"])]),e.createElementVNode("div",Je,[e.createVNode(L,{percentage:r.value,"show-text":!1,"stroke-width":6},null,8,["percentage"])])])):e.createCommentVNode("",!0),(e.openBlock(),e.createBlock(Ve.ssTable,{itemData:(B=f.value)==null?void 0:B.compData,key:(O=f.value)==null?void 0:O.id,index:(k=f.value)==null?void 0:k.id,showHeader:!1},null,8,["itemData","index"])),D.value.length>0?(e.openBlock(),e.createElementBlock("div",Ue,[e.createVNode(q._sfc_main$1,{modelValue:"添加新行",onClick:we,buttonType:"primary"},{default:e.withCtx(()=>[m.value?(e.openBlock(),e.createBlock(w,{key:0,class:"is-loading"},{default:e.withCtx(()=>[e.createVNode(e.unref(R.loading_default))]),_:1})):e.createCommentVNode("",!0)]),_:1})])):e.createCommentVNode("",!0),e.createVNode(j,{modelValue:E.value,"onUpdate:modelValue":n[7]||(n[7]=M=>E.value=M),title:"导入数据",width:"500px"},{footer:e.withCtx(()=>[e.createElementVNode("span",je,[e.createVNode(q._sfc_main$1,{modelValue:"取消",onClick:n[6]||(n[6]=M=>E.value=!1)}),e.createVNode(q._sfc_main$1,{modelValue:"确认导入",onClick:be,type:"primary"})])]),default:e.withCtx(()=>[n[14]||(n[14]=e.createElementVNode("p",{class:"import-instructions"}," 请从Excel或csv中复制数据 (首行为表头, Tab分隔) ",-1)),e.createVNode(U,{modelValue:y.value,"onUpdate:modelValue":n[5]||(n[5]=M=>y.value=M),type:"textarea",rows:10,placeholder:ae.value},null,8,["modelValue","placeholder"])]),_:1,__:[14]},8,["modelValue"])])}}}),Oe=le._export_sfc(Ae,[["__scopeId","data-v-bd8eb2be"]]),Pe={class:"panel-content"},qe={key:0,class:"joints-list"},Ye={class:"joint-info-row"},Ge={class:"joint-left"},Xe={class:"joint-name"},Ke={class:"joint-range"},Ze={class:"joint-type"},He={key:0,class:"joint-control-row"},We={class:"slider-container"},Qe=["min","max","value","onInput"],et={class:"value-display"},tt={class:"joint-value"},ot={class:"unit"},lt={key:1,class:"empty-state"},nt=e.defineComponent({__name:"urdfJointPanel",props:{model:{}},setup(h,{expose:s}){const a=h,c=e.ref([]),v=e.ref(null),f=(r,l=!1)=>r==="revolute"?l?Math.PI:-Math.PI:r==="prismatic"?l?1:-1:0,V=r=>{if(!r||!r.joints)return console.warn("URDF模型无效或不包含关节信息"),[];const l=[];return Object.keys(r.joints).forEach(t=>{var b,$;const i=r.joints[t];if(i.jointType==="fixed")return;const o={lower:((b=i.limit)==null?void 0:b.lower)??f(i.jointType,!1),upper:(($=i.limit)==null?void 0:$.upper)??f(i.jointType,!0)};l.push({name:t,type:i.jointType||"unknown",limit:o,currentValue:i.angle||0,urdfJoint:i})}),l.sort((t,i)=>t.name.localeCompare(i.name))},d=(r,l)=>{var b;const t=c.value.find($=>$.name===r);if(!t)return;const i=parseFloat(l),o=Math.max(t.limit.lower,Math.min(t.limit.upper,i));t.currentValue=o,(b=a.model)!=null&&b.setJointValue?a.model.setJointValue(r,o):t.urdfJoint.setJointValue(o)},E=()=>{c.value.forEach(r=>{(r.type==="revolute"||r.type==="prismatic")&&d(r.name,0)})},y=()=>{a.model&&c.value.forEach(r=>{r.urdfJoint.angle!==void 0&&r.currentValue!==r.urdfJoint.angle&&(r.currentValue=r.urdfJoint.angle)})},m=()=>{const r=()=>{y(),v.value=requestAnimationFrame(r)};r()},g=()=>{v.value&&(cancelAnimationFrame(v.value),v.value=null)};return e.watch(()=>a.model,r=>{r?c.value=V(r):c.value=[]},{immediate:!0}),e.onMounted(()=>{m()}),e.onUnmounted(()=>{g()}),s({resetAllJoints:E}),(r,l)=>(e.openBlock(),e.createElementBlock("div",Pe,[c.value.length>0?(e.openBlock(),e.createElementBlock("div",qe,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(c.value,t=>(e.openBlock(),e.createElementBlock("div",{key:t.name,class:"joint-item"},[e.createElementVNode("div",Ye,[e.createElementVNode("div",Ge,[e.createElementVNode("span",Xe,e.toDisplayString(t.name),1),e.createElementVNode("span",Ke," ["+e.toDisplayString(t.limit.lower.toFixed(2))+", "+e.toDisplayString(t.limit.upper.toFixed(2))+"] ",1)]),e.createElementVNode("span",Ze,e.toDisplayString(t.type),1)]),t.type==="revolute"||t.type==="prismatic"?(e.openBlock(),e.createElementBlock("div",He,[e.createElementVNode("div",We,[e.createElementVNode("input",{type:"range",min:t.limit.lower,max:t.limit.upper,step:"0.01",value:t.currentValue,onInput:i=>d(t.name,i.target.value),class:"joint-slider"},null,40,Qe)]),e.createElementVNode("div",et,[e.createElementVNode("span",tt,e.toDisplayString(t.currentValue?Number(t.currentValue).toFixed(3):"0.000"),1),e.createElementVNode("span",ot,e.toDisplayString(t.type==="revolute"?"rad":"m"),1)])])):e.createCommentVNode("",!0)]))),128))])):(e.openBlock(),e.createElementBlock("div",lt,l[0]||(l[0]=[e.createElementVNode("p",null,"未检测到可控制的关节",-1)])))]))}}),at=le._export_sfc(nt,[["__scopeId","data-v-9adcbc67"]]),st={class:"panel-content"},rt="id",it={__name:"urdfTree",props:{model:Object,maxExpandCount:{type:Number,default:10},expandStrategy:{type:String,default:"breadth",validator:h=>["breadth","firstLevel"].includes(h)}},emits:["nodeClick"],setup(h,{emit:s}){const a=h,c=s,v=e.ref([]),f={children:"children",label:"label"},V=l=>{c("nodeClick",l)},d=(l,t=0)=>{const i=[];return Array.isArray(l)&&(l==null?void 0:l.length)>0&&l.forEach(o=>{if(!(o!=null&&o.isMesh)&&((o==null?void 0:o.type)==="URDFJoint"||(o==null?void 0:o.type)==="URDFLink")){const b={name:o==null?void 0:o.name,label:o==null?void 0:o.name,show:!0,level:t+1,isPenultimate:!1,type:o==null?void 0:o.type,id:o==null?void 0:o.id,limit:(o==null?void 0:o.limit)??"",children:d(o==null?void 0:o.children,t+1),path:o==null?void 0:o.name};i.push(b)}}),i},E=l=>l?[{name:l==null?void 0:l.name,label:l==null?void 0:l.name,show:!0,level:1,isPenultimate:!1,type:l==null?void 0:l.type,id:l==null?void 0:l.id,limit:(l==null?void 0:l.limit)??"",children:d(l==null?void 0:l.children,1),path:l==null?void 0:l.name}]:[],y=(l,t)=>{const i=[],o=[...l];for(;o.length>0&&i.length<t;){const b=o.shift();b.children&&b.children.length>0&&(i.push(b.id),o.push(...b.children))}return i},m=(l,t)=>{const i=[];return l.forEach(o=>{if(o.children&&o.children.length>0){i.push(o.id);const b=o.children.filter($=>$.children&&$.children.length>0).slice(0,t).map($=>$.id);i.push(...b)}}),i.slice(0,t+1)},g=e.computed(()=>!v.value||v.value.length===0?[]:a.expandStrategy==="firstLevel"?m(v.value,a.maxExpandCount):y(v.value,a.maxExpandCount)),r=e.computed(()=>a!=null&&a.model?E(a.model):[]);return e.watch(r,l=>{v.value=JSON.parse(JSON.stringify(l))},{immediate:!0}),(l,t)=>{const i=e.resolveComponent("el-tree");return e.openBlock(),e.createElementBlock("div",st,[e.createVNode(i,{data:v.value,props:f,"default-expanded-keys":g.value,"node-key":rt,onNodeClick:V},null,8,["data","default-expanded-keys"])])}}},ct=le._export_sfc(it,[["__scopeId","data-v-0dda287c"]]),ut={class:"obj-viewer-container"},dt={class:"buttonGroup-top"},mt={class:"buttonGroup-topLeft"},pt={class:"buttonGroup-left"},ft={class:"buttonGroup-right"},vt={class:"buttonGroup-bottom"},gt={class:"left-panel"},ht={class:"panel-header"},Vt={class:"panel-body"},yt={key:1,class:"clipping-content"},bt={class:"radio-group"},wt={class:"radio-label"},Et={class:"radio-label"},kt={class:"radio-label"},_t={class:"radio-label"},Nt={class:"right-panel"},Ct={class:"panel-header"},$t={class:"panel-body"},St={key:0,class:"loading-overlay"},xt=e.defineComponent({__name:"threeSceneView",props:{fileBlobs:{default:()=>[]},animationData:{default:()=>({})},threeData:{}},emits:["getAnimationData","getThreeData"],setup(h,{emit:s}){const a=s,c=h,v=e.ref(null),f=e.ref(!1),V=e.ref(""),d=e.ref(!1),E=e.ref(""),y=e.ref(!1),m=e.ref(""),g=e.shallowRef(null),r=e.shallowRef(null),{currentModels:l,resetView:t,initThreeJS:i,handleResize:o,getThreeJSObjects:b,cleanup:$,setModels:I}=C.useThreeJS(v),{loadSceneFromFile:H}=$e(b,l,f,V),{isAnimating:z,toggleAnimation:J,stopAnimation:Y}=C.useAnimation(b,l),{isClipping:ne,activeClippingAxis:D,toggleClipping:ae,updateClippingPlanes:A}=C.useClipping(b,l),G=T=>{d.value=!0,E.value=T,T==="剖面视图"&&!ne.value&&ae()},Z=T=>{y.value=!0,m.value=T,T==="动画仿真"&&a("getAnimationData")},se=()=>{a("getThreeData")},re=()=>{e.nextTick(()=>{})};return e.watch(()=>c.fileBlobs,T=>{if(T&&T.length>0){const p=T[0];if(!p.name.toLowerCase().endsWith(".urdf")){R.ElMessage.warning("提供的文件不是有效的 urdf 文件。");return}H(p).then(X=>{g.value=X}).catch(X=>{console.error("加载URDF文件时发生错误:",X),R.ElMessage.error("加载urdf模型失败"),g.value=null})}else g.value=null},{immediate:!0,deep:!0}),e.watch(g,T=>{I(T?[T]:[])}),e.onMounted(async()=>{await e.nextTick();try{i(),window.addEventListener("resize",o);const T=b();r.value=T.scene}catch(T){console.error("Three.js 初始化失败:",T),R.ElMessage.error("渲染引擎初始化失败!")}}),e.onBeforeUnmount(()=>{E.value="",m.value="",window.removeEventListener("resize",o),z.value&&Y(),$()}),(T,p)=>{const X=e.resolveComponent("el-scrollbar");return e.openBlock(),e.createElementBlock("div",ut,[e.createElementVNode("div",{ref_key:"threejsContainer",ref:v,class:"threejs-container"},null,512),e.createElementVNode("div",dt,[e.createVNode(C.SvgIcon,{name:"guanjianjiexi",size:"34"}),e.createVNode(C.SvgIcon,{name:"guanjiekongzhi",size:"34"}),e.createVNode(C.SvgIcon,{name:"gongyishengcheng",size:"34"}),e.createVNode(C.SvgIcon,{name:"buchangshezhi",size:"34"}),e.createVNode(C.SvgIcon,{name:"shuchujiagongchengxu",size:"34"})]),e.createElementVNode("div",mt,[e.createVNode(C.SvgIcon,{name:"viewReset",size:"24",onClick:e.unref(t),title:"重置"},null,8,["onClick"]),e.createVNode(C.SvgIcon,{name:"fangda",size:"24",title:"放大"}),e.createVNode(C.SvgIcon,{name:"suoxiao",size:"24",title:"缩小"}),e.createVNode(C.SvgIcon,{name:"lookAround",size:"24",onClick:e.unref(J),title:e.unref(z)?"停止动画":"动画视图"},null,8,["onClick","title"])]),e.createElementVNode("div",pt,[e.createVNode(C.SvgIcon,{name:"jiegoushu",size:"24",onClick:p[0]||(p[0]=S=>G("场景树")),active:d.value&&E.value==="场景树",title:"场景树"},null,8,["active"]),e.createVNode(C.SvgIcon,{name:"clipping",size:"24",onClick:p[1]||(p[1]=S=>G("剖面视图")),active:d.value&&E.value==="剖面视图",title:"剖面视图"},null,8,["active"]),e.createVNode(C.SvgIcon,{name:"donghuafangzhen",size:"24",onClick:p[2]||(p[2]=S=>G("场景树3"))}),e.createVNode(C.SvgIcon,{name:"donghuafangzhen",size:"24",onClick:p[3]||(p[3]=S=>G("场景4"))})]),e.createElementVNode("div",ft,[e.createVNode(C.SvgIcon,{name:"donghuafangzhen",size:"24"}),e.createVNode(C.SvgIcon,{name:"donghuafangzhen",size:"24"}),e.createVNode(C.SvgIcon,{name:"guanjiekongzhi",size:"24",onClick:p[4]||(p[4]=S=>Z("关节控制")),active:y.value&&m.value==="关节控制",title:"关节控制"},null,8,["active"]),e.createVNode(C.SvgIcon,{name:"donghuafangzhen",size:"24",title:"动画仿真",onClick:p[5]||(p[5]=S=>Z("动画仿真")),active:y.value&&m.value==="动画仿真"},null,8,["active"]),e.createVNode(C.SvgIcon,{name:"donghuafangzhen",size:"24",title:"urdf动画",onClick:p[6]||(p[6]=S=>Z("urdf动画")),active:y.value&&m.value==="urdf动画"},null,8,["active"]),e.createVNode(C.SvgIcon,{name:"donghuafangzhen",size:"24"})]),e.createElementVNode("div",vt,[e.createVNode(C.SvgIcon,{name:"kuaitui",size:"24",backgroundColor:"#ffffff",title:"快退",onClick:p[7]||(p[7]=()=>{})}),e.createVNode(C.SvgIcon,{name:"bofang",size:"24",backgroundColor:"#ffffff",title:"播放",onClick:re}),e.createVNode(C.SvgIcon,{name:"kuaijin",size:"24",backgroundColor:"#ffffff",title:"快进",onClick:p[8]||(p[8]=()=>{})}),e.createVNode(C.SvgIcon,{name:"zanting",size:"24",backgroundColor:"#ffffff",title:"暂停",onClick:p[9]||(p[9]=()=>{})}),e.createVNode(C.SvgIcon,{name:"zhongzhi",size:"24",backgroundColor:"#ffffff",title:"停止",onClick:p[10]||(p[10]=()=>{})})]),e.withDirectives(e.createElementVNode("div",gt,[e.createElementVNode("div",ht,[e.createElementVNode("span",null,e.toDisplayString(E.value),1),e.createElementVNode("span",{class:"close",onClick:p[11]||(p[11]=S=>d.value=!1)}," X ")]),e.createElementVNode("div",Vt,[e.createVNode(X,{height:"100%"},{default:e.withCtx(()=>[E.value==="场景树"?(e.openBlock(),e.createBlock(ct,{key:0,model:g.value},null,8,["model"])):e.createCommentVNode("",!0),E.value==="剖面视图"?(e.openBlock(),e.createElementBlock("div",yt,[e.createElementVNode("div",bt,[e.createElementVNode("label",wt,[e.withDirectives(e.createElementVNode("input",{type:"radio",name:"clipping-axis",value:"none","onUpdate:modelValue":p[12]||(p[12]=S=>e.isRef(D)?D.value=S:null),onChange:p[13]||(p[13]=(...S)=>e.unref(A)&&e.unref(A)(...S))},null,544),[[e.vModelRadio,e.unref(D)]]),p[21]||(p[21]=e.createElementVNode("span",{class:"radio-text"},"无切割",-1))]),e.createElementVNode("label",Et,[e.withDirectives(e.createElementVNode("input",{type:"radio",name:"clipping-axis",value:"x","onUpdate:modelValue":p[14]||(p[14]=S=>e.isRef(D)?D.value=S:null),onChange:p[15]||(p[15]=(...S)=>e.unref(A)&&e.unref(A)(...S))},null,544),[[e.vModelRadio,e.unref(D)]]),p[22]||(p[22]=e.createElementVNode("span",{class:"radio-text"},"X轴切割",-1))]),e.createElementVNode("label",kt,[e.withDirectives(e.createElementVNode("input",{type:"radio",name:"clipping-axis",value:"y","onUpdate:modelValue":p[16]||(p[16]=S=>e.isRef(D)?D.value=S:null),onChange:p[17]||(p[17]=(...S)=>e.unref(A)&&e.unref(A)(...S))},null,544),[[e.vModelRadio,e.unref(D)]]),p[23]||(p[23]=e.createElementVNode("span",{class:"radio-text"},"Y轴切割",-1))]),e.createElementVNode("label",_t,[e.withDirectives(e.createElementVNode("input",{type:"radio",name:"clipping-axis",value:"z","onUpdate:modelValue":p[18]||(p[18]=S=>e.isRef(D)?D.value=S:null),onChange:p[19]||(p[19]=(...S)=>e.unref(A)&&e.unref(A)(...S))},null,544),[[e.vModelRadio,e.unref(D)]]),p[24]||(p[24]=e.createElementVNode("span",{class:"radio-text"},"Z轴切割",-1))])])])):e.createCommentVNode("",!0)]),_:1})])],512),[[e.vShow,d.value]]),e.withDirectives(e.createElementVNode("div",Nt,[e.createElementVNode("div",Ct,[e.createElementVNode("span",null,e.toDisplayString(m.value),1),e.createElementVNode("span",{class:"close",onClick:p[20]||(p[20]=S=>y.value=!1)}," X ")]),e.createElementVNode("div",$t,[e.createVNode(X,{height:"100%"},{default:e.withCtx(()=>[e.withDirectives(e.createVNode(at,{model:g.value},null,8,["model"]),[[e.vShow,m.value==="关节控制"]]),e.withDirectives(e.createVNode(Oe,{model:g.value,onGetThreeData:se,threeData:c.threeData},null,8,["model","threeData"]),[[e.vShow,m.value==="动画仿真"]])]),_:1})])],512),[[e.vShow,y.value]]),f.value?(e.openBlock(),e.createElementBlock("div",St,[p[25]||(p[25]=e.createElementVNode("div",{class:"loading-spinner"},null,-1)),e.createElementVNode("p",null,e.toDisplayString(V.value),1)])):e.createCommentVNode("",!0)])}}}),Mt=le._export_sfc(xt,[["__scopeId","data-v-2598a604"]]);exports.default=Mt;
@@ -1,10 +1,10 @@
1
- import { defineComponent as k, defineAsyncComponent as p, ref as u, watch as C, createElementBlock as d, openBlock as m, normalizeClass as A, createBlock as h, createCommentVNode as B, unref as w } from "vue";
2
- import { s as y } from "./index-C2bI4adc.js";
3
- import "./index.vue_vue_type_style_index_0_scoped_0f027c8c_lang-qefZ9E5G.js";
4
- import { _ as R } from "./_plugin-vue_export-helper-CHgC5LLL.js";
5
- function E(r) {
1
+ import { defineComponent as C, defineAsyncComponent as f, ref as u, watch as S, createElementBlock as h, openBlock as m, normalizeClass as A, createBlock as d, createCommentVNode as R, unref as y } from "vue";
2
+ import { a as v } from "./index-Dt2McMki.js";
3
+ import "./index.vue_vue_type_style_index_0_scoped_0f027c8c_lang-CtN9Ij0Y.js";
4
+ import { _ as $ } from "./_plugin-vue_export-helper-CHgC5LLL.js";
5
+ function H(r) {
6
6
  const i = sessionStorage.getItem("loginToken") ?? "123456";
7
- return y({
7
+ return v({
8
8
  url: "/api/sysFile/uploadFile",
9
9
  method: "post",
10
10
  data: r,
@@ -14,9 +14,9 @@ function E(r) {
14
14
  }
15
15
  });
16
16
  }
17
- function $(r) {
17
+ function z(r) {
18
18
  const i = sessionStorage.getItem("loginToken") ?? "123456";
19
- return y({
19
+ return v({
20
20
  url: "/api/sysFile/downloadFile",
21
21
  method: "post",
22
22
  data: r,
@@ -28,10 +28,10 @@ function $(r) {
28
28
  responseType: "blob"
29
29
  });
30
30
  }
31
- const z = {
31
+ const B = {
32
32
  key: 2,
33
33
  class: "loading"
34
- }, V = /* @__PURE__ */ k({
34
+ }, V = /* @__PURE__ */ C({
35
35
  __name: "threeViewerHost",
36
36
  props: {
37
37
  fileUrls: { default: () => [] },
@@ -41,60 +41,59 @@ const z = {
41
41
  width: { default: "100%" },
42
42
  height: { default: "100%" },
43
43
  autoSize: { type: Boolean, default: void 0 },
44
- threeData: {},
45
- isSelfWindow: { type: Boolean }
44
+ threeData: {}
46
45
  },
47
46
  emits: ["getThreeData"],
48
47
  setup(r, { emit: i }) {
49
- const v = p(() => import("./threeSceneView-BZx98QgN.js")), g = p(() => import("./threePreview-BUZRvBRx.js")), s = r, b = i, n = u([]);
48
+ const w = f(() => import("./threeSceneView-BVbVe_Et.js")), g = f(() => import("./threePreview-BSqdALPK.js")), c = r, b = i, n = u([]);
50
49
  u(null);
51
- const l = u(!1);
50
+ const s = u(!1);
52
51
  function _(e) {
53
52
  try {
54
- const o = new URL(e).pathname, a = o.substring(o.lastIndexOf("/") + 1);
55
- return decodeURIComponent(a);
56
- } catch (o) {
57
- return console.error("无法解析URL以提取文件名:", e, o), "未知文件名";
53
+ const a = new URL(e).pathname, o = a.substring(a.lastIndexOf("/") + 1);
54
+ return decodeURIComponent(o);
55
+ } catch (a) {
56
+ return console.error("无法解析URL以提取文件名:", e, a), "未知文件名";
58
57
  }
59
58
  }
60
59
  async function F(e) {
61
- let o, a;
60
+ let a, o;
62
61
  if (/^https?:\/\//.test(e))
63
62
  try {
64
63
  const t = await fetch(e);
65
64
  if (!t.ok)
66
65
  throw new Error(`下载文件失败: ${t.statusText} (URL: ${e})`);
67
- o = await t.blob(), a = _(e);
66
+ a = await t.blob(), o = _(e);
68
67
  } catch (t) {
69
68
  throw console.error("使用 fetch 下载文件时出错:", t), t;
70
69
  }
71
70
  else
72
71
  try {
73
- const t = await $({ url: e });
72
+ const t = await z({ url: e });
74
73
  if (t.status !== 200)
75
74
  throw new Error(`下载失败: ${t.status}`);
76
- const c = t.headers["content-disposition"];
77
- a = T(c) || "无文件名", o = t.data;
75
+ const l = t.headers["content-disposition"];
76
+ o = T(l) || "无文件名", a = t.data;
78
77
  } catch (t) {
79
78
  throw console.error("通过 API 下载文件时出错:", t), t;
80
79
  }
81
- return new File([o], a, { type: o.type });
80
+ return new File([a], o, { type: a.type });
82
81
  }
83
82
  function T(e) {
84
83
  if (!e) return;
85
- const o = e.match(/filename\*\s*=\s*([^;]+)/i);
86
- if (o) {
87
- let t = o[1].trim();
84
+ const a = e.match(/filename\*\s*=\s*([^;]+)/i);
85
+ if (a) {
86
+ let t = a[1].trim();
88
87
  t = t.replace(/^"(.*)"$/, "$1");
89
- const c = t.split("''");
90
- if (c.length === 2) {
91
- const U = c[0].toUpperCase(), f = c[1];
88
+ const l = t.split("''");
89
+ if (l.length === 2) {
90
+ const k = l[0].toUpperCase(), p = l[1];
92
91
  try {
93
- if (U === "UTF-8")
94
- return decodeURIComponent(f);
92
+ if (k === "UTF-8")
93
+ return decodeURIComponent(p);
95
94
  } catch {
96
95
  }
97
- return f;
96
+ return p;
98
97
  }
99
98
  try {
100
99
  return decodeURIComponent(t);
@@ -102,58 +101,57 @@ const z = {
102
101
  return t;
103
102
  }
104
103
  }
105
- const a = e.match(/filename\s*=\s*("?)([^";]+)\1/i);
106
- if (a)
107
- return a[2].trim();
104
+ const o = e.match(/filename\s*=\s*("?)([^";]+)\1/i);
105
+ if (o)
106
+ return o[2].trim();
108
107
  }
109
108
  async function D(e) {
110
109
  if (!e || !e.length) {
111
110
  n.value = [];
112
111
  return;
113
112
  }
114
- l.value = !0;
113
+ s.value = !0;
115
114
  try {
116
- const o = await Promise.all(e.map((a) => F(a)));
117
- n.value = o;
118
- } catch (o) {
119
- console.error("文件下载时发生错误:", o), n.value = [];
115
+ const a = await Promise.all(e.map((o) => F(o)));
116
+ n.value = a;
117
+ } catch (a) {
118
+ console.error("文件下载时发生错误:", a), n.value = [];
120
119
  } finally {
121
- l.value = !1;
120
+ s.value = !1;
122
121
  }
123
122
  }
124
- const S = () => {
123
+ const U = () => {
125
124
  b("getThreeData");
126
125
  };
127
- return C(
128
- () => s.fileUrls,
126
+ return S(
127
+ () => c.fileUrls,
129
128
  async (e) => {
130
129
  await D(e ?? []);
131
130
  },
132
131
  { immediate: !0, deep: !0 }
133
- ), (e, o) => (m(), d("div", {
134
- class: A(s.host === "electron" ? "mv-electron" : "mv-inline")
132
+ ), (e, a) => (m(), h("div", {
133
+ class: A(c.host === "electron" ? "mv-electron" : "mv-inline")
135
134
  }, [
136
- !l.value && s.isThreeScene && n.value.length > 0 ? (m(), h(w(v), {
135
+ !s.value && c.isThreeScene && n.value.length > 0 ? (m(), d(y(w), {
137
136
  key: 0,
138
137
  "file-blobs": n.value,
139
138
  "animation-data": e.animationData,
140
- onGetThreeData: S,
141
- threeData: s.threeData,
142
- isSelfWindow: s.isSelfWindow
143
- }, null, 8, ["file-blobs", "animation-data", "threeData", "isSelfWindow"])) : !l.value && n.value.length > 0 ? (m(), h(w(g), {
139
+ onGetThreeData: U,
140
+ threeData: c.threeData
141
+ }, null, 8, ["file-blobs", "animation-data", "threeData"])) : !s.value && n.value.length > 0 ? (m(), d(y(g), {
144
142
  key: 1,
145
143
  "file-blobs": n.value,
146
144
  "animation-data": e.animationData
147
- }, null, 8, ["file-blobs", "animation-data"])) : l.value ? (m(), d("div", z, " 文件下载中,请稍候... ")) : B("", !0)
145
+ }, null, 8, ["file-blobs", "animation-data"])) : s.value ? (m(), h("div", B, " 文件下载中,请稍候... ")) : R("", !0)
148
146
  ], 2));
149
147
  }
150
- }), I = /* @__PURE__ */ R(V, [["__scopeId", "data-v-2e23dada"]]), H = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
148
+ }), I = /* @__PURE__ */ $(V, [["__scopeId", "data-v-107f7783"]]), M = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
151
149
  __proto__: null,
152
150
  default: I
153
151
  }, Symbol.toStringTag, { value: "Module" }));
154
152
  export {
155
- H as a,
156
- $ as d,
153
+ M as a,
154
+ z as d,
157
155
  I as t,
158
- E as u
156
+ H as u
159
157
  };
@@ -0,0 +1 @@
1
+ "use strict";const o=require("vue"),h=require("./index-BOev8isw.cjs");require("./index.vue_vue_type_style_index_0_scoped_0f027c8c_lang-mQIxU0SD.cjs");const T=require("./_plugin-vue_export-helper-BHFhmbuH.cjs");function D(i){const s=sessionStorage.getItem("loginToken")??"123456";return h.service({url:"/api/sysFile/uploadFile",method:"post",data:i,headers:{Authorization:s,"Content-Type":"multipart/form-data"}})}function f(i){const s=sessionStorage.getItem("loginToken")??"123456";return h.service({url:"/api/sysFile/downloadFile",method:"post",data:i,headers:{Authorization:s,Accept:"application/octet-stream"},responseType:"blob"})}const U={key:2,class:"loading"},A=o.defineComponent({__name:"threeViewerHost",props:{fileUrls:{default:()=>[]},isThreeScene:{type:Boolean,default:!1},host:{default:"inline"},animationData:{default:()=>({})},width:{default:"100%"},height:{default:"100%"},autoSize:{type:Boolean,default:void 0},threeData:{}},emits:["getThreeData"],setup(i,{emit:s}){const d=o.defineAsyncComponent(()=>Promise.resolve().then(()=>require("./threeSceneView-KvCERteS.cjs"))),v=o.defineAsyncComponent(()=>Promise.resolve().then(()=>require("./threePreview-CKvbwCiX.cjs"))),u=i,w=s,r=o.ref([]);o.ref(null);const l=o.ref(!1);function y(e){try{const n=new URL(e).pathname,a=n.substring(n.lastIndexOf("/")+1);return decodeURIComponent(a)}catch(n){return console.error("无法解析URL以提取文件名:",e,n),"未知文件名"}}async function g(e){let n,a;if(/^https?:\/\//.test(e))try{const t=await fetch(e);if(!t.ok)throw new Error(`下载文件失败: ${t.statusText} (URL: ${e})`);n=await t.blob(),a=y(e)}catch(t){throw console.error("使用 fetch 下载文件时出错:",t),t}else try{const t=await f({url:e});if(t.status!==200)throw new Error(`下载失败: ${t.status}`);const c=t.headers["content-disposition"];a=b(c)||"无文件名",n=t.data}catch(t){throw console.error("通过 API 下载文件时出错:",t),t}return new File([n],a,{type:n.type})}function b(e){if(!e)return;const n=e.match(/filename\*\s*=\s*([^;]+)/i);if(n){let t=n[1].trim();t=t.replace(/^"(.*)"$/,"$1");const c=t.split("''");if(c.length===2){const k=c[0].toUpperCase(),p=c[1];try{if(k==="UTF-8")return decodeURIComponent(p)}catch{}return p}try{return decodeURIComponent(t)}catch{return t}}const a=e.match(/filename\s*=\s*("?)([^";]+)\1/i);if(a)return a[2].trim()}async function _(e){if(!e||!e.length){r.value=[];return}l.value=!0;try{const n=await Promise.all(e.map(a=>g(a)));r.value=n}catch(n){console.error("文件下载时发生错误:",n),r.value=[]}finally{l.value=!1}}const F=()=>{w("getThreeData")};return o.watch(()=>u.fileUrls,async e=>{await _(e??[])},{immediate:!0,deep:!0}),(e,n)=>(o.openBlock(),o.createElementBlock("div",{class:o.normalizeClass(u.host==="electron"?"mv-electron":"mv-inline")},[!l.value&&u.isThreeScene&&r.value.length>0?(o.openBlock(),o.createBlock(o.unref(d),{key:0,"file-blobs":r.value,"animation-data":e.animationData,onGetThreeData:F,threeData:u.threeData},null,8,["file-blobs","animation-data","threeData"])):!l.value&&r.value.length>0?(o.openBlock(),o.createBlock(o.unref(v),{key:1,"file-blobs":r.value,"animation-data":e.animationData},null,8,["file-blobs","animation-data"])):l.value?(o.openBlock(),o.createElementBlock("div",U," 文件下载中,请稍候... ")):o.createCommentVNode("",!0)],2))}}),m=T._export_sfc(A,[["__scopeId","data-v-107f7783"]]),B=Object.freeze(Object.defineProperty({__proto__:null,default:m},Symbol.toStringTag,{value:"Module"}));exports.downloadAvatarApi=f;exports.threeViewerHost=m;exports.threeViewerHost$1=B;exports.uploadFile=D;
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "ss-component-new",
3
3
  "private": false,
4
- "version": "1.1.821",
4
+ "version": "1.1.823",
5
5
  "type": "module",
6
6
  "files": [
7
7
  "dist",
@@ -1 +1 @@
1
- <?xml version="1.0" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg t="1754014497867" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="6026" width="32" height="32" xmlns:xlink="http://www.w3.org/1999/xlink"><path d="M938.666667 390.186667V207.274667A121.941333 121.941333 0 0 0 816.725333 85.333333H207.274667A121.941333 121.941333 0 0 0 85.333333 207.274667v609.450666A121.941333 121.941333 0 0 0 207.274667 938.666667h609.450666A121.941333 121.941333 0 0 0 938.666667 816.725333V390.186667zM164.138667 164.138667c11.434667-11.52 26.965333-17.92 43.178666-17.92h609.578667a60.928 60.928 0 0 1 60.885333 61.098666v121.984H146.218667v-122.026666c0-16.170667 6.4-31.701333 17.92-43.136z m195.413333 439.381333h-213.333333v-213.333333h213.333333v213.333333z m-195.413333 256.426667c-11.52-11.349333-17.92-26.88-17.92-43.050667v-152.448h213.333333v213.333333H207.36a60.586667 60.586667 0 0 1-43.178667-17.792z m702.677333-6.741334c-25.472 26.282667-82.346667 21.546667-118.357333 21.461334h-340.053334V384h475.733334v350.72c0.085333 37.12 8.106667 92.245333-17.322667 118.485333z" fill="#646E78" p-id="6027"></path><path d="M807.594667 506.709333a41.941333 41.941333 0 0 1 3.072 15.701334c0 2.986667-0.554667 5.930667-1.706667 8.874666a27.093333 27.093333 0 0 1-5.418667 8.533334c-2.730667 2.730667-5.12 5.12-7.296 7.168-2.133333 2.048-4.053333 3.84-5.632 5.461333-1.792 1.834667-3.498667 3.413333-5.12 4.778667l-63.488-63.829334c2.730667-2.474667 5.973333-5.504 9.685334-9.045333 3.754667-3.498667 6.826667-6.314667 9.344-8.362667a29.781333 29.781333 0 0 1 19.882666-6.656 37.76 37.76 0 0 1 9.514667 1.536c3.029333 0.938667 5.717333 1.962667 7.978667 3.072 4.736 2.517333 10.026667 6.912 15.786666 13.141334 5.76 6.272 10.24 12.8 13.397334 19.626666z m-264.618667 166.528l9.514667-9.728c4.992-5.12 11.221333-11.434667 18.688-18.901333l24.789333-24.917333 27.52-27.648 73.045333-73.386667 63.530667 64.170667-73.045333 73.386666-27.178667 27.605334c-9.045333 8.874667-17.194667 17.024-24.448 24.405333-7.253333 7.381333-13.226667 13.482667-18.005333 18.261333a147.328 147.328 0 0 1-16.298667 14.677334 42.453333 42.453333 0 0 1-9.173333 5.461333 147.925333 147.925333 0 0 1-13.952 5.802667 469.418667 469.418667 0 0 1-38.186667 12.288 143.36 143.36 0 0 1-13.44 3.072c-6.101333 0.682667-10.197333-0.213333-12.202667-2.730667-2.048-2.517333-2.602667-6.698667-1.706666-12.629333a115.626667 115.626667 0 0 1 3.2-13.824l5.461333-18.773334c1.92-6.485333 3.797333-12.458667 5.589333-17.92 1.834667-5.461333 3.285333-9.216 4.437334-11.264 1.365333-3.157333 2.858667-6.058667 4.565333-8.704 1.706667-2.602667 4.138667-5.504 7.296-8.704z" fill="#646E78" p-id="6028"></path></svg>
1
+ <?xml version="1.0" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg t="1757466075529" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="5350" xmlns:xlink="http://www.w3.org/1999/xlink" width="32" height="32"><path d="M543.552 163.264c14.592 0 26.88 14.976 26.624 30.272-0.32 14.784-11.84 28.48-26.112 28.48H187.52c-32.64 0-60.48 29.248-60.48 70.336v110.72a12.8 12.8 0 0 0 6.08 11.072C176.64 440.576 200 489.728 200 543.616c0 53.952-25.472 104.896-66.88 129.472a12.8 12.8 0 0 0-6.08 11.072v110.72c0 41.152 21.12 66.24 60.48 66.24h584.896c39.296 0 60.032-25.088 60.032-66.176V684.16a12.8 12.8 0 0 0-6.08-11.072c-43.52-26.368-65.536-75.52-65.536-129.472 0-62.976 41.792-123.264 98.56-144.448 13.44-5.12 31.744 0.896 36.48 14.976 4.928 14.08-3.712 34.816-17.216 39.872-36.032 13.44-60.352 49.472-60.352 89.536s24.32 76.096 60.352 89.6l9.216 3.392a12.608 12.608 0 0 1 8 11.968v146.432c0.128 71.232-55.232 129.024-123.52 129.024H187.52C119.232 923.968 64 866.176 64 794.944V648.64c0-5.312 3.2-10.176 8.064-11.968l9.152-3.392c36.096-13.44 60.352-49.472 60.352-89.6 0-40-24.32-76.032-60.352-89.536l-9.152-3.392A12.608 12.608 0 0 1 64 438.784V292.352c0-71.296 55.36-129.088 123.52-129.088h356.032z m181.12 553.6c14.336 0 26.048 15.68 26.048 30.592 0 14.976-11.712 30.656-25.984 30.656h-464.96c-14.272 0-25.984-15.68-25.984-30.656 0-14.912 11.712-30.656 25.984-30.656h464.96z m38.784-622.208c25.024 0 49.984 9.92 68.992 29.696l46.4 52.352c37.952 39.68 26.624 85.44-11.328 125.056L605.44 575.68a47.808 47.808 0 0 1-32.96 14.848H422.336a3.2 3.2 0 0 1-3.2-3.52l-0.32-157.056a52.096 52.096 0 0 1 14.208-34.304l261.504-271.296a95.36 95.36 0 0 1 68.928-29.696zM354.048 526.72c14.336 0 26.752 14.976 26.752 29.952 0 14.912-12.416 29.888-26.752 29.888H259.84c-14.272 0-26.88-14.976-26.88-29.888 0-14.976 12.608-29.952 26.88-29.952h94.272z m412.48-366.208c-12.16 0-26.176 7.296-34.624 16.192L478.528 436.288v97.216h80.832l259.008-273.728c8.512-8.96 18.56-18.56 18.56-31.36s-15.36-32.64-31.36-47.296c-16-14.592-26.752-20.608-39.04-20.608zM354.048 329.6c14.336 0 26.24 15.808 26.24 30.72 0 14.976-11.904 30.72-26.24 30.72H259.84c-14.272 0-26.56-15.744-26.56-30.72 0-14.912 12.288-30.72 26.56-30.72h94.272z" p-id="5351"></path></svg>
@@ -0,0 +1 @@
1
+ <?xml version="1.0" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg t="1757496944396" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="6631" xmlns:xlink="http://www.w3.org/1999/xlink" width="32" height="32"><path d="M394.6 689.8c-13.2 3.2-27.4-9.5-31.7-23.2-8.4-28.5-12.7-58.6-12.7-88.1 0-159.4 151.5-325.1 314.1-352.1v-5.3c0-1.6 0-3.7 0.5-5.3l0.5-2.1c1.6-11.6 5.8-38.5 32.2-55.4 10.6-6.9 22.2-10 34.3-10 14.8 0 26.9 5.3 34.3 9.5 1.6 0.5 2.6 1.6 4.2 2.6L929.2 286c17.4 13.2 28 34.8 28 57 0 22.7-10.6 44.3-28.5 57.5L770.5 525.7c-11.6 9-25.3 13.7-39.1 13.7-12.1 0-23.8-3.7-34.8-10.6-21.1-13.7-31.7-34.8-31.7-64.4v-1.1C559.3 475 442.2 569 416.3 657.6c-4.8 14.3-13.7 32.2-21.7 32.2z m335.7-466.6V256c0 17.4-13.7 31.7-31.1 32.7-125.6 6.9-257.6 131.4-279.7 254.4C486 458.7 595.2 390 699.7 397.4c17.4 1.1 30.6 15.3 30.6 32.7V465c0 4.7 0.5 6.9 0.5 7.9l157.3-124.6c2.1-1.6 2.6-3.2 2.6-5.3 0-2.1-1.1-4.2-2.6-5.3L731.9 214.3c-1.1 1.6-1.6 5.8-2.1 8.4l0.5 0.5z m0 0" p-id="6632"></path><path d="M715.6 916.3H188.3c-67 0-121.9-54.9-121.9-121.9v-568c0-67 54.9-121.9 121.9-121.9h436.5v69.7H188.3c-28.5 0-52.3 23.2-52.3 52.3V795c0 28.5 23.2 52.3 52.3 52.3h527.3c28.5 0 52.3-23.2 52.3-52.3V593.2H837v201.6c0 66.6-54.4 121.5-121.4 121.5z m0 0" p-id="6633"></path><path d="M183 566.9h112.4V626H183v-59.1z m0 154.1h296.1v59.1H183V721z m0-425.4h237v59.1H183v-59.1z m0 140.9h112.4v59.1H183v-59.1z m0 0" p-id="6634"></path></svg>
@@ -0,0 +1 @@
1
+ <?xml version="1.0" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg t="1757496984570" class="icon" viewBox="0 0 1061 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="7061" xmlns:xlink="http://www.w3.org/1999/xlink" width="33.15625" height="32"><path d="M447.122 467.332L49.24 268.162A33.501 33.501 0 0 0 0.136 300.745v441.02a33.042 33.042 0 0 0 16.062 27.994l396.965 248.275a33.96 33.96 0 0 0 17.438 5.507 33.042 33.042 0 0 0 33.043-33.042V497.162a33.042 33.042 0 0 0-16.522-29.83z m598.889-203.76a33.042 33.042 0 0 0-31.666 0l-463.507 203.76a33.042 33.042 0 0 0-19.733 30.289v493.337a33.042 33.042 0 0 0 49.563 28.453l463.048-265.255a33.042 33.042 0 0 0 16.521-28.453V291.566a33.042 33.042 0 0 0-14.226-27.994z m-54.611-84.9a33.042 33.042 0 0 0-22.487-29.83L550.838 1.53a32.583 32.583 0 0 0-19.733 0L83.659 158.021a33.042 33.042 0 0 0-4.13 61.036l397.882 199.17a33.501 33.501 0 0 0 14.685 3.213 33.96 33.96 0 0 0 13.31 0L969.37 215.845a33.042 33.042 0 0 0 22.029-37.173z" p-id="7062"></path></svg>
@@ -0,0 +1 @@
1
+ <?xml version="1.0" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg t="1757497889555" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="8785" xmlns:xlink="http://www.w3.org/1999/xlink" width="32" height="32"><path d="M512 1024C230.4 1024 0 793.6 0 512S230.4 0 512 0s512 230.4 512 512-230.4 512-512 512z m0-916.8c-222.6 0-404.8 182.1-404.8 404.8S289.4 916.8 512 916.8 916.8 734.6 916.8 512 734.6 107.2 512 107.2z" p-id="8786"></path><path d="M647.4 1001.2c-119.1 33-272.1-156-348.1-430.3S257.5 55.8 376.6 22.8s272.1 156 348.1 430.3 41.8 515.1-77.3 548.1zM411 147c-67.8 18.8-98.7 184.5-38 403.5S545.2 895.8 613 877s98.7-184.5 38-403.5c-60.5-219-174-344.8-240-326.5z" p-id="8787"></path><path d="M45.1 655.8c-36-116.4 145.8-272.8 414-355.7s506.6-56.3 542.5 60.2c36 116.5-145.8 272.8-414.1 355.7S81.1 772.3 45.1 655.8z m835.2-258c-20.5-66.3-184.8-91.9-398.9-25.7S146 552.1 166.5 618.3s184.8 91.9 398.9 25.7 334.9-181.6 314.9-246.2z" p-id="8788"></path></svg>
@@ -1,108 +0,0 @@
1
- import { k, l as A, c as I } from "./index.vue_vue_type_style_index_1_lang-Rs1M3B8e.js";
2
- const S = async () => {
3
- const m = "弯管仿真加工分析";
4
- let b = {};
5
- const l = sessionStorage.getItem("systemKey"), f = await k(`${m}/管件解析`, l, "");
6
- let w = ["管长", "外径"], i = {};
7
- f == null || f.forEach((e) => {
8
- var c;
9
- (e == null ? void 0 : e.comp) === "Form" && ((c = e == null ? void 0 : e.compData) == null || c.forEach((n) => {
10
- var t;
11
- (n == null ? void 0 : n.key) === "formContent" && ((t = n == null ? void 0 : n.contents) == null || t.forEach((a) => {
12
- w.includes(a == null ? void 0 : a.key) && (i[a.key] = a.value);
13
- }));
14
- }));
15
- });
16
- const E = i.管长, d = i.外径;
17
- console.log("管长", E, "外径", d, i);
18
- const K = E, R = d / 2, s = await k(`${m}/加工位姿生成`, l, "");
19
- let $ = ["夹持长度"], p = {};
20
- s == null || s.forEach((e) => {
21
- var c;
22
- (e == null ? void 0 : e.comp) === "Form" && ((c = e == null ? void 0 : e.compData) == null || c.forEach((n) => {
23
- var t;
24
- (n == null ? void 0 : n.key) === "formContent" && ((t = n == null ? void 0 : n.contents) == null || t.forEach((a) => {
25
- $.includes(a == null ? void 0 : a.key) && (p[a.key] = a.value);
26
- }));
27
- }));
28
- });
29
- const F = p.夹持长度;
30
- console.log("夹持长度", F, p);
31
- const x = Number(F), h = {}, y = await k(`${m}/仿真动画生成`, l, "");
32
- y == null || y.forEach((e) => {
33
- var c, n, t, a, D, C;
34
- if ((e == null ? void 0 : e.comp) === "Table") {
35
- let L = [], u = (t = (n = (c = e == null ? void 0 : e.compData) == null ? void 0 : c.find((o) => (o == null ? void 0 : o.key) === "header")) == null ? void 0 : n.contents) == null ? void 0 : t.map((o) => o == null ? void 0 : o.label), g = (C = (D = (a = e == null ? void 0 : e.compData) == null ? void 0 : a.find((o) => (o == null ? void 0 : o.key) === "tableContents")) == null ? void 0 : D.contents) == null ? void 0 : C.map((o) => (o = o == null ? void 0 : o.filter((r) => !(r != null && r.id)), o));
36
- g == null || g.forEach((o) => {
37
- L.push(
38
- A(
39
- o,
40
- u == null ? void 0 : u.filter((r) => r !== "操作")
41
- )
42
- );
43
- }), h[e.name] = L, h[e.name + "Content"] = e;
44
- }
45
- });
46
- const T = I(h);
47
- return b = {
48
- initialPipeLength: K,
49
- pipeRadius: R,
50
- clampLength: x,
51
- animationData: T
52
- }, b;
53
- }, N = async () => {
54
- const m = "双弯管仿真加工分析";
55
- let b = {};
56
- const l = sessionStorage.getItem("systemKey"), f = await k(`${m}/管件解析`, l, "");
57
- let w = ["管长", "外径"], i = {};
58
- f == null || f.forEach((e) => {
59
- var c;
60
- (e == null ? void 0 : e.comp) === "Form" && ((c = e == null ? void 0 : e.compData) == null || c.forEach((n) => {
61
- var t;
62
- (n == null ? void 0 : n.key) === "formContent" && ((t = n == null ? void 0 : n.contents) == null || t.forEach((a) => {
63
- w.includes(a == null ? void 0 : a.key) && (i[a.key] = a.value);
64
- }));
65
- }));
66
- });
67
- const E = i.管长, d = i.外径;
68
- console.log("管长", E, "外径", d, i);
69
- const K = E, R = d / 2, s = await k(`${m}/加工位姿生成`, l, "");
70
- let $ = ["夹持长度"], p = {};
71
- s == null || s.forEach((e) => {
72
- var c;
73
- (e == null ? void 0 : e.comp) === "Form" && ((c = e == null ? void 0 : e.compData) == null || c.forEach((n) => {
74
- var t;
75
- (n == null ? void 0 : n.key) === "formContent" && ((t = n == null ? void 0 : n.contents) == null || t.forEach((a) => {
76
- $.includes(a == null ? void 0 : a.key) && (p[a.key] = a.value);
77
- }));
78
- }));
79
- });
80
- const F = p.夹持长度;
81
- console.log("夹持长度", F, p);
82
- const x = Number(F), h = {}, y = await k(`${m}/仿真动画生成`, l, "");
83
- y == null || y.forEach((e) => {
84
- var c, n, t, a, D, C;
85
- if ((e == null ? void 0 : e.comp) === "Table") {
86
- let L = [], u = (t = (n = (c = e == null ? void 0 : e.compData) == null ? void 0 : c.find((o) => (o == null ? void 0 : o.key) === "header")) == null ? void 0 : n.contents) == null ? void 0 : t.map((o) => o == null ? void 0 : o.label), g = (C = (D = (a = e == null ? void 0 : e.compData) == null ? void 0 : a.find((o) => (o == null ? void 0 : o.key) === "tableContents")) == null ? void 0 : D.contents) == null ? void 0 : C.map((o) => (o = o == null ? void 0 : o.filter((r) => !(r != null && r.id)), o));
87
- g == null || g.forEach((o) => {
88
- L.push(
89
- A(
90
- o,
91
- u == null ? void 0 : u.filter((r) => r !== "操作")
92
- )
93
- );
94
- }), h[e.name] = L, h[e.name + "Content"] = e;
95
- }
96
- });
97
- const T = I(h);
98
- return b = {
99
- initialPipeLength: K,
100
- pipeRadius: R,
101
- clampLength: x,
102
- animationData: T
103
- }, b;
104
- };
105
- export {
106
- N as a,
107
- S as f
108
- };
@@ -1 +0,0 @@
1
- "use strict";const r=require("./index.vue_vue_type_style_index_1_lang-Bmwy3cgo.cjs"),K=async()=>{const m="弯管仿真加工分析";let D={};const f=sessionStorage.getItem("systemKey"),s=await r.getItemData(`${m}/管件解析`,f,"");let L=["管长","外径"],l={};s==null||s.forEach(e=>{var t;(e==null?void 0:e.comp)==="Form"&&((t=e==null?void 0:e.compData)==null||t.forEach(n=>{var c;(n==null?void 0:n.key)==="formContent"&&((c=n==null?void 0:n.contents)==null||c.forEach(a=>{L.includes(a==null?void 0:a.key)&&(l[a.key]=a.value)}))}))});const d=l.管长,k=l.外径;console.log("管长",d,"外径",k,l);const R=d,_=k/2,p=await r.getItemData(`${m}/加工位姿生成`,f,"");let w=["夹持长度"],h={};p==null||p.forEach(e=>{var t;(e==null?void 0:e.comp)==="Form"&&((t=e==null?void 0:e.compData)==null||t.forEach(n=>{var c;(n==null?void 0:n.key)==="formContent"&&((c=n==null?void 0:n.contents)==null||c.forEach(a=>{w.includes(a==null?void 0:a.key)&&(h[a.key]=a.value)}))}))});const E=h.夹持长度;console.log("夹持长度",E,h);const x=Number(E),y={},g=await r.getItemData(`${m}/仿真动画生成`,f,"");g==null||g.forEach(e=>{var t,n,c,a,F,C;if((e==null?void 0:e.comp)==="Table"){let I=[],u=(c=(n=(t=e==null?void 0:e.compData)==null?void 0:t.find(o=>(o==null?void 0:o.key)==="header"))==null?void 0:n.contents)==null?void 0:c.map(o=>o==null?void 0:o.label),b=(C=(F=(a=e==null?void 0:e.compData)==null?void 0:a.find(o=>(o==null?void 0:o.key)==="tableContents"))==null?void 0:F.contents)==null?void 0:C.map(o=>(o=o==null?void 0:o.filter(i=>!(i!=null&&i.id)),o));b==null||b.forEach(o=>{I.push(r.getValueToObjectValue(o,u==null?void 0:u.filter(i=>i!=="操作")))}),y[e.name]=I,y[e.name+"Content"]=e}});const A=r.cloneDeep(y);return D={initialPipeLength:R,pipeRadius:_,clampLength:x,animationData:A},D},T=async()=>{const m="双弯管仿真加工分析";let D={};const f=sessionStorage.getItem("systemKey"),s=await r.getItemData(`${m}/管件解析`,f,"");let L=["管长","外径"],l={};s==null||s.forEach(e=>{var t;(e==null?void 0:e.comp)==="Form"&&((t=e==null?void 0:e.compData)==null||t.forEach(n=>{var c;(n==null?void 0:n.key)==="formContent"&&((c=n==null?void 0:n.contents)==null||c.forEach(a=>{L.includes(a==null?void 0:a.key)&&(l[a.key]=a.value)}))}))});const d=l.管长,k=l.外径;console.log("管长",d,"外径",k,l);const R=d,_=k/2,p=await r.getItemData(`${m}/加工位姿生成`,f,"");let w=["夹持长度"],h={};p==null||p.forEach(e=>{var t;(e==null?void 0:e.comp)==="Form"&&((t=e==null?void 0:e.compData)==null||t.forEach(n=>{var c;(n==null?void 0:n.key)==="formContent"&&((c=n==null?void 0:n.contents)==null||c.forEach(a=>{w.includes(a==null?void 0:a.key)&&(h[a.key]=a.value)}))}))});const E=h.夹持长度;console.log("夹持长度",E,h);const x=Number(E),y={},g=await r.getItemData(`${m}/仿真动画生成`,f,"");g==null||g.forEach(e=>{var t,n,c,a,F,C;if((e==null?void 0:e.comp)==="Table"){let I=[],u=(c=(n=(t=e==null?void 0:e.compData)==null?void 0:t.find(o=>(o==null?void 0:o.key)==="header"))==null?void 0:n.contents)==null?void 0:c.map(o=>o==null?void 0:o.label),b=(C=(F=(a=e==null?void 0:e.compData)==null?void 0:a.find(o=>(o==null?void 0:o.key)==="tableContents"))==null?void 0:F.contents)==null?void 0:C.map(o=>(o=o==null?void 0:o.filter(i=>!(i!=null&&i.id)),o));b==null||b.forEach(o=>{I.push(r.getValueToObjectValue(o,u==null?void 0:u.filter(i=>i!=="操作")))}),y[e.name]=I,y[e.name+"Content"]=e}});const A=r.cloneDeep(y);return D={initialPipeLength:R,pipeRadius:_,clampLength:x,animationData:A},D};exports.fetchDoubleRobotAnimationData=T;exports.fetchSingleRobotAnimationData=K;