فهرست منبع

优化设备页面

jishenghua 9 ماه پیش
والد
کامیت
66bb070106
2فایلهای تغییر یافته به همراه5 افزوده شده و 3 حذف شده
  1. 4 3
      gyj-iot-web/src/views/iot/device/index.vue
  2. 1 0
      gyj-iot-web/src/views/iot/product/index.vue

+ 4 - 3
gyj-iot-web/src/views/iot/device/index.vue

@@ -229,6 +229,7 @@ const deviceList = ref([]);
 // 我的分组列表数据
 const myGroupList = ref([]);
 const isSubDev = ref(false);
+const ids = ref([]);
 
 const data = reactive({
     // 查询参数
@@ -410,7 +411,7 @@ function handleEditDevice(row, activeName) {
     let deviceId = 0;
     let isSubDev = 0;
     if (row != 0) {
-        deviceId = row.deviceId || this.ids;
+        deviceId = row.deviceId || ids.value;
         isSubDev = row.subDeviceCount > 0 ? 1 : 0;
     }
     proxy.$router.push({
@@ -455,7 +456,7 @@ function handleRunDevice(row) {
 }
 /** 删除按钮操作 */
 function handleDelete(row) {
-    const deviceIds = row.deviceId || this.ids;
+    const deviceIds = row.deviceId || ids.value;
     proxy.$modal.confirm('是否确认删除设备编号为"' + deviceIds + '"的数据项?').then(function () {
             if (row.deviceType === 3) {
                 delSipDeviceBySipId(row.serialNumber);
@@ -463,7 +464,7 @@ function handleDelete(row) {
             return delDevice(deviceIds);
         })
         .then(() => {
-            this.getList();
+            getList();
             proxy.$modal.msgSuccess('删除成功');
         })
         .catch(() => {});

+ 1 - 0
gyj-iot-web/src/views/iot/product/index.vue

@@ -122,6 +122,7 @@ const title = ref("");
 // 是否显示弹出层
 const open = ref(false);
 const uniqueId = ref("");
+const ids = ref([]);
 
 const data = reactive({
     // 查询参数