Browse Source

Merge branch 'main' of github.com:le5le-com/visualization-design

ananzhusen 1 year ago
parent
commit
110f527b17
1 changed files with 95 additions and 68 deletions
  1. 95 68
      src/services/defaults.ts

+ 95 - 68
src/services/defaults.ts

@@ -1163,7 +1163,7 @@ export const formComponents = [
           width: 300,
           height: 40,
           text: '当前时间',
-          lineWidth:0,
+          lineWidth: 0,
           timeFormat:
             '`${year}-${month}-${day} ${hours}:${minutes}:${seconds} 星期${week}`',
           props: {
@@ -1225,27 +1225,27 @@ export const formComponents = [
               label: '2022-01-01',
               content: '事件一',
               circleBg: '#BFDBFF',
-              circleShadow:'#4583FF33',
-              color:'#BFDBFF',
-              textColor:'#FFFFFF'
+              circleShadow: '#4583FF33',
+              color: '#BFDBFF',
+              textColor: '#FFFFFF',
               // path: 'M71.3,61.9v2.21L56.66,66V63.82l3.27-.43.25-1-2.39.31V60.84l2.84-.37.21-.87-3.4.44V57.85l13.08-1.73v2.2l-6.85.9-.21.88,6-.79-.15,2.85ZM58.11,66.56,69.86,65v5.63L58.11,72.19Zm2.59,3.09,6.44-.84V67.52l-6.44.85ZM62.78,63l3.87-.51.07-.95L63,62.05Z',
             },
             {
               label: '2022-02-01',
               content: '事件二',
               circleBg: '#BFDBFF',
-              circleShadow:'#4583FF33',
-              textColor:'#FFFFFF'
+              circleShadow: '#4583FF33',
+              textColor: '#FFFFFF',
             },
             {
               label: '2022-03-01',
               content: '事件三',
-              textColor:'#FFFFFF66'
+              textColor: '#FFFFFF66',
             },
             {
               label: '2022-04-01',
               content: '事件四',
-              textColor:'#FFFFFF66'
+              textColor: '#FFFFFF66',
             },
           ],
           text: '时间轴',
@@ -1295,27 +1295,27 @@ export const formComponents = [
               label: '2022-01-01',
               content: '事件一',
               circleBg: '#BFDBFF',
-              circleShadow:'#4583FF33',
-              color:'#BFDBFF',
-              textColor:'#FFFFFF'
+              circleShadow: '#4583FF33',
+              color: '#BFDBFF',
+              textColor: '#FFFFFF',
               // path: 'M71.3,61.9v2.21L56.66,66V63.82l3.27-.43.25-1-2.39.31V60.84l2.84-.37.21-.87-3.4.44V57.85l13.08-1.73v2.2l-6.85.9-.21.88,6-.79-.15,2.85ZM58.11,66.56,69.86,65v5.63L58.11,72.19Zm2.59,3.09,6.44-.84V67.52l-6.44.85ZM62.78,63l3.87-.51.07-.95L63,62.05Z',
             },
             {
               label: '2022-02-01',
               content: '事件二',
               circleBg: '#BFDBFF',
-              circleShadow:'#4583FF33',
-              textColor:'#FFFFFF'
+              circleShadow: '#4583FF33',
+              textColor: '#FFFFFF',
             },
             {
               label: '2022-03-01',
               content: '事件三',
-              textColor:'#FFFFFF66'
+              textColor: '#FFFFFF66',
             },
             {
               label: '2022-04-01',
               content: '事件四',
-              textColor:'#FFFFFF66'
+              textColor: '#FFFFFF66',
             },
           ],
           props: {
@@ -2170,7 +2170,7 @@ export const formComponents = [
           externElement: true,
           selectedKeys: ['1'],
           // activeColor: '#4E85E5',
-          iconPosition:'left',
+          iconPosition: 'left',
           data: [
             {
               key: '1',
@@ -2700,12 +2700,12 @@ export const formComponents = [
         icon: 'l-yuanzhushuiwei',
         data: {
           name: 'waterTank',
-          width: 100,
-          height: 100,
+          width: 128,
+          height: 128,
           disableAnchor: true,
           color: '#FFFFFF00',
           progress: 0.5,
-          progressColor: '#00a9e6',
+          progressColor: '#4583FF',
         },
       },
       {
@@ -2713,10 +2713,10 @@ export const formComponents = [
         icon: 'l-qiuxingshuiwei',
         data: {
           name: 'watermeter',
-          width: 100,
-          height: 100,
+          width: 128,
+          height: 128,
           disableAnchor: true,
-          background: '#faad14',
+          background: '#4583FF',
           value: 50,
           max: 70,
           min: 20,
@@ -2732,24 +2732,26 @@ export const formComponents = [
         icon: 'l-zhishideng',
         data: {
           name: 'indicatorLight',
-          width: 100,
-          height: 100,
+          disableAnchor: true,
+          width: 128,
+          height: 128,
           displayStatus: 0, //显示状态 默认 方形 圆形
-          background: '#5ac8f7',
-          color: '#5ac8f7',
+          background: '#4583FF33',
+          color: '#4583FF',
           hiddenText: true,
+          onColor:'#58CC84',
           frames: [
             {
-              background: '#f53e6c',
-              color: '#f53e6c',
+              background: '#4583FF33',
+              color: '#4583FF',
               bkType: 0,
               duration: 200,
               strokeType: 0,
               visible: true,
             },
             {
-              background: '#5ac8f7',
-              color: '#5ac8f7',
+              background: '#4583FF33',
+              color: '#4583FF',
               bkType: 0,
               duration: 200,
               strokeType: 0,
@@ -2758,6 +2760,19 @@ export const formComponents = [
           ],
           animateType: 'custom',
         },
+        props: {
+          custom: [
+            {
+              key: 'state',
+              value: 'on',
+              type: 'select',
+              options: [
+                { label: '开', value: 'on' },
+                { label: '关', value: 'off' },
+              ],
+            },
+          ],
+        },
       },
       {
         name: '圆形按钮',
@@ -2784,10 +2799,12 @@ export const formComponents = [
           width: 72,
           height: 128,
           disableInput: true,
-          offColor: '#BFBFBF',
-          onColor: '#1890ff',
+          offColor: '#FFA98F',
+          onColor: '#80D99F',
           color: '#4583FF', //66 33
           background: '#4583FF33',
+          offShadowColor: '#FF5D3C',
+          onShadowColor: '#58CC84',
         },
       },
       {
@@ -2812,18 +2829,20 @@ export const formComponents = [
         icon: 'l-zhadao',
         data: {
           name: 'knifeSwitch',
-          width: 100,
-          height: 100,
-          switch: false,
-          color: '#0AECA140',
-          background: '#748E9140',
-          events: [
-            {
-              action: 5,
-              name: 'click',
-              value: 'window.meta2d.setValue({id:pen.id,switch:!pen.switch});',
-            },
-          ],
+          width: 64,
+          height: 128,
+          color: '#4583FF',
+          disableInput: true,
+          background: '#4583FF33',
+          offColor: '#FF5D3C',
+          onColor: '#58CC84',
+          // events: [
+          //   {
+          //     action: 5,
+          //     name: 'click',
+          //     value: 'window.meta2d.setValue({id:pen.id,switch:!pen.switch});',
+          //   },
+          // ],
         },
       },
       {
@@ -2831,19 +2850,22 @@ export const formComponents = [
         icon: 'l-bodongkaiguan',
         data: {
           name: 'toggleSwitch',
-          width: 100,
-          height: 100,
-          switch: false,
-          color: '#0AECA140',
-          background: '#748E9140',
-          events: [
-            {
-              action: 5,
-              name: 'click',
-              value:
-                'window.meta2d.setValue({id:pen.id,switch:!pen.switch});window.meta2d.render()',
-            },
-          ],
+          width: 128,
+          height: 128,
+          checked: true,
+          disableInput: true,
+          color: '#4583FF',
+          background: '#4583FF33',
+          offColor: '#FF5D3C',
+          onColor: '#58CC84',
+          // events: [
+          //   {
+          //     action: 5,
+          //     name: 'click',
+          //     value:
+          //       'window.meta2d.setValue({id:pen.id,switch:!pen.switch});window.meta2d.render()',
+          //   },
+          // ],
         },
       },
       {
@@ -2851,11 +2873,12 @@ export const formComponents = [
         icon: 'l-kongqikaiguan',
         data: {
           name: 'airSwitch',
-          width: 180,
-          height: 240,
+          width: 120,
+          height: 128,
           switch: true,
           color: '#748E9173',
           background: '#748E9140',
+          disableInput: true,
         },
       },
       {
@@ -2863,11 +2886,14 @@ export const formComponents = [
         icon: 'l-shuizhuwendu',
         data: {
           name: 'thermometer',
-          width: 100,
-          height: 300,
+          width: 32,
+          height: 128,
           disableAnchor: true,
-          background: '#F40',
-          value: 10,
+          color:'#4583FF',
+          fontColor:'#FFFFFFB3',
+          background: '#FF5D3C33',
+          activeBacground:'#FF5D3C',
+          value: -10,
           min: -20,
           max: 20,
         },
@@ -2877,17 +2903,18 @@ export const formComponents = [
         icon: 'l-bianpingwendu',
         data: {
           name: 'thermometer1',
-          width: 200,
-          height: 300,
           disableAnchor: true,
+          width: 48,
+          height: 128,
           backgroundColor: '#666',
           value: 0,
           min: -20,
           max: 20,
+          color:'#4583FF',
           markColor: '#fff',
-          barrelColor: '#624',
-          barrelShowColor: '#d26',
-          fontColor: '#fff',
+          background:'#FF5D3C33',
+          activeBackground:'#FF5D3C',
+          fontColor: '#FFFFFFB3',
           sub: 5,
           barrel: {
             x: 0.3,