From ce6fd59db6eb2df67ddf36f6feb134ddcb5825b0 Mon Sep 17 00:00:00 2001 From: fengcheng <2929004360@qq.com> Date: Sat, 12 Apr 2025 16:58:35 +0800 Subject: [PATCH] =?UTF-8?q?=E6=B7=BB=E5=8A=A0=E8=A1=8C=E6=94=BF=E5=88=86?= =?UTF-8?q?=E7=BB=84?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/main/resources/application-druid.yml | 4 +- ruoyi-ui-vue3/src/api/wvp/group.js | 26 + ruoyi-ui-vue3/src/api/wvp/region.js | 26 + .../views/components/common/channelCode.vue | 120 ++-- .../wvp/administrativeGrouping/index.vue | 580 ++++++++++++++++++ ruoyi-ui-vue3/src/views/wvp/channel/index.vue | 12 +- .../src/views/wvp/cloudRecord/index.vue | 4 +- ruoyi-ui-vue3/src/views/wvp/device/index.vue | 12 +- .../gb28181/controller/GroupController.java | 32 +- .../gb28181/controller/RegionController.java | 32 +- .../wvp/mapper/CommonGBChannelMapper.java | 2 +- .../com/ruoyi/wvp/mapper/GroupMapper.java | 4 +- .../com/ruoyi/wvp/mapper/RegionMapper.java | 2 +- ...20000001320000001_34020000001310000001.jpg | Bin 0 -> 61756 bytes ...20000001350000001_34020000001310000001.jpg | Bin 47205 -> 47744 bytes ...20000001390000001_34020000001320000001.jpg | Bin 0 -> 28873 bytes 16 files changed, 754 insertions(+), 102 deletions(-) create mode 100644 ruoyi-ui-vue3/src/views/wvp/administrativeGrouping/index.vue create mode 100644 snap/34020000001320000001_34020000001310000001.jpg create mode 100644 snap/34020000001390000001_34020000001320000001.jpg diff --git a/ruoyi-admin/src/main/resources/application-druid.yml b/ruoyi-admin/src/main/resources/application-druid.yml index da04c74..ecb2d11 100644 --- a/ruoyi-admin/src/main/resources/application-druid.yml +++ b/ruoyi-admin/src/main/resources/application-druid.yml @@ -6,8 +6,8 @@ spring: druid: # 主库数据源 master: - url: jdbc:mysql://192.168.158.39:3306/ry-wvp?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=true&serverTimezone=GMT%2B8 -# url: jdbc:mysql://127.0.0.1:3306/ry-wvp?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=true&serverTimezone=GMT%2B8 + url: jdbc:mysql://192.168.158.39:3306/ry-wvp?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=true&serverTimezone=GMT%2B8&rewriteBatchedStatements=true&allowMultiQueries=true +# url: jdbc:mysql://127.0.0.1:3306/ry-wvp?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=true&serverTimezone=GMT%2B8&rewriteBatchedStatements=true&allowMultiQueries=true username: root password: haoxin # 从库数据源 diff --git a/ruoyi-ui-vue3/src/api/wvp/group.js b/ruoyi-ui-vue3/src/api/wvp/group.js index ed6f5a5..25b6398 100644 --- a/ruoyi-ui-vue3/src/api/wvp/group.js +++ b/ruoyi-ui-vue3/src/api/wvp/group.js @@ -8,3 +8,29 @@ export function queryForTree(query) { params: query }) } + +// 更新分组 +export function updateGroup(data) { + return request({ + url: `/api/group/update`, + method: 'post', + data: data + }) +} + +// 添加分组 +export function addGroup(data) { + return request({ + url: `/api/group/add`, + method: 'post', + data: data + }) +} + +// 删除分组 +export function deleteGroup(id) { + return request({ + url: `/api/group/delete/${id}`, + method: 'delete', + }) +} diff --git a/ruoyi-ui-vue3/src/api/wvp/region.js b/ruoyi-ui-vue3/src/api/wvp/region.js index bb6066e..59028d6 100644 --- a/ruoyi-ui-vue3/src/api/wvp/region.js +++ b/ruoyi-ui-vue3/src/api/wvp/region.js @@ -17,3 +17,29 @@ export function queryForTree(query) { params: query }) } + +// 更新区域 +export function updateRegion(data) { + return request({ + url: `/api/region/update`, + method: 'post', + data: data + }) +} + +// 添加区域 +export function addRegion(data) { + return request({ + url: `/api/region/add`, + method: 'post', + data: data + }) +} + +// 删除区域 +export function deleteRegion(id) { + return request({ + url: `/api/region/delete/${id}`, + method: 'delete', + }) +} diff --git a/ruoyi-ui-vue3/src/views/components/common/channelCode.vue b/ruoyi-ui-vue3/src/views/components/common/channelCode.vue index 195f790..93bf834 100644 --- a/ruoyi-ui-vue3/src/views/components/common/channelCode.vue +++ b/ruoyi-ui-vue3/src/views/components/common/channelCode.vue @@ -136,64 +136,7 @@ const emit = defineEmits(['handleOk']); const showVideoDialog = ref(false); const activeKey = ref('0'); -const allVal = ref([ - { - id: [1, 2], - meaning: '省级编码', - val: '11', - type: '中心编码', - lock: false, - }, - { - id: [3, 4], - meaning: '市级编码', - val: '01', - type: '中心编码', - lock: false, - }, - { - id: [5, 6], - meaning: '区级编码', - val: '01', - type: '中心编码', - lock: false, - }, - { - id: [7, 8], - meaning: '基层接入单位编码', - val: '01', - type: '中心编码', - lock: false, - }, - { - id: [9, 10], - meaning: '行业编码', - val: '00', - type: '行业编码', - lock: false, - }, - { - id: [11, 13], - meaning: '类型编码', - val: '132', - type: '类型编码', - lock: false, - }, - { - id: [14], - meaning: '网络标识编码', - val: '7', - type: '网络标识', - lock: false, - }, - { - id: [15, 20], - meaning: '设备/用户序号', - val: '000001', - type: '序号', - lock: false, - } -]); +const allVal = ref([]); const regionList = ref([]); const deviceTypeList = ref([]); const industryCodeTypeList = ref([]); @@ -204,7 +147,62 @@ const endCallBck = ref(null); defineExpose({openDialog}) function openDialog(callBck, code, lockIndex, lockContent) { - console.log(code) + allVal.value = [{ + id: [1, 2], + meaning: '省级编码', + val: '11', + type: '中心编码', + lock: false, + }, + { + id: [3, 4], + meaning: '市级编码', + val: '01', + type: '中心编码', + lock: false, + }, + { + id: [5, 6], + meaning: '区级编码', + val: '01', + type: '中心编码', + lock: false, + }, + { + id: [7, 8], + meaning: '基层接入单位编码', + val: '01', + type: '中心编码', + lock: false, + }, + { + id: [9, 10], + meaning: '行业编码', + val: '00', + type: '行业编码', + lock: false, + }, + { + id: [11, 13], + meaning: '类型编码', + val: '132', + type: '类型编码', + lock: false, + }, + { + id: [14], + meaning: '网络标识编码', + val: '7', + type: '网络标识', + lock: false, + }, + { + id: [15, 20], + meaning: '设备/用户序号', + val: '000001', + type: '序号', + lock: false, + }] showVideoDialog.value = true activeKey.value = '0'; regionList.value = [] @@ -221,8 +219,8 @@ function openDialog(callBck, code, lockIndex, lockContent) { allVal.value[7].val = code.substring(14) } if (typeof lockIndex != 'undefined') { - allVal.value[0][lockIndex].lock = true - allVal.value[0][lockIndex].val = lockContent + allVal.value[lockIndex].lock = true + allVal.value[lockIndex].val = lockContent } endCallBck.value = callBck; } diff --git a/ruoyi-ui-vue3/src/views/wvp/administrativeGrouping/index.vue b/ruoyi-ui-vue3/src/views/wvp/administrativeGrouping/index.vue new file mode 100644 index 0000000..54048f7 --- /dev/null +++ b/ruoyi-ui-vue3/src/views/wvp/administrativeGrouping/index.vue @@ -0,0 +1,580 @@ + + + + + + + + 展开/折叠 + + + + + + + + + + + + + 修改 + 新增 + 删除 + + + + + + + + + {{ allValRegion[0].val }} + {{ allValRegion[0].meaning }} + + + {{ item.name }} - {{ item.deviceId }} + + + + + {{ allValRegion[1].val ? allValRegion[1].val : "--" }} + {{ allValRegion[1].meaning }} + + + 不添加 + + + {{ item.name }} - {{ item.deviceId.substring(2) }} + + + + + {{ allValRegion[2].val ? allValRegion[2].val : "--" }} + {{ allValRegion[2].meaning }} + + + 不添加 + + + {{ item.name }} - {{ item.deviceId.substring(4) }} + + + + + + {{ allValRegion[3].val ? allValRegion[3].val : "--" }} + {{ allValRegion[3].meaning }} + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 展开/折叠 + + + + + + + + + + + + + 修改 + 新增 + 删除 + + + + + + + + + + 生成 + + + + + + + + + + 选择 + + + + + + + + + + + + + + + + + + + + + diff --git a/ruoyi-ui-vue3/src/views/wvp/channel/index.vue b/ruoyi-ui-vue3/src/views/wvp/channel/index.vue index 8fe9421..a7ef598 100644 --- a/ruoyi-ui-vue3/src/views/wvp/channel/index.vue +++ b/ruoyi-ui-vue3/src/views/wvp/channel/index.vue @@ -88,17 +88,15 @@ - 播放 停止 编辑 @@ -108,9 +106,9 @@ 更多 - - - + + + @@ -503,7 +501,7 @@ import { subChannels, updateChannelStreamIdentification } from "../../../api/wvp/device.js"; -import {getCommonChannel, resetChannel, updateChannelData, sendDevicePush} from "../../../api/wvp/channel.js"; +import {getCommonChannel, resetChannel, sendDevicePush, updateChannelData} from "../../../api/wvp/channel.js"; import {recordApi} from "../../../api/wvp/control.js"; import router from "@/router"; diff --git a/ruoyi-ui-vue3/src/views/wvp/cloudRecord/index.vue b/ruoyi-ui-vue3/src/views/wvp/cloudRecord/index.vue index 96a7ea1..5c52af7 100644 --- a/ruoyi-ui-vue3/src/views/wvp/cloudRecord/index.vue +++ b/ruoyi-ui-vue3/src/views/wvp/cloudRecord/index.vue @@ -62,9 +62,9 @@ - 播放 + 播放 - 下载 + 下载 diff --git a/ruoyi-ui-vue3/src/views/wvp/device/index.vue b/ruoyi-ui-vue3/src/views/wvp/device/index.vue index 08d6702..6d2edc1 100644 --- a/ruoyi-ui-vue3/src/views/wvp/device/index.vue +++ b/ruoyi-ui-vue3/src/views/wvp/device/index.vue @@ -110,23 +110,23 @@ - 刷新 - 通道 - 修改 + 修改 {moreClick(command, scope.row)}"> 更多 - - - + + + diff --git a/ruoyi-wvp/src/main/java/com/ruoyi/wvp/gb28181/controller/GroupController.java b/ruoyi-wvp/src/main/java/com/ruoyi/wvp/gb28181/controller/GroupController.java index 12a942a..8c2c6e7 100644 --- a/ruoyi-wvp/src/main/java/com/ruoyi/wvp/gb28181/controller/GroupController.java +++ b/ruoyi-wvp/src/main/java/com/ruoyi/wvp/gb28181/controller/GroupController.java @@ -26,12 +26,16 @@ public class GroupController extends BaseController { @Autowired private IGroupService groupService; - @Operation(summary = "添加分组") - @Parameter(name = "group", description = "group", required = true) + /** + * 添加分组 + * + * @param group + */ @ResponseBody @PostMapping("/add") - public void add(@RequestBody Group group) { + public AjaxResult add(@RequestBody Group group) { groupService.add(group); + return success(); } /** @@ -55,24 +59,32 @@ public class GroupController extends BaseController { return success(groupService.queryForTree(query, parent, hasChannel)); } - @Operation(summary = "更新分组") - @Parameter(name = "group", description = "Group", required = true) + /** + * 更新分组 + * + * @param group + */ @ResponseBody @PostMapping("/update") - public void update(@RequestBody Group group) { + public AjaxResult update(@RequestBody Group group) { groupService.update(group); + return success(); } - @Operation(summary = "删除分组") - @Parameter(name = "id", description = "分组id", required = true) + /** + * 删除分组 + * + * @param id 分组id + */ @ResponseBody - @DeleteMapping("/delete") - public void delete(Integer id) { + @DeleteMapping("/delete/{id}") + public AjaxResult delete(@PathVariable Integer id) { Assert.notNull(id, "分组id(deviceId)不需要存在"); boolean result = groupService.delete(id); if (!result) { throw new ControllerException(ErrorCode.ERROR100.getCode(), "移除失败"); } + return success(); } @Operation(summary = "获取所属的行政区划下的行政区划") diff --git a/ruoyi-wvp/src/main/java/com/ruoyi/wvp/gb28181/controller/RegionController.java b/ruoyi-wvp/src/main/java/com/ruoyi/wvp/gb28181/controller/RegionController.java index 15310c3..9834b12 100644 --- a/ruoyi-wvp/src/main/java/com/ruoyi/wvp/gb28181/controller/RegionController.java +++ b/ruoyi-wvp/src/main/java/com/ruoyi/wvp/gb28181/controller/RegionController.java @@ -30,12 +30,16 @@ public class RegionController extends BaseController { @Autowired private IRegionService regionService; - @Operation(summary = "添加区域") - @Parameter(name = "region", description = "Region", required = true) + /** + * 添加区域 + * + * @param region + */ @ResponseBody @PostMapping("/add") - public void add(@RequestBody Region region) { + public AjaxResult add(@RequestBody Region region) { regionService.add(region); + return success(); } @Operation(summary = "查询区域") @@ -73,24 +77,32 @@ public class RegionController extends BaseController { return success(regionService.queryForTree(query, parent, hasChannel)); } - @Operation(summary = "更新区域") - @Parameter(name = "region", description = "Region", required = true) + /** + * 更新区域 + * + * @param region + */ @ResponseBody @PostMapping("/update") - public void update(@RequestBody Region region) { + public AjaxResult update(@RequestBody Region region) { regionService.update(region); + return success(); } - @Operation(summary = "删除区域") - @Parameter(name = "id", description = "区域ID", required = true) + /** + * 删除区域 + * + * @param id 区域ID + */ @ResponseBody - @DeleteMapping("/delete") - public void delete(Integer id) { + @DeleteMapping("/delete/{id}") + public AjaxResult delete(@PathVariable Integer id) { Assert.notNull(id, "区域ID需要存在"); boolean result = regionService.deleteByDeviceId(id); if (!result) { throw new ControllerException(ErrorCode.ERROR100.getCode(), "移除失败"); } + return success(); } @Operation(summary = "根据区域Id查询区域") diff --git a/ruoyi-wvp/src/main/java/com/ruoyi/wvp/mapper/CommonGBChannelMapper.java b/ruoyi-wvp/src/main/java/com/ruoyi/wvp/mapper/CommonGBChannelMapper.java index b8f32f3..e1c8f80 100644 --- a/ruoyi-wvp/src/main/java/com/ruoyi/wvp/mapper/CommonGBChannelMapper.java +++ b/ruoyi-wvp/src/main/java/com/ruoyi/wvp/mapper/CommonGBChannelMapper.java @@ -285,7 +285,7 @@ public interface CommonGBChannelMapper { " WHERE gb_civil_code in "+ " #{item.deviceId}" + " "}) - int removeCivilCode(List allChildren); + int removeCivilCode(@Param("allChildren") List allChildren); @Update(value = {" ") - int batchDelete(List allChildren); + int batchDelete(@Param("allChildren") List allChildren); @Select("SELECT * from wvp_common_group WHERE device_id = #{businessGroup} and business_group = #{businessGroup} ") Group queryBusinessGroup(@Param("businessGroup") String businessGroup); @@ -117,7 +117,7 @@ public interface GroupMapper { " where device_id in " + " #{item.deviceId}" + " ") - List queryInGroupListByDeviceId(List groupList); + List queryInGroupListByDeviceId(@Param("groupList") List groupList); @Select(" ") - void batchDelete(List allChildren); + void batchDelete(@Param("allChildren") List allChildren); @Select("