添加通道编号构建页面
parent
0853d7e842
commit
cb403689b4
|
@ -1,8 +1,9 @@
|
|||
package com.genersoft.iot.vmp.conf;
|
||||
|
||||
import com.genersoft.iot.vmp.common.CivilCodePo;
|
||||
import com.genersoft.iot.vmp.utils.CivilCodeUtil;
|
||||
import com.genersoft.iot.vmp.gb28181.bean.Region;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.ehcache.impl.internal.concurrent.ConcurrentHashMap;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.boot.CommandLineRunner;
|
||||
import org.springframework.context.annotation.Configuration;
|
||||
|
@ -18,6 +19,7 @@ import java.io.InputStreamReader;
|
|||
import java.nio.file.Files;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
* 启动时读取行政区划表
|
||||
|
@ -31,6 +33,8 @@ public class CivilCodeFileConf implements CommandLineRunner {
|
|||
@Lazy
|
||||
private UserSetting userSetting;
|
||||
|
||||
private final Map<String, CivilCodePo> civilCodeMap= new ConcurrentHashMap<>();
|
||||
|
||||
@Override
|
||||
public void run(String... args) throws Exception {
|
||||
if (ObjectUtils.isEmpty(userSetting.getCivilCodeFile())) {
|
||||
|
@ -59,7 +63,6 @@ public class CivilCodeFileConf implements CommandLineRunner {
|
|||
BufferedReader inputStreamReader = new BufferedReader(new InputStreamReader(inputStream));
|
||||
int index = -1;
|
||||
String line;
|
||||
List<CivilCodePo> civilCodePoList = new ArrayList<>();
|
||||
while ((line = inputStreamReader.readLine()) != null) {
|
||||
index ++;
|
||||
if (index == 0) {
|
||||
|
@ -67,15 +70,28 @@ public class CivilCodeFileConf implements CommandLineRunner {
|
|||
}
|
||||
String[] infoArray = line.split(",");
|
||||
CivilCodePo civilCodePo = CivilCodePo.getInstance(infoArray);
|
||||
civilCodePoList.add(civilCodePo);
|
||||
civilCodeMap.put(civilCodePo.getCode(), civilCodePo);
|
||||
}
|
||||
CivilCodeUtil.INSTANCE.add(civilCodePoList);
|
||||
inputStreamReader.close();
|
||||
inputStream.close();
|
||||
if (civilCodePoList.isEmpty()) {
|
||||
if (civilCodeMap.isEmpty()) {
|
||||
log.warn("[行政区划] 文件内容为空,可能造成目录刷新结果不完整");
|
||||
}else {
|
||||
log.info("[行政区划] 加载成功,共加载数据{}条", civilCodePoList.size());
|
||||
log.info("[行政区划] 加载成功,共加载数据{}条", civilCodeMap.size());
|
||||
}
|
||||
}
|
||||
|
||||
public List<Region> getAllChild(String parent) {
|
||||
List<Region> result = new ArrayList<>();
|
||||
for (String key : civilCodeMap.keySet()) {
|
||||
if (parent == null) {
|
||||
if (ObjectUtils.isEmpty(civilCodeMap.get(key).getParentCode().trim())) {
|
||||
result.add(Region.getInstance(key, civilCodeMap.get(key).getName(), civilCodeMap.get(key).getParentCode()));
|
||||
}
|
||||
}else if (civilCodeMap.get(key).getParentCode().equals(parent)) {
|
||||
result.add(Region.getInstance(key, civilCodeMap.get(key).getName(), civilCodeMap.get(key).getParentCode()));
|
||||
}
|
||||
}
|
||||
return result;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -0,0 +1,58 @@
|
|||
package com.genersoft.iot.vmp.gb28181.bean;
|
||||
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
|
||||
public class DeviceType implements Comparable<DeviceType>{
|
||||
|
||||
/**
|
||||
* 编号
|
||||
*/
|
||||
private String name;
|
||||
|
||||
/**
|
||||
* 名称
|
||||
*/
|
||||
private String code;
|
||||
|
||||
/**
|
||||
* 归属名称
|
||||
*/
|
||||
private String ownerName;
|
||||
public static DeviceType getInstance(DeviceTypeEnum typeEnum) {
|
||||
DeviceType deviceType = new DeviceType();
|
||||
deviceType.setName(typeEnum.getName());
|
||||
deviceType.setCode(typeEnum.getCode());
|
||||
deviceType.setOwnerName(typeEnum.getOwnerName());
|
||||
return deviceType;
|
||||
}
|
||||
|
||||
|
||||
public String getName() {
|
||||
return name;
|
||||
}
|
||||
|
||||
public void setName(String name) {
|
||||
this.name = name;
|
||||
}
|
||||
|
||||
public String getCode() {
|
||||
return code;
|
||||
}
|
||||
|
||||
public void setCode(String code) {
|
||||
this.code = code;
|
||||
}
|
||||
|
||||
public String getOwnerName() {
|
||||
return ownerName;
|
||||
}
|
||||
|
||||
public void setOwnerName(String ownerName) {
|
||||
this.ownerName = ownerName;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int compareTo(@NotNull DeviceType deviceType) {
|
||||
return Integer.compare(Integer.parseInt(this.code), Integer.parseInt(deviceType.getCode()));
|
||||
}
|
||||
}
|
|
@ -0,0 +1,98 @@
|
|||
package com.genersoft.iot.vmp.gb28181.bean;
|
||||
|
||||
/**
|
||||
* 收录行业编码
|
||||
*/
|
||||
public enum DeviceTypeEnum {
|
||||
DVR("111", "DVR编码", "前端主设备"),
|
||||
VIDEO_SERVER("112", "视频服务器编码", "前端主设备"),
|
||||
ENCODER("113", "编码器编码", "前端主设备"),
|
||||
DECODER("114", "解码器编码", "前端主设备"),
|
||||
VIDEO_SWITCHING_MATRIX("115", "视频切换矩阵编码", "前端主设备"),
|
||||
AUDIO_SWITCHING_MATRIX("116", "音频切换矩阵编码", "前端主设备"),
|
||||
ALARM_CONTROLLER("117", "报警控制器编码", "前端主设备"),
|
||||
NVR("118", "网络视频录像机(NVR)编码", "前端主设备"),
|
||||
RESERVE("119", "预留", "前端主设备"),
|
||||
ONLINE_VIDEO_IMAGE_INFORMATION_ACQUISITION_SYSTEM("120", "在线视频图像信息采集系统编码", "前端主设备"),
|
||||
VIDEO_CHECKPOINT("121", "视频卡口编码", "前端主设备"),
|
||||
MULTI_CAMERA_DEVICE("122", "多目设备编码", "前端主设备"),
|
||||
PARKING_LOT_ENTRANCE_AND_EXIT_CONTROL_EQUIPMENT("123", "停车场出入口控制设备编码", "前端主设备"),
|
||||
PERSONNEL_ACCESS_CONTROL_EQUIPMENT("124", "人员出入口控制设备编码", "前端主设备"),
|
||||
SECURITY_INSPECTION_EQUIPMENT("125", "安检设备编码", "前端主设备"),
|
||||
HVR("130", "混合硬盘录像机(HVR)编码", "前端主设备"),
|
||||
CAMERA("131", "摄像机编码", "前端外围设备"),
|
||||
IPC("132", "网络摄像机(IPC)/在线视频图像信息采集设备编码", "前端外围设备"),
|
||||
MONITOR("133", "显示器编码", "前端外围设备"),
|
||||
ALARM_INPUT_DEVICE("134", "报警输入设备编码(如红外、烟感、门禁等报警设备)", "前端外围设备"),
|
||||
ALARM_OUTPUT_DEVICE("135", "报警输出设备编码(如警灯、警铃等设备)", "前端外围设备"),
|
||||
VOICE_INPUT_DEVICE("136", "语音输入设备编码", "前端外围设备"),
|
||||
VOICE_OUTPUT_DEVICE("137", "语音输出设备", "前端外围设备"),
|
||||
MOBILE_TRANSMISSION_EQUIPMENT("138", "移动传输设备编码", "前端外围设备"),
|
||||
OTHER_PERIPHERAL_DEVICES("139", "其他外围设备编码", "前端外围设备"),
|
||||
ALARM_OUTPUT_DEVICE2("140", "报警输出设备编码(如继电器或触发器控制的设备)", "前端外围设备"),
|
||||
BARRIER_GATE("141", "道闸(控制车辆通行)", "前端外围设备"),
|
||||
SMART_DOOR("142", "智能门(控制人员通行)", "前端外围设备"),
|
||||
VOUCHER_RECOGNITION_UNIT("143", "凭证识别单元", "前端外围设备"),
|
||||
CENTRAL_SIGNALING_CONTROL_SERVER("200", "中心信令控制服务器编码", "平台设备"),
|
||||
WEB_APPLICATION_SERVER("201", "Web应用服务器编码", "平台设备"),
|
||||
PROXY_SERVER("203", "代理服务器编码", "平台设备"),
|
||||
SECURITY_SERVER("204", "安全服务器编码", "平台设备"),
|
||||
ALARM_SERVER("205", "报警服务器编码", "平台设备"),
|
||||
DATABASE_SERVER("206", "数据库服务器编码", "平台设备"),
|
||||
GIS_SERVER("207", "GIS服务器编码", "平台设备"),
|
||||
MANAGER_SERVER("208", "管理服务器编码", "平台设备"),
|
||||
ACCESS_GATEWAY("209", "接入网关编码", "平台设备"),
|
||||
MEDIA_STORAGE_SERVER("210", "媒体存储服务器编码", "平台设备"),
|
||||
SIGNALING_SECURITY_ROUTING_GATEWAY("211", "信令安全路由网关编码", "平台设备"),
|
||||
BUSINESS_GROUP("215", "业务分组编码", "平台设备"),
|
||||
VIRTUAL_ORGANIZATION("216", "虚拟组织编码", "平台设备"),
|
||||
CENTRAL_USER("300", "中心用户", "中心用户"),
|
||||
END_USER("400", "终端用户", "终端用户"),
|
||||
VIDEO_IMAGE_INFORMATION_SYNTHESIS("500", "视频图像信息综合应用平台", "平台外接服务器"),
|
||||
VIDEO_IMAGE_INFORMATION_OPERATION_AND_MAINTENANCE_MANAGEMENT("501", "视频图像信息运维管理平台", "平台外接服务器"),
|
||||
VIDEO_IMAGE_ANALYSIS("502", "视频图像分析系统", "平台外接服务器"),
|
||||
VIDEO_IMAGE_INFORMATION_DATABASE("503", "视频图像信息数据库", "平台外接服务器"),
|
||||
VIDEO_IMAGE_ANALYSIS_EQUIPMENT("505", "视频图像分析设备", "平台外接服务器"),
|
||||
;
|
||||
|
||||
/**
|
||||
* 编号
|
||||
*/
|
||||
private final String name;
|
||||
|
||||
/**
|
||||
* 名称
|
||||
*/
|
||||
private String code;
|
||||
|
||||
/**
|
||||
* 归属名称
|
||||
*/
|
||||
private String ownerName;
|
||||
|
||||
DeviceTypeEnum(String code, String name, String ownerName) {
|
||||
this.name = name;
|
||||
this.code = code;
|
||||
this.ownerName = ownerName;
|
||||
}
|
||||
|
||||
public String getName() {
|
||||
return name;
|
||||
}
|
||||
|
||||
public String getCode() {
|
||||
return code;
|
||||
}
|
||||
|
||||
public void setCode(String code) {
|
||||
this.code = code;
|
||||
}
|
||||
|
||||
public String getOwnerName() {
|
||||
return ownerName;
|
||||
}
|
||||
|
||||
public void setOwnerName(String ownerName) {
|
||||
this.ownerName = ownerName;
|
||||
}
|
||||
}
|
|
@ -0,0 +1,59 @@
|
|||
package com.genersoft.iot.vmp.gb28181.bean;
|
||||
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
|
||||
public class IndustryCodeType implements Comparable<IndustryCodeType>{
|
||||
|
||||
/**
|
||||
* 接入类型码
|
||||
*/
|
||||
private String name;
|
||||
|
||||
/**
|
||||
* 名称
|
||||
*/
|
||||
private String code;
|
||||
|
||||
/**
|
||||
* 备注
|
||||
*/
|
||||
private String notes;
|
||||
|
||||
public static IndustryCodeType getInstance(IndustryCodeTypeEnum typeEnum) {
|
||||
IndustryCodeType industryCodeType = new IndustryCodeType();
|
||||
industryCodeType.setName(typeEnum.getName());
|
||||
industryCodeType.setCode(typeEnum.getCode());
|
||||
industryCodeType.setNotes(typeEnum.getNotes());
|
||||
return industryCodeType;
|
||||
}
|
||||
|
||||
|
||||
public String getName() {
|
||||
return name;
|
||||
}
|
||||
|
||||
public void setName(String name) {
|
||||
this.name = name;
|
||||
}
|
||||
|
||||
public String getCode() {
|
||||
return code;
|
||||
}
|
||||
|
||||
public void setCode(String code) {
|
||||
this.code = code;
|
||||
}
|
||||
|
||||
public String getNotes() {
|
||||
return notes;
|
||||
}
|
||||
|
||||
public void setNotes(String notes) {
|
||||
this.notes = notes;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int compareTo(@NotNull IndustryCodeType industryCodeType) {
|
||||
return Integer.compare(Integer.parseInt(this.code), Integer.parseInt(industryCodeType.getCode()));
|
||||
}
|
||||
}
|
|
@ -0,0 +1,55 @@
|
|||
package com.genersoft.iot.vmp.gb28181.bean;
|
||||
|
||||
import lombok.Getter;
|
||||
|
||||
/**
|
||||
* 收录行业编码
|
||||
*/
|
||||
public enum IndustryCodeTypeEnum {
|
||||
SOCIAL_SECURITY_ROAD("00", "社会治安路面接入", "包括城市路面、商业街、公共区域、重点区域"),
|
||||
SOCIAL_SECURITY_COMMUNITY("01", "社会治安社区接入", "包括社区、楼宇、网吧等"),
|
||||
SOCIAL_SECURITY__INTERNAL("02", "社会治安内部接入 ", "包括公安办公楼、留置室等"),
|
||||
SOCIAL_SECURITY_OTHER("03", "社会治安其他接入", ""),
|
||||
TRAFFIC_ROAD("04", "交通路面接入 ", "包括城市主要干道、国道、高速交通状况监视"),
|
||||
TRAFFIC_BAYONET("05", "交通卡口接入", "包括交叉路口、“电子警察”、关口、收费站等"),
|
||||
TRAFFIC_INTERNAL("06", "交通内部接入", "包括交管办公楼等"),
|
||||
TRAFFIC_OTHER("07", "交通其他接入", ""),
|
||||
CITY_MANAGEMENT("08", "城市管理接入", ""),
|
||||
HEALTH_ENVIRONMENTAL_PROTECTION("09", "卫生环保接入", ""),
|
||||
COMMODITY_INSPECTION_CUSTOMHOUSE("10", "商检海关接入", ""),
|
||||
EDUCATION_SECTOR("11", "教育部门接入", ""),
|
||||
CIVIL_AVIATION("12", "民航接入", ""),
|
||||
RAILWAY("13", "铁路接入", ""),
|
||||
SHIPPING("14", "航运接入", ""),
|
||||
AGRICULTURE_FORESTRY_ANIMAL_HUSBANDRY_FISHING("40", "农、林、牧、渔业接入", ""),
|
||||
MINING("41", "采矿业接入", ""),
|
||||
MANUFACTURING_INDUSTRY("42", "制造业接入", ""),
|
||||
ELECTRICITY_HEAT_GAS_AND_WATER_PRODUCTION_AND_SUPPLY("43", "电力、热力、燃气及水生产和供应业接入", ""),
|
||||
CONSTRUCTION("44", "建筑业接入", ""),
|
||||
WHOLESALE_AND_RETAIL("45", "批发和零售业接入", ""),
|
||||
;
|
||||
|
||||
/**
|
||||
* 接入类型码
|
||||
*/
|
||||
@Getter
|
||||
private String name;
|
||||
|
||||
/**
|
||||
* 名称
|
||||
*/
|
||||
@Getter
|
||||
private String code;
|
||||
|
||||
/**
|
||||
* 备注
|
||||
*/
|
||||
@Getter
|
||||
private String notes;
|
||||
|
||||
IndustryCodeTypeEnum(String code, String name, String notes) {
|
||||
this.name = name;
|
||||
this.code = code;
|
||||
this.notes = notes;
|
||||
}
|
||||
}
|
|
@ -0,0 +1,45 @@
|
|||
package com.genersoft.iot.vmp.gb28181.bean;
|
||||
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
|
||||
public class NetworkIdentificationType implements Comparable<NetworkIdentificationType>{
|
||||
|
||||
/**
|
||||
* 接入类型码
|
||||
*/
|
||||
private String name;
|
||||
|
||||
/**
|
||||
* 名称
|
||||
*/
|
||||
private String code;
|
||||
|
||||
public static NetworkIdentificationType getInstance(NetworkIdentificationTypeEnum typeEnum) {
|
||||
NetworkIdentificationType industryCodeType = new NetworkIdentificationType();
|
||||
industryCodeType.setName(typeEnum.getName());
|
||||
industryCodeType.setCode(typeEnum.getCode());
|
||||
return industryCodeType;
|
||||
}
|
||||
|
||||
|
||||
public String getName() {
|
||||
return name;
|
||||
}
|
||||
|
||||
public void setName(String name) {
|
||||
this.name = name;
|
||||
}
|
||||
|
||||
public String getCode() {
|
||||
return code;
|
||||
}
|
||||
|
||||
public void setCode(String code) {
|
||||
this.code = code;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int compareTo(@NotNull NetworkIdentificationType networkIdentificationType) {
|
||||
return Integer.compare(Integer.parseInt(this.code), Integer.parseInt(networkIdentificationType.getCode()));
|
||||
}
|
||||
}
|
|
@ -0,0 +1,51 @@
|
|||
package com.genersoft.iot.vmp.gb28181.bean;
|
||||
|
||||
/**
|
||||
* 收录行业编码
|
||||
*/
|
||||
public enum NetworkIdentificationTypeEnum {
|
||||
PUBLIC_SECURITY_VIDEO_TRANSMISSION_NETWORK("0", "公安视频传输网"),
|
||||
PUBLIC_SECURITY_VIDEO_TRANSMISSION_NETWORK2("1", "公安视频传输网"),
|
||||
INDUSTRY_SPECIFIC_NETWORK("2", "行业专网"),
|
||||
POLITICAL_AND_LEGAL_INFORMATION_NETWORK("3", "政法信息网"),
|
||||
PUBLIC_SECURITY_MOBILE_INFORMATION_NETWORK("4", "公安移动信息网"),
|
||||
PUBLIC_SECURITY_INFORMATION_NETWORK("5", "公安信息网"),
|
||||
ELECTRONIC_GOVERNMENT_EXTRANET("6", "电子政务外网"),
|
||||
PUBLIC_NETWORKS_SUCH_AS_THE_INTERNET("7", "互联网等公共网络"),
|
||||
Dedicated_Line("8", "专线"),
|
||||
RESERVE("9", "预留"),
|
||||
;
|
||||
|
||||
/**
|
||||
* 接入类型码
|
||||
*/
|
||||
private String name;
|
||||
|
||||
/**
|
||||
* 名称
|
||||
*/
|
||||
private String code;
|
||||
|
||||
|
||||
NetworkIdentificationTypeEnum(String code, String name) {
|
||||
this.name = name;
|
||||
this.code = code;
|
||||
}
|
||||
|
||||
public String getName() {
|
||||
return name;
|
||||
}
|
||||
|
||||
public void setName(String name) {
|
||||
this.name = name;
|
||||
}
|
||||
|
||||
public String getCode() {
|
||||
return code;
|
||||
}
|
||||
|
||||
public void setCode(String code) {
|
||||
this.code = code;
|
||||
}
|
||||
|
||||
}
|
|
@ -0,0 +1,64 @@
|
|||
package com.genersoft.iot.vmp.gb28181.bean;
|
||||
|
||||
import com.genersoft.iot.vmp.utils.DateUtil;
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.Data;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
|
||||
/**
|
||||
* 区域
|
||||
*/
|
||||
@Data
|
||||
@Schema(description = "区域")
|
||||
public class Region implements Comparable<Region>{
|
||||
/**
|
||||
* 数据库自增ID
|
||||
*/
|
||||
@Schema(description = "数据库自增ID")
|
||||
private int commonRegionId;
|
||||
|
||||
/**
|
||||
* 区域国标编号
|
||||
*/
|
||||
@Schema(description = "区域国标编号")
|
||||
private String commonRegionDeviceId;
|
||||
|
||||
/**
|
||||
* 区域名称
|
||||
*/
|
||||
@Schema(description = "区域名称")
|
||||
private String commonRegionName;
|
||||
|
||||
/**
|
||||
* 父区域国标ID
|
||||
*/
|
||||
@Schema(description = "父区域国标ID")
|
||||
private String commonRegionParentId;
|
||||
|
||||
/**
|
||||
* 创建时间
|
||||
*/
|
||||
@Schema(description = "创建时间")
|
||||
private String commonRegionCreateTime;
|
||||
|
||||
/**
|
||||
* 更新时间
|
||||
*/
|
||||
@Schema(description = "更新时间")
|
||||
private String commonRegionUpdateTime;
|
||||
|
||||
public static Region getInstance(String commonRegionDeviceId, String commonRegionName, String commonRegionParentId) {
|
||||
Region region = new Region();
|
||||
region.setCommonRegionDeviceId(commonRegionDeviceId);
|
||||
region.setCommonRegionName(commonRegionName);
|
||||
region.setCommonRegionParentId(commonRegionParentId);
|
||||
region.setCommonRegionCreateTime(DateUtil.getNow());
|
||||
region.setCommonRegionUpdateTime(DateUtil.getNow());
|
||||
return region;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int compareTo(@NotNull Region region) {
|
||||
return Integer.compare(Integer.parseInt(this.commonRegionDeviceId), Integer.parseInt(region.getCommonRegionDeviceId()));
|
||||
}
|
||||
}
|
|
@ -2,6 +2,9 @@ package com.genersoft.iot.vmp.gb28181.controller;
|
|||
|
||||
import com.genersoft.iot.vmp.conf.security.JwtUtils;
|
||||
import com.genersoft.iot.vmp.gb28181.bean.CommonGBChannel;
|
||||
import com.genersoft.iot.vmp.gb28181.bean.DeviceType;
|
||||
import com.genersoft.iot.vmp.gb28181.bean.IndustryCodeType;
|
||||
import com.genersoft.iot.vmp.gb28181.bean.NetworkIdentificationType;
|
||||
import com.genersoft.iot.vmp.gb28181.service.IGbChannelService;
|
||||
import com.genersoft.iot.vmp.media.service.IMediaServerService;
|
||||
import com.genersoft.iot.vmp.storager.IRedisCatchStorage;
|
||||
|
@ -16,6 +19,8 @@ import org.springframework.web.bind.annotation.GetMapping;
|
|||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.ResponseBody;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
|
||||
@Tag(name = "全局通道管理")
|
||||
@Controller
|
||||
|
@ -40,4 +45,25 @@ public class CommonChannelController {
|
|||
public CommonGBChannel getOne(int id){
|
||||
return channelService.getOne(id);
|
||||
}
|
||||
|
||||
@Operation(summary = "获取行业编码列表", security = @SecurityRequirement(name = JwtUtils.HEADER))
|
||||
@ResponseBody
|
||||
@GetMapping("/industry/list")
|
||||
public List<IndustryCodeType> getIndustryCodeList(){
|
||||
return channelService.getIndustryCodeList();
|
||||
}
|
||||
|
||||
@Operation(summary = "获取编码列表", security = @SecurityRequirement(name = JwtUtils.HEADER))
|
||||
@ResponseBody
|
||||
@GetMapping("/type/list")
|
||||
public List<DeviceType> getDeviceTypeList(){
|
||||
return channelService.getDeviceTypeList();
|
||||
}
|
||||
|
||||
@Operation(summary = "获取编码列表", security = @SecurityRequirement(name = JwtUtils.HEADER))
|
||||
@ResponseBody
|
||||
@GetMapping("/network/identification/list")
|
||||
public List<NetworkIdentificationType> getNetworkIdentificationTypeList(){
|
||||
return channelService.getNetworkIdentificationTypeList();
|
||||
}
|
||||
}
|
||||
|
|
|
@ -0,0 +1,111 @@
|
|||
package com.genersoft.iot.vmp.gb28181.controller;
|
||||
|
||||
import com.genersoft.iot.vmp.conf.exception.ControllerException;
|
||||
import com.genersoft.iot.vmp.gb28181.bean.Region;
|
||||
import com.genersoft.iot.vmp.gb28181.service.IRegionService;
|
||||
import com.genersoft.iot.vmp.vmanager.bean.ErrorCode;
|
||||
import com.github.pagehelper.PageInfo;
|
||||
import io.swagger.v3.oas.annotations.Operation;
|
||||
import io.swagger.v3.oas.annotations.Parameter;
|
||||
import io.swagger.v3.oas.annotations.tags.Tag;
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.util.ObjectUtils;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
@Tag(name = "区域管理")
|
||||
@RestController
|
||||
@RequestMapping("/api/region")
|
||||
public class RegionController {
|
||||
|
||||
private final static Logger logger = LoggerFactory.getLogger(RegionController.class);
|
||||
|
||||
@Autowired
|
||||
private IRegionService regionService;
|
||||
|
||||
@Operation(summary = "添加区域")
|
||||
@Parameter(name = "region", description = "Region", required = true)
|
||||
@ResponseBody
|
||||
@PostMapping("/add")
|
||||
public void add(@RequestBody Region region){
|
||||
regionService.add(region);
|
||||
}
|
||||
|
||||
@Operation(summary = "查询区域")
|
||||
@Parameter(name = "query", description = "要搜索的内容", required = true)
|
||||
@Parameter(name = "page", description = "当前页", required = true)
|
||||
@Parameter(name = "count", description = "每页查询数量", required = true)
|
||||
@ResponseBody
|
||||
@GetMapping("/list")
|
||||
public PageInfo<Region> query(
|
||||
@RequestParam(required = false) String query,
|
||||
@RequestParam(required = true) int page,
|
||||
@RequestParam(required = true) int count
|
||||
){
|
||||
return regionService.query(query, page, count);
|
||||
}
|
||||
|
||||
@Operation(summary = "更新区域")
|
||||
@Parameter(name = "region", description = "Region", required = true)
|
||||
@ResponseBody
|
||||
@PostMapping("/update")
|
||||
public void update(@RequestBody Region region){
|
||||
regionService.update(region);
|
||||
}
|
||||
|
||||
@Operation(summary = "删除区域")
|
||||
@Parameter(name = "regionDeviceId", description = "区域编码", required = true)
|
||||
@ResponseBody
|
||||
@GetMapping("/delete")
|
||||
public void delete(String regionDeviceId){
|
||||
assert regionDeviceId != null;
|
||||
boolean result = regionService.deleteByDeviceId(regionDeviceId);
|
||||
if (!result) {
|
||||
throw new ControllerException(ErrorCode.ERROR100.getCode(), "移除失败");
|
||||
}
|
||||
}
|
||||
|
||||
@Operation(summary = "分页区域子节点")
|
||||
@Parameter(name = "regionParentId", description = "行政区划父节点编号", required = true)
|
||||
@Parameter(name = "page", description = "当前页", required = true)
|
||||
@Parameter(name = "count", description = "每页查询数量", required = true)
|
||||
@ResponseBody
|
||||
@GetMapping("/child/list")
|
||||
public PageInfo<Region> queryChildRegionList(
|
||||
@RequestParam(required = true) String regionParentId,
|
||||
@RequestParam(required = true) int page,
|
||||
@RequestParam(required = true) int count
|
||||
){
|
||||
if (ObjectUtils.isEmpty(regionParentId.trim())) {
|
||||
regionParentId = null;
|
||||
}
|
||||
return regionService.queryChildRegionList(regionParentId, page, count);
|
||||
}
|
||||
|
||||
@Operation(summary = "根据区域Id查询区域")
|
||||
@Parameter(name = "regionDeviceId", description = "行政区划节点编号", required = true)
|
||||
@ResponseBody
|
||||
@GetMapping("/one")
|
||||
public Region queryRegionByDeviceId(
|
||||
@RequestParam(required = true) String regionDeviceId
|
||||
){
|
||||
if (ObjectUtils.isEmpty(regionDeviceId.trim())) {
|
||||
throw new ControllerException(ErrorCode.ERROR400);
|
||||
}
|
||||
return regionService.queryRegionByDeviceId(regionDeviceId);
|
||||
}
|
||||
|
||||
@Operation(summary = "获取所属的行政区划下的行政区划")
|
||||
@Parameter(name = "parent", description = "所属的行政区划", required = false)
|
||||
@ResponseBody
|
||||
@GetMapping("/base/child/list")
|
||||
public List<Region> getAllChild(@RequestParam(required = false) String parent){
|
||||
if (ObjectUtils.isEmpty(parent.trim())) {
|
||||
parent = null;
|
||||
}
|
||||
return regionService.getAllChild(parent);
|
||||
}
|
||||
}
|
|
@ -0,0 +1,17 @@
|
|||
package com.genersoft.iot.vmp.gb28181.dao;
|
||||
|
||||
import com.genersoft.iot.vmp.gb28181.bean.Region;
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
@Mapper
|
||||
public interface RegionMapper {
|
||||
void add(Region region);
|
||||
|
||||
List<Region> query(String query);
|
||||
|
||||
List<Region> getChildren(String regionParentId);
|
||||
|
||||
Region queryRegion(int id);
|
||||
}
|
|
@ -1,6 +1,9 @@
|
|||
package com.genersoft.iot.vmp.gb28181.service;
|
||||
|
||||
import com.genersoft.iot.vmp.gb28181.bean.CommonGBChannel;
|
||||
import com.genersoft.iot.vmp.gb28181.bean.DeviceType;
|
||||
import com.genersoft.iot.vmp.gb28181.bean.IndustryCodeType;
|
||||
import com.genersoft.iot.vmp.gb28181.bean.NetworkIdentificationType;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
|
@ -29,4 +32,10 @@ public interface IGbChannelService {
|
|||
List<CommonGBChannel> queryByPlatformId(Integer platformId);
|
||||
|
||||
CommonGBChannel getOne(int id);
|
||||
|
||||
List<IndustryCodeType> getIndustryCodeList();
|
||||
|
||||
List<DeviceType> getDeviceTypeList();
|
||||
|
||||
List<NetworkIdentificationType> getNetworkIdentificationTypeList();
|
||||
}
|
||||
|
|
|
@ -0,0 +1,33 @@
|
|||
package com.genersoft.iot.vmp.gb28181.service;
|
||||
|
||||
import com.genersoft.iot.vmp.gb28181.bean.Region;
|
||||
import com.github.pagehelper.PageInfo;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
|
||||
public interface IRegionService {
|
||||
|
||||
void add(Region region);
|
||||
|
||||
boolean deleteByDeviceId(String regionDeviceId);
|
||||
|
||||
/**
|
||||
* 查询区划列表
|
||||
*/
|
||||
PageInfo<Region> query(String query, int page, int count);
|
||||
|
||||
/**
|
||||
* 查询子区划列表
|
||||
*/
|
||||
PageInfo<Region> queryChildRegionList(String regionParentId, int page, int count);
|
||||
|
||||
/**
|
||||
* 更新区域
|
||||
*/
|
||||
void update(Region region);
|
||||
|
||||
List<Region> getAllChild(String parent);
|
||||
|
||||
Region queryRegionByDeviceId(String regionDeviceId);
|
||||
}
|
|
@ -1,6 +1,6 @@
|
|||
package com.genersoft.iot.vmp.gb28181.service.impl;
|
||||
|
||||
import com.genersoft.iot.vmp.gb28181.bean.CommonGBChannel;
|
||||
import com.genersoft.iot.vmp.gb28181.bean.*;
|
||||
import com.genersoft.iot.vmp.gb28181.dao.CommonGBChannelMapper;
|
||||
import com.genersoft.iot.vmp.gb28181.event.EventPublisher;
|
||||
import com.genersoft.iot.vmp.gb28181.event.subscribe.catalog.CatalogEvent;
|
||||
|
@ -10,6 +10,8 @@ import org.springframework.beans.factory.annotation.Autowired;
|
|||
import org.springframework.stereotype.Service;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.Collections;
|
||||
import java.util.List;
|
||||
|
||||
@Slf4j
|
||||
|
@ -232,4 +234,37 @@ public class GbChannelServiceImpl implements IGbChannelService {
|
|||
public CommonGBChannel getOne(int id) {
|
||||
return commonGBChannelMapper.queryById(id);
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<IndustryCodeType> getIndustryCodeList() {
|
||||
IndustryCodeTypeEnum[] values = IndustryCodeTypeEnum.values();
|
||||
List<IndustryCodeType> result = new ArrayList<>(values.length);
|
||||
for (IndustryCodeTypeEnum value : values) {
|
||||
result.add(IndustryCodeType.getInstance(value));
|
||||
}
|
||||
Collections.sort(result);
|
||||
return result;
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<DeviceType> getDeviceTypeList() {
|
||||
DeviceTypeEnum[] values = DeviceTypeEnum.values();
|
||||
List<DeviceType> result = new ArrayList<>(values.length);
|
||||
for (DeviceTypeEnum value : values) {
|
||||
result.add(DeviceType.getInstance(value));
|
||||
}
|
||||
Collections.sort(result);
|
||||
return result;
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<NetworkIdentificationType> getNetworkIdentificationTypeList() {
|
||||
NetworkIdentificationTypeEnum[] values = NetworkIdentificationTypeEnum.values();
|
||||
List<NetworkIdentificationType> result = new ArrayList<>(values.length);
|
||||
for (NetworkIdentificationTypeEnum value : values) {
|
||||
result.add(NetworkIdentificationType.getInstance(value));
|
||||
}
|
||||
Collections.sort(result);
|
||||
return result;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -0,0 +1,87 @@
|
|||
package com.genersoft.iot.vmp.gb28181.service.impl;
|
||||
|
||||
import com.genersoft.iot.vmp.conf.CivilCodeFileConf;
|
||||
import com.genersoft.iot.vmp.gb28181.bean.Region;
|
||||
import com.genersoft.iot.vmp.gb28181.dao.RegionMapper;
|
||||
import com.genersoft.iot.vmp.gb28181.service.IRegionService;
|
||||
import com.genersoft.iot.vmp.utils.DateUtil;
|
||||
import com.github.pagehelper.PageHelper;
|
||||
import com.github.pagehelper.PageInfo;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
import org.springframework.util.ObjectUtils;
|
||||
|
||||
import java.util.Collections;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 区域管理类
|
||||
*/
|
||||
@Service
|
||||
public class RegionServiceImpl implements IRegionService {
|
||||
|
||||
|
||||
@Autowired
|
||||
private RegionMapper regionMapper;
|
||||
|
||||
|
||||
@Autowired
|
||||
private GbChannelServiceImpl gbChannelService;
|
||||
|
||||
|
||||
@Autowired
|
||||
private CivilCodeFileConf civilCodeFileConf;
|
||||
|
||||
@Override
|
||||
public void add(Region region) {
|
||||
assert region.getCommonRegionName() != null;
|
||||
assert region.getCommonRegionDeviceId() != null;
|
||||
if (ObjectUtils.isEmpty(region.getCommonRegionParentId().trim())) {
|
||||
region.setCommonRegionParentId(null);
|
||||
}
|
||||
region.setCommonRegionCreateTime(DateUtil.getNow());
|
||||
region.setCommonRegionUpdateTime(DateUtil.getNow());
|
||||
regionMapper.add(region);
|
||||
}
|
||||
|
||||
@Override
|
||||
@Transactional
|
||||
public boolean deleteByDeviceId(String regionDeviceId) {
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public PageInfo<Region> query(String query, int page, int count) {
|
||||
PageHelper.startPage(page, count);
|
||||
List<Region> regionList = regionMapper.query(query);
|
||||
return new PageInfo<>(regionList);
|
||||
}
|
||||
|
||||
@Override
|
||||
public PageInfo<Region> queryChildRegionList(String regionParentId, int page, int count) {
|
||||
assert regionParentId != null;
|
||||
PageHelper.startPage(page, count);
|
||||
List<Region> all = regionMapper.getChildren(regionParentId);
|
||||
return new PageInfo<>(all);
|
||||
}
|
||||
|
||||
@Override
|
||||
@Transactional
|
||||
public void update(Region region) {
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<Region> getAllChild(String parent) {
|
||||
List<Region> allChild = civilCodeFileConf.getAllChild(parent);
|
||||
Collections.sort(allChild);
|
||||
return allChild;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Region queryRegionByDeviceId(String regionDeviceId) {
|
||||
return null;
|
||||
}
|
||||
}
|
|
@ -1,191 +1,230 @@
|
|||
<template>
|
||||
<div id="ChannelEdit" v-loading="locading" style="width: 100%">
|
||||
<el-form ref="passwordForm" status-icon label-width="160px" style="padding-top: 1rem">
|
||||
<el-form-item label="名称" >
|
||||
<el-input v-model="form.gbName" placeholder="请输入通道名称"></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="编码" >
|
||||
<el-input v-model="form.gbDeviceId" placeholder="请输入通道编码"></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="设备厂商" >
|
||||
<el-input v-model="form.gbManufacturer" placeholder="请输入设备厂商"></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="设备型号" >
|
||||
<el-input v-model="form.gbModel" placeholder="请输入设备型号"></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="设备归属" >
|
||||
<el-input v-model="form.gbOwner" placeholder="请输入设备归属"></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="行政区域" >
|
||||
<el-input v-model="form.gbCivilCode" placeholder="请输入行政区域"></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="警区" >
|
||||
<el-input v-model="form.gbBlock" placeholder="请输入警区"></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="安装地址" >
|
||||
<el-input v-model="form.gbAddress" placeholder="请输入安装地址"></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="子设备" >
|
||||
<el-select v-model="form.gbParental" style="width: 100%" placeholder="请选择是否有子设备">
|
||||
<el-option label="有" :value="1"></el-option>
|
||||
<el-option label="无" :value="0"></el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="父节点编码" >
|
||||
<el-input v-model="form.gbParentId" placeholder="请输入父节点编码"></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="信令安全模式" >
|
||||
<el-select v-model="form.gbSafetyWay" style="width: 100%" placeholder="请选择信令安全模式">
|
||||
<el-option label="不采用" :value="0"></el-option>
|
||||
<el-option label="S/MIME签名" :value="2"></el-option>
|
||||
<el-option label="S/MIME加密签名同时采用" :value="3"></el-option>
|
||||
<el-option label="数字摘要" :value="4"></el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="注册方式" >
|
||||
<el-select v-model="form.gbRegisterWay" style="width: 100%" placeholder="请选择注册方式">
|
||||
<el-option label="IETFRFC3261标准" :value="1"></el-option>
|
||||
<el-option label="基于口令的双向认证" :value="2"></el-option>
|
||||
<el-option label="基于数字证书的双向认证注册" :value="3"></el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="证书序列号" >
|
||||
<el-input type="number" v-model="form.gbCertNum" placeholder="请输入证书序列号"></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="证书有效标识" >
|
||||
<el-select v-model="form.gbCertifiable" style="width: 100%" placeholder="请选择证书有效标识">
|
||||
<el-option label="有效" :value="1"></el-option>
|
||||
<el-option label="无效" :value="0"></el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="无效原因码" >
|
||||
<el-input type="errCode" v-model="form.gbCertNum" placeholder="请输入无效原因码"></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="证书终止有效期" >
|
||||
<el-date-picker
|
||||
v-model="form.gbEndTime"
|
||||
type="datetime"
|
||||
placeholder="选择日期时间">
|
||||
</el-date-picker>
|
||||
</el-form-item>
|
||||
<el-form-item label="保密属性" >
|
||||
<el-select v-model="form.gbSecrecy" style="width: 100%" placeholder="请选择保密属性">
|
||||
<el-option label="不涉密" :value="0"></el-option>
|
||||
<el-option label="涉密" :value="1"></el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="IP地址" >
|
||||
<el-input v-model="form.gbIpAddress" placeholder="请输入IP地址"></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="端口" >
|
||||
<el-input type="number" v-model="form.gbPort" placeholder="请输入端口"></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="设备口令" >
|
||||
<el-input v-model="form.gbPassword" placeholder="请输入设备口令"></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="设备状态" >
|
||||
<el-select v-model="form.gbStatus" style="width: 100%" placeholder="请选择设备状态">
|
||||
<el-option label="在线" value="ON"></el-option>
|
||||
<el-option label="离线" value="OFF"></el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="经度" >
|
||||
<el-input v-model="form.gbLongitude" placeholder="请输入经度"></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="纬度" >
|
||||
<el-input v-model="form.gbLatitude" placeholder="请输入纬度"></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="业务分组编号" >
|
||||
<el-input v-model="form.gbBusinessGroupId" placeholder="请输入业务分组编号"></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="云台类型" >
|
||||
<el-select v-model="form.gbStatus" style="width: 100%" placeholder="请选择云台类型">
|
||||
<el-option label="球机" :value="1"></el-option>
|
||||
<el-option label="半球" :value="2"></el-option>
|
||||
<el-option label="固定枪机" :value="3"></el-option>
|
||||
<el-option label="遥控枪机" :value="4"></el-option>
|
||||
<el-option label="遥控半球" :value="5"></el-option>
|
||||
<el-option label="多目设备的全景/拼接通道" :value="6"></el-option>
|
||||
<el-option label="多目设备的分割通道" :value="7"></el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="位置类型" >
|
||||
<el-select v-model="form.gbPositionType" style="width: 100%" placeholder="请选择位置类型">
|
||||
<el-option label="省际检查站" :value="1"></el-option>
|
||||
<el-option label="党政机关" :value="2"></el-option>
|
||||
<el-option label="车站码头" :value="3"></el-option>
|
||||
<el-option label="中心广场" :value="4"></el-option>
|
||||
<el-option label="体育场馆" :value="5"></el-option>
|
||||
<el-option label="商业中心" :value="6"></el-option>
|
||||
<el-option label="宗教场所" :value="7"></el-option>
|
||||
<el-option label="校园周边" :value="8"></el-option>
|
||||
<el-option label="治安复杂区域" :value="9"></el-option>
|
||||
<el-option label="交通干线" :value="10"></el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="室外/室内" >
|
||||
<el-select v-model="form.gbRoomType" style="width: 100%" placeholder="请选择位置类型">
|
||||
<el-option label="室外" :value="1"></el-option>
|
||||
<el-option label="室内" :value="2"></el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="用途" >
|
||||
<el-select v-model="form.gbUseType" style="width: 100%" placeholder="请选择位置类型">
|
||||
<el-option label="治安" :value="1"></el-option>
|
||||
<el-option label="交通" :value="2"></el-option>
|
||||
<el-option label="重点" :value="3"></el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="补光" >
|
||||
<el-select v-model="form.gbUseType" style="width: 100%" placeholder="请选择位置类型">
|
||||
<el-option label="无补光" :value="1"></el-option>
|
||||
<el-option label="红外补光" :value="2"></el-option>
|
||||
<el-option label="白光补光" :value="3"></el-option>
|
||||
<el-option label="激光补光" :value="4"></el-option>
|
||||
<el-option label="其他" :value="9"></el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="监视方位" >
|
||||
<el-select v-model="form.gbUseType" style="width: 100%" placeholder="请选择位置类型">
|
||||
<el-option label="东(西向东)" :value="1"></el-option>
|
||||
<el-option label="西(东向西)" :value="2"></el-option>
|
||||
<el-option label="南(北向南)" :value="3"></el-option>
|
||||
<el-option label="北(南向北)" :value="4"></el-option>
|
||||
<el-option label="东南(西北到东南)" :value="5"></el-option>
|
||||
<el-option label="东北(西南到东北)" :value="6"></el-option>
|
||||
<el-option label="西南(东北到西南)" :value="7"></el-option>
|
||||
<el-option label="西北(东南到西北)" :value="8"></el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="分辨率" >
|
||||
<el-input v-model="form.gbResolution" placeholder="请输入分辨率"></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="下载倍速" >
|
||||
<el-select v-model="form.gbDownloadSpeedArray" @change="test" multiple style="width: 100%" placeholder="请选择位置类型">
|
||||
<el-option label="1倍速" value="1"></el-option>
|
||||
<el-option label="2倍速" value="2"></el-option>
|
||||
<el-option label="4倍速" value="4"></el-option>
|
||||
<el-option label="8倍速" value="8"></el-option>
|
||||
<el-option label="16倍速" value="16"></el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
|
||||
|
||||
|
||||
<div style="float: right;">
|
||||
<el-button type="primary" size="mini" @click="onSubmit">保存</el-button>
|
||||
<el-button size="mini" @click="close">取消</el-button>
|
||||
<div v-if="!form.gbId" class="page-header">
|
||||
<div class="page-title">
|
||||
<el-button icon="el-icon-back" size="mini" style="font-size: 20px; color: #000;" type="text" @click="showDevice" ></el-button>
|
||||
<el-divider direction="vertical"></el-divider>
|
||||
编辑通道
|
||||
</div>
|
||||
<div class="page-header-btn">
|
||||
<div style="display: inline;">
|
||||
<el-button icon="el-icon-close" size="mini" style="font-size: 20px; color: #000;" type="text" @click="showDevice" ></el-button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<el-form ref="passwordForm" status-icon label-width="160px" class="channel-form">
|
||||
<div class="form-box">
|
||||
<el-form-item label="名称" >
|
||||
<el-input v-model="form.gbName" placeholder="请输入通道名称"></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="编码" >
|
||||
<el-input v-model="form.gbDeviceId" placeholder="请输入通道编码">
|
||||
<el-button slot="append" @click="buildDeviceIdCode">生成</el-button>
|
||||
</el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="设备厂商" >
|
||||
<el-input v-model="form.gbManufacturer" placeholder="请输入设备厂商"></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="设备型号" >
|
||||
<el-input v-model="form.gbModel" placeholder="请输入设备型号"></el-input>
|
||||
</el-form-item>
|
||||
|
||||
<el-form-item label="行政区域" >
|
||||
<el-input v-model="form.gbCivilCode" placeholder="请输入行政区域"></el-input>
|
||||
</el-form-item>
|
||||
|
||||
<el-form-item label="安装地址" >
|
||||
<el-input v-model="form.gbAddress" placeholder="请输入安装地址"></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="子设备" >
|
||||
<el-select v-model="form.gbParental" style="width: 100%" placeholder="请选择是否有子设备">
|
||||
<el-option label="有" :value="1"></el-option>
|
||||
<el-option label="无" :value="0"></el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="父节点编码" >
|
||||
<el-input v-model="form.gbParentId" placeholder="请输入父节点编码"></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="设备状态" >
|
||||
<el-select v-model="form.gbStatus" style="width: 100%" placeholder="请选择设备状态">
|
||||
<el-option label="在线" value="ON"></el-option>
|
||||
<el-option label="离线" value="OFF"></el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="经度" >
|
||||
<el-input v-model="form.gbLongitude" placeholder="请输入经度"></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="纬度" >
|
||||
<el-input v-model="form.gbLatitude" placeholder="请输入纬度"></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="云台类型" >
|
||||
<el-select v-model="form.gbPtzType" style="width: 100%" placeholder="请选择云台类型">
|
||||
<el-option label="球机" :value="1"></el-option>
|
||||
<el-option label="半球" :value="2"></el-option>
|
||||
<el-option label="固定枪机" :value="3"></el-option>
|
||||
<el-option label="遥控枪机" :value="4"></el-option>
|
||||
<el-option label="遥控半球" :value="5"></el-option>
|
||||
<el-option label="多目设备的全景/拼接通道" :value="6"></el-option>
|
||||
<el-option label="多目设备的分割通道" :value="7"></el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</div>
|
||||
<div>
|
||||
<el-form-item label="警区" >
|
||||
<el-input v-model="form.gbBlock" placeholder="请输入警区"></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="设备归属" >
|
||||
<el-input v-model="form.gbOwner" placeholder="请输入设备归属"></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="信令安全模式" >
|
||||
<el-select v-model="form.gbSafetyWay" style="width: 100%" placeholder="请选择信令安全模式">
|
||||
<el-option label="不采用" :value="0"></el-option>
|
||||
<el-option label="S/MIME签名" :value="2"></el-option>
|
||||
<el-option label="S/MIME加密签名同时采用" :value="3"></el-option>
|
||||
<el-option label="数字摘要" :value="4"></el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="注册方式" >
|
||||
<el-select v-model="form.gbRegisterWay" style="width: 100%" placeholder="请选择注册方式">
|
||||
<el-option label="IETFRFC3261标准" :value="1"></el-option>
|
||||
<el-option label="基于口令的双向认证" :value="2"></el-option>
|
||||
<el-option label="基于数字证书的双向认证注册" :value="3"></el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="证书序列号" >
|
||||
<el-input type="number" v-model="form.gbCertNum" placeholder="请输入证书序列号"></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="证书有效标识" >
|
||||
<el-select v-model="form.gbCertifiable" style="width: 100%" placeholder="请选择证书有效标识">
|
||||
<el-option label="有效" :value="1"></el-option>
|
||||
<el-option label="无效" :value="0"></el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="无效原因码" >
|
||||
<el-input type="errCode" v-model="form.gbCertNum" placeholder="请输入无效原因码"></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="证书终止有效期" >
|
||||
<el-date-picker
|
||||
v-model="form.gbEndTime"
|
||||
type="datetime"
|
||||
placeholder="选择日期时间"
|
||||
style="width: 100%">
|
||||
</el-date-picker>
|
||||
</el-form-item>
|
||||
<el-form-item label="保密属性" >
|
||||
<el-select v-model="form.gbSecrecy" style="width: 100%" placeholder="请选择保密属性">
|
||||
<el-option label="不涉密" :value="0"></el-option>
|
||||
<el-option label="涉密" :value="1"></el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="IP地址" >
|
||||
<el-input v-model="form.gbIpAddress" placeholder="请输入IP地址"></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="端口" >
|
||||
<el-input type="number" v-model="form.gbPort" placeholder="请输入端口"></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="设备口令" >
|
||||
<el-input v-model="form.gbPassword" placeholder="请输入设备口令"></el-input>
|
||||
</el-form-item>
|
||||
</div>
|
||||
<div>
|
||||
<el-form-item label="业务分组编号" >
|
||||
<el-input v-model="form.gbBusinessGroupId" placeholder="请输入业务分组编号"></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="位置类型" >
|
||||
<el-select v-model="form.gbPositionType" style="width: 100%" placeholder="请选择位置类型">
|
||||
<el-option label="省际检查站" :value="1"></el-option>
|
||||
<el-option label="党政机关" :value="2"></el-option>
|
||||
<el-option label="车站码头" :value="3"></el-option>
|
||||
<el-option label="中心广场" :value="4"></el-option>
|
||||
<el-option label="体育场馆" :value="5"></el-option>
|
||||
<el-option label="商业中心" :value="6"></el-option>
|
||||
<el-option label="宗教场所" :value="7"></el-option>
|
||||
<el-option label="校园周边" :value="8"></el-option>
|
||||
<el-option label="治安复杂区域" :value="9"></el-option>
|
||||
<el-option label="交通干线" :value="10"></el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="室外/室内" >
|
||||
<el-select v-model="form.gbRoomType" style="width: 100%" placeholder="请选择位置类型">
|
||||
<el-option label="室外" :value="1"></el-option>
|
||||
<el-option label="室内" :value="2"></el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="用途" >
|
||||
<el-select v-model="form.gbUseType" style="width: 100%" placeholder="请选择位置类型">
|
||||
<el-option label="治安" :value="1"></el-option>
|
||||
<el-option label="交通" :value="2"></el-option>
|
||||
<el-option label="重点" :value="3"></el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="补光" >
|
||||
<el-select v-model="form.gbUseType" style="width: 100%" placeholder="请选择位置类型">
|
||||
<el-option label="无补光" :value="1"></el-option>
|
||||
<el-option label="红外补光" :value="2"></el-option>
|
||||
<el-option label="白光补光" :value="3"></el-option>
|
||||
<el-option label="激光补光" :value="4"></el-option>
|
||||
<el-option label="其他" :value="9"></el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="监视方位" >
|
||||
<el-select v-model="form.gbUseType" style="width: 100%" placeholder="请选择位置类型">
|
||||
<el-option label="东(西向东)" :value="1"></el-option>
|
||||
<el-option label="西(东向西)" :value="2"></el-option>
|
||||
<el-option label="南(北向南)" :value="3"></el-option>
|
||||
<el-option label="北(南向北)" :value="4"></el-option>
|
||||
<el-option label="东南(西北到东南)" :value="5"></el-option>
|
||||
<el-option label="东北(西南到东北)" :value="6"></el-option>
|
||||
<el-option label="西南(东北到西南)" :value="7"></el-option>
|
||||
<el-option label="西北(东南到西北)" :value="8"></el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="分辨率" >
|
||||
<el-input v-model="form.gbResolution" placeholder="请输入分辨率"></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="下载倍速" >
|
||||
<el-select v-model="form.gbDownloadSpeedArray" multiple style="width: 100%" placeholder="请选择位置类型">
|
||||
<el-option label="1倍速" value="1"></el-option>
|
||||
<el-option label="2倍速" value="2"></el-option>
|
||||
<el-option label="4倍速" value="4"></el-option>
|
||||
<el-option label="8倍速" value="8"></el-option>
|
||||
<el-option label="16倍速" value="16"></el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="空域编码能力" >
|
||||
<el-select v-model="form.gbSvcSpaceSupportMod" style="width: 100%" placeholder="请选择空域编码能力">
|
||||
<el-option label="1级增强" value="1"></el-option>
|
||||
<el-option label="2级增强" value="2"></el-option>
|
||||
<el-option label="3级增强" value="3"></el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="时域编码能力" >
|
||||
<el-select v-model="form.gbSvcTimeSupportMode" style="width: 100%" placeholder="请选择空域编码能力">
|
||||
<el-option label="1级增强" value="1"></el-option>
|
||||
<el-option label="2级增强" value="2"></el-option>
|
||||
<el-option label="3级增强" value="3"></el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<div style="float: right;">
|
||||
<el-button type="primary" @click="onSubmit">保存</el-button>
|
||||
<el-button @click="close">取消</el-button>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</el-form>
|
||||
<ChannelCode ref="channelCode"></ChannelCode>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import ChannelCode from './dialog/ChannelCode.vue'
|
||||
|
||||
export default {
|
||||
name: "channelEdit",
|
||||
props: [ 'id',],
|
||||
computed: {},
|
||||
components: {
|
||||
ChannelCode,
|
||||
},
|
||||
created() {
|
||||
// 获取完整信息
|
||||
this.getCommonChannel()
|
||||
|
@ -202,6 +241,9 @@ export default {
|
|||
},
|
||||
close: function () {
|
||||
|
||||
},
|
||||
showDevice: function () {
|
||||
|
||||
},
|
||||
test: function () {
|
||||
console.log(this.form.gbDownloadSpeedArray)
|
||||
|
@ -224,6 +266,11 @@ export default {
|
|||
this.locading = false
|
||||
])
|
||||
},
|
||||
buildDeviceIdCode: function (){
|
||||
this.$refs.channelCode.openDialog(code=>{
|
||||
this.form.gbDeviceId = code;
|
||||
});
|
||||
}
|
||||
// getDeviceChannel:function (callback) {
|
||||
// this.$axios({
|
||||
// method: 'get',
|
||||
|
@ -246,3 +293,12 @@ export default {
|
|||
},
|
||||
};
|
||||
</script>
|
||||
<style>
|
||||
.channel-form {
|
||||
display: grid;
|
||||
background-color: #FFFFFF;
|
||||
padding: 1rem 2rem 0 2rem;
|
||||
grid-template-columns: 1fr 1fr 1fr;
|
||||
gap: 1rem;
|
||||
}
|
||||
</style>
|
||||
|
|
|
@ -0,0 +1,371 @@
|
|||
<template>
|
||||
<div id="channelCode" v-loading="loading">
|
||||
<el-dialog
|
||||
title="生成国标编码"
|
||||
width="65rem"
|
||||
top="2rem"
|
||||
:close-on-click-modal="false"
|
||||
:visible.sync="showVideoDialog"
|
||||
:destroy-on-close="true"
|
||||
@close="closeModel()"
|
||||
>
|
||||
<el-tabs v-model="activeKey" centered style="padding: 0 1rem">
|
||||
<el-tab-pane name="0" >
|
||||
<div slot="label">
|
||||
<div class="show-code-item">{{ allVal[0].val }}</div>
|
||||
<div style="text-align: center">{{ allVal[0].meaning }}</div>
|
||||
</div>
|
||||
<el-radio-group v-model="allVal[0].val" :disabled="allVal[0].lock">
|
||||
<!-- <el-radio v-for="item in regionList" :label="item.commonRegionDeviceId">-->
|
||||
<!-- {{ item.commonRegionName }} - {{ item.commonRegionDeviceId }}-->
|
||||
<!-- </el-radio>-->
|
||||
<el-radio :label="3">备选项</el-radio>
|
||||
<el-radio :label="6">备选项</el-radio>
|
||||
<el-radio :label="9">备选项</el-radio>
|
||||
</el-radio-group>
|
||||
</el-tab-pane>
|
||||
<!-- <el-tab-pane name="1">-->
|
||||
<!-- <div slot="label">-->
|
||||
<!-- <div class="show-code-item">{{ allVal[1].val }}</div>-->
|
||||
<!-- <div style="text-align: center">{{ allVal[1].meaning }}</div>-->
|
||||
<!-- </div>-->
|
||||
<!-- <el-radio-group v-model="allVal[1].val" :disabled="allVal[1].lock">-->
|
||||
<!-- <el-radio v-for="item in regionList" :label="item.commonRegionDeviceId.substring(2)">-->
|
||||
<!-- {{ item.commonRegionName }} - {{ item.commonRegionDeviceId.substring(2) }}-->
|
||||
<!-- </el-radio>-->
|
||||
<!-- </el-radio-group>-->
|
||||
<!-- </el-tab-pane>-->
|
||||
<!-- <el-tab-pane name="2">-->
|
||||
<!-- <div slot="label">-->
|
||||
<!-- <div class="show-code-item">{{ allVal[2].val }}</div>-->
|
||||
<!-- <div style="text-align: center">{{ allVal[2].meaning }}</div>-->
|
||||
<!-- </div>-->
|
||||
<!-- <el-radio-group v-model="allVal[2].val" :disabled="allVal[2].lock">-->
|
||||
<!-- <el-radio v-for="item in regionList" :label="item.commonRegionDeviceId.substring(4)">-->
|
||||
<!-- {{ item.commonRegionName }} - {{ item.commonRegionDeviceId.substring(4) }}-->
|
||||
<!-- </el-radio>-->
|
||||
<!-- </el-radio-group>-->
|
||||
<!-- </el-tab-pane>-->
|
||||
<!-- <el-tab-pane name="3">-->
|
||||
<!-- 请手动输入基层接入单位编码,两位数字-->
|
||||
<!-- <div slot="label">-->
|
||||
<!-- <div class="show-code-item">{{ allVal[3].val }}</div>-->
|
||||
<!-- <div style="text-align: center">{{ allVal[3].meaning }}</div>-->
|
||||
<!-- </div>-->
|
||||
<!-- <el-input-->
|
||||
<!-- type="text"-->
|
||||
<!-- placeholder="请输入内容"-->
|
||||
<!-- v-model="allVal[3].val"-->
|
||||
<!-- maxlength="2"-->
|
||||
<!-- :disabled="allVal[3].lock"-->
|
||||
<!-- show-word-limit-->
|
||||
<!-- >-->
|
||||
<!-- </el-input>-->
|
||||
<!-- </el-tab-pane>-->
|
||||
<!-- <el-tab-pane name="4">-->
|
||||
<!-- <div slot="label">-->
|
||||
<!-- <div class="show-code-item">{{ allVal[4].val }}</div>-->
|
||||
<!-- <div style="text-align: center">{{ allVal[4].meaning }}</div>-->
|
||||
<!-- </div>-->
|
||||
<!-- <el-radio-group v-model="allVal[4].val" :disabled="allVal[4].lock">-->
|
||||
<!-- <el-radio v-for="item in industryCodeTypeList" :label="item.code">-->
|
||||
<!-- {{ item.name }} - {{ item.code }}-->
|
||||
<!-- </el-radio>-->
|
||||
<!-- </el-radio-group>-->
|
||||
<!-- </el-tab-pane>-->
|
||||
<!-- <el-tab-pane name="5">-->
|
||||
<!-- <div slot="label">-->
|
||||
<!-- <div class="show-code-item">{{ allVal[5].val }}</div>-->
|
||||
<!-- <div style="text-align: center">{{ allVal[5].meaning }}</div>-->
|
||||
<!-- </div>-->
|
||||
<!-- <el-radio-group v-model="allVal[5].val" :disabled="allVal[5].lock">-->
|
||||
<!-- <el-radio v-for="item in deviceTypeList" :label="item.code">-->
|
||||
<!-- {{ item.name }} - {{ item.code }}-->
|
||||
<!-- </el-radio>-->
|
||||
<!-- </el-radio-group>-->
|
||||
<!-- </el-tab-pane>-->
|
||||
<!-- <el-tab-pane name="6">-->
|
||||
<!-- <div slot="label">-->
|
||||
<!-- <div class="show-code-item">{{ allVal[6].val }}</div>-->
|
||||
<!-- <div style="text-align: center">{{ allVal[6].meaning }}</div>-->
|
||||
<!-- </div>-->
|
||||
<!-- <el-radio-group v-model="allVal[6].val" :disabled="allVal[6].lock">-->
|
||||
<!-- <el-radio v-for="item in networkIdentificationTypeList" :label="item.code">-->
|
||||
<!-- {{ item.name }} - {{ item.code }}-->
|
||||
<!-- </el-radio>-->
|
||||
<!-- </el-radio-group>-->
|
||||
<!-- </el-tab-pane>-->
|
||||
<!-- <el-tab-pane name="7">-->
|
||||
<!-- 请手动输入设备/用户序号, 六位数字-->
|
||||
<!-- <div slot="label">-->
|
||||
<!-- <div class="show-code-item">{{ allVal[7].val }}</div>-->
|
||||
<!-- <div style="text-align: center">{{ allVal[7].meaning }}</div>-->
|
||||
<!-- </div>-->
|
||||
<!-- <el-input-->
|
||||
<!-- type="text"-->
|
||||
<!-- placeholder="请输入内容"-->
|
||||
<!-- v-model="allVal[7].val"-->
|
||||
<!-- maxlength="6"-->
|
||||
<!-- :disabled="allVal[7].lock"-->
|
||||
<!-- show-word-limit-->
|
||||
<!-- >-->
|
||||
<!-- </el-input>-->
|
||||
<!-- </el-tab-pane>-->
|
||||
</el-tabs>
|
||||
</el-dialog>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
|
||||
export default {
|
||||
name: "addUser",
|
||||
props: {},
|
||||
computed: {},
|
||||
created() {
|
||||
this.getRegionList()
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
showVideoDialog: false,
|
||||
okText: "完成",
|
||||
activeKey: '0',
|
||||
allVal: [
|
||||
{
|
||||
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,
|
||||
}
|
||||
],
|
||||
regionList: [],
|
||||
deviceTypeList: [],
|
||||
industryCodeTypeList: [],
|
||||
networkIdentificationTypeList: [],
|
||||
endCallBck: null,
|
||||
loading: false,
|
||||
};
|
||||
},
|
||||
methods: {
|
||||
openDialog: function (endCallBck, code, lockIndex, lockContent) {
|
||||
this.showVideoDialog = true
|
||||
if (typeof code != 'undefined' && code.length === 20) {
|
||||
this.allVal[0].val = code.substring(0, 2)
|
||||
this.allVal[1].val = code.substring(2, 4)
|
||||
this.allVal[2].val = code.substring(4, 6)
|
||||
this.allVal[3].val = code.substring(6, 8)
|
||||
this.allVal[4].val = code.substring(8, 10)
|
||||
this.allVal[5].val = code.substring(10, 13)
|
||||
this.allVal[6].val = code.substring(14, 15)
|
||||
this.allVal[7].val = code.substring(15)
|
||||
}
|
||||
if (typeof lockIndex != 'undefined') {
|
||||
this.allVal[lockIndex].lock = true
|
||||
this.allVal[lockIndex].val = lockContent
|
||||
}
|
||||
this.endCallBck = endCallBck;
|
||||
},
|
||||
getRegionList: () => {
|
||||
this.regionList = []
|
||||
if (this.activeKey === '0' || this.activeKey === '1' || this.activeKey === '2') {
|
||||
let parent = ''
|
||||
if (this.activeKey === '1') {
|
||||
parent = this.allVal[0].val
|
||||
if (parent === '11' || parent === '12' || parent === '31') {
|
||||
this.regionList.push({
|
||||
// 数据库自增ID
|
||||
commonRegionId: -1,
|
||||
// 区域国标编号
|
||||
commonRegionDeviceId: parent + '01',
|
||||
// 区域名称
|
||||
commonRegionName: '市辖区',
|
||||
// 父区域国标ID
|
||||
commonRegionParentId: parent,
|
||||
})
|
||||
console.log(this.regionList)
|
||||
return
|
||||
} else if (parent === '50') {
|
||||
this.regionList = [
|
||||
{
|
||||
// 数据库自增ID
|
||||
commonRegionId: -1,
|
||||
// 区域国标编号
|
||||
commonRegionDeviceId: parent + '01',
|
||||
// 区域名称
|
||||
commonRegionName: '市辖区',
|
||||
// 父区域国标ID
|
||||
commonRegionParentId: parent,
|
||||
},
|
||||
{
|
||||
// 数据库自增ID
|
||||
commonRegionId: -1,
|
||||
// 区域国标编号
|
||||
commonRegionDeviceId: parent + '02',
|
||||
// 区域名称
|
||||
commonRegionName: '县',
|
||||
// 父区域国标ID
|
||||
commonRegionParentId: parent,
|
||||
},
|
||||
]
|
||||
return
|
||||
}
|
||||
}
|
||||
if (this.activeKey === '2') {
|
||||
if (this.allVal[0].val === '11' || this.allVal[0].val === '12' || this.allVal[0].val === '31' || this.allVal[0].val === '50') {
|
||||
parent = this.allVal[0].val
|
||||
} else {
|
||||
parent = this.allVal[0].val + this.allVal[1].val
|
||||
}
|
||||
|
||||
console.log(parent)
|
||||
}
|
||||
if (this.activeKey !== '0' && parent === '') {
|
||||
this.$message.error('请先选择上级行政区划');
|
||||
}
|
||||
this.queryChildList(parent);
|
||||
} else if (this.activeKey === '4') {
|
||||
this.queryIndustryCodeList();
|
||||
} else if (this.activeKey === '5') {
|
||||
this.queryDeviceTypeList();
|
||||
} else if (this.activeKey === '6') {
|
||||
this.queryNetworkIdentificationTypeList();
|
||||
}
|
||||
},
|
||||
queryChildList: (parent)=>{
|
||||
this.$axios({
|
||||
method: 'get',
|
||||
url: "/api/region/base/child/list",
|
||||
params: {
|
||||
parent: parent,
|
||||
}
|
||||
}).then((res) => {
|
||||
if (res.data.code === 0) {
|
||||
this.regionList = res.data.data
|
||||
} else {
|
||||
this.$message.error(res.data.msg);
|
||||
}
|
||||
}).catch((error) => {
|
||||
this.$message.error(error);
|
||||
});
|
||||
},
|
||||
queryIndustryCodeList: ()=>{
|
||||
this.$axios({
|
||||
method: 'get',
|
||||
url: "/api/common/channel/industry/list",
|
||||
}).then((res) => {
|
||||
if (res.data.code === 0) {
|
||||
this.industryCodeTypeList.value = res.data.data
|
||||
} else {
|
||||
this.$message.error(res.data.msg);
|
||||
}
|
||||
}).catch((error) => {
|
||||
this.$message.error(error);
|
||||
});
|
||||
},
|
||||
queryDeviceTypeList: ()=>{
|
||||
this.$axios({
|
||||
method: 'get',
|
||||
url: "/api/common/channel/type/list",
|
||||
}).then((res) => {
|
||||
if (res.data.code === 0) {
|
||||
this.deviceTypeList.value = res.data.data
|
||||
} else {
|
||||
this.$message.error(res.data.msg);
|
||||
}
|
||||
}).catch((error) => {
|
||||
this.$message.error(error);
|
||||
});
|
||||
},
|
||||
queryNetworkIdentificationTypeList: ()=>{
|
||||
this.$axios({
|
||||
method: 'get',
|
||||
url: "/api/common/channel/network/identification/list",
|
||||
}).then((res) => {
|
||||
if (res.data.code === 0) {
|
||||
this.networkIdentificationTypeList.value = res.data.data
|
||||
} else {
|
||||
this.$message.error(res.data.msg);
|
||||
}
|
||||
}).catch((error) => {
|
||||
this.$message.error(error);
|
||||
});
|
||||
},
|
||||
closeModel: function (){
|
||||
this.showVideoDialog = false
|
||||
},
|
||||
handleOk: () => {
|
||||
const code =
|
||||
this.allVal[0].val +
|
||||
this.allVal[1].val +
|
||||
this.allVal[2].val +
|
||||
this.allVal[3].val +
|
||||
this.allVal[4].val +
|
||||
this.allVal[5].val +
|
||||
this.allVal[6].val +
|
||||
this.allVal[7].val
|
||||
console.log(code)
|
||||
if (this.endCallBck) {
|
||||
this.endCallBck(code)
|
||||
}
|
||||
this.showVideoDialog = false
|
||||
}
|
||||
},
|
||||
};
|
||||
</script>
|
||||
|
||||
<style>
|
||||
.show-code-item {
|
||||
text-align: center;
|
||||
font-size: 3rem;
|
||||
}
|
||||
</style>
|
Loading…
Reference in New Issue