diff --git a/src/main/java/com/genersoft/iot/vmp/gb28181/controller/CommonChannelController.java b/src/main/java/com/genersoft/iot/vmp/gb28181/controller/CommonChannelController.java index e1d51899..b8a9df52 100755 --- a/src/main/java/com/genersoft/iot/vmp/gb28181/controller/CommonChannelController.java +++ b/src/main/java/com/genersoft/iot/vmp/gb28181/controller/CommonChannelController.java @@ -86,13 +86,15 @@ public class CommonChannelController { @Parameter(name = "count", description = "每页查询数量", required = true) @Parameter(name = "query", description = "查询内容") @Parameter(name = "online", description = "是否在线") + @Parameter(name = "hasCivilCode", description = "是否分配行政区划") @GetMapping("/list") public PageInfo queryList(int page, int count, @RequestParam(required = false) String query, - @RequestParam(required = false) Boolean online){ + @RequestParam(required = false) Boolean online, + @RequestParam(required = false) Boolean hasCivilCode){ if (ObjectUtils.isEmpty(query)){ query = null; } - return channelService.queryList(page, count, query, online); + return channelService.queryList(page, count, query, online, hasCivilCode); } } diff --git a/src/main/java/com/genersoft/iot/vmp/gb28181/dao/CommonGBChannelMapper.java b/src/main/java/com/genersoft/iot/vmp/gb28181/dao/CommonGBChannelMapper.java index f68e14a2..79a65246 100644 --- a/src/main/java/com/genersoft/iot/vmp/gb28181/dao/CommonGBChannelMapper.java +++ b/src/main/java/com/genersoft/iot/vmp/gb28181/dao/CommonGBChannelMapper.java @@ -306,7 +306,7 @@ public interface CommonGBChannelMapper { CommonGBChannel queryByStreamProxyId(@Param("streamProxyId") Integer streamProxyId); @SelectProvider(type = ChannelProvider.class, method = "queryList") - List queryList(String query, Boolean online); + List queryList(@Param("query") String query, @Param("online") Boolean online, @Param("hasCivilCode") Boolean hasCivilCode); @Select(" diff --git a/web_src/src/components/region.vue b/web_src/src/components/region.vue index bd500be7..12f040ac 100755 --- a/web_src/src/components/region.vue +++ b/web_src/src/components/region.vue @@ -20,6 +20,13 @@ + 添加状态: + + + + + 添加 @@ -40,14 +47,14 @@ @@ -86,6 +93,7 @@ export default { searchSrt: "", channelType: "", online: "", + hasCivilCode: "", winHeight: window.innerHeight - 180, currentPage: 1, count: 15, @@ -114,27 +122,27 @@ export default { this.getChannelList(); }, getChannelList: function () { - let that = this; this.$axios({ method: 'get', url: `/api/common/channel/list`, params: { - page: that.currentPage, - count: that.count, - query: that.searchSrt, - online: that.online + page: this.currentPage, + count: this.count, + query: this.searchSrt, + online: this.online, + hasCivilCode: this.hasCivilCode } - }).then(function (res) { + }).then((res)=> { if (res.data.code === 0) { - that.total = res.data.data.total; - that.channelList = res.data.data.list; + this.total = res.data.data.total; + this.channelList = res.data.data.list; // 防止出现表格错位 - that.$nextTick(() => { - that.$refs.channelListTable.doLayout(); + this.$nextTick(() => { + this.$refs.channelListTable.doLayout(); }) } - }).catch(function (error) { + }).catch((error)=> { console.log(error); }); }, diff --git a/数据库/2.7.2-重构/初始化-mysql-2.7.2.sql b/数据库/2.7.2-重构/初始化-mysql-2.7.2.sql index 673ae033..03f6eeee 100644 --- a/数据库/2.7.2-重构/初始化-mysql-2.7.2.sql +++ b/数据库/2.7.2-重构/初始化-mysql-2.7.2.sql @@ -160,7 +160,7 @@ create table wvp_device_channel ( gb_ip_address character varying(50), gb_port integer, gb_password character varying(50), - gb_status character varying(50) default 'OFF', + gb_status character varying(50), gb_longitude double, gb_latitude double, gb_business_group_id character varying(50),