Browse Source

[Wip 0000] SVG单道双道风门开发

houzekong 2 weeks ago
parent
commit
61926a4a3a

File diff suppressed because it is too large
+ 524 - 0
src/views/vent/monitorManager/windowMonitor/components/windowDualSVG.vue


File diff suppressed because it is too large
+ 19 - 31
src/views/vent/monitorManager/windowMonitor/components/windowSVG.vue


+ 1 - 0
src/views/vent/monitorManager/windowMonitor/window.data.ts

@@ -307,6 +307,7 @@ export const chartsColumns = [
 export function getModelComponent(is2DModel: boolean = false, sysOrgCode?: string) {
   // @ts-ignore
   return defineAsyncComponent(() => {
+    // return import('./components/windowDualSVG.vue');
     if (!is2DModel) return import('./components/entryThree.vue');
     switch (sysOrgCode) {
       // case '000000':

+ 5 - 0
src/views/vent/monitorManager/windowMonitor/window.threejs.ts

@@ -97,6 +97,7 @@ const startAnimation = () => {
 
 // 鼠标点击、松开事件
 const mouseEvent = (event) => {
+  if (!model) return;
   if (event.button == 0) {
     mouseDownFn(model, group, event, (intersects) => {
       if (windowType === 'ddFc5' && ddFc5) {
@@ -140,6 +141,7 @@ const addMouseEvent = () => {
   // model.canvasContainer?.addEventListener('pointerup', mouseUp);
 };
 export const addMonitorText = (selectData) => {
+  if (!model) return;
   if (windowType === 'ddFc5' && ddFc5) {
     return ddFc5.addMonitorText.call(ddFc5, selectData);
   } else if (windowType === 'ddFc1' && ddFc1) {
@@ -174,6 +176,7 @@ export const addMonitorText = (selectData) => {
 };
 
 export function computePlay(data, maxarea, isFirst = false) {
+  if (!model) return;
   const isJz = data.windowModal == 'sdFc4';
   if (windowType === 'singleXkWindow') {
     const acosToAngle = (cosValue) => {
@@ -262,6 +265,7 @@ export function computePlay(data, maxarea, isFirst = false) {
 }
 
 export const play = (rotationParam, flag) => {
+  if (!model) return;
   if (windowType === 'ddFc5' && ddFc5) {
     return ddFc5.play.call(ddFc5, rotationParam, flag);
   } else if (windowType === 'ddFc1' && ddFc1) {
@@ -297,6 +301,7 @@ export const play = (rotationParam, flag) => {
 
 // 切换风窗类型
 export const setModelType = (type) => {
+  if (!model) return;
   // if (!model || !model.scene) return;
   windowType = type;
   const windowConfigurations = {

Some files were not shown because too many files changed in this diff