Просмотр исходного кода

[Feat 0000] 风门详情页面适配缩略图功能

houzekong 3 дней назад
Родитель
Сommit
107f64df11
1 измененных файлов с 5 добавлено и 4 удалено
  1. 5 4
      src/views/vent/monitorManager/gateMonitor/gate.threejs.ts

+ 5 - 4
src/views/vent/monitorManager/gateMonitor/gate.threejs.ts

@@ -15,8 +15,8 @@ import FmXR from './gate.threejs.xr';
 // import FmSp1 from './gate.threejs.one.sp';
 import { animateCamera } from '/@/utils/threejs/util';
 import useEvent from '../../../../utils/threejs/useEvent';
-import { getDictItemsByCode } from '/@/utils/dict';
-import { useGlobSetting } from '/@/hooks/setting';
+import { useModelFileStore } from '/@/store/modules/modelFile';
+// import { useGlobSetting } from '/@/hooks/setting';
 
 // 模型对象、 文字对象
 let model,
@@ -868,11 +868,11 @@ export const mountedThree = () => {
     model.setEnvMap('test1.hdr');
     model.renderer.toneMappingExposure = 0.9;
     model.camera.position.set(100, 0, 1000);
-    const dictCodes = getDictItemsByCode('gateStyle');
+    const dictCodes = useModelFileStore().getModelFileDataByKey('gate');
     if (dictCodes && dictCodes.length > 0) {
       for (let i = 0; i < dictCodes.length; i++) {
         const dict = dictCodes[i];
-        switch (dict.value) {
+        switch (dict.fileName) {
           case 'fmXr':
             const FmXR = await loadModel('FmXR');
             fmXr = new FmXR(model);
@@ -981,6 +981,7 @@ export const mountedThree = () => {
     }
 
     model.animate();
+    // generateThumbnailsBySwitch();
     // startAnimation();
   });
 };