浏览代码

[Feat 0000]三维模型字体动态替换

bobo04052021@163.com 1 月之前
父节点
当前提交
e18fb28644

+ 10 - 2
src/views/vent/monitorManager/balancePressMonitor/balancePress.threejs.base.ts

@@ -52,6 +52,14 @@ class balancePressBase {
     if (!this.group) {
       return;
     }
+    const screenDownText = VENT_PARAM['modalText']
+      ? // @ts-ignore
+        VENT_PARAM['modalText']
+      : // @ts-ignore
+        History_Type['type'] == 'remote'
+        ? `国能神东煤炭集团监制`
+        : '煤科通安(北京)智控科技有限公司研制';
+    const screenDownTextX = 80 - (screenDownText.length - 10) * 6;
     const textArr = [
       {
         text: `煤矿巷道远程局部风机系统`,
@@ -110,11 +118,11 @@ class balancePressBase {
         y: 275,
       },
       {
-        text: `煤科通安(北京)智控科技有限公司研制`,
+        text: screenDownText,
         font: 'normal 28px Arial',
         color: '#009900',
         strokeStyle: '#002200',
-        x: 20,
+        x: screenDownTextX,
         y: 325,
       },
     ];

+ 10 - 2
src/views/vent/monitorManager/balancePressMonitor/balancePress.threejs.sp.ts

@@ -52,6 +52,14 @@ class balancePressSp {
     if (!this.group) {
       return;
     }
+    const screenDownText = VENT_PARAM['modalText']
+      ? // @ts-ignore
+        VENT_PARAM['modalText']
+      : // @ts-ignore
+        History_Type['type'] == 'remote'
+        ? `国能神东煤炭集团监制`
+        : '煤科通安(北京)智控科技有限公司研制';
+    const screenDownTextX = 80 - (screenDownText.length - 10) * 6;
     const textArr = [
       {
         text: `煤矿巷道远程局部风机系统`,
@@ -110,11 +118,11 @@ class balancePressSp {
         y: 275,
       },
       {
-        text: `煤科通安(北京)智控科技有限公司研制`,
+        text: screenDownText,
         font: 'normal 28px Arial',
         color: '#009900',
         strokeStyle: '#002200',
-        x: 20,
+        x: screenDownTextX,
         y: 325,
       },
     ];

+ 10 - 2
src/views/vent/monitorManager/balancePressMonitor/balancePress.threejs.tun.ts

@@ -51,6 +51,14 @@ class balancePressTun {
     if (!this.group) {
       return;
     }
+    const screenDownText = VENT_PARAM['modalText']
+      ? // @ts-ignore
+        VENT_PARAM['modalText']
+      : // @ts-ignore
+        History_Type['type'] == 'remote'
+        ? `国能神东煤炭集团监制`
+        : '煤科通安(北京)智控科技有限公司研制';
+    const screenDownTextX = 80 - (screenDownText.length - 10) * 6;
     const textArr = [
       {
         text: `煤矿巷道远程局部风机系统`,
@@ -109,11 +117,11 @@ class balancePressTun {
         y: 275,
       },
       {
-        text: `煤科通安(北京)智控科技有限公司研制`,
+        text: screenDownText,
         font: 'normal 28px Arial',
         color: '#009900',
         strokeStyle: '#002200',
-        x: 20,
+        x: screenDownTextX,
         y: 325,
       },
     ];

+ 10 - 2
src/views/vent/monitorManager/balancePressMonitor1/balancePress.three.ts

@@ -124,6 +124,14 @@ export const addText = (selectData) => {
   if (!group) {
     return;
   }
+  const screenDownText = VENT_PARAM['modalText']
+    ? // @ts-ignore
+      VENT_PARAM['modalText']
+    : // @ts-ignore
+      History_Type['type'] == 'remote'
+      ? `国能神东煤炭集团监制`
+      : '煤科通安(北京)智控科技有限公司研制';
+  const screenDownTextX = 80 - (screenDownText.length - 10) * 6;
   const textArr = [
     {
       text: `煤矿巷道远程局部风机系统`,
@@ -182,11 +190,11 @@ export const addText = (selectData) => {
       y: 275,
     },
     {
-      text: `煤科通安(北京)智控科技有限公司研制`,
+      text: screenDownText,
       font: 'normal 28px Arial',
       color: '#009900',
       strokeStyle: '#002200',
-      x: 20,
+      x: screenDownTextX,
       y: 325,
     },
   ];

+ 7 - 7
src/views/vent/monitorManager/fanLocalMonitor/fanLocal.threejs.single.ts

@@ -147,9 +147,9 @@ class ModelContext {
       ? // @ts-ignore
         VENT_PARAM['modalText']
       : // @ts-ignore
-      History_Type['type'] == 'remote'
-      ? `国能神东煤炭集团监制`
-      : '煤科通安(北京)智控科技有限公司研制';
+        History_Type['type'] == 'remote'
+        ? `国能神东煤炭集团监制`
+        : '煤科通安(北京)智控科技有限公司研制';
 
     const screenDownTextX = 80 - (screenDownText.length - 10) * 6;
     const textArr = [
@@ -174,10 +174,10 @@ class ModelContext {
           selectData.airSupplyDistence_merge
             ? selectData.airSupplyDistence_merge
             : selectData.fchimenylength
-            ? selectData.fchimenylength
-            : selectData.airSupplyDistence_merge
-            ? selectData.airSupplyDistence_merge
-            : '-'
+              ? selectData.fchimenylength
+              : selectData.airSupplyDistence_merge
+                ? selectData.airSupplyDistence_merge
+                : '-'
         }`,
         font: 'normal 30px Arial',
         color: '#009900',

+ 13 - 4
src/views/vent/monitorManager/obfurage1Monitor/gate.threejs.three.ts

@@ -80,6 +80,15 @@ class Fm2 {
     if (!this.group) {
       return;
     }
+    const screenDownText = VENT_PARAM['modalText']
+      ? // @ts-ignore
+        VENT_PARAM['modalText']
+      : // @ts-ignore
+        History_Type['type'] == 'remote'
+        ? `国能神东煤炭集团监制`
+        : '煤科通安(北京)智控科技有限公司研制';
+    const screenDownTextX = 80 - (screenDownText.length - 10) * 6;
+
     const textArr = [
       {
         text: `远程控制自动风门`,
@@ -138,11 +147,11 @@ class Fm2 {
         y: 275,
       },
       {
-        text: `煤科通安(北京)智控科技有限公司研制`,
+        text: screenDownText,
         font: 'normal 28px Arial',
-        color: '#00FF00',
-        strokeStyle: '#007400',
-        x: 20,
+        color: '#009900',
+        strokeStyle: '#002200',
+        x: screenDownTextX,
         y: 325,
       },
     ];

+ 13 - 4
src/views/vent/monitorManager/obfurage1Monitor/gate.threejs.two.ts

@@ -99,6 +99,15 @@ class Fm1 {
     if (!this.group) {
       return;
     }
+    const screenDownText = VENT_PARAM['modalText']
+      ? // @ts-ignore
+        VENT_PARAM['modalText']
+      : // @ts-ignore
+        History_Type['type'] == 'remote'
+        ? `国能神东煤炭集团监制`
+        : '煤科通安(北京)智控科技有限公司研制';
+    const screenDownTextX = 80 - (screenDownText.length - 10) * 6;
+
     const textArr = [
       {
         text: `远程控制快速密闭门`,
@@ -157,11 +166,11 @@ class Fm1 {
         y: 275,
       },
       {
-        text: `煤科通安(北京)智控科技有限公司研制`,
+        text: screenDownText,
         font: 'normal 28px Arial',
-        color: '#00FF00',
-        strokeStyle: '#007400',
-        x: 20,
+        color: '#009900',
+        strokeStyle: '#002200',
+        x: screenDownTextX,
         y: 325,
       },
     ];

+ 5 - 4
src/views/vent/monitorManager/windowMonitorBet/dandaoFcBetZh.threejs.ts

@@ -39,12 +39,13 @@ class singleWindowBetZh {
       return;
     }
     const screenDownText = VENT_PARAM['modalText']
-      ? VENT_PARAM['modalText']
-      : History_Type['type'] == 'remote'
+      ? // @ts-ignore
+        VENT_PARAM['modalText']
+      : // @ts-ignore
+        History_Type['type'] == 'remote'
         ? `国能神东煤炭集团监制`
         : '煤科通安(北京)智控科技有限公司研制';
-
-    const screenDownTextX = 90 - (screenDownText.length - 10) * 6;
+    const screenDownTextX = 80 - (screenDownText.length - 10) * 6;
     const textArr = [
       {
         text: `远程定量调节自动风窗`,

+ 12 - 3
src/views/vent/monitorManager/windrectMonitor/duishe.threejs.ts

@@ -85,6 +85,15 @@ class dsWindRect {
     if (!this.group) {
       return;
     }
+    const screenDownText = VENT_PARAM['modalText']
+      ? // @ts-ignore
+        VENT_PARAM['modalText']
+      : // @ts-ignore
+        History_Type['type'] == 'remote'
+        ? `国能神东煤炭集团监制`
+        : '煤科通安(北京)智控科技有限公司研制';
+    const screenDownTextX = 80 - (screenDownText.length - 10) * 6;
+
     const { sysOrgCode } = useGlobSetting();
     const textArr = [
       {
@@ -144,12 +153,12 @@ class dsWindRect {
         y: 247,
       },
       {
-        text: `煤科通安(北京)智控科技有限公司研制`,
+        text: screenDownText,
         font: 'normal 28px Arial',
         color: '#009900',
         strokeStyle: '#002200',
-        x: 20,
-        y: 302,
+        x: screenDownTextX,
+        y: 325,
       },
     ];
 

+ 12 - 3
src/views/vent/monitorManager/windrectMonitor/longmen.threejs.ts

@@ -64,6 +64,15 @@ class lmWindRect {
     if (!this.group) {
       return;
     }
+    const screenDownText = VENT_PARAM['modalText']
+      ? // @ts-ignore
+        VENT_PARAM['modalText']
+      : // @ts-ignore
+        History_Type['type'] == 'remote'
+        ? `国能神东煤炭集团监制`
+        : '煤科通安(北京)智控科技有限公司研制';
+    const screenDownTextX = 80 - (screenDownText.length - 10) * 6;
+
     const textArr = [
       {
         text: `龙门式测风装置`,
@@ -170,12 +179,12 @@ class lmWindRect {
         y: 245,
       },
       {
-        text: `煤科通安(北京)智控科技有限公司研制`,
+        text: screenDownText,
         font: 'normal 28px Arial',
         color: '#009900',
         strokeStyle: '#002200',
-        x: 60,
-        y: 302,
+        x: screenDownTextX,
+        y: 325,
       },
     ];
 

+ 12 - 3
src/views/vent/monitorManager/windrectMonitor/longmenSide.threejs.ts

@@ -65,6 +65,15 @@ class lmWindRectSide {
     if (!this.group) {
       return;
     }
+    const screenDownText = VENT_PARAM['modalText']
+      ? // @ts-ignore
+        VENT_PARAM['modalText']
+      : // @ts-ignore
+        History_Type['type'] == 'remote'
+        ? `国能神东煤炭集团监制`
+        : '煤科通安(北京)智控科技有限公司研制';
+    const screenDownTextX = 80 - (screenDownText.length - 10) * 6;
+
     const textArr = [
       {
         text: `煤矿巷道远程测风系统`,
@@ -123,12 +132,12 @@ class lmWindRectSide {
         y: 245,
       },
       {
-        text: `煤科通安(北京)智控科技有限公司研制`,
+        text: screenDownText,
         font: 'normal 28px Arial',
         color: '#009900',
         strokeStyle: '#002200',
-        x: 60,
-        y: 303,
+        x: screenDownTextX,
+        y: 325,
       },
     ];
 

+ 11 - 3
src/views/vent/monitorManager/windrectMonitor/zhedie.threejs.ts

@@ -58,6 +58,14 @@ class zdWindRect {
     if (!this.group) {
       return;
     }
+    const screenDownText = VENT_PARAM['modalText']
+      ? // @ts-ignore
+        VENT_PARAM['modalText']
+      : // @ts-ignore
+        History_Type['type'] == 'remote'
+        ? `国能神东煤炭集团监制`
+        : '煤科通安(北京)智控科技有限公司研制';
+    const screenDownTextX = 80 - (screenDownText.length - 10) * 6;
     const textArr = [
       {
         text: `折叠式测风装置`,
@@ -164,12 +172,12 @@ class zdWindRect {
         y: 252,
       },
       {
-        text: `煤科通安(北京)智控科技有限公司研制`,
+        text: screenDownText,
         font: 'normal 28px Arial',
         color: '#009900',
         strokeStyle: '#002200',
-        x: 60,
-        y: 302,
+        x: screenDownTextX,
+        y: 325,
       },
     ];