From 36afa809c42b3f905f817b7c6210b7ebeb3d0673 Mon Sep 17 00:00:00 2001 From: redamancy-qian <848238014@qq.com> Date: Sat, 16 Apr 2022 13:57:26 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BB=A3=E7=A0=81=E8=A7=84=E8=8C=83=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../wumei-admin/src/main/resources/application.yml | 2 +- .../ruoyi/iot/controller/CategoryController.java | 4 ++-- .../com/ruoyi/iot/controller/DeviceController.java | 14 +++++++++----- .../com/ruoyi/iot/controller/GroupController.java | 2 +- .../ruoyi/iot/controller/ProductController.java | 2 +- .../controller/ThingsModelTemplateController.java | 2 +- .../java/com/ruoyi/iot/mapper/CategoryMapper.java | 4 ++-- .../java/com/ruoyi/iot/mapper/DeviceMapper.java | 6 +++--- .../java/com/ruoyi/iot/mapper/GroupMapper.java | 2 +- .../java/com/ruoyi/iot/mapper/ProductMapper.java | 2 +- .../iot/mapper/ThingsModelTemplateMapper.java | 2 +- .../com/ruoyi/iot/service/ICategoryService.java | 4 ++-- .../java/com/ruoyi/iot/service/IDeviceService.java | 6 +++--- .../java/com/ruoyi/iot/service/IGroupService.java | 2 +- .../com/ruoyi/iot/service/IProductService.java | 2 +- .../iot/service/IThingsModelTemplateService.java | 2 +- .../iot/service/impl/CategoryServiceImpl.java | 8 ++++---- .../ruoyi/iot/service/impl/DeviceServiceImpl.java | 12 ++++++------ .../ruoyi/iot/service/impl/GroupServiceImpl.java | 4 ++-- .../ruoyi/iot/service/impl/ProductServiceImpl.java | 4 ++-- .../impl/ThingsModelTemplateServiceImpl.java | 4 ++-- .../main/resources/mapper/iot/CategoryMapper.xml | 4 ++-- .../src/main/resources/mapper/iot/DeviceMapper.xml | 6 +++--- .../src/main/resources/mapper/iot/GroupMapper.xml | 2 +- .../main/resources/mapper/iot/ProductMapper.xml | 2 +- .../mapper/iot/ThingsModelTemplateMapper.xml | 2 +- vue/src/views/iot/device/product-list.vue | 6 +++--- vue/src/views/iot/group/device-list.vue | 4 ++-- 28 files changed, 60 insertions(+), 56 deletions(-) diff --git a/springboot/wumei-admin/src/main/resources/application.yml b/springboot/wumei-admin/src/main/resources/application.yml index de4a59e0..2dce8904 100644 --- a/springboot/wumei-admin/src/main/resources/application.yml +++ b/springboot/wumei-admin/src/main/resources/application.yml @@ -65,7 +65,7 @@ spring: # 数据库索引 database: 0 # 密码 - password: wumei-smart +# password: wumei-smart # password: 123456 # 连接超时时间 timeout: 10s diff --git a/springboot/wumei-iot/src/main/java/com/ruoyi/iot/controller/CategoryController.java b/springboot/wumei-iot/src/main/java/com/ruoyi/iot/controller/CategoryController.java index 0d22c397..fd657d59 100644 --- a/springboot/wumei-iot/src/main/java/com/ruoyi/iot/controller/CategoryController.java +++ b/springboot/wumei-iot/src/main/java/com/ruoyi/iot/controller/CategoryController.java @@ -54,7 +54,7 @@ public class CategoryController extends BaseController { list = categoryService.selectCategoryList(category); }else { - list = categoryService.selectCategoryList1(category); + list = categoryService.selectCategoryListAccurate(category); } return getDataTable(list); @@ -73,7 +73,7 @@ public class CategoryController extends BaseController { list = categoryService.selectCategoryShortList(); }else { - list = categoryService.selectCategoryShortList1(category); + list = categoryService.selectCategoryShortListAccurate(category); } return AjaxResult.success(list); } diff --git a/springboot/wumei-iot/src/main/java/com/ruoyi/iot/controller/DeviceController.java b/springboot/wumei-iot/src/main/java/com/ruoyi/iot/controller/DeviceController.java index b91256e0..b7746123 100644 --- a/springboot/wumei-iot/src/main/java/com/ruoyi/iot/controller/DeviceController.java +++ b/springboot/wumei-iot/src/main/java/com/ruoyi/iot/controller/DeviceController.java @@ -48,11 +48,9 @@ public class DeviceController extends BaseController if(device.getUserName()==null || device.getUserName()=="" ) { list = deviceService.selectDeviceList(device); - System.out.print("进入模糊查询"); }else { // 精确查询 - System.out.print("进入精准查询"+device.getUserName()); - list = deviceService.selectDeviceList1(device); + list = deviceService.selectDeviceListAccurate(device); } return getDataTable(list); } @@ -72,7 +70,7 @@ public class DeviceController extends BaseController list = deviceService.selectDeviceShortList(device); }else { // 精确查询 - list = deviceService.selectDeviceShortList1(device); + list = deviceService.selectDeviceShortListAccurate(device); } return getDataTable(list); } @@ -85,7 +83,13 @@ public class DeviceController extends BaseController @ApiOperation("查询所有设备简短列表") public TableDataInfo allShortList(Device device) { - List list = deviceService.selectAllDeviceShortList1(device.getUserName()); + List list = new ArrayList<>(); + if(device.getUserName()==null || device.getUserName() == "") + { + list = deviceService.selectAllDeviceShortList(); + }else { + list = deviceService.selectAllDeviceShortListAccurate(device.getUserName()); + } return getDataTable(list); } diff --git a/springboot/wumei-iot/src/main/java/com/ruoyi/iot/controller/GroupController.java b/springboot/wumei-iot/src/main/java/com/ruoyi/iot/controller/GroupController.java index 2913a5ba..a283773f 100644 --- a/springboot/wumei-iot/src/main/java/com/ruoyi/iot/controller/GroupController.java +++ b/springboot/wumei-iot/src/main/java/com/ruoyi/iot/controller/GroupController.java @@ -58,7 +58,7 @@ public class GroupController extends BaseController }else { // 精准查询 - list = groupService.selectGroupList1(group); + list = groupService.selectGroupListAccurate(group); } return getDataTable(list); } diff --git a/springboot/wumei-iot/src/main/java/com/ruoyi/iot/controller/ProductController.java b/springboot/wumei-iot/src/main/java/com/ruoyi/iot/controller/ProductController.java index bf2a48b6..88d0900c 100644 --- a/springboot/wumei-iot/src/main/java/com/ruoyi/iot/controller/ProductController.java +++ b/springboot/wumei-iot/src/main/java/com/ruoyi/iot/controller/ProductController.java @@ -48,7 +48,7 @@ public class ProductController extends BaseController { list = productService.selectProductList(product); }else { - list = productService.selectProductList1(product); + list = productService.selectProductListAccurate(product); } return getDataTable(list); } diff --git a/springboot/wumei-iot/src/main/java/com/ruoyi/iot/controller/ThingsModelTemplateController.java b/springboot/wumei-iot/src/main/java/com/ruoyi/iot/controller/ThingsModelTemplateController.java index cd91eb67..bbc20a99 100644 --- a/springboot/wumei-iot/src/main/java/com/ruoyi/iot/controller/ThingsModelTemplateController.java +++ b/springboot/wumei-iot/src/main/java/com/ruoyi/iot/controller/ThingsModelTemplateController.java @@ -53,7 +53,7 @@ public class ThingsModelTemplateController extends BaseController list = thingsModelTemplateService.selectThingsModelTemplateList(thingsModelTemplate); }else{ // 精准查询 - list = thingsModelTemplateService.selectThingsModelTemplateList1(thingsModelTemplate); + list = thingsModelTemplateService.selectThingsModelTemplateListAccurate(thingsModelTemplate); } return getDataTable(list); } diff --git a/springboot/wumei-iot/src/main/java/com/ruoyi/iot/mapper/CategoryMapper.java b/springboot/wumei-iot/src/main/java/com/ruoyi/iot/mapper/CategoryMapper.java index 29cdc487..5b357f88 100644 --- a/springboot/wumei-iot/src/main/java/com/ruoyi/iot/mapper/CategoryMapper.java +++ b/springboot/wumei-iot/src/main/java/com/ruoyi/iot/mapper/CategoryMapper.java @@ -78,7 +78,7 @@ public interface CategoryMapper */ public int productCountInCategorys(Long[] categoryIds); // 精准查询 - List selectCategoryList1(Category category); + List selectCategoryListAccurate(Category category); - List selectCategoryShortList1(Category category); + List selectCategoryShortListAccurate(Category category); } diff --git a/springboot/wumei-iot/src/main/java/com/ruoyi/iot/mapper/DeviceMapper.java b/springboot/wumei-iot/src/main/java/com/ruoyi/iot/mapper/DeviceMapper.java index 4527855a..ef05f333 100644 --- a/springboot/wumei-iot/src/main/java/com/ruoyi/iot/mapper/DeviceMapper.java +++ b/springboot/wumei-iot/src/main/java/com/ruoyi/iot/mapper/DeviceMapper.java @@ -162,9 +162,9 @@ public interface DeviceMapper */ public int deleteDeviceGroupByDeviceIds(Long[] deviceIds); // 查询所有简短设备列表 - List selectAllDeviceShortList1(String userName); + List selectAllDeviceShortListAccurate(String userName); //精准查询 - List selectDeviceList1(Device device); + List selectDeviceListAccurate(Device device); - List selectDeviceShortList1(Device device); + List selectDeviceShortListAccurate(Device device); } diff --git a/springboot/wumei-iot/src/main/java/com/ruoyi/iot/mapper/GroupMapper.java b/springboot/wumei-iot/src/main/java/com/ruoyi/iot/mapper/GroupMapper.java index 3004f9f9..4f72fdad 100644 --- a/springboot/wumei-iot/src/main/java/com/ruoyi/iot/mapper/GroupMapper.java +++ b/springboot/wumei-iot/src/main/java/com/ruoyi/iot/mapper/GroupMapper.java @@ -85,5 +85,5 @@ public interface GroupMapper public int deleteDeviceGroupByGroupIds(Long[] groupIds); // 精准查询所有 - List selectGroupList1(Group group); + List selectGroupListAccurate(Group group); } diff --git a/springboot/wumei-iot/src/main/java/com/ruoyi/iot/mapper/ProductMapper.java b/springboot/wumei-iot/src/main/java/com/ruoyi/iot/mapper/ProductMapper.java index 7f6b901f..dc9a5614 100644 --- a/springboot/wumei-iot/src/main/java/com/ruoyi/iot/mapper/ProductMapper.java +++ b/springboot/wumei-iot/src/main/java/com/ruoyi/iot/mapper/ProductMapper.java @@ -117,5 +117,5 @@ public interface ProductMapper */ public int thingsCountInProduct(Long productId); // 精准查询 - List selectProductList1(Product product); + List selectProductListAccurate(Product product); } diff --git a/springboot/wumei-iot/src/main/java/com/ruoyi/iot/mapper/ThingsModelTemplateMapper.java b/springboot/wumei-iot/src/main/java/com/ruoyi/iot/mapper/ThingsModelTemplateMapper.java index 82c970f4..75478ac6 100644 --- a/springboot/wumei-iot/src/main/java/com/ruoyi/iot/mapper/ThingsModelTemplateMapper.java +++ b/springboot/wumei-iot/src/main/java/com/ruoyi/iot/mapper/ThingsModelTemplateMapper.java @@ -69,5 +69,5 @@ public interface ThingsModelTemplateMapper */ public int deleteThingsModelTemplateByTemplateIds(Long[] templateIds); // 精准查询 - List selectThingsModelTemplateList1(ThingsModelTemplate thingsModelTemplate); + List selectThingsModelTemplateListAccurate(ThingsModelTemplate thingsModelTemplate); } diff --git a/springboot/wumei-iot/src/main/java/com/ruoyi/iot/service/ICategoryService.java b/springboot/wumei-iot/src/main/java/com/ruoyi/iot/service/ICategoryService.java index ab9c4df9..8d610e00 100644 --- a/springboot/wumei-iot/src/main/java/com/ruoyi/iot/service/ICategoryService.java +++ b/springboot/wumei-iot/src/main/java/com/ruoyi/iot/service/ICategoryService.java @@ -70,7 +70,7 @@ public interface ICategoryService public int deleteCategoryByCategoryId(Long categoryId); // 精准查询 - List selectCategoryList1(Category category); + List selectCategoryListAccurate(Category category); - List selectCategoryShortList1(Category category); + List selectCategoryShortListAccurate(Category category); } diff --git a/springboot/wumei-iot/src/main/java/com/ruoyi/iot/service/IDeviceService.java b/springboot/wumei-iot/src/main/java/com/ruoyi/iot/service/IDeviceService.java index 99350e32..a8cff481 100644 --- a/springboot/wumei-iot/src/main/java/com/ruoyi/iot/service/IDeviceService.java +++ b/springboot/wumei-iot/src/main/java/com/ruoyi/iot/service/IDeviceService.java @@ -153,11 +153,11 @@ public interface IDeviceService public String generationDeviceNum(); // 获取所有简短设备列表 - List selectAllDeviceShortList1(String userName); + List selectAllDeviceShortListAccurate(String userName); // 精准查询 - List selectDeviceList1(Device device); + List selectDeviceListAccurate(Device device); // 精准查询所有条件设备的简短信息 - List selectDeviceShortList1(Device device); + List selectDeviceShortListAccurate(Device device); } diff --git a/springboot/wumei-iot/src/main/java/com/ruoyi/iot/service/IGroupService.java b/springboot/wumei-iot/src/main/java/com/ruoyi/iot/service/IGroupService.java index 8bbd00c6..db9ce721 100644 --- a/springboot/wumei-iot/src/main/java/com/ruoyi/iot/service/IGroupService.java +++ b/springboot/wumei-iot/src/main/java/com/ruoyi/iot/service/IGroupService.java @@ -75,5 +75,5 @@ public interface IGroupService public int deleteGroupByGroupId(Long groupId); // 精准查询 - List selectGroupList1(Group group); + List selectGroupListAccurate(Group group); } diff --git a/springboot/wumei-iot/src/main/java/com/ruoyi/iot/service/IProductService.java b/springboot/wumei-iot/src/main/java/com/ruoyi/iot/service/IProductService.java index 59e0cf0b..f1d1753f 100644 --- a/springboot/wumei-iot/src/main/java/com/ruoyi/iot/service/IProductService.java +++ b/springboot/wumei-iot/src/main/java/com/ruoyi/iot/service/IProductService.java @@ -79,5 +79,5 @@ public interface IProductService public int deleteProductByProductId(Long productId); // 精准查询 - List selectProductList1(Product product); + List selectProductListAccurate(Product product); } diff --git a/springboot/wumei-iot/src/main/java/com/ruoyi/iot/service/IThingsModelTemplateService.java b/springboot/wumei-iot/src/main/java/com/ruoyi/iot/service/IThingsModelTemplateService.java index 59367c6f..40307c45 100644 --- a/springboot/wumei-iot/src/main/java/com/ruoyi/iot/service/IThingsModelTemplateService.java +++ b/springboot/wumei-iot/src/main/java/com/ruoyi/iot/service/IThingsModelTemplateService.java @@ -60,5 +60,5 @@ public interface IThingsModelTemplateService public int deleteThingsModelTemplateByTemplateId(Long templateId); // 精准查询 - List selectThingsModelTemplateList1(ThingsModelTemplate thingsModelTemplate); + List selectThingsModelTemplateListAccurate(ThingsModelTemplate thingsModelTemplate); } diff --git a/springboot/wumei-iot/src/main/java/com/ruoyi/iot/service/impl/CategoryServiceImpl.java b/springboot/wumei-iot/src/main/java/com/ruoyi/iot/service/impl/CategoryServiceImpl.java index cc92509d..82cdaab7 100644 --- a/springboot/wumei-iot/src/main/java/com/ruoyi/iot/service/impl/CategoryServiceImpl.java +++ b/springboot/wumei-iot/src/main/java/com/ruoyi/iot/service/impl/CategoryServiceImpl.java @@ -98,8 +98,8 @@ public class CategoryServiceImpl implements ICategoryService } @Override - public List selectCategoryShortList1(Category category) { - return categoryMapper.selectCategoryShortList1(category); + public List selectCategoryShortListAccurate(Category category) { + return categoryMapper.selectCategoryShortListAccurate(category); } /** @@ -134,7 +134,7 @@ public class CategoryServiceImpl implements ICategoryService } @Override - public List selectCategoryList1(Category category) { - return categoryMapper.selectCategoryList1(category); + public List selectCategoryListAccurate(Category category) { + return categoryMapper.selectCategoryListAccurate(category); } } diff --git a/springboot/wumei-iot/src/main/java/com/ruoyi/iot/service/impl/DeviceServiceImpl.java b/springboot/wumei-iot/src/main/java/com/ruoyi/iot/service/impl/DeviceServiceImpl.java index 88ac044d..5bda376f 100644 --- a/springboot/wumei-iot/src/main/java/com/ruoyi/iot/service/impl/DeviceServiceImpl.java +++ b/springboot/wumei-iot/src/main/java/com/ruoyi/iot/service/impl/DeviceServiceImpl.java @@ -252,8 +252,8 @@ public class DeviceServiceImpl implements IDeviceService { // 精准查询所有条件的设备 @Override - public List selectDeviceShortList1(Device device) { - return deviceMapper.selectDeviceShortList1(device); + public List selectDeviceShortListAccurate(Device device) { + return deviceMapper.selectDeviceShortListAccurate(device); } /** @@ -541,13 +541,13 @@ public class DeviceServiceImpl implements IDeviceService { } @Override - public List selectAllDeviceShortList1(String userName) { - return deviceMapper.selectAllDeviceShortList1(userName); + public List selectAllDeviceShortListAccurate(String userName) { + return deviceMapper.selectAllDeviceShortListAccurate(userName); } // 精准查询 @Override - public List selectDeviceList1(Device device) { - return deviceMapper.selectDeviceList1(device); + public List selectDeviceListAccurate(Device device) { + return deviceMapper.selectDeviceListAccurate(device); } diff --git a/springboot/wumei-iot/src/main/java/com/ruoyi/iot/service/impl/GroupServiceImpl.java b/springboot/wumei-iot/src/main/java/com/ruoyi/iot/service/impl/GroupServiceImpl.java index 6e30dada..f63dac75 100644 --- a/springboot/wumei-iot/src/main/java/com/ruoyi/iot/service/impl/GroupServiceImpl.java +++ b/springboot/wumei-iot/src/main/java/com/ruoyi/iot/service/impl/GroupServiceImpl.java @@ -142,7 +142,7 @@ public class GroupServiceImpl implements IGroupService // 精准查询所有 @Override - public List selectGroupList1(Group group) { - return groupMapper.selectGroupList1(group); + public List selectGroupListAccurate(Group group) { + return groupMapper.selectGroupListAccurate(group); } } diff --git a/springboot/wumei-iot/src/main/java/com/ruoyi/iot/service/impl/ProductServiceImpl.java b/springboot/wumei-iot/src/main/java/com/ruoyi/iot/service/impl/ProductServiceImpl.java index fadf43ba..596e70ec 100644 --- a/springboot/wumei-iot/src/main/java/com/ruoyi/iot/service/impl/ProductServiceImpl.java +++ b/springboot/wumei-iot/src/main/java/com/ruoyi/iot/service/impl/ProductServiceImpl.java @@ -196,7 +196,7 @@ public class ProductServiceImpl implements IProductService } // 精准查询 @Override - public List selectProductList1(Product product) { - return productMapper.selectProductList1(product); + public List selectProductListAccurate(Product product) { + return productMapper.selectProductListAccurate(product); } } diff --git a/springboot/wumei-iot/src/main/java/com/ruoyi/iot/service/impl/ThingsModelTemplateServiceImpl.java b/springboot/wumei-iot/src/main/java/com/ruoyi/iot/service/impl/ThingsModelTemplateServiceImpl.java index 07a03596..ce808bb7 100644 --- a/springboot/wumei-iot/src/main/java/com/ruoyi/iot/service/impl/ThingsModelTemplateServiceImpl.java +++ b/springboot/wumei-iot/src/main/java/com/ruoyi/iot/service/impl/ThingsModelTemplateServiceImpl.java @@ -110,7 +110,7 @@ public class ThingsModelTemplateServiceImpl implements IThingsModelTemplateServi } // 精准查询 @Override - public List selectThingsModelTemplateList1(ThingsModelTemplate thingsModelTemplate) { - return thingsModelTemplateMapper.selectThingsModelTemplateList1(thingsModelTemplate); + public List selectThingsModelTemplateListAccurate(ThingsModelTemplate thingsModelTemplate) { + return thingsModelTemplateMapper.selectThingsModelTemplateListAccurate(thingsModelTemplate); } } diff --git a/springboot/wumei-iot/src/main/resources/mapper/iot/CategoryMapper.xml b/springboot/wumei-iot/src/main/resources/mapper/iot/CategoryMapper.xml index 0f7d9326..d2d44dbb 100644 --- a/springboot/wumei-iot/src/main/resources/mapper/iot/CategoryMapper.xml +++ b/springboot/wumei-iot/src/main/resources/mapper/iot/CategoryMapper.xml @@ -34,7 +34,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" order by order_num - and category_name = #{categoryName} @@ -48,7 +48,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" from iot_category order by order_num - select category_id, category_name from iot_category diff --git a/springboot/wumei-iot/src/main/resources/mapper/iot/DeviceMapper.xml b/springboot/wumei-iot/src/main/resources/mapper/iot/DeviceMapper.xml index 66274bfd..72d57eda 100644 --- a/springboot/wumei-iot/src/main/resources/mapper/iot/DeviceMapper.xml +++ b/springboot/wumei-iot/src/main/resources/mapper/iot/DeviceMapper.xml @@ -105,7 +105,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" select device_id, device_name,product_id, serial_number, status,is_shadow ,is_custom_location,things_model_value, active_time from iot_device - select device_id, device_name, product_name, user_name, serial_number, firmware_version, status,rssi,is_shadow , is_custom_location, active_time,network_address,longitude,latitude from iot_device @@ -129,7 +129,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" order by create_time desc - and device_name = #{deviceName} @@ -176,7 +176,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" order by create_time desc - and device_name = #{deviceName} diff --git a/springboot/wumei-iot/src/main/resources/mapper/iot/GroupMapper.xml b/springboot/wumei-iot/src/main/resources/mapper/iot/GroupMapper.xml index 562de0df..1f0e37ce 100644 --- a/springboot/wumei-iot/src/main/resources/mapper/iot/GroupMapper.xml +++ b/springboot/wumei-iot/src/main/resources/mapper/iot/GroupMapper.xml @@ -31,7 +31,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" order by group_order - and group_name = #{groupName} diff --git a/springboot/wumei-iot/src/main/resources/mapper/iot/ProductMapper.xml b/springboot/wumei-iot/src/main/resources/mapper/iot/ProductMapper.xml index 271a7f17..cbbab247 100644 --- a/springboot/wumei-iot/src/main/resources/mapper/iot/ProductMapper.xml +++ b/springboot/wumei-iot/src/main/resources/mapper/iot/ProductMapper.xml @@ -51,7 +51,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" order by create_time desc - and product_name=#{productName} diff --git a/springboot/wumei-iot/src/main/resources/mapper/iot/ThingsModelTemplateMapper.xml b/springboot/wumei-iot/src/main/resources/mapper/iot/ThingsModelTemplateMapper.xml index ad476501..7b161703 100644 --- a/springboot/wumei-iot/src/main/resources/mapper/iot/ThingsModelTemplateMapper.xml +++ b/springboot/wumei-iot/src/main/resources/mapper/iot/ThingsModelTemplateMapper.xml @@ -34,7 +34,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" order by create_time desc - and template_name = #{templateName} diff --git a/vue/src/views/iot/device/product-list.vue b/vue/src/views/iot/device/product-list.vue index 862c7ce7..51555959 100644 --- a/vue/src/views/iot/device/product-list.vue +++ b/vue/src/views/iot/device/product-list.vue @@ -96,9 +96,9 @@ export default { getList() { this.loading = true; // 判断是否是admin角色 - if (this.$store.state.user.roles.indexOf("admin") === -1){ - this.queryParams.tenantName = this.$store.state.user.name - } + if (this.$store.state.user.roles.indexOf("admin") === -1){ + this.queryParams.tenantName = this.$store.state.user.name + } listProduct(this.queryParams).then(response => { this.productList = response.rows; this.total = response.total; diff --git a/vue/src/views/iot/group/device-list.vue b/vue/src/views/iot/group/device-list.vue index 46a64beb..dea9220e 100644 --- a/vue/src/views/iot/group/device-list.vue +++ b/vue/src/views/iot/group/device-list.vue @@ -88,7 +88,7 @@ export default { immediate: true } }, - created() { + created() { }, methods: { @@ -102,7 +102,7 @@ export default { /** 查询设备列表 */ getList() { this.loading = true; - this.queryParams.params = {}; + this.queryParams.params = {}; if (null != this.daterangeActiveTime && '' != this.daterangeActiveTime) { this.queryParams.params["beginActiveTime"] = this.daterangeActiveTime[0]; this.queryParams.params["endActiveTime"] = this.daterangeActiveTime[1]; -- Gitee