ソースを参照

note-sync syncing

yukai 1 年間 前
コミット
ee88bec4e3

+ 11 - 1
.env.development

@@ -1,4 +1,14 @@
 # VITE_SERVER_PROTOCOL = 'http:'
 # VITE_SERVER_HOSTNAME = '127.0.0.1:8200'
 VITE_SERVER_PROTOCOL = 'https:'
-VITE_SERVER_HOSTNAME = 'zhgy.sagoo.cn'
+VITE_SERVER_HOSTNAME = 'zhgy.sagoo.cn'
+
+# VITE_SERVER_PROTOCOL = 'http:'
+# VITE_SERVER_HOSTNAME = 'iot.server.mydig.net'
+
+
+# VITE_SERVER_PROTOCOL = 'http:'
+# VITE_SERVER_HOSTNAME = 'liangzi.server.mydig.net'
+
+# VITE_SERVER_PROTOCOL = 'http:'
+# VITE_SERVER_HOSTNAME = 'pg.server.mydig.net'

+ 0 - 1
src/views/iot/scene/manage/component/actionItem.vue

@@ -94,7 +94,6 @@ const getOneDetail = () => {
             };
           }
         });
-
         actionList.value=combinedArray;
 			})
 		};

+ 36 - 11
src/views/iot/scene/manage/component/sceneItem.vue

@@ -70,6 +70,8 @@ import { DocumentAdd, CircleClose, Right } from '@element-plus/icons-vue';
 import vue3cron from '/@/components/vue3cron/vue3cron.vue';
 import api from '/@/api/scene';
 import product from '/@/api/device';
+import datahub from '/@/api/datahub';
+
 import Condition from './condition.vue';
 const { proxy } = getCurrentInstance() as any;
 const scene_type = proxy.useDict('scene_type');
@@ -121,13 +123,13 @@ const props = defineProps({
       'name': '设备离线',
     }, 
     
-    // {
-    //   'key': 'readAttribute',
-    //   'name': '读取属性',
-    // }, {
-    //   'key': 'modifyAttribute',
-    //   'name': '修改属性',
-    // }, 
+    {
+      'key': 'readAttribute',
+      'name': '读取属性',
+    }, {
+      'key': 'modifyAttribute',
+      'name': '修改属性',
+    }, 
     {
       'key': 'reportAttribute',
       'name': '属性上报',
@@ -135,10 +137,10 @@ const props = defineProps({
       'key': 'reportEvent',
       'name': '事件上报',
     },
-    //  {
-    //   'key': 'functionCall',
-    //   'name': '功能调用',
-    // }
+     {
+      'key': 'functionCall',
+      'name': '功能调用',
+    }
   ]
   }
 })
@@ -175,7 +177,30 @@ const getSelectcolumns=(index: number, val: string) => {
     'operator': '',
     'value': ''
   }]];
+
 }
+//获取类型数据
+const getAction = (val: string) => {
+  switch (val) {
+    case 'functionCall':
+      product.tabDeviceFucntion.getList({ key: product_key }).then((res: any) => {
+        functionCallList.value = res
+      })
+      break;
+    case 'readAttribute':
+      datahub.node.getpropertyList({ key: product_key }).then((re: any) => {
+        propertyCallList.value = re;
+      });
+
+      break;
+    case 'modifyAttribute':
+      datahub.node.getpropertyList({ key: product_key }).then((re: any) => {
+        propertyCallList.value = re;
+      });
+      break;
+  }
+}
+
 const getcolumns = (index: number, val: string) => {
   let where = {
     "sceneType": props.sceneType, //场景类型