diff --git a/src/main/java/com/genersoft/iot/vmp/gb28181/bean/CommonGBChannel.java b/src/main/java/com/genersoft/iot/vmp/gb28181/bean/CommonGBChannel.java index 14143e306..a9d19363a 100644 --- a/src/main/java/com/genersoft/iot/vmp/gb28181/bean/CommonGBChannel.java +++ b/src/main/java/com/genersoft/iot/vmp/gb28181/bean/CommonGBChannel.java @@ -86,16 +86,12 @@ public class CommonGBChannel { @Schema(description = "国标-纬度 WGS-84坐标系") private Double gbLatitude; - @Schema(description = "") private Double gpsAltitude; - @Schema(description = "") private Double gpsSpeed; - @Schema(description = "") private Double gpsDirection; - @Schema(description = "") private String gpsTime; @Schema(description = "国标-虚拟组织所属的业务分组ID") diff --git a/src/main/java/com/genersoft/iot/vmp/gb28181/controller/ChannelController.java b/src/main/java/com/genersoft/iot/vmp/gb28181/controller/ChannelController.java index 1f8eeca24..21bba5eee 100755 --- a/src/main/java/com/genersoft/iot/vmp/gb28181/controller/ChannelController.java +++ b/src/main/java/com/genersoft/iot/vmp/gb28181/controller/ChannelController.java @@ -104,7 +104,7 @@ public class ChannelController { @Operation(summary = "重置国标通道", security = @SecurityRequirement(name = JwtUtils.HEADER)) @PostMapping("/reset") - public void reset(ResetParam param){ + public void reset(@RequestBody ResetParam param){ Assert.notNull(param.getId(), "通道ID不能为空"); Assert.notEmpty(param.getChanelFields(), "待重置字段不可以空"); channelService.reset(param.getId(), param.getChanelFields()); 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 1a25105b7..1e93f07d2 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 @@ -237,8 +237,8 @@ public interface CommonGBChannelMapper { @Update(value = {" "}) diff --git a/web/src/api/commonChannel.js b/web/src/api/commonChannel.js index 949c9c6d9..4070f43a1 100644 --- a/web/src/api/commonChannel.js +++ b/web/src/api/commonChannel.js @@ -41,13 +41,11 @@ export function update(data) { }) } -export function reset(id) { +export function reset(data) { return request({ method: 'post', url: '/api/common/channel/reset', - params: { - id: id - } + data: data }) } diff --git a/web/src/store/modules/commonChanel.js b/web/src/store/modules/commonChanel.js index dcc7acce7..04143b465 100644 --- a/web/src/store/modules/commonChanel.js +++ b/web/src/store/modules/commonChanel.js @@ -72,9 +72,9 @@ const actions = { }) }) }, - reset({ commit }, id) { + reset({ commit }, data) { return new Promise((resolve, reject) => { - reset(id).then(response => { + reset(data).then(response => { const { data } = response resolve(data) }).catch(error => { diff --git a/web/src/views/common/CommonChannelEdit.vue b/web/src/views/common/CommonChannelEdit.vue index b8367bb58..79710a796 100644 --- a/web/src/views/common/CommonChannelEdit.vue +++ b/web/src/views/common/CommonChannelEdit.vue @@ -233,7 +233,7 @@
保存 取消 - 重置 + 重置
@@ -241,6 +241,7 @@ + @@ -249,10 +250,12 @@ import channelCode from './../dialog/channelCode' import ChooseCivilCode from '../dialog/chooseCivilCode.vue' import ChooseGroup from '../dialog/chooseGroup.vue' import diff from '../../utils/diff' +import ResetChannel from './../dialog/resetChannel.vue' export default { name: 'CommonChannelEdit', components: { + ResetChannel, ChooseCivilCode, ChooseGroup, channelCode @@ -346,7 +349,7 @@ export default { } }) }, - reset: function() { + reset: function(fileIds) { this.$confirm('确定重置为默认内容?', '提示', { dangerouslyUseHTMLString: true, confirmButtonText: '确定', @@ -354,7 +357,10 @@ export default { type: 'warning' }).then(() => { this.loading = true - this.$store.dispatch('commonChanel/reset', this.form.gbId) + this.$store.dispatch('commonChanel/reset', { + id: this.form.gbId, + chanelFields: fileIds + }) .then((data) => { this.$message.success({ showClose: true, @@ -406,6 +412,9 @@ export default { cancelSubmit: function() { this.$emit('cancel') }, + showReset: function() { + this.$refs.resetChannel.openDialog() + }, getPaths: function() { this.parentPath = [] if (this.form.gbParentId && this.form.gbBusinessGroupId) { diff --git a/web/src/views/dialog/resetChannel.vue b/web/src/views/dialog/resetChannel.vue new file mode 100644 index 000000000..f101eec8e --- /dev/null +++ b/web/src/views/dialog/resetChannel.vue @@ -0,0 +1,245 @@ + + +