Compare commits
No commits in common. "7022e20ad1aa9575b6be6b38296f7f27ffc4419d" and "a32ba2c6b9e91e98a2d261b7bef81c35d124d74c" have entirely different histories.
7022e20ad1
...
a32ba2c6b9
|
@ -1,100 +0,0 @@
|
||||||
package com.ruoyi.web.controller.board;
|
|
||||||
|
|
||||||
import com.ruoyi.board.domain.BoardProtocol;
|
|
||||||
import com.ruoyi.board.service.IBoardProtocolService;
|
|
||||||
import com.ruoyi.common.annotation.Log;
|
|
||||||
import com.ruoyi.common.core.controller.BaseController;
|
|
||||||
import com.ruoyi.common.core.domain.AjaxResult;
|
|
||||||
import com.ruoyi.common.core.page.TableDataInfo;
|
|
||||||
import com.ruoyi.common.enums.BusinessType;
|
|
||||||
import com.ruoyi.common.utils.poi.ExcelUtil;
|
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
|
||||||
import org.springframework.security.access.prepost.PreAuthorize;
|
|
||||||
import org.springframework.web.bind.annotation.*;
|
|
||||||
|
|
||||||
import javax.servlet.http.HttpServletResponse;
|
|
||||||
import java.util.List;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 情报板协议库Controller
|
|
||||||
*
|
|
||||||
* @author fuhao
|
|
||||||
* @date 2024-09-04
|
|
||||||
*/
|
|
||||||
@RestController
|
|
||||||
@RequestMapping("/board/protocol")
|
|
||||||
public class BoardProtocolController extends BaseController {
|
|
||||||
@Autowired
|
|
||||||
private IBoardProtocolService boardProtocolService;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 查询情报板协议库列表
|
|
||||||
*/
|
|
||||||
@PreAuthorize("@ss.hasPermi('board:protocol:list')")
|
|
||||||
@GetMapping("/list")
|
|
||||||
public TableDataInfo list(BoardProtocol boardProtocol) {
|
|
||||||
startPage();
|
|
||||||
List<BoardProtocol> list = boardProtocolService.list();
|
|
||||||
return getDataTable(list);
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 导出情报板协议库列表
|
|
||||||
*/
|
|
||||||
@PreAuthorize("@ss.hasPermi('board:protocol:export')")
|
|
||||||
@Log(title = "情报板协议库", businessType = BusinessType.EXPORT)
|
|
||||||
@PostMapping("/export")
|
|
||||||
public void export(HttpServletResponse response, BoardProtocol boardProtocol) {
|
|
||||||
List<BoardProtocol> list = boardProtocolService.list();
|
|
||||||
ExcelUtil<BoardProtocol> util = new ExcelUtil<BoardProtocol>(BoardProtocol.class);
|
|
||||||
util.exportExcel(response, list, "情报板协议库数据");
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 获取情报板协议库详细信息
|
|
||||||
*/
|
|
||||||
@PreAuthorize("@ss.hasPermi('board:protocol:query')")
|
|
||||||
@GetMapping(value = "/{id}")
|
|
||||||
public AjaxResult getInfo(@PathVariable("id") Long id) {
|
|
||||||
return success(boardProtocolService.getById(id));
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 新增情报板协议库
|
|
||||||
*/
|
|
||||||
@PreAuthorize("@ss.hasPermi('board:protocol:add')")
|
|
||||||
@Log(title = "情报板协议库", businessType = BusinessType.INSERT)
|
|
||||||
@PostMapping
|
|
||||||
public AjaxResult add(@RequestBody BoardProtocol boardProtocol) {
|
|
||||||
return toAjax(boardProtocolService.save(boardProtocol));
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 修改情报板协议库
|
|
||||||
*/
|
|
||||||
@PreAuthorize("@ss.hasPermi('board:protocol:edit')")
|
|
||||||
@Log(title = "情报板协议库", businessType = BusinessType.UPDATE)
|
|
||||||
@PutMapping
|
|
||||||
public AjaxResult edit(@RequestBody BoardProtocol boardProtocol) {
|
|
||||||
return toAjax(boardProtocolService.saveOrUpdate(boardProtocol));
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 删除情报板协议库
|
|
||||||
*/
|
|
||||||
@PreAuthorize("@ss.hasPermi('board:protocol:remove')")
|
|
||||||
@Log(title = "情报板协议库", businessType = BusinessType.DELETE)
|
|
||||||
@DeleteMapping("/{ids}")
|
|
||||||
public AjaxResult remove(@PathVariable List<Long> ids) {
|
|
||||||
return toAjax(boardProtocolService.removeByIds(ids));
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 获取协议树列表
|
|
||||||
*/
|
|
||||||
@PreAuthorize("@ss.hasPermi('plan:type:list')")
|
|
||||||
@GetMapping("/protocolTree")
|
|
||||||
public AjaxResult deptTree(BoardProtocol planType) {
|
|
||||||
return success(boardProtocolService.listProtocolTree(planType));
|
|
||||||
}
|
|
||||||
}
|
|
|
@ -34,7 +34,7 @@ public class BoardTypeController extends BaseController {
|
||||||
@GetMapping("/list")
|
@GetMapping("/list")
|
||||||
public TableDataInfo list(BoardType boardType) {
|
public TableDataInfo list(BoardType boardType) {
|
||||||
startPage();
|
startPage();
|
||||||
List<BoardType> list = boardTypeService.listByParams(boardType);
|
List<BoardType> list = boardTypeService.list();
|
||||||
return getDataTable(list);
|
return getDataTable(list);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -1,7 +1,6 @@
|
||||||
package com.ruoyi.web.controller.board;
|
package com.ruoyi.web.controller.board;
|
||||||
|
|
||||||
import com.ruoyi.board.domain.PresetContent;
|
import com.ruoyi.board.domain.PresetContent;
|
||||||
import com.ruoyi.board.domain.dto.PresetContentDTO;
|
|
||||||
import com.ruoyi.board.service.IPresetContentService;
|
import com.ruoyi.board.service.IPresetContentService;
|
||||||
import com.ruoyi.common.annotation.Log;
|
import com.ruoyi.common.annotation.Log;
|
||||||
import com.ruoyi.common.core.controller.BaseController;
|
import com.ruoyi.common.core.controller.BaseController;
|
||||||
|
@ -38,7 +37,7 @@ public class PresetContentController extends BaseController
|
||||||
public TableDataInfo list(PresetContent presetContent)
|
public TableDataInfo list(PresetContent presetContent)
|
||||||
{
|
{
|
||||||
startPage();
|
startPage();
|
||||||
List<PresetContentDTO> list = presetContentService.listDTO(presetContent);
|
List<PresetContent> list = presetContentService.listPage(presetContent);
|
||||||
return getDataTable(list);
|
return getDataTable(list);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -1,91 +0,0 @@
|
||||||
package com.ruoyi.web.controller.board;
|
|
||||||
|
|
||||||
import com.ruoyi.board.domain.PubWhiteIp;
|
|
||||||
import com.ruoyi.board.service.IPubWhiteIpService;
|
|
||||||
import com.ruoyi.common.annotation.Log;
|
|
||||||
import com.ruoyi.common.core.controller.BaseController;
|
|
||||||
import com.ruoyi.common.core.domain.AjaxResult;
|
|
||||||
import com.ruoyi.common.core.page.TableDataInfo;
|
|
||||||
import com.ruoyi.common.enums.BusinessType;
|
|
||||||
import com.ruoyi.common.utils.poi.ExcelUtil;
|
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
|
||||||
import org.springframework.security.access.prepost.PreAuthorize;
|
|
||||||
import org.springframework.web.bind.annotation.*;
|
|
||||||
|
|
||||||
import javax.servlet.http.HttpServletResponse;
|
|
||||||
import java.util.List;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 发布源白名单Controller
|
|
||||||
*
|
|
||||||
* @author fuhao
|
|
||||||
* @date 2024-09-04
|
|
||||||
*/
|
|
||||||
@RestController
|
|
||||||
@RequestMapping("/board/whiteIp")
|
|
||||||
public class PubWhiteIpController extends BaseController {
|
|
||||||
@Autowired
|
|
||||||
private IPubWhiteIpService pubWhiteIpService;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 查询发布源白名单列表
|
|
||||||
*/
|
|
||||||
@PreAuthorize("@ss.hasPermi('board:whiteIp:list')")
|
|
||||||
@GetMapping("/list")
|
|
||||||
public TableDataInfo list(PubWhiteIp pubWhiteIp) {
|
|
||||||
startPage();
|
|
||||||
List<PubWhiteIp> list = pubWhiteIpService.list();
|
|
||||||
return getDataTable(list);
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 导出发布源白名单列表
|
|
||||||
*/
|
|
||||||
@PreAuthorize("@ss.hasPermi('board:whiteIp:export')")
|
|
||||||
@Log(title = "发布源白名单", businessType = BusinessType.EXPORT)
|
|
||||||
@PostMapping("/export")
|
|
||||||
public void export(HttpServletResponse response, PubWhiteIp pubWhiteIp) {
|
|
||||||
List<PubWhiteIp> list = pubWhiteIpService.list();
|
|
||||||
ExcelUtil<PubWhiteIp> util = new ExcelUtil<PubWhiteIp>(PubWhiteIp.class);
|
|
||||||
util.exportExcel(response, list, "发布源白名单数据");
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 获取发布源白名单详细信息
|
|
||||||
*/
|
|
||||||
@PreAuthorize("@ss.hasPermi('board:whiteIp:query')")
|
|
||||||
@GetMapping(value = "/{id}")
|
|
||||||
public AjaxResult getInfo(@PathVariable("id") Long id) {
|
|
||||||
return success(pubWhiteIpService.getById(id));
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 新增发布源白名单
|
|
||||||
*/
|
|
||||||
@PreAuthorize("@ss.hasPermi('board:whiteIp:add')")
|
|
||||||
@Log(title = "发布源白名单", businessType = BusinessType.INSERT)
|
|
||||||
@PostMapping
|
|
||||||
public AjaxResult add(@RequestBody PubWhiteIp pubWhiteIp) {
|
|
||||||
return toAjax(pubWhiteIpService.save(pubWhiteIp));
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 修改发布源白名单
|
|
||||||
*/
|
|
||||||
@PreAuthorize("@ss.hasPermi('board:whiteIp:edit')")
|
|
||||||
@Log(title = "发布源白名单", businessType = BusinessType.UPDATE)
|
|
||||||
@PutMapping
|
|
||||||
public AjaxResult edit(@RequestBody PubWhiteIp pubWhiteIp) {
|
|
||||||
return toAjax(pubWhiteIpService.saveOrUpdate(pubWhiteIp));
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 删除发布源白名单
|
|
||||||
*/
|
|
||||||
@PreAuthorize("@ss.hasPermi('board:whiteIp:remove')")
|
|
||||||
@Log(title = "发布源白名单", businessType = BusinessType.DELETE)
|
|
||||||
@DeleteMapping("/{ids}")
|
|
||||||
public AjaxResult remove(@PathVariable List<Long> ids) {
|
|
||||||
return toAjax(pubWhiteIpService.removeByIds(ids));
|
|
||||||
}
|
|
||||||
}
|
|
|
@ -1,98 +0,0 @@
|
||||||
package com.ruoyi.web.controller.board;
|
|
||||||
|
|
||||||
import com.ruoyi.board.domain.ReleaseLog;
|
|
||||||
import com.ruoyi.board.service.IReleaseLogService;
|
|
||||||
import com.ruoyi.common.annotation.Log;
|
|
||||||
import com.ruoyi.common.core.controller.BaseController;
|
|
||||||
import com.ruoyi.common.core.domain.AjaxResult;
|
|
||||||
import com.ruoyi.common.core.page.TableDataInfo;
|
|
||||||
import com.ruoyi.common.enums.BusinessType;
|
|
||||||
import com.ruoyi.common.utils.poi.ExcelUtil;
|
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
|
||||||
import org.springframework.security.access.prepost.PreAuthorize;
|
|
||||||
import org.springframework.web.bind.annotation.*;
|
|
||||||
|
|
||||||
import javax.servlet.http.HttpServletResponse;
|
|
||||||
import java.util.List;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 发布日志记录Controller
|
|
||||||
*
|
|
||||||
* @author fuhao
|
|
||||||
* @date 2024-09-05
|
|
||||||
*/
|
|
||||||
@RestController
|
|
||||||
@RequestMapping("/board/releaseLog")
|
|
||||||
public class ReleaseLogController extends BaseController
|
|
||||||
{
|
|
||||||
@Autowired
|
|
||||||
private IReleaseLogService releaseLogService;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 查询发布日志记录列表
|
|
||||||
*/
|
|
||||||
@PreAuthorize("@ss.hasPermi('board:releaseLog:list')")
|
|
||||||
@GetMapping("/list")
|
|
||||||
public TableDataInfo list(ReleaseLog releaseLog)
|
|
||||||
{
|
|
||||||
startPage();
|
|
||||||
List<ReleaseLog> list = releaseLogService.list();
|
|
||||||
return getDataTable(list);
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 导出发布日志记录列表
|
|
||||||
*/
|
|
||||||
@PreAuthorize("@ss.hasPermi('board:releaseLog:export')")
|
|
||||||
@Log(title = "发布日志记录", businessType = BusinessType.EXPORT)
|
|
||||||
@PostMapping("/export")
|
|
||||||
public void export(HttpServletResponse response, ReleaseLog releaseLog)
|
|
||||||
{
|
|
||||||
List<ReleaseLog> list = releaseLogService.list();
|
|
||||||
ExcelUtil<ReleaseLog> util = new ExcelUtil<ReleaseLog>(ReleaseLog.class);
|
|
||||||
util.exportExcel(response, list, "发布日志记录数据");
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 获取发布日志记录详细信息
|
|
||||||
*/
|
|
||||||
@PreAuthorize("@ss.hasPermi('board:releaseLog:query')")
|
|
||||||
@GetMapping(value = "/{id}")
|
|
||||||
public AjaxResult getInfo(@PathVariable("id") Long id)
|
|
||||||
{
|
|
||||||
return success(releaseLogService.getById(id));
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 新增发布日志记录
|
|
||||||
*/
|
|
||||||
@PreAuthorize("@ss.hasPermi('board:releaseLog:add')")
|
|
||||||
@Log(title = "发布日志记录", businessType = BusinessType.INSERT)
|
|
||||||
@PostMapping
|
|
||||||
public AjaxResult add(@RequestBody ReleaseLog releaseLog)
|
|
||||||
{
|
|
||||||
return toAjax(releaseLogService.save(releaseLog));
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 修改发布日志记录
|
|
||||||
*/
|
|
||||||
@PreAuthorize("@ss.hasPermi('board:releaseLog:edit')")
|
|
||||||
@Log(title = "发布日志记录", businessType = BusinessType.UPDATE)
|
|
||||||
@PutMapping
|
|
||||||
public AjaxResult edit(@RequestBody ReleaseLog releaseLog)
|
|
||||||
{
|
|
||||||
return toAjax(releaseLogService.saveOrUpdate(releaseLog));
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 删除发布日志记录
|
|
||||||
*/
|
|
||||||
@PreAuthorize("@ss.hasPermi('board:releaseLog:remove')")
|
|
||||||
@Log(title = "发布日志记录", businessType = BusinessType.DELETE)
|
|
||||||
@DeleteMapping("/{ids}")
|
|
||||||
public AjaxResult remove(@PathVariable List<Long> ids)
|
|
||||||
{
|
|
||||||
return toAjax(releaseLogService.removeByIds(ids));
|
|
||||||
}
|
|
||||||
}
|
|
|
@ -5,11 +5,10 @@ import com.baomidou.mybatisplus.annotation.TableField;
|
||||||
import com.baomidou.mybatisplus.annotation.TableId;
|
import com.baomidou.mybatisplus.annotation.TableId;
|
||||||
import com.baomidou.mybatisplus.annotation.TableName;
|
import com.baomidou.mybatisplus.annotation.TableName;
|
||||||
import com.ruoyi.common.core.domain.BaseEntity;
|
import com.ruoyi.common.core.domain.BaseEntity;
|
||||||
|
import java.math.BigDecimal;
|
||||||
import lombok.Data;
|
import lombok.Data;
|
||||||
import lombok.EqualsAndHashCode;
|
import lombok.EqualsAndHashCode;
|
||||||
|
|
||||||
import java.math.BigDecimal;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 警报计划表
|
* 警报计划表
|
||||||
*/
|
*/
|
||||||
|
@ -33,7 +32,7 @@ public class AlertPlan extends BaseEntity {
|
||||||
* 等级
|
* 等级
|
||||||
*/
|
*/
|
||||||
@TableField(value = "`level`")
|
@TableField(value = "`level`")
|
||||||
private String level;
|
private Integer level;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 最大值
|
* 最大值
|
||||||
|
@ -50,6 +49,6 @@ public class AlertPlan extends BaseEntity {
|
||||||
/**
|
/**
|
||||||
* 显示内容
|
* 显示内容
|
||||||
*/
|
*/
|
||||||
@TableField(value = "preset_content_id")
|
@TableField(value = "display_content")
|
||||||
private Long presetContentId;
|
private String displayContent;
|
||||||
}
|
}
|
|
@ -48,18 +48,30 @@ public class BoardInfo extends BaseEntity {
|
||||||
/**
|
/**
|
||||||
* 情报板尺寸
|
* 情报板尺寸
|
||||||
*/
|
*/
|
||||||
@TableField(value = "board_size_type")
|
@TableField(value = "board_size")
|
||||||
private Integer boardSizeType;
|
private String boardSize;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 情报板品牌协议
|
* 情报板品牌
|
||||||
*/
|
*/
|
||||||
@TableField(value = "board_brand_protocol")
|
@TableField(value = "board_brand")
|
||||||
private Integer boardBrandProtocol;
|
private String boardBrand;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 情报板通讯协议
|
||||||
|
*/
|
||||||
|
@TableField(value = "board_communication_protocol")
|
||||||
|
private String boardCommunicationProtocol;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 情报板IP
|
* 情报板IP
|
||||||
*/
|
*/
|
||||||
@TableField(value = "board_ip")
|
@TableField(value = "board_ip")
|
||||||
private String boardIp;
|
private String boardIp;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 情报板端口号
|
||||||
|
*/
|
||||||
|
@TableField(value = "board_port")
|
||||||
|
private Integer boardPort;
|
||||||
}
|
}
|
|
@ -1,35 +0,0 @@
|
||||||
package com.ruoyi.board.domain;
|
|
||||||
|
|
||||||
import com.baomidou.mybatisplus.annotation.IdType;
|
|
||||||
import com.baomidou.mybatisplus.annotation.TableField;
|
|
||||||
import com.baomidou.mybatisplus.annotation.TableId;
|
|
||||||
import com.baomidou.mybatisplus.annotation.TableName;
|
|
||||||
import lombok.Data;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 情报板协议库
|
|
||||||
*/
|
|
||||||
@Data
|
|
||||||
@TableName(value = "pub_board_protocol")
|
|
||||||
public class BoardProtocol {
|
|
||||||
@TableId(value = "id", type = IdType.AUTO)
|
|
||||||
private Long id;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 情报板品牌
|
|
||||||
*/
|
|
||||||
@TableField(value = "brand")
|
|
||||||
private String brand;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 情报板通讯协议
|
|
||||||
*/
|
|
||||||
@TableField(value = "protocol")
|
|
||||||
private String protocol;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 备注
|
|
||||||
*/
|
|
||||||
@TableField(value = "remark")
|
|
||||||
private String remark;
|
|
||||||
}
|
|
|
@ -4,9 +4,8 @@ import com.baomidou.mybatisplus.annotation.IdType;
|
||||||
import com.baomidou.mybatisplus.annotation.TableField;
|
import com.baomidou.mybatisplus.annotation.TableField;
|
||||||
import com.baomidou.mybatisplus.annotation.TableId;
|
import com.baomidou.mybatisplus.annotation.TableId;
|
||||||
import com.baomidou.mybatisplus.annotation.TableName;
|
import com.baomidou.mybatisplus.annotation.TableName;
|
||||||
import lombok.Data;
|
|
||||||
|
|
||||||
import java.util.Date;
|
import java.util.Date;
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 预置信息及模版表
|
* 预置信息及模版表
|
||||||
|
@ -29,8 +28,8 @@ public class PresetContent {
|
||||||
/**
|
/**
|
||||||
* 情报板尺寸
|
* 情报板尺寸
|
||||||
*/
|
*/
|
||||||
@TableField(value = "board_size_type")
|
@TableField(value = "board_size")
|
||||||
private Integer boardSizeType;
|
private String boardSize;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 信息类型
|
* 信息类型
|
||||||
|
@ -53,8 +52,8 @@ public class PresetContent {
|
||||||
/**
|
/**
|
||||||
* 字体样式
|
* 字体样式
|
||||||
*/
|
*/
|
||||||
@TableField(value = "font_family")
|
@TableField(value = "font_style")
|
||||||
private String fontFamily;
|
private String fontStyle;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 字体大小
|
* 字体大小
|
||||||
|
@ -92,12 +91,6 @@ public class PresetContent {
|
||||||
@TableField(value = "play_time")
|
@TableField(value = "play_time")
|
||||||
private Integer playTime;
|
private Integer playTime;
|
||||||
|
|
||||||
@TableField(value = "horizontal_center")
|
|
||||||
private Boolean horizontalCenter;
|
|
||||||
|
|
||||||
@TableField(value = "vertical_center")
|
|
||||||
private Boolean verticalCenter;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 当前预置类型 1:内置模版 0:预发布信息
|
* 当前预置类型 1:内置模版 0:预发布信息
|
||||||
*/
|
*/
|
||||||
|
|
|
@ -1,41 +0,0 @@
|
||||||
package com.ruoyi.board.domain;
|
|
||||||
|
|
||||||
import com.baomidou.mybatisplus.annotation.IdType;
|
|
||||||
import com.baomidou.mybatisplus.annotation.TableField;
|
|
||||||
import com.baomidou.mybatisplus.annotation.TableId;
|
|
||||||
import com.baomidou.mybatisplus.annotation.TableName;
|
|
||||||
import lombok.Data;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 发布源白名单
|
|
||||||
*/
|
|
||||||
@Data
|
|
||||||
@TableName(value = "pub_white_ip")
|
|
||||||
public class PubWhiteIp {
|
|
||||||
@TableId(value = "id", type = IdType.AUTO)
|
|
||||||
private Integer id;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 名称
|
|
||||||
*/
|
|
||||||
@TableField(value = "`name`")
|
|
||||||
private String name;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* IP地址
|
|
||||||
*/
|
|
||||||
@TableField(value = "ip")
|
|
||||||
private String ip;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 安全密钥
|
|
||||||
*/
|
|
||||||
@TableField(value = "security_key")
|
|
||||||
private String securityKey;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 备注
|
|
||||||
*/
|
|
||||||
@TableField(value = "remark")
|
|
||||||
private String remark;
|
|
||||||
}
|
|
|
@ -1,52 +0,0 @@
|
||||||
package com.ruoyi.board.domain;
|
|
||||||
|
|
||||||
import com.baomidou.mybatisplus.annotation.IdType;
|
|
||||||
import com.baomidou.mybatisplus.annotation.TableField;
|
|
||||||
import com.baomidou.mybatisplus.annotation.TableId;
|
|
||||||
import com.baomidou.mybatisplus.annotation.TableName;
|
|
||||||
import lombok.Data;
|
|
||||||
|
|
||||||
import java.util.Date;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 发布日志记录
|
|
||||||
*/
|
|
||||||
@Data
|
|
||||||
@TableName(value = "pub_release_log")
|
|
||||||
public class ReleaseLog {
|
|
||||||
/**
|
|
||||||
* 主键ID
|
|
||||||
*/
|
|
||||||
@TableId(value = "id", type = IdType.AUTO)
|
|
||||||
private Integer id;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 操作人
|
|
||||||
*/
|
|
||||||
@TableField(value = "`operator`")
|
|
||||||
private String operator;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 创建时间
|
|
||||||
*/
|
|
||||||
@TableField(value = "create_time")
|
|
||||||
private Date createTime;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 情报板ID
|
|
||||||
*/
|
|
||||||
@TableField(value = "board_id")
|
|
||||||
private Integer boardId;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 情报板名称
|
|
||||||
*/
|
|
||||||
@TableField(value = "board_name")
|
|
||||||
private String boardName;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 发布内容
|
|
||||||
*/
|
|
||||||
@TableField(value = "release_content")
|
|
||||||
private String releaseContent;
|
|
||||||
}
|
|
|
@ -18,10 +18,11 @@ public class AlertPlanAndPlanTypeDTO {
|
||||||
|
|
||||||
private String typeName;
|
private String typeName;
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 等级
|
* 等级
|
||||||
*/
|
*/
|
||||||
private String level;
|
private Integer level;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 最大值
|
* 最大值
|
||||||
|
@ -34,12 +35,7 @@ public class AlertPlanAndPlanTypeDTO {
|
||||||
private BigDecimal minValue;
|
private BigDecimal minValue;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 显示内容 ID
|
* 显示内容
|
||||||
*/
|
*/
|
||||||
private Long presetContentId;
|
private String displayContent;
|
||||||
|
|
||||||
/**
|
|
||||||
* 显示内容名称
|
|
||||||
*/
|
|
||||||
private String presetContentName;
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -29,35 +29,20 @@ public class BoardInfoAndRoadDTO {
|
||||||
*/
|
*/
|
||||||
private String boardMileage;
|
private String boardMileage;
|
||||||
|
|
||||||
/**
|
|
||||||
* 情报板类型ID
|
|
||||||
*/
|
|
||||||
private Integer boardSizeType;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 情报板类型名称
|
|
||||||
*/
|
|
||||||
private String boardSizeName;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 情报板尺寸
|
* 情报板尺寸
|
||||||
*/
|
*/
|
||||||
private String boardSize;
|
private String boardSize;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 情报板品牌协议ID
|
* 情报板品牌
|
||||||
*/
|
*/
|
||||||
private Integer boardBrandProtocol;
|
private String boardBrand;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 情报板品牌名
|
* 情报板通讯协议
|
||||||
*/
|
*/
|
||||||
private String boardBrandName;
|
private String boardCommunicationProtocol;
|
||||||
|
|
||||||
/**
|
|
||||||
* 情报板协议名
|
|
||||||
*/
|
|
||||||
private String boardProtocolName;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 情报板IP
|
* 情报板IP
|
||||||
|
@ -68,4 +53,6 @@ public class BoardInfoAndRoadDTO {
|
||||||
* 路段名称
|
* 路段名称
|
||||||
*/
|
*/
|
||||||
private String roadName;
|
private String roadName;
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,145 +0,0 @@
|
||||||
package com.ruoyi.board.domain.dto;
|
|
||||||
|
|
||||||
import com.baomidou.mybatisplus.annotation.IdType;
|
|
||||||
import com.baomidou.mybatisplus.annotation.TableField;
|
|
||||||
import com.baomidou.mybatisplus.annotation.TableId;
|
|
||||||
import lombok.Data;
|
|
||||||
|
|
||||||
import java.util.Date;
|
|
||||||
|
|
||||||
@Data
|
|
||||||
public class PresetContentDTO {
|
|
||||||
/**
|
|
||||||
* 主键自增
|
|
||||||
*/
|
|
||||||
@TableId(value = "id", type = IdType.AUTO)
|
|
||||||
private Integer id;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 预置信息名称
|
|
||||||
*/
|
|
||||||
@TableField(value = "`name`")
|
|
||||||
private String name;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 情报板尺寸
|
|
||||||
*/
|
|
||||||
@TableField(value = "board_size_type")
|
|
||||||
private Integer boardSizeType;
|
|
||||||
|
|
||||||
@TableField(value = "board_size_type_name")
|
|
||||||
private String boardSizeTypeName;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 信息类型
|
|
||||||
*/
|
|
||||||
@TableField(value = "info_type")
|
|
||||||
private Integer infoType;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 类型名称
|
|
||||||
*/
|
|
||||||
private String typeName;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 预置内容
|
|
||||||
*/
|
|
||||||
@TableField(value = "content")
|
|
||||||
private String content;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 预览路径
|
|
||||||
*/
|
|
||||||
@TableField(value = "preview_path")
|
|
||||||
private String previewPath;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 字体样式
|
|
||||||
*/
|
|
||||||
@TableField(value = "font_family")
|
|
||||||
private String fontFamily;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 字体大小
|
|
||||||
*/
|
|
||||||
@TableField(value = "font_size")
|
|
||||||
private Integer fontSize;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 字体间距
|
|
||||||
*/
|
|
||||||
@TableField(value = "letter_spacing")
|
|
||||||
private Integer letterSpacing;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 字体颜色
|
|
||||||
*/
|
|
||||||
@TableField(value = "font_color")
|
|
||||||
private String fontColor;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 字体坐标X
|
|
||||||
*/
|
|
||||||
@TableField(value = "font_position_x")
|
|
||||||
private Integer fontPositionX;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 字体坐标Y
|
|
||||||
*/
|
|
||||||
@TableField(value = "font_position_y")
|
|
||||||
private Integer fontPositionY;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 播放时间
|
|
||||||
*/
|
|
||||||
@TableField(value = "play_time")
|
|
||||||
private Integer playTime;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 当前预置类型 1:内置模版 0:预发布信息
|
|
||||||
*/
|
|
||||||
@TableField(value = "preset_type")
|
|
||||||
private Integer presetType;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 备注
|
|
||||||
*/
|
|
||||||
@TableField(value = "remark")
|
|
||||||
private String remark;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 创建时间
|
|
||||||
*/
|
|
||||||
@TableField(value = "create_time")
|
|
||||||
private Date createTime;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 更新时间
|
|
||||||
*/
|
|
||||||
@TableField(value = "update_time")
|
|
||||||
private Date updateTime;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 创建人id
|
|
||||||
*/
|
|
||||||
@TableField(value = "create_by")
|
|
||||||
private Integer createBy;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 更新人id
|
|
||||||
*/
|
|
||||||
@TableField(value = "update_by")
|
|
||||||
private Integer updateBy;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 是否水平居中
|
|
||||||
*/
|
|
||||||
@TableField(value = "horizontal_center")
|
|
||||||
private Boolean horizontalCenter;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 是否垂直居中
|
|
||||||
*/
|
|
||||||
@TableField(value = "vertical_center")
|
|
||||||
private Boolean verticalCenter;
|
|
||||||
}
|
|
|
@ -1,24 +1,7 @@
|
||||||
package com.ruoyi.board.domain.enums;
|
package com.ruoyi.board.domain.enums;
|
||||||
|
|
||||||
import com.ruoyi.board.domain.PlanType;
|
|
||||||
import com.ruoyi.board.service.IPlanTypeService;
|
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
|
||||||
import org.springframework.stereotype.Component;
|
|
||||||
|
|
||||||
import java.util.HashMap;
|
|
||||||
import java.util.List;
|
|
||||||
import java.util.Map;
|
|
||||||
import java.util.stream.Collectors;
|
|
||||||
|
|
||||||
@Component
|
|
||||||
public class AlertPlanType {
|
public class AlertPlanType {
|
||||||
|
|
||||||
static Map<String, Long> typeNameIDMap = new HashMap<>();
|
|
||||||
|
|
||||||
@Autowired
|
|
||||||
private IPlanTypeService planTypeService;
|
|
||||||
|
|
||||||
|
|
||||||
public static int getPlanTypeByName(String planTypeName) {
|
public static int getPlanTypeByName(String planTypeName) {
|
||||||
// 0:雾,1:雨,2:雪
|
// 0:雾,1:雨,2:雪
|
||||||
switch (planTypeName) {
|
switch (planTypeName) {
|
||||||
|
@ -32,17 +15,4 @@ public class AlertPlanType {
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public void setTypeNameIDMap() {
|
|
||||||
typeNameIDMap.clear();
|
|
||||||
List<PlanType> planTypeList = planTypeService.list();
|
|
||||||
typeNameIDMap.putAll(planTypeList.stream()
|
|
||||||
.collect(Collectors.toMap(
|
|
||||||
PlanType::getTypeName,
|
|
||||||
PlanType::getId
|
|
||||||
)));
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,7 +0,0 @@
|
||||||
package com.ruoyi.board.mapper;
|
|
||||||
|
|
||||||
import com.github.yulichang.base.MPJBaseMapper;
|
|
||||||
import com.ruoyi.board.domain.BoardProtocol;
|
|
||||||
|
|
||||||
public interface BoardProtocolMapper extends MPJBaseMapper<BoardProtocol> {
|
|
||||||
}
|
|
|
@ -1,7 +0,0 @@
|
||||||
package com.ruoyi.board.mapper;
|
|
||||||
|
|
||||||
import com.github.yulichang.base.MPJBaseMapper;
|
|
||||||
import com.ruoyi.board.domain.PubWhiteIp;
|
|
||||||
|
|
||||||
public interface PubWhiteIpMapper extends MPJBaseMapper<PubWhiteIp> {
|
|
||||||
}
|
|
|
@ -1,7 +0,0 @@
|
||||||
package com.ruoyi.board.mapper;
|
|
||||||
|
|
||||||
import com.github.yulichang.base.MPJBaseMapper;
|
|
||||||
import com.ruoyi.board.domain.ReleaseLog;
|
|
||||||
|
|
||||||
public interface ReleaseLogMapper extends MPJBaseMapper<ReleaseLog> {
|
|
||||||
}
|
|
|
@ -10,9 +10,7 @@ public interface IAlertPlanService extends MPJBaseService<AlertPlan> {
|
||||||
|
|
||||||
List<AlertPlanAndPlanTypeDTO> listPage(AlertPlan alertPlan);
|
List<AlertPlanAndPlanTypeDTO> listPage(AlertPlan alertPlan);
|
||||||
|
|
||||||
AlertPlan getOneByTypeAndValue(Long type, Double value);
|
AlertPlan getOneByTypeAndValue(Integer type, Double value);
|
||||||
|
|
||||||
AlertPlanAndPlanTypeDTO getDTOById(Long id);
|
AlertPlanAndPlanTypeDTO getDTOById(Long id);
|
||||||
|
|
||||||
AlertPlan getOneByPresetContentId(Integer id, Integer typeId);
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -8,7 +8,9 @@ import java.util.List;
|
||||||
|
|
||||||
public interface IBoardInfoService extends MPJBaseService<BoardInfo> {
|
public interface IBoardInfoService extends MPJBaseService<BoardInfo> {
|
||||||
|
|
||||||
BoardInfoAndRoadDTO getOneByIP(String ip);
|
BoardInfo getOneByIP(String ip);
|
||||||
|
|
||||||
|
List<BoardInfo> listPage(BoardInfo boardInfo);
|
||||||
|
|
||||||
List<BoardInfoAndRoadDTO> listBoardInfoDTO(BoardInfo boardInfo);
|
List<BoardInfoAndRoadDTO> listBoardInfoDTO(BoardInfo boardInfo);
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,11 +0,0 @@
|
||||||
package com.ruoyi.board.service;
|
|
||||||
|
|
||||||
import com.github.yulichang.base.MPJBaseService;
|
|
||||||
import com.ruoyi.board.domain.BoardProtocol;
|
|
||||||
import com.ruoyi.common.core.domain.TreeSelect;
|
|
||||||
|
|
||||||
import java.util.List;
|
|
||||||
|
|
||||||
public interface IBoardProtocolService extends MPJBaseService<BoardProtocol> {
|
|
||||||
List<TreeSelect> listProtocolTree(BoardProtocol planType);
|
|
||||||
}
|
|
|
@ -3,8 +3,5 @@ package com.ruoyi.board.service;
|
||||||
import com.github.yulichang.base.MPJBaseService;
|
import com.github.yulichang.base.MPJBaseService;
|
||||||
import com.ruoyi.board.domain.BoardType;
|
import com.ruoyi.board.domain.BoardType;
|
||||||
|
|
||||||
import java.util.List;
|
|
||||||
|
|
||||||
public interface IBoardTypeService extends MPJBaseService<BoardType> {
|
public interface IBoardTypeService extends MPJBaseService<BoardType> {
|
||||||
List<BoardType> listByParams(BoardType boardType);
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -2,13 +2,12 @@ package com.ruoyi.board.service;
|
||||||
|
|
||||||
import com.github.yulichang.base.MPJBaseService;
|
import com.github.yulichang.base.MPJBaseService;
|
||||||
import com.ruoyi.board.domain.PresetContent;
|
import com.ruoyi.board.domain.PresetContent;
|
||||||
import com.ruoyi.board.domain.dto.PresetContentDTO;
|
|
||||||
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
public interface IPresetContentService extends MPJBaseService<PresetContent> {
|
public interface IPresetContentService extends MPJBaseService<PresetContent> {
|
||||||
|
|
||||||
PresetContent getOneByContentAndBoardSize(String content, String boardSize, Long type);
|
PresetContent getOneByContentAndBoardSize(String content, String boardSize, Integer type);
|
||||||
|
|
||||||
List<PresetContentDTO> listDTO(PresetContent presetContent);
|
List<PresetContent> listPage(PresetContent presetContent);
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,7 +0,0 @@
|
||||||
package com.ruoyi.board.service;
|
|
||||||
|
|
||||||
import com.github.yulichang.base.MPJBaseService;
|
|
||||||
import com.ruoyi.board.domain.PubWhiteIp;
|
|
||||||
|
|
||||||
public interface IPubWhiteIpService extends MPJBaseService<PubWhiteIp> {
|
|
||||||
}
|
|
|
@ -1,7 +0,0 @@
|
||||||
package com.ruoyi.board.service;
|
|
||||||
|
|
||||||
import com.github.yulichang.base.MPJBaseService;
|
|
||||||
import com.ruoyi.board.domain.ReleaseLog;
|
|
||||||
|
|
||||||
public interface IReleaseLogService extends MPJBaseService<ReleaseLog> {
|
|
||||||
}
|
|
|
@ -2,9 +2,13 @@ package com.ruoyi.board.service;
|
||||||
|
|
||||||
import com.github.yulichang.base.MPJBaseService;
|
import com.github.yulichang.base.MPJBaseService;
|
||||||
import com.ruoyi.board.domain.ReleaseRecord;
|
import com.ruoyi.board.domain.ReleaseRecord;
|
||||||
|
import com.ruoyi.board.domain.dto.ReleaseRecordAndPresetContentDTO;
|
||||||
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
public interface IReleaseRecordService extends MPJBaseService<ReleaseRecord> {
|
public interface IReleaseRecordService extends MPJBaseService<ReleaseRecord> {
|
||||||
|
|
||||||
|
List<ReleaseRecordAndPresetContentDTO> listLatest2minRecordDtoByBoardId(Integer boardId);
|
||||||
|
|
||||||
List<ReleaseRecord> listLatest2minRecordByBoardId(Integer boardId);
|
List<ReleaseRecord> listLatest2minRecordByBoardId(Integer boardId);
|
||||||
}
|
}
|
||||||
|
|
|
@ -5,7 +5,6 @@ import com.github.yulichang.base.MPJBaseServiceImpl;
|
||||||
import com.github.yulichang.wrapper.MPJLambdaWrapper;
|
import com.github.yulichang.wrapper.MPJLambdaWrapper;
|
||||||
import com.ruoyi.board.domain.AlertPlan;
|
import com.ruoyi.board.domain.AlertPlan;
|
||||||
import com.ruoyi.board.domain.PlanType;
|
import com.ruoyi.board.domain.PlanType;
|
||||||
import com.ruoyi.board.domain.PresetContent;
|
|
||||||
import com.ruoyi.board.domain.dto.AlertPlanAndPlanTypeDTO;
|
import com.ruoyi.board.domain.dto.AlertPlanAndPlanTypeDTO;
|
||||||
import com.ruoyi.board.mapper.AlertPlanMapper;
|
import com.ruoyi.board.mapper.AlertPlanMapper;
|
||||||
import com.ruoyi.board.service.IAlertPlanService;
|
import com.ruoyi.board.service.IAlertPlanService;
|
||||||
|
@ -26,15 +25,13 @@ public class AlertPlanServiceImpl extends MPJBaseServiceImpl<AlertPlanMapper, Al
|
||||||
MPJLambdaWrapper<AlertPlan> eq = new MPJLambdaWrapper<AlertPlan>()
|
MPJLambdaWrapper<AlertPlan> eq = new MPJLambdaWrapper<AlertPlan>()
|
||||||
.selectAll(AlertPlan.class)
|
.selectAll(AlertPlan.class)
|
||||||
.select(PlanType::getTypeName)
|
.select(PlanType::getTypeName)
|
||||||
.selectAs(PresetContent::getName, "preset_content_name")
|
|
||||||
.leftJoin(PlanType.class, PlanType::getId, AlertPlan::getType)
|
.leftJoin(PlanType.class, PlanType::getId, AlertPlan::getType)
|
||||||
.leftJoin(PresetContent.class, PresetContent::getId, AlertPlan::getPresetContentId)
|
|
||||||
.eq(ObjectUtils.isNotEmpty(alertPlan.getType()), AlertPlan::getType, alertPlan.getType());
|
.eq(ObjectUtils.isNotEmpty(alertPlan.getType()), AlertPlan::getType, alertPlan.getType());
|
||||||
return selectJoinList(AlertPlanAndPlanTypeDTO.class, eq);
|
return selectJoinList(AlertPlanAndPlanTypeDTO.class, eq);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public AlertPlan getOneByTypeAndValue(Long planType, Double value) {
|
public AlertPlan getOneByTypeAndValue(Integer planType, Double value) {
|
||||||
if (planType < 0) {
|
if (planType < 0) {
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
@ -56,12 +53,4 @@ public class AlertPlanServiceImpl extends MPJBaseServiceImpl<AlertPlanMapper, Al
|
||||||
return selectJoinOne(AlertPlanAndPlanTypeDTO.class, eq);
|
return selectJoinOne(AlertPlanAndPlanTypeDTO.class, eq);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
|
||||||
public AlertPlan getOneByPresetContentId(Integer id, Integer typeId) {
|
|
||||||
LambdaQueryWrapper<AlertPlan> alertPlanLambdaQueryWrapper = new LambdaQueryWrapper<>();
|
|
||||||
alertPlanLambdaQueryWrapper.eq(AlertPlan::getPresetContentId, id);
|
|
||||||
alertPlanLambdaQueryWrapper.eq(AlertPlan::getType, typeId);
|
|
||||||
return getOne(alertPlanLambdaQueryWrapper);
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,10 +1,9 @@
|
||||||
package com.ruoyi.board.service.impl;
|
package com.ruoyi.board.service.impl;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||||
import com.github.yulichang.base.MPJBaseServiceImpl;
|
import com.github.yulichang.base.MPJBaseServiceImpl;
|
||||||
import com.github.yulichang.wrapper.MPJLambdaWrapper;
|
import com.github.yulichang.wrapper.MPJLambdaWrapper;
|
||||||
import com.ruoyi.board.domain.BoardInfo;
|
import com.ruoyi.board.domain.BoardInfo;
|
||||||
import com.ruoyi.board.domain.BoardProtocol;
|
|
||||||
import com.ruoyi.board.domain.BoardType;
|
|
||||||
import com.ruoyi.board.domain.RoadGroup;
|
import com.ruoyi.board.domain.RoadGroup;
|
||||||
import com.ruoyi.board.domain.dto.BoardInfoAndRoadDTO;
|
import com.ruoyi.board.domain.dto.BoardInfoAndRoadDTO;
|
||||||
import com.ruoyi.board.mapper.BoardInfoMapper;
|
import com.ruoyi.board.mapper.BoardInfoMapper;
|
||||||
|
@ -18,32 +17,33 @@ import java.util.List;
|
||||||
public class BoardInfoServiceImpl extends MPJBaseServiceImpl<BoardInfoMapper, BoardInfo> implements IBoardInfoService {
|
public class BoardInfoServiceImpl extends MPJBaseServiceImpl<BoardInfoMapper, BoardInfo> implements IBoardInfoService {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public BoardInfoAndRoadDTO getOneByIP(String ip) {
|
public BoardInfo getOneByIP(String ip) {
|
||||||
MPJLambdaWrapper<BoardInfo> eq = condition()
|
LambdaQueryWrapper<BoardInfo> boardInfoLambdaQueryWrapper = new LambdaQueryWrapper<>();
|
||||||
.eq(StringUtils.isNotEmpty(ip), BoardInfo::getBoardIp, ip);
|
boardInfoLambdaQueryWrapper.eq(BoardInfo::getBoardIp, ip);
|
||||||
return selectJoinOne(BoardInfoAndRoadDTO.class, eq);
|
return getOne(boardInfoLambdaQueryWrapper);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public List<BoardInfo> listPage(BoardInfo boardInfo) {
|
||||||
|
LambdaQueryWrapper<BoardInfo> wrapper = new LambdaQueryWrapper<>();
|
||||||
|
wrapper.likeRight(StringUtils.isNotEmpty(boardInfo.getBoardName()), BoardInfo::getBoardName, boardInfo.getBoardName());
|
||||||
|
wrapper.likeRight(StringUtils.isNotEmpty(boardInfo.getBoardMileage()), BoardInfo::getBoardMileage, boardInfo.getBoardMileage());
|
||||||
|
wrapper.eq(StringUtils.isNotEmpty(boardInfo.getBoardSize()), BoardInfo::getBoardSize, boardInfo.getBoardSize());
|
||||||
|
wrapper.eq(StringUtils.isNotEmpty(boardInfo.getBoardBrand()), BoardInfo::getBoardBrand, boardInfo.getBoardBrand());
|
||||||
|
wrapper.eq(StringUtils.isNotEmpty(boardInfo.getBoardCommunicationProtocol()), BoardInfo::getBoardCommunicationProtocol, boardInfo.getBoardCommunicationProtocol());
|
||||||
|
wrapper.eq(StringUtils.isNotEmpty(boardInfo.getBoardRoadSection()), BoardInfo::getBoardRoadSection, boardInfo.getBoardRoadSection());
|
||||||
|
return list(wrapper);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public List<BoardInfoAndRoadDTO> listBoardInfoDTO(BoardInfo boardInfo) {
|
public List<BoardInfoAndRoadDTO> listBoardInfoDTO(BoardInfo boardInfo) {
|
||||||
MPJLambdaWrapper<BoardInfo> eq = condition()
|
MPJLambdaWrapper<BoardInfo> eq = new MPJLambdaWrapper<BoardInfo>()
|
||||||
|
.selectAll(BoardInfo.class)
|
||||||
|
.select(RoadGroup::getRoadName)
|
||||||
|
.leftJoin(RoadGroup.class, RoadGroup::getId, BoardInfo::getBoardRoadSection)
|
||||||
.likeRight(StringUtils.isNotEmpty(boardInfo.getBoardName()), BoardInfo::getBoardName, boardInfo.getBoardName())
|
.likeRight(StringUtils.isNotEmpty(boardInfo.getBoardName()), BoardInfo::getBoardName, boardInfo.getBoardName())
|
||||||
.likeRight(StringUtils.isNotEmpty(boardInfo.getBoardMileage()), BoardInfo::getBoardMileage, boardInfo.getBoardMileage())
|
.likeRight(StringUtils.isNotEmpty(boardInfo.getBoardMileage()), BoardInfo::getBoardMileage, boardInfo.getBoardMileage())
|
||||||
.eq(StringUtils.isNotEmpty(boardInfo.getBoardRoadSection()), BoardInfo::getBoardRoadSection, boardInfo.getBoardRoadSection());
|
.eq(StringUtils.isNotEmpty(boardInfo.getBoardRoadSection()), BoardInfo::getBoardRoadSection, boardInfo.getBoardRoadSection());
|
||||||
return selectJoinList(BoardInfoAndRoadDTO.class, eq);
|
return selectJoinList(BoardInfoAndRoadDTO.class, eq);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
private MPJLambdaWrapper<BoardInfo> condition() {
|
|
||||||
return new MPJLambdaWrapper<BoardInfo>()
|
|
||||||
.selectAll(BoardInfo.class)
|
|
||||||
.select(RoadGroup::getRoadName)
|
|
||||||
.selectAs(BoardType::getName, "board_size_name")
|
|
||||||
.selectAs(BoardType::getSize, "board_size")
|
|
||||||
.selectAs(BoardProtocol::getBrand, "board_brand_name")
|
|
||||||
.selectAs(BoardProtocol::getProtocol, "board_protocol_name")
|
|
||||||
.leftJoin(RoadGroup.class, RoadGroup::getId, BoardInfo::getBoardRoadSection)
|
|
||||||
.leftJoin(BoardType.class, BoardType::getId, BoardInfo::getBoardSizeType)
|
|
||||||
.leftJoin(BoardProtocol.class, BoardProtocol::getId, BoardInfo::getBoardBrandProtocol);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,47 +0,0 @@
|
||||||
package com.ruoyi.board.service.impl;
|
|
||||||
|
|
||||||
import com.github.yulichang.base.MPJBaseServiceImpl;
|
|
||||||
import com.ruoyi.board.domain.BoardProtocol;
|
|
||||||
import com.ruoyi.board.mapper.BoardProtocolMapper;
|
|
||||||
import com.ruoyi.board.service.IBoardProtocolService;
|
|
||||||
import com.ruoyi.common.core.domain.TreeSelect;
|
|
||||||
import org.slf4j.Logger;
|
|
||||||
import org.slf4j.LoggerFactory;
|
|
||||||
import org.springframework.stereotype.Service;
|
|
||||||
|
|
||||||
import java.util.ArrayList;
|
|
||||||
import java.util.List;
|
|
||||||
import java.util.Map;
|
|
||||||
import java.util.stream.Collectors;
|
|
||||||
|
|
||||||
@Service
|
|
||||||
public class BoardProtocolServiceImpl extends MPJBaseServiceImpl<BoardProtocolMapper, BoardProtocol> implements IBoardProtocolService {
|
|
||||||
private static final Logger log = LoggerFactory.getLogger(BoardProtocolServiceImpl.class);
|
|
||||||
private static final Long DEFAULT_ID = 0L;
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public List<TreeSelect> listProtocolTree(BoardProtocol planType) {
|
|
||||||
List<BoardProtocol> protocols = list();
|
|
||||||
Map<String, List<BoardProtocol>> protocolsByBrand = protocols.stream().collect(Collectors.groupingBy(BoardProtocol::getBrand));
|
|
||||||
List<TreeSelect> treeSelects = new ArrayList<>();
|
|
||||||
protocolsByBrand.forEach((brand, brandProtocols) -> treeSelects.add(createTreeSelectForBrand(brand, brandProtocols)));
|
|
||||||
return treeSelects;
|
|
||||||
}
|
|
||||||
|
|
||||||
private TreeSelect createTreeSelectForBrand(String brand, List<BoardProtocol> brandProtocols) {
|
|
||||||
TreeSelect treeSelect = new TreeSelect();
|
|
||||||
treeSelect.setLabel(brand);
|
|
||||||
treeSelect.setId(DEFAULT_ID);
|
|
||||||
treeSelect.setChildren(brandProtocols.stream().map(this::mapToTreeSelect).collect(Collectors.toList()));
|
|
||||||
return treeSelect;
|
|
||||||
}
|
|
||||||
|
|
||||||
private TreeSelect mapToTreeSelect(BoardProtocol protocol) {
|
|
||||||
TreeSelect treeSelect = new TreeSelect();
|
|
||||||
treeSelect.setId(protocol.getId());
|
|
||||||
treeSelect.setLabel(protocol.getProtocol());
|
|
||||||
return treeSelect;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
}
|
|
|
@ -1,21 +1,11 @@
|
||||||
package com.ruoyi.board.service.impl;
|
package com.ruoyi.board.service.impl;
|
||||||
|
|
||||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
|
||||||
import com.github.yulichang.base.MPJBaseServiceImpl;
|
import com.github.yulichang.base.MPJBaseServiceImpl;
|
||||||
import com.ruoyi.board.domain.BoardType;
|
import com.ruoyi.board.domain.BoardType;
|
||||||
import com.ruoyi.board.mapper.BoardTypeMapper;
|
import com.ruoyi.board.mapper.BoardTypeMapper;
|
||||||
import com.ruoyi.board.service.IBoardTypeService;
|
import com.ruoyi.board.service.IBoardTypeService;
|
||||||
import com.ruoyi.common.utils.StringUtils;
|
|
||||||
import org.springframework.stereotype.Service;
|
import org.springframework.stereotype.Service;
|
||||||
|
|
||||||
import java.util.List;
|
|
||||||
|
|
||||||
@Service
|
@Service
|
||||||
public class BoardTypeServiceImpl extends MPJBaseServiceImpl<BoardTypeMapper, BoardType> implements IBoardTypeService {
|
public class BoardTypeServiceImpl extends MPJBaseServiceImpl<BoardTypeMapper, BoardType> implements IBoardTypeService {
|
||||||
@Override
|
|
||||||
public List<BoardType> listByParams(BoardType boardType) {
|
|
||||||
LambdaQueryWrapper<BoardType> boardTypeLambdaQueryWrapper = new LambdaQueryWrapper<>();
|
|
||||||
boardTypeLambdaQueryWrapper.likeRight(StringUtils.isNotEmpty(boardType.getName()), BoardType::getName, boardType.getName());
|
|
||||||
return list(boardTypeLambdaQueryWrapper);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -33,7 +33,7 @@ public class PlanTypeServiceImpl extends MPJBaseServiceImpl<PlanTypeMapper, Plan
|
||||||
treeSelect.setLabel(planType.getTypeName());
|
treeSelect.setLabel(planType.getTypeName());
|
||||||
treeSelect.setChildren(childTreeSelectList);
|
treeSelect.setChildren(childTreeSelectList);
|
||||||
return treeSelect;
|
return treeSelect;
|
||||||
}
|
};
|
||||||
|
|
||||||
private List<PlanType> buildPlanTree(List<PlanType> list) {
|
private List<PlanType> buildPlanTree(List<PlanType> list) {
|
||||||
List<PlanType> returnList = new ArrayList<>();
|
List<PlanType> returnList = new ArrayList<>();
|
||||||
|
|
|
@ -2,38 +2,33 @@ package com.ruoyi.board.service.impl;
|
||||||
|
|
||||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||||
import com.github.yulichang.base.MPJBaseServiceImpl;
|
import com.github.yulichang.base.MPJBaseServiceImpl;
|
||||||
import com.github.yulichang.wrapper.MPJLambdaWrapper;
|
import com.ruoyi.common.utils.StringUtils;
|
||||||
import com.ruoyi.board.domain.BoardType;
|
import org.apache.commons.lang3.ObjectUtils;
|
||||||
import com.ruoyi.board.domain.PlanType;
|
|
||||||
import com.ruoyi.board.domain.PresetContent;
|
|
||||||
import com.ruoyi.board.domain.dto.PresetContentDTO;
|
|
||||||
import com.ruoyi.board.mapper.PresetContentMapper;
|
|
||||||
import com.ruoyi.board.service.IPresetContentService;
|
|
||||||
import org.springframework.stereotype.Service;
|
import org.springframework.stereotype.Service;
|
||||||
|
import com.ruoyi.board.mapper.PresetContentMapper;
|
||||||
|
import com.ruoyi.board.domain.PresetContent;
|
||||||
|
import com.ruoyi.board.service.IPresetContentService;
|
||||||
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
@Service
|
@Service
|
||||||
public class PresetContentServiceImpl extends MPJBaseServiceImpl<PresetContentMapper, PresetContent> implements IPresetContentService {
|
public class PresetContentServiceImpl extends MPJBaseServiceImpl<PresetContentMapper, PresetContent> implements IPresetContentService {
|
||||||
@Override
|
@Override
|
||||||
public PresetContent getOneByContentAndBoardSize(String content, String boardSize, Long type) {
|
public PresetContent getOneByContentAndBoardSize(String content, String boardSize, Integer type) {
|
||||||
LambdaQueryWrapper<PresetContent> queryWrapper = new LambdaQueryWrapper<>();
|
LambdaQueryWrapper<PresetContent> queryWrapper = new LambdaQueryWrapper<>();
|
||||||
queryWrapper
|
queryWrapper
|
||||||
.eq(PresetContent::getContent, content)
|
.eq(PresetContent::getContent, content)
|
||||||
.eq(PresetContent::getBoardSizeType, boardSize)
|
.eq(PresetContent::getBoardSize, boardSize)
|
||||||
.eq(PresetContent::getInfoType, type);
|
.eq(PresetContent::getInfoType, type);
|
||||||
return getOne(queryWrapper);
|
return getOne(queryWrapper);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public List<PresetContentDTO> listDTO(PresetContent presetContent) {
|
public List<PresetContent> listPage(PresetContent presetContent) {
|
||||||
MPJLambdaWrapper<PresetContent> eq = new MPJLambdaWrapper<PresetContent>()
|
LambdaQueryWrapper<PresetContent> queryWrapper = new LambdaQueryWrapper<>();
|
||||||
.selectAll(PresetContent.class)
|
queryWrapper.likeRight(StringUtils.isNotEmpty(presetContent.getName()), PresetContent::getName, presetContent.getName());
|
||||||
.selectAs(PlanType::getTypeName, "type_name")
|
queryWrapper.eq(StringUtils.isNotEmpty(presetContent.getBoardSize()), PresetContent::getBoardSize, presetContent.getBoardSize());
|
||||||
.selectAs(BoardType::getName,"board_size_type_name")
|
queryWrapper.eq(ObjectUtils.isNotEmpty(presetContent.getInfoType()), PresetContent::getInfoType, presetContent.getInfoType());
|
||||||
.leftJoin(PlanType.class, PlanType::getId, PresetContent::getInfoType)
|
return list(queryWrapper);
|
||||||
.leftJoin(BoardType.class, BoardType::getId, PresetContent::getBoardSizeType)
|
|
||||||
.eq(presetContent.getInfoType() != null && presetContent.getInfoType() > 0, PresetContent::getInfoType, presetContent.getInfoType());
|
|
||||||
return selectJoinList(PresetContentDTO.class, eq);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,11 +0,0 @@
|
||||||
package com.ruoyi.board.service.impl;
|
|
||||||
|
|
||||||
import com.github.yulichang.base.MPJBaseServiceImpl;
|
|
||||||
import com.ruoyi.board.domain.PubWhiteIp;
|
|
||||||
import com.ruoyi.board.mapper.PubWhiteIpMapper;
|
|
||||||
import com.ruoyi.board.service.IPubWhiteIpService;
|
|
||||||
import org.springframework.stereotype.Service;
|
|
||||||
|
|
||||||
@Service
|
|
||||||
public class PubWhiteIpServiceImpl extends MPJBaseServiceImpl<PubWhiteIpMapper, PubWhiteIp> implements IPubWhiteIpService {
|
|
||||||
}
|
|
|
@ -1,12 +0,0 @@
|
||||||
package com.ruoyi.board.service.impl;
|
|
||||||
|
|
||||||
import com.github.yulichang.base.MPJBaseServiceImpl;
|
|
||||||
import com.ruoyi.board.domain.ReleaseLog;
|
|
||||||
import com.ruoyi.board.mapper.ReleaseLogMapper;
|
|
||||||
import com.ruoyi.board.service.IReleaseLogService;
|
|
||||||
import org.springframework.stereotype.Service;
|
|
||||||
|
|
||||||
@Service
|
|
||||||
public class ReleaseLogServiceImpl extends MPJBaseServiceImpl<ReleaseLogMapper, ReleaseLog> implements IReleaseLogService {
|
|
||||||
|
|
||||||
}
|
|
|
@ -20,9 +20,23 @@ import java.util.List;
|
||||||
public class ReleaseRecordServiceImpl extends MPJBaseServiceImpl<ReleaseRecordMapper, ReleaseRecord> implements IReleaseRecordService {
|
public class ReleaseRecordServiceImpl extends MPJBaseServiceImpl<ReleaseRecordMapper, ReleaseRecord> implements IReleaseRecordService {
|
||||||
private static final Logger log = LoggerFactory.getLogger(ReleaseRecordServiceImpl.class);
|
private static final Logger log = LoggerFactory.getLogger(ReleaseRecordServiceImpl.class);
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public List<ReleaseRecordAndPresetContentDTO> listLatest2minRecordDtoByBoardId(Integer boardId) {
|
||||||
|
Date before2min = new Date(System.currentTimeMillis() - 30 * 60 * 1000);
|
||||||
|
return selectJoinList(ReleaseRecordAndPresetContentDTO.class,
|
||||||
|
new MPJLambdaWrapper<ReleaseRecord>()
|
||||||
|
.selectAll(ReleaseRecord.class)
|
||||||
|
.select(PresetContent::getInfoType)
|
||||||
|
.leftJoin(PresetContent.class, PresetContent::getId, ReleaseRecord::getPresetContentId)
|
||||||
|
.eq(ReleaseRecord::getBoardId, boardId)
|
||||||
|
.gt(ReleaseRecord::getCreateTime, before2min)
|
||||||
|
.eq(PresetContent::getPresetType, 0)
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public List<ReleaseRecord> listLatest2minRecordByBoardId(Integer boardId) {
|
public List<ReleaseRecord> listLatest2minRecordByBoardId(Integer boardId) {
|
||||||
Date before2min = new Date(System.currentTimeMillis() - 2 * 60 * 1000);
|
Date before2min = new Date(System.currentTimeMillis() - 30 * 60 * 1000);
|
||||||
LambdaQueryWrapper<ReleaseRecord> queryWrapper = new LambdaQueryWrapper<>();
|
LambdaQueryWrapper<ReleaseRecord> queryWrapper = new LambdaQueryWrapper<>();
|
||||||
queryWrapper.eq(ReleaseRecord::getBoardId, boardId)
|
queryWrapper.eq(ReleaseRecord::getBoardId, boardId)
|
||||||
.gt(ReleaseRecord::getCreateTime, before2min);
|
.gt(ReleaseRecord::getCreateTime, before2min);
|
||||||
|
|
|
@ -4,7 +4,7 @@ import lombok.Getter;
|
||||||
|
|
||||||
@Getter
|
@Getter
|
||||||
public enum ProtocolDefault {
|
public enum ProtocolDefault {
|
||||||
SanSi(1, "三思", 2929),;
|
SanSi(1, "SanSi", 2929),;
|
||||||
private final Integer id;
|
private final Integer id;
|
||||||
private final String name;
|
private final String name;
|
||||||
private final Integer port;
|
private final Integer port;
|
||||||
|
|
|
@ -1,8 +1,8 @@
|
||||||
package com.ruoyi.protocol.sansi;
|
package com.ruoyi.protocol.sansi;
|
||||||
|
|
||||||
import com.alibaba.fastjson2.JSON;
|
import com.alibaba.fastjson2.JSON;
|
||||||
|
import com.ruoyi.board.domain.BoardInfo;
|
||||||
import com.ruoyi.board.domain.PresetContent;
|
import com.ruoyi.board.domain.PresetContent;
|
||||||
import com.ruoyi.board.domain.dto.BoardInfoAndRoadDTO;
|
|
||||||
import com.ruoyi.common.utils.DateUtils;
|
import com.ruoyi.common.utils.DateUtils;
|
||||||
import com.ruoyi.common.utils.StringUtils;
|
import com.ruoyi.common.utils.StringUtils;
|
||||||
import com.ruoyi.protocol.enums.ProtocolDefault;
|
import com.ruoyi.protocol.enums.ProtocolDefault;
|
||||||
|
@ -32,7 +32,7 @@ public class SanSiProtocol implements IProtocolService {
|
||||||
private static final Logger log = LoggerFactory.getLogger(SanSiProtocol.class);
|
private static final Logger log = LoggerFactory.getLogger(SanSiProtocol.class);
|
||||||
Integer deviceId = 0;
|
Integer deviceId = 0;
|
||||||
|
|
||||||
private String createTextItem(List<PresetContent> presetContentList, BoardInfoAndRoadDTO boardInfo) {
|
private String createTextItem(List<PresetContent> presetContentList, BoardInfo boardInfo) {
|
||||||
Animation animation = new Animation();
|
Animation animation = new Animation();
|
||||||
animation.setInAnimation(0);
|
animation.setInAnimation(0);
|
||||||
animation.setInAnimationSpeed(200);
|
animation.setInAnimationSpeed(200);
|
||||||
|
@ -42,7 +42,7 @@ public class SanSiProtocol implements IProtocolService {
|
||||||
presetContentList.forEach(i -> {
|
presetContentList.forEach(i -> {
|
||||||
TextBase textBase = new TextBase(0, i.getContent());
|
TextBase textBase = new TextBase(0, i.getContent());
|
||||||
textBase.setFontSize(i.getFontSize()+","+i.getFontSize());
|
textBase.setFontSize(i.getFontSize()+","+i.getFontSize());
|
||||||
textBase.setFontName(SanSiFontStyle.getStyleValueByName(i.getFontFamily()));
|
textBase.setFontName(SanSiFontStyle.getStyleValueByName(i.getFontStyle()));
|
||||||
textBase.setWordSpace(i.getLetterSpacing());
|
textBase.setWordSpace(i.getLetterSpacing());
|
||||||
BaseColour fontColour = SanSiFontColor.getBaseColourByColorName(i.getFontColor());
|
BaseColour fontColour = SanSiFontColor.getBaseColourByColorName(i.getFontColor());
|
||||||
if (null == fontColour) {
|
if (null == fontColour) {
|
||||||
|
@ -56,6 +56,7 @@ public class SanSiProtocol implements IProtocolService {
|
||||||
textPlayItem.setY(i.getFontPositionY());
|
textPlayItem.setY(i.getFontPositionY());
|
||||||
playItemList.add(textPlayItem);
|
playItemList.add(textPlayItem);
|
||||||
});
|
});
|
||||||
|
|
||||||
String boardSize = boardInfo.getBoardSize();
|
String boardSize = boardInfo.getBoardSize();
|
||||||
String[] split = StringUtils.split(boardSize, "*");
|
String[] split = StringUtils.split(boardSize, "*");
|
||||||
if (split.length < 2) {
|
if (split.length < 2) {
|
||||||
|
@ -66,12 +67,12 @@ public class SanSiProtocol implements IProtocolService {
|
||||||
int width = Integer.parseInt(split[1]);
|
int width = Integer.parseInt(split[1]);
|
||||||
|
|
||||||
AreaPositon areaPositon = new AreaPositon(0, 0, height, width, 0);
|
AreaPositon areaPositon = new AreaPositon(0, 0, height, width, 0);
|
||||||
AreaItem areaItem = new AreaItem("2", "areaItem", areaPositon, playItemList);
|
AreaItem areaItem = new AreaItem("1", "areaItem", areaPositon, playItemList);
|
||||||
|
|
||||||
List<AreaItem> areaItemList = new ArrayList<>();
|
List<AreaItem> areaItemList = new ArrayList<>();
|
||||||
areaItemList.add(areaItem);
|
areaItemList.add(areaItem);
|
||||||
|
|
||||||
PageItem pageItem = new PageItem("2", "pageItem", areaItemList);
|
PageItem pageItem = new PageItem("1", "pageItem", areaItemList);
|
||||||
PlayListFcms plf = new PlayListFcms();
|
PlayListFcms plf = new PlayListFcms();
|
||||||
|
|
||||||
String path = "./protocolFile/SanSi/" + DateUtils.dateTimeNow();
|
String path = "./protocolFile/SanSi/" + DateUtils.dateTimeNow();
|
||||||
|
@ -92,16 +93,19 @@ public class SanSiProtocol implements IProtocolService {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean protocolSupport(String protocolName) {
|
public boolean protocolSupport(String protocolName) {
|
||||||
return StringUtils.contains(protocolName, ProtocolDefault.SanSi.getName());
|
return StringUtils.equals(ProtocolDefault.SanSi.getName(), protocolName);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void loginDevice(BoardInfoAndRoadDTO boardInfo) {
|
public void loginDevice(BoardInfo boardInfo) {
|
||||||
if (deviceId > 10) {
|
if (deviceId > 10) {
|
||||||
deviceId = 0;
|
deviceId = 0;
|
||||||
}
|
}
|
||||||
deviceId++;
|
deviceId++;
|
||||||
DeviceVar.deviceInforInit(Integer.toString(deviceId), 1, boardInfo.getBoardIp(), ProtocolDefault.SanSi.getPort(), 2048);
|
if (boardInfo.getBoardPort()<1) {
|
||||||
|
boardInfo.setBoardPort(ProtocolDefault.SanSi.getPort());
|
||||||
|
}
|
||||||
|
DeviceVar.deviceInforInit(Integer.toString(deviceId), 1, boardInfo.getBoardIp(), boardInfo.getBoardPort(), 2048);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
@ -110,7 +114,7 @@ public class SanSiProtocol implements IProtocolService {
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void publishContent(BoardInfoAndRoadDTO boardInfo, List<PresetContent> presetContentList) {
|
public void publishContent(BoardInfo boardInfo, List<PresetContent> presetContentList) {
|
||||||
String path = createTextItem(presetContentList, boardInfo);
|
String path = createTextItem(presetContentList, boardInfo);
|
||||||
uploadAndStartPlayList(path);
|
uploadAndStartPlayList(path);
|
||||||
}
|
}
|
||||||
|
|
|
@ -6,9 +6,7 @@ import java.util.stream.Stream;
|
||||||
|
|
||||||
@Getter
|
@Getter
|
||||||
public enum SanSiFontStyle {
|
public enum SanSiFontStyle {
|
||||||
SongTi("SimSun", "s"),
|
SongTi("宋体", "s");
|
||||||
HeiTi("SimHei", "h"),
|
|
||||||
KaiTi("KaiTi", "k");
|
|
||||||
private final String name;
|
private final String name;
|
||||||
private final String value;
|
private final String value;
|
||||||
|
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
package com.ruoyi.protocol.service;
|
package com.ruoyi.protocol.service;
|
||||||
|
|
||||||
|
import com.ruoyi.board.domain.BoardInfo;
|
||||||
import com.ruoyi.board.domain.PresetContent;
|
import com.ruoyi.board.domain.PresetContent;
|
||||||
import com.ruoyi.board.domain.dto.BoardInfoAndRoadDTO;
|
|
||||||
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
|
@ -9,13 +9,13 @@ public interface IProtocolService {
|
||||||
|
|
||||||
boolean protocolSupport(String protocolName);
|
boolean protocolSupport(String protocolName);
|
||||||
|
|
||||||
void loginDevice(BoardInfoAndRoadDTO boardInfo);
|
void loginDevice(BoardInfo boardInfo);
|
||||||
|
|
||||||
void logoutDevice();
|
void logoutDevice();
|
||||||
|
|
||||||
void publishContent(BoardInfoAndRoadDTO boardInfo, List<PresetContent> presetContentList);
|
void publishContent(BoardInfo boardInfo, List<PresetContent> presetContentList);
|
||||||
|
|
||||||
default void publishInformation(BoardInfoAndRoadDTO boardInfo, List<PresetContent> presetContentList){
|
default void publishInformation(BoardInfo boardInfo, List<PresetContent> presetContentList){
|
||||||
// 登录
|
// 登录
|
||||||
loginDevice(boardInfo);
|
loginDevice(boardInfo);
|
||||||
// 发布
|
// 发布
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
package com.ruoyi.protocol.service.impl;
|
package com.ruoyi.protocol.service.impl;
|
||||||
|
|
||||||
|
import com.ruoyi.board.domain.BoardInfo;
|
||||||
import com.ruoyi.board.domain.PresetContent;
|
import com.ruoyi.board.domain.PresetContent;
|
||||||
import com.ruoyi.board.domain.dto.BoardInfoAndRoadDTO;
|
|
||||||
import com.ruoyi.protocol.service.IProtocolService;
|
import com.ruoyi.protocol.service.IProtocolService;
|
||||||
import org.slf4j.Logger;
|
import org.slf4j.Logger;
|
||||||
import org.slf4j.LoggerFactory;
|
import org.slf4j.LoggerFactory;
|
||||||
|
@ -16,8 +16,8 @@ public class ContentPublishingService {
|
||||||
@Autowired
|
@Autowired
|
||||||
List<IProtocolService> protocolServiceList;
|
List<IProtocolService> protocolServiceList;
|
||||||
|
|
||||||
public void contentPublish(BoardInfoAndRoadDTO boardInfo, List<PresetContent> presetContentList) {
|
public void contentPublish(BoardInfo boardInfo, List<PresetContent> presetContentList) {
|
||||||
IProtocolService iProtocolService = protocolServiceList.stream().filter(i -> i.protocolSupport(boardInfo.getBoardProtocolName())).findFirst().orElse(null);
|
IProtocolService iProtocolService = protocolServiceList.stream().filter(i -> i.protocolSupport(boardInfo.getBoardCommunicationProtocol())).findFirst().orElse(null);
|
||||||
if (iProtocolService ==null) {
|
if (iProtocolService ==null) {
|
||||||
log.error("协议不支持");
|
log.error("协议不支持");
|
||||||
return;
|
return;
|
||||||
|
|
|
@ -9,6 +9,4 @@ public interface ISensorDataService {
|
||||||
void putPerceptionParamsToMap(PerceptionParams perceptionParams);
|
void putPerceptionParamsToMap(PerceptionParams perceptionParams);
|
||||||
|
|
||||||
void handlerPerceptionMap();
|
void handlerPerceptionMap();
|
||||||
|
|
||||||
void setPlanTypeNameIdMap();
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,8 +1,14 @@
|
||||||
package com.ruoyi.sensor.service.impl;
|
package com.ruoyi.sensor.service.impl;
|
||||||
|
|
||||||
import com.ruoyi.board.domain.*;
|
import com.ruoyi.board.domain.AlertPlan;
|
||||||
import com.ruoyi.board.domain.dto.BoardInfoAndRoadDTO;
|
import com.ruoyi.board.domain.BoardInfo;
|
||||||
import com.ruoyi.board.service.*;
|
import com.ruoyi.board.domain.PresetContent;
|
||||||
|
import com.ruoyi.board.domain.ReleaseRecord;
|
||||||
|
import com.ruoyi.board.domain.enums.AlertPlanType;
|
||||||
|
import com.ruoyi.board.service.IAlertPlanService;
|
||||||
|
import com.ruoyi.board.service.IBoardInfoService;
|
||||||
|
import com.ruoyi.board.service.IPresetContentService;
|
||||||
|
import com.ruoyi.board.service.IReleaseRecordService;
|
||||||
import com.ruoyi.protocol.service.impl.ContentPublishingService;
|
import com.ruoyi.protocol.service.impl.ContentPublishingService;
|
||||||
import com.ruoyi.sensor.common.PerceptionHandlerMap;
|
import com.ruoyi.sensor.common.PerceptionHandlerMap;
|
||||||
import com.ruoyi.sensor.domain.PerceptionParams;
|
import com.ruoyi.sensor.domain.PerceptionParams;
|
||||||
|
@ -13,6 +19,7 @@ import com.ruoyi.sensor.domain.dto.PerceptionHandlerDTO;
|
||||||
import com.ruoyi.sensor.enums.PrintColor;
|
import com.ruoyi.sensor.enums.PrintColor;
|
||||||
import com.ruoyi.sensor.merchants.MerchantsHttp;
|
import com.ruoyi.sensor.merchants.MerchantsHttp;
|
||||||
import com.ruoyi.sensor.service.ISensorDataService;
|
import com.ruoyi.sensor.service.ISensorDataService;
|
||||||
|
import org.apache.commons.lang3.StringUtils;
|
||||||
import org.apache.commons.lang3.math.NumberUtils;
|
import org.apache.commons.lang3.math.NumberUtils;
|
||||||
import org.slf4j.Logger;
|
import org.slf4j.Logger;
|
||||||
import org.slf4j.LoggerFactory;
|
import org.slf4j.LoggerFactory;
|
||||||
|
@ -40,19 +47,11 @@ public class SensorDataServiceImpl implements ISensorDataService {
|
||||||
private IReleaseRecordService releaseRecordService;
|
private IReleaseRecordService releaseRecordService;
|
||||||
@Autowired
|
@Autowired
|
||||||
private ContentPublishingService contentPublishingService;
|
private ContentPublishingService contentPublishingService;
|
||||||
@Autowired
|
|
||||||
private IPlanTypeService planTypeService;
|
|
||||||
|
|
||||||
private static final Map<String, Long> planTypeNameIdMap = new HashMap<>();
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@Async
|
@Async
|
||||||
public void perceptionParamsHandler(PerceptionParams params) {
|
public void perceptionParamsHandler(PerceptionParams params) {
|
||||||
long currentContentPlanType = planTypeNameIdMap.getOrDefault(params.getPerceptionType(), (long) -1);
|
int currentContentPlanType = AlertPlanType.getPlanTypeByName(params.getPerceptionType());
|
||||||
if (currentContentPlanType == -1) {
|
|
||||||
log.error("没有这个预警的类型");
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
// 找到符合计划的预警
|
// 找到符合计划的预警
|
||||||
AlertPlan currentAlertPlan = alertPlanService.getOneByTypeAndValue(currentContentPlanType, params.getPerceptionValue());
|
AlertPlan currentAlertPlan = alertPlanService.getOneByTypeAndValue(currentContentPlanType, params.getPerceptionValue());
|
||||||
if (null == currentAlertPlan) {
|
if (null == currentAlertPlan) {
|
||||||
|
@ -60,13 +59,13 @@ public class SensorDataServiceImpl implements ISensorDataService {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
// 情报板设备信息
|
// 情报板设备信息
|
||||||
BoardInfoAndRoadDTO boardInfo = boardInfoService.getOneByIP(params.getBoardIp());
|
BoardInfo boardInfo = boardInfoService.getOneByIP(params.getBoardIp());
|
||||||
if (null == boardInfo) {
|
if (null == boardInfo) {
|
||||||
log.error("找不到情报板信息");
|
log.error("找不到情报板信息");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
// 预置发布的信息
|
// 预置发布的信息
|
||||||
PresetContent currentContent = presetContentService.getById(currentAlertPlan.getPresetContentId());
|
PresetContent currentContent = presetContentService.getOneByContentAndBoardSize(currentAlertPlan.getDisplayContent(), boardInfo.getBoardSize(), currentContentPlanType);
|
||||||
if (null == currentContent) {
|
if (null == currentContent) {
|
||||||
log.error("找不到预置发布的信息");
|
log.error("找不到预置发布的信息");
|
||||||
return;
|
return;
|
||||||
|
@ -81,7 +80,7 @@ public class SensorDataServiceImpl implements ISensorDataService {
|
||||||
informationToBeReleasedList.add(currentContent);
|
informationToBeReleasedList.add(currentContent);
|
||||||
} else {
|
} else {
|
||||||
// 如果不为空,说明 2 分钟内是发布了内容的,查询所有的发布内容
|
// 如果不为空,说明 2 分钟内是发布了内容的,查询所有的发布内容
|
||||||
Set<Integer> presetContentIdList = releaseRecordList.stream().map(ReleaseRecord::getPresetContentId).collect(Collectors.toSet());
|
List<Integer> presetContentIdList = releaseRecordList.stream().map(ReleaseRecord::getPresetContentId).collect(Collectors.toList());
|
||||||
List<PresetContent> existPresetContentList = presetContentService.listByIds(presetContentIdList);
|
List<PresetContent> existPresetContentList = presetContentService.listByIds(presetContentIdList);
|
||||||
// 先把已经存在的都加入进去
|
// 先把已经存在的都加入进去
|
||||||
informationToBeReleasedList.addAll(existPresetContentList);
|
informationToBeReleasedList.addAll(existPresetContentList);
|
||||||
|
@ -94,24 +93,36 @@ public class SensorDataServiceImpl implements ISensorDataService {
|
||||||
// 说明这是一个已有的类型,需要获取预警等级,然后进行判断
|
// 说明这是一个已有的类型,需要获取预警等级,然后进行判断
|
||||||
// 判断已有类型是否和现在的一样然后再替换掉
|
// 判断已有类型是否和现在的一样然后再替换掉
|
||||||
// 现在需要知道这个同类型的属于是哪个级别的
|
// 现在需要知道这个同类型的属于是哪个级别的
|
||||||
AlertPlan existContentAlertPlan = alertPlanService.getOneByPresetContentId(isExistsPresetContent.getId(), currentAlertPlan.getType());
|
int foundPlanId = releaseRecordList.stream()
|
||||||
if (existContentAlertPlan != null) {
|
.filter(i -> Objects.equals(i.getPresetContentId(), isExistsPresetContent.getId()))
|
||||||
switch (currentAlertPlan.getMinValue().compareTo(existContentAlertPlan.getMinValue())) {
|
.mapToInt(ReleaseRecord::getPlanId)
|
||||||
|
.findFirst().orElse(-1);
|
||||||
|
AlertPlan byId = alertPlanService.getById(foundPlanId);
|
||||||
|
int compare = NumberUtils.compare(byId.getLevel(),
|
||||||
|
currentAlertPlan.getLevel());
|
||||||
|
switch (compare) {
|
||||||
case 0:
|
case 0:
|
||||||
|
// 两个一样等级
|
||||||
|
// 这时候就不需要替换,也不需要重新发布
|
||||||
presetStatus = "预警持续";
|
presetStatus = "预警持续";
|
||||||
break;
|
break;
|
||||||
case 1:
|
case 1:
|
||||||
presetStatus = "预警加强";
|
// getPresetContentLevel > alertPlan.getLevel()
|
||||||
|
// 预警减弱
|
||||||
|
// 此时需要将同类型的信息给替换掉,并重新发布
|
||||||
|
presetStatus = "预警减弱";
|
||||||
break;
|
break;
|
||||||
case -1:
|
case -1:
|
||||||
presetStatus = "预警减弱";
|
// getPresetContentLevel < alertPlan.getLevel()
|
||||||
|
// 预警加强
|
||||||
|
// 此时需要将同类型的信息给替换掉,并重新发布
|
||||||
|
presetStatus = "预警加强";
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
// 替换同类型的预警信息
|
// 替换同类型的预警信息
|
||||||
for (int i = 0; i < informationToBeReleasedList.size(); i++) {
|
for (int i = 0; i < existPresetContentList.size(); i++) {
|
||||||
if (informationToBeReleasedList.get(i).getInfoType() == currentContentPlanType) {
|
if (existPresetContentList.get(i).getInfoType() == currentContentPlanType) {
|
||||||
informationToBeReleasedList.set(i, currentContent);
|
existPresetContentList.set(i, currentContent);
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -122,11 +133,9 @@ public class SensorDataServiceImpl implements ISensorDataService {
|
||||||
// 发布之后记录发布内容 ReleaseRecord
|
// 发布之后记录发布内容 ReleaseRecord
|
||||||
this.saveRecord(boardInfo.getId(), currentContent.getId(), currentAlertPlan.getId());
|
this.saveRecord(boardInfo.getId(), currentContent.getId(), currentAlertPlan.getId());
|
||||||
// 记录完了之后就需要向对方发送状态日志记录
|
// 记录完了之后就需要向对方发送状态日志记录
|
||||||
// this.sendStatus(presetStatus, boardInfo.getBoardIp(), params.getPerceptionType(), currentContent.getContent(), params.getPerceptionValue(), currentAlertPlan.getLevel());
|
this.sendStatus(presetStatus, boardInfo.getBoardIp(), params.getPerceptionType(), currentContent.getContent(), params.getPerceptionValue(), currentAlertPlan.getLevel());
|
||||||
this.sendStatus(presetStatus, boardInfo.getBoardIp(), params.getPerceptionType(), currentContent.getContent(), params.getPerceptionValue(), 1);
|
|
||||||
// 发送情报板发布信息日志记录
|
// 发送情报板发布信息日志记录
|
||||||
// this.sendPublicLog(boardInfo.getBoardIp(), params.getPerceptionType(), currentAlertPlan.getLevel(), currentContent.getContent(), informationToBeReleasedList);
|
this.sendPublicLog(boardInfo.getBoardIp(), params.getPerceptionType(), currentAlertPlan.getLevel(), currentContent.getContent(), informationToBeReleasedList);
|
||||||
this.sendPublicLog(boardInfo.getBoardIp(), params.getPerceptionType(), 1, currentContent.getContent(), informationToBeReleasedList);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
@ -140,6 +149,8 @@ public class SensorDataServiceImpl implements ISensorDataService {
|
||||||
PerceptionHandlerMap.perceptionHandlerMap.put(key, orDefault);
|
PerceptionHandlerMap.perceptionHandlerMap.put(key, orDefault);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void handlerPerceptionMap(){
|
public void handlerPerceptionMap(){
|
||||||
List<PerceptionParams> publishList = new ArrayList<>();
|
List<PerceptionParams> publishList = new ArrayList<>();
|
||||||
|
@ -183,10 +194,9 @@ public class SensorDataServiceImpl implements ISensorDataService {
|
||||||
releaseLogReport.setReleaseStatus("发布成功");
|
releaseLogReport.setReleaseStatus("发布成功");
|
||||||
List<PresetContentStyle> presetContentStyles = new ArrayList<>();
|
List<PresetContentStyle> presetContentStyles = new ArrayList<>();
|
||||||
informationToBeReleasedList.forEach(i -> {
|
informationToBeReleasedList.forEach(i -> {
|
||||||
// String[] split = StringUtils.split(i.getBoardSize(), "*");
|
String[] split = StringUtils.split(i.getBoardSize(), "*");
|
||||||
String[] split = null;
|
|
||||||
PresetContentStyle p = new PresetContentStyle();
|
PresetContentStyle p = new PresetContentStyle();
|
||||||
p.setFont(i.getFontFamily());
|
p.setFont(i.getFontStyle());
|
||||||
p.setFontSize(i.getFontSize());
|
p.setFontSize(i.getFontSize());
|
||||||
p.setFontColor(PrintColor.getBitColor(i.getFontColor()));
|
p.setFontColor(PrintColor.getBitColor(i.getFontColor()));
|
||||||
p.setContent(i.getContent());
|
p.setContent(i.getContent());
|
||||||
|
@ -237,11 +247,4 @@ public class SensorDataServiceImpl implements ISensorDataService {
|
||||||
releaseRecord.setCreatedBy(1);
|
releaseRecord.setCreatedBy(1);
|
||||||
releaseRecordService.save(releaseRecord);
|
releaseRecordService.save(releaseRecord);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
|
||||||
public void setPlanTypeNameIdMap() {
|
|
||||||
planTypeNameIdMap.clear();
|
|
||||||
Map<String, Long> collect = planTypeService.list().stream().collect(Collectors.toMap(PlanType::getTypeName, PlanType::getId));
|
|
||||||
planTypeNameIdMap.putAll(collect);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -15,7 +15,6 @@ public class ClearPerceptionTask {
|
||||||
private static final Logger log = LoggerFactory.getLogger(ClearPerceptionTask.class);
|
private static final Logger log = LoggerFactory.getLogger(ClearPerceptionTask.class);
|
||||||
|
|
||||||
public void clearPerception(){
|
public void clearPerception(){
|
||||||
sensorDataService.setPlanTypeNameIdMap();
|
|
||||||
sensorDataService.handlerPerceptionMap();
|
sensorDataService.handlerPerceptionMap();
|
||||||
log.info("handlerPerceptionMap 处理完了");
|
log.info("handlerPerceptionMap 处理完了");
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,16 +0,0 @@
|
||||||
<?xml version="1.0" encoding="UTF-8"?>
|
|
||||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
|
||||||
<mapper namespace="com.ruoyi.board.mapper.BoardProtocolMapper">
|
|
||||||
<resultMap id="BaseResultMap" type="com.ruoyi.board.domain.BoardProtocol">
|
|
||||||
<!--@mbg.generated-->
|
|
||||||
<!--@Table pub_board_protocol-->
|
|
||||||
<id column="id" jdbcType="INTEGER" property="id" />
|
|
||||||
<result column="brand" jdbcType="VARCHAR" property="brand" />
|
|
||||||
<result column="protocol" jdbcType="VARCHAR" property="protocol" />
|
|
||||||
<result column="remark" jdbcType="VARCHAR" property="remark" />
|
|
||||||
</resultMap>
|
|
||||||
<sql id="Base_Column_List">
|
|
||||||
<!--@mbg.generated-->
|
|
||||||
id, brand, protocol, remark
|
|
||||||
</sql>
|
|
||||||
</mapper>
|
|
|
@ -1,4 +1,33 @@
|
||||||
<?xml version="1.0" encoding="UTF-8"?>
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||||
<mapper namespace="com.ruoyi.board.mapper.PresetContentMapper">
|
<mapper namespace="com.ruoyi.board.mapper.PresetContentMapper">
|
||||||
|
<resultMap id="BaseResultMap" type="com.ruoyi.board.domain.PresetContent">
|
||||||
|
<!--@mbg.generated-->
|
||||||
|
<!--@Table pub_preset_content-->
|
||||||
|
<id column="id" jdbcType="INTEGER" property="id" />
|
||||||
|
<result column="name" jdbcType="VARCHAR" property="name" />
|
||||||
|
<result column="board_size" jdbcType="VARCHAR" property="boardSize" />
|
||||||
|
<result column="info_type" jdbcType="INTEGER" property="infoType" />
|
||||||
|
<result column="content" jdbcType="VARCHAR" property="content" />
|
||||||
|
<result column="preview_path" jdbcType="VARCHAR" property="previewPath" />
|
||||||
|
<result column="font_style" jdbcType="VARCHAR" property="fontStyle" />
|
||||||
|
<result column="font_size" jdbcType="INTEGER" property="fontSize" />
|
||||||
|
<result column="letter_spacing" jdbcType="INTEGER" property="letterSpacing" />
|
||||||
|
<result column="font_color" jdbcType="VARCHAR" property="fontColor" />
|
||||||
|
<result column="font_position_x" jdbcType="INTEGER" property="fontPositionX" />
|
||||||
|
<result column="font_position_y" jdbcType="INTEGER" property="fontPositionY" />
|
||||||
|
<result column="play_time" jdbcType="INTEGER" property="playTime" />
|
||||||
|
<result column="preset_type" jdbcType="INTEGER" property="presetType" />
|
||||||
|
<result column="remark" jdbcType="VARCHAR" property="remark" />
|
||||||
|
<result column="create_time" jdbcType="TIMESTAMP" property="createTime" />
|
||||||
|
<result column="update_time" jdbcType="TIMESTAMP" property="updateTime" />
|
||||||
|
<result column="create_by" jdbcType="INTEGER" property="createBy" />
|
||||||
|
<result column="update_by" jdbcType="INTEGER" property="updateBy" />
|
||||||
|
</resultMap>
|
||||||
|
<sql id="Base_Column_List">
|
||||||
|
<!--@mbg.generated-->
|
||||||
|
id, `name`, board_size, info_type, content, preview_path, font_style, font_size,
|
||||||
|
letter_spacing, font_color, font_position_x, font_position_y, play_time, preset_type,
|
||||||
|
remark, create_time, update_time, create_by, update_by
|
||||||
|
</sql>
|
||||||
</mapper>
|
</mapper>
|
|
@ -1,4 +0,0 @@
|
||||||
<?xml version="1.0" encoding="UTF-8"?>
|
|
||||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
|
||||||
<mapper namespace="com.ruoyi.board.mapper.PubWhiteIpMapper">
|
|
||||||
</mapper>
|
|
|
@ -1,4 +0,0 @@
|
||||||
<?xml version="1.0" encoding="UTF-8"?>
|
|
||||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
|
||||||
<mapper namespace="com.ruoyi.board.mapper.ReleaseLogMapper">
|
|
||||||
</mapper>
|
|
|
@ -1,52 +0,0 @@
|
||||||
import request from '@/utils/request'
|
|
||||||
|
|
||||||
// 查询情报板协议库列表
|
|
||||||
export function listProtocol(query) {
|
|
||||||
return request({
|
|
||||||
url: '/board/protocol/list',
|
|
||||||
method: 'get',
|
|
||||||
params: query
|
|
||||||
})
|
|
||||||
}
|
|
||||||
|
|
||||||
// 查询情报板协议库详细
|
|
||||||
export function getProtocol(id) {
|
|
||||||
return request({
|
|
||||||
url: '/board/protocol/' + id,
|
|
||||||
method: 'get'
|
|
||||||
})
|
|
||||||
}
|
|
||||||
|
|
||||||
// 新增情报板协议库
|
|
||||||
export function addProtocol(data) {
|
|
||||||
return request({
|
|
||||||
url: '/board/protocol',
|
|
||||||
method: 'post',
|
|
||||||
data: data
|
|
||||||
})
|
|
||||||
}
|
|
||||||
|
|
||||||
// 修改情报板协议库
|
|
||||||
export function updateProtocol(data) {
|
|
||||||
return request({
|
|
||||||
url: '/board/protocol',
|
|
||||||
method: 'put',
|
|
||||||
data: data
|
|
||||||
})
|
|
||||||
}
|
|
||||||
|
|
||||||
// 删除情报板协议库
|
|
||||||
export function delProtocol(id) {
|
|
||||||
return request({
|
|
||||||
url: '/board/protocol/' + id,
|
|
||||||
method: 'delete'
|
|
||||||
})
|
|
||||||
}
|
|
||||||
|
|
||||||
// 查询情报板协议的级联菜单结构
|
|
||||||
export function protocolTreeSelect() {
|
|
||||||
return request({
|
|
||||||
url: '/board/protocol/protocolTree',
|
|
||||||
method: 'get'
|
|
||||||
})
|
|
||||||
}
|
|
|
@ -1,44 +0,0 @@
|
||||||
import request from '@/utils/request'
|
|
||||||
|
|
||||||
// 查询发布日志记录列表
|
|
||||||
export function listReleaseLog(query) {
|
|
||||||
return request({
|
|
||||||
url: '/board/releaseLog/list',
|
|
||||||
method: 'get',
|
|
||||||
params: query
|
|
||||||
})
|
|
||||||
}
|
|
||||||
|
|
||||||
// 查询发布日志记录详细
|
|
||||||
export function getReleaseLog(id) {
|
|
||||||
return request({
|
|
||||||
url: '/board/releaseLog/' + id,
|
|
||||||
method: 'get'
|
|
||||||
})
|
|
||||||
}
|
|
||||||
|
|
||||||
// 新增发布日志记录
|
|
||||||
export function addReleaseLog(data) {
|
|
||||||
return request({
|
|
||||||
url: '/board/releaseLog',
|
|
||||||
method: 'post',
|
|
||||||
data: data
|
|
||||||
})
|
|
||||||
}
|
|
||||||
|
|
||||||
// 修改发布日志记录
|
|
||||||
export function updateReleaseLog(data) {
|
|
||||||
return request({
|
|
||||||
url: '/board/releaseLog',
|
|
||||||
method: 'put',
|
|
||||||
data: data
|
|
||||||
})
|
|
||||||
}
|
|
||||||
|
|
||||||
// 删除发布日志记录
|
|
||||||
export function delReleaseLog(id) {
|
|
||||||
return request({
|
|
||||||
url: '/board/releaseLog/' + id,
|
|
||||||
method: 'delete'
|
|
||||||
})
|
|
||||||
}
|
|
|
@ -1,44 +0,0 @@
|
||||||
import request from '@/utils/request'
|
|
||||||
|
|
||||||
// 查询发布源白名单列表
|
|
||||||
export function listWhiteIp(query) {
|
|
||||||
return request({
|
|
||||||
url: '/board/whiteIp/list',
|
|
||||||
method: 'get',
|
|
||||||
params: query
|
|
||||||
})
|
|
||||||
}
|
|
||||||
|
|
||||||
// 查询发布源白名单详细
|
|
||||||
export function getWhiteIp(id) {
|
|
||||||
return request({
|
|
||||||
url: '/board/whiteIp/' + id,
|
|
||||||
method: 'get'
|
|
||||||
})
|
|
||||||
}
|
|
||||||
|
|
||||||
// 新增发布源白名单
|
|
||||||
export function addWhiteIp(data) {
|
|
||||||
return request({
|
|
||||||
url: '/board/whiteIp',
|
|
||||||
method: 'post',
|
|
||||||
data: data
|
|
||||||
})
|
|
||||||
}
|
|
||||||
|
|
||||||
// 修改发布源白名单
|
|
||||||
export function updateWhiteIp(data) {
|
|
||||||
return request({
|
|
||||||
url: '/board/whiteIp',
|
|
||||||
method: 'put',
|
|
||||||
data: data
|
|
||||||
})
|
|
||||||
}
|
|
||||||
|
|
||||||
// 删除发布源白名单
|
|
||||||
export function delWhiteIp(id) {
|
|
||||||
return request({
|
|
||||||
url: '/board/whiteIp/' + id,
|
|
||||||
method: 'delete'
|
|
||||||
})
|
|
||||||
}
|
|
|
@ -35,7 +35,7 @@ export default {
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
props: {
|
props: {
|
||||||
fontFamily: {
|
fontStyle: {
|
||||||
type: String,
|
type: String,
|
||||||
default: 'normal',
|
default: 'normal',
|
||||||
},
|
},
|
||||||
|
@ -73,15 +73,7 @@ export default {
|
||||||
},
|
},
|
||||||
content: {
|
content: {
|
||||||
type: String,
|
type: String,
|
||||||
default: '这里是示例内容',
|
default: '这里是示例内容,哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈',
|
||||||
},
|
|
||||||
horizontalCenter: {
|
|
||||||
type: Boolean,
|
|
||||||
default: false,
|
|
||||||
},
|
|
||||||
verticalCenter: {
|
|
||||||
type: Boolean,
|
|
||||||
default: false,
|
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
computed: {
|
computed: {
|
||||||
|
@ -93,19 +85,20 @@ export default {
|
||||||
background: '#000000',
|
background: '#000000',
|
||||||
overflow: 'hidden',
|
overflow: 'hidden',
|
||||||
display: 'flex',
|
display: 'flex',
|
||||||
alignItems: this.verticalCenter ? 'center' : 'flex-start',
|
alignItems: 'center',
|
||||||
justifyContent: this.horizontalCenter ? 'center' : 'flex-start',
|
justifyContent: 'center',
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
textStyle() {
|
textStyle() {
|
||||||
return {
|
return {
|
||||||
fontFamily: this.fontFamily,
|
position: 'absolute',
|
||||||
whiteSpace: 'preserve-breaks',
|
top: `${-this.fontY * this.scale}px`,
|
||||||
|
left: `${this.fontX * this.scale}px`,
|
||||||
|
fontStyle: this.fontStyle,
|
||||||
color: this.fontColor,
|
color: this.fontColor,
|
||||||
fontSize: `${this.fontSize * this.scale}px`,
|
fontSize: `${this.fontSize * this.scale}px`,
|
||||||
letterSpacing: `${this.letterSpacing * this.scale}px`,
|
letterSpacing: `${this.letterSpacing * this.scale}px`,
|
||||||
lineHeight: `${this.lineHeight}`,
|
lineHeight: `${this.lineHeight}`,
|
||||||
transform: `translate(${this.horizontalCenter ? this.fontX * this.scale : this.fontX}px, ${this.verticalCenter ? this.fontY * this.scale : this.fontY}px)`,
|
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
<template>
|
<template>
|
||||||
<div class="app-container">
|
<div class="app-container">
|
||||||
<el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="auto">
|
<el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="auto">
|
||||||
<el-form-item label="内容模版名称" prop="name">
|
<el-form-item label="预置信息名称" prop="name">
|
||||||
<el-input
|
<el-input
|
||||||
v-model="queryParams.name"
|
v-model="queryParams.name"
|
||||||
placeholder="请输入预置信息名称"
|
placeholder="请输入预置信息名称"
|
||||||
|
@ -9,13 +9,32 @@
|
||||||
@keyup.enter.native="handleQuery"
|
@keyup.enter.native="handleQuery"
|
||||||
/>
|
/>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="信息类型" prop="type">
|
<el-form-item label="情报板尺寸" prop="boardSize">
|
||||||
<el-cascader
|
<el-select
|
||||||
v-model="queryParams.infoType"
|
v-model="queryParams.boardSize"
|
||||||
:options="planTypeOptions"
|
|
||||||
:props="{lable: 'lable', value: 'id', expandTrigger:'hover', emitPath: false}"
|
|
||||||
clearable
|
clearable
|
||||||
|
placeholder="全部">
|
||||||
|
<el-option
|
||||||
|
v-for="dict in dict.type.board_size"
|
||||||
|
:key="dict.value"
|
||||||
|
:label="dict.label + ' ' + dict.value"
|
||||||
|
:value="dict.value"
|
||||||
/>
|
/>
|
||||||
|
</el-select>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="信息类型" prop="type">
|
||||||
|
<el-select
|
||||||
|
v-model="queryParams.infoType"
|
||||||
|
clearable
|
||||||
|
placeholder="全部"
|
||||||
|
>
|
||||||
|
<el-option
|
||||||
|
v-for="dict in dict.type.alert_type"
|
||||||
|
:key="dict.value"
|
||||||
|
:label="dict.label"
|
||||||
|
:value="dict.value"
|
||||||
|
/>
|
||||||
|
</el-select>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item>
|
<el-form-item>
|
||||||
<el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button>
|
<el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button>
|
||||||
|
@ -56,17 +75,39 @@
|
||||||
v-hasPermi="['board:content:remove']"
|
v-hasPermi="['board:content:remove']"
|
||||||
>删除</el-button>
|
>删除</el-button>
|
||||||
</el-col>
|
</el-col>
|
||||||
|
<!-- <el-col :span="1.5">-->
|
||||||
|
<!-- <el-button-->
|
||||||
|
<!-- type="warning"-->
|
||||||
|
<!-- plain-->
|
||||||
|
<!-- icon="el-icon-download"-->
|
||||||
|
<!-- size="mini"-->
|
||||||
|
<!-- @click="handleExport"-->
|
||||||
|
<!-- v-hasPermi="['board:content:export']"-->
|
||||||
|
<!-- >导出</el-button>-->
|
||||||
|
<!-- </el-col>-->
|
||||||
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
|
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
|
||||||
</el-row>
|
</el-row>
|
||||||
|
|
||||||
<el-table v-loading="loading" :data="contentList" @selection-change="handleSelectionChange">
|
<el-table v-loading="loading" :data="contentList" @selection-change="handleSelectionChange">
|
||||||
<el-table-column type="selection" width="55" align="center" />
|
<el-table-column type="selection" width="55" align="center" />
|
||||||
<el-table-column label="唯一编号" align="center" prop="id" />
|
<el-table-column label="唯一编号" align="center" prop="id" />
|
||||||
<el-table-column label="内容模版名称" align="center" prop="name"/>
|
<el-table-column label="预置信息名称" align="center" prop="name" />
|
||||||
<el-table-column label="情报板尺寸" align="center" prop="boardSizeTypeName"/>
|
<el-table-column label="情报板尺寸" align="center" prop="boardSize" />
|
||||||
<el-table-column label="信息类型" align="center" prop="typeName"/>
|
<el-table-column label="信息类型" align="center" prop="infoType">
|
||||||
|
<template slot-scope="scope">
|
||||||
|
<dict-tag :options="dict.type.alert_type" :value="scope.row.infoType"/>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
<el-table-column label="预置内容" align="center" prop="content" />
|
<el-table-column label="预置内容" align="center" prop="content" />
|
||||||
|
<el-table-column label="预览路径" align="center" prop="previewPath" />
|
||||||
|
<!-- <el-table-column label="字体样式" align="center" prop="fontStyle" />-->
|
||||||
|
<!-- <el-table-column label="字体大小" align="center" prop="fontSize" />-->
|
||||||
|
<!-- <el-table-column label="字体间距" align="center" prop="letterSpacing" />-->
|
||||||
|
<!-- <el-table-column label="字体颜色" align="center" prop="fontColor" />-->
|
||||||
|
<!-- <el-table-column label="字体坐标X" align="center" prop="fontPositionX" />-->
|
||||||
|
<!-- <el-table-column label="字体坐标Y" align="center" prop="fontPositionY" />-->
|
||||||
<el-table-column label="播放时间" align="center" prop="playTime" />
|
<el-table-column label="播放时间" align="center" prop="playTime" />
|
||||||
|
<!-- <el-table-column label="当前预置类型 1:内置模版 0:预发布信息" align="center" prop="presetType" />-->
|
||||||
<el-table-column label="备注" align="center" prop="remark" />
|
<el-table-column label="备注" align="center" prop="remark" />
|
||||||
<el-table-column label="操作" align="center" class-name="small-padding fixed-width">
|
<el-table-column label="操作" align="center" class-name="small-padding fixed-width">
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
|
@ -97,63 +138,48 @@
|
||||||
/>
|
/>
|
||||||
|
|
||||||
<!-- 添加或修改预置信息及模版对话框 -->
|
<!-- 添加或修改预置信息及模版对话框 -->
|
||||||
<el-dialog :title="title" :visible.sync="open" width="800px" append-to-body>
|
<el-dialog :title="title" :visible.sync="open" width="1000px" append-to-body>
|
||||||
<el-form ref="form" :model="form" :rules="rules" label-width="auto">
|
<el-form ref="form" :model="form" :rules="rules" label-width="auto">
|
||||||
<el-row :gutter="0">
|
<el-form-item label="预置信息名称" prop="name">
|
||||||
<el-col :span="8">
|
|
||||||
<el-form-item label="内容模版名称" prop="name">
|
|
||||||
<el-input v-model="form.name" placeholder="请输入预置信息名称" />
|
<el-input v-model="form.name" placeholder="请输入预置信息名称" />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="预置信息类型" prop="infoType">
|
<el-form-item label="预置信息类型" prop="infoType">
|
||||||
<el-cascader
|
|
||||||
v-model="form.infoType"
|
|
||||||
:options="planTypeOptions"
|
|
||||||
:props="{lable: 'lable', value: 'id', expandTrigger:'hover', emitPath: false}"
|
|
||||||
/>
|
|
||||||
</el-form-item>
|
|
||||||
<el-form-item label="情报板尺寸" prop="boardSizeType">
|
|
||||||
<el-select
|
<el-select
|
||||||
v-model="form.boardSizeType"
|
v-model="form.infoType"
|
||||||
placeholder="请选择">
|
placeholder="全部"
|
||||||
|
>
|
||||||
<el-option
|
<el-option
|
||||||
v-for="dict in this.boardTypeOptions"
|
v-for="dict in dict.type.alert_type"
|
||||||
:key="dict.id"
|
:key="dict.value"
|
||||||
:label="dict.name"
|
:label="dict.label"
|
||||||
:value="dict.id"
|
:value="dict.value"
|
||||||
|
/>
|
||||||
|
</el-select>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="情报板尺寸" prop="boardSize">
|
||||||
|
<el-select
|
||||||
|
v-model="form.boardSize"
|
||||||
|
placeholder="请选择情报板尺寸">
|
||||||
|
<el-option
|
||||||
|
v-for="dict in dict.type.board_size"
|
||||||
|
:key="dict.value"
|
||||||
|
:label="dict.label + ' ' + dict.value"
|
||||||
|
:value="dict.value"
|
||||||
/>
|
/>
|
||||||
</el-select>
|
</el-select>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="预置内容" prop="content">
|
<el-form-item label="预置内容" prop="content">
|
||||||
<el-input type="textarea" v-model="form.content" placeholder="请输入预置内容"/>
|
<el-input v-model="form.content" placeholder="请输入预置内容"/>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="备注" prop="remark">
|
<el-form-item label="备注" prop="remark">
|
||||||
<el-input v-model="form.remark" placeholder="请输入备注" />
|
<el-input v-model="form.remark" placeholder="请输入备注" />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
<el-form-item label="字体样式" prop="fontStyle">
|
||||||
<el-col :span="8">
|
|
||||||
<el-form-item label="字体大小" prop="fontSize">
|
|
||||||
<el-input-number :controls="false" :min="20" :max="50" v-model="form.fontSize" placeholder="请输入字体大小" size="small" />
|
|
||||||
</el-form-item>
|
|
||||||
<el-form-item label="字体间距" prop="letterSpacing">
|
|
||||||
<el-input-number :controls="false" :min="0" v-model="form.letterSpacing" placeholder="请输入字体间距" size="small" />
|
|
||||||
</el-form-item>
|
|
||||||
<el-form-item label="字体坐标X" prop="fontPositionX">
|
|
||||||
<el-input-number :controls="false" v-model="form.fontPositionX" placeholder="请输入字体坐标X" size="small"/>
|
|
||||||
</el-form-item>
|
|
||||||
<el-form-item label="字体坐标Y" prop="fontPositionY">
|
|
||||||
<el-input-number :controls="false" v-model="form.fontPositionY" placeholder="请输入字体坐标Y" size="small"/>
|
|
||||||
</el-form-item>
|
|
||||||
<el-form-item label="播放时间" prop="playTime">
|
|
||||||
<el-input-number :controls="false" :min="0" v-model="form.playTime" placeholder="请输入播放时间" size="small"/>
|
|
||||||
</el-form-item>
|
|
||||||
</el-col>
|
|
||||||
<el-col :span="8">
|
|
||||||
<el-form-item label="字体样式" prop="fontFamily">
|
|
||||||
<el-select
|
<el-select
|
||||||
v-model="form.fontFamily"
|
v-model="form.fontStyle"
|
||||||
placeholder="请选择字体样式">
|
placeholder="请选择字体样式">
|
||||||
<el-option
|
<el-option
|
||||||
v-for="dict in dict.type.font_family"
|
v-for="dict in dict.type.font_style"
|
||||||
:key="dict.value"
|
:key="dict.value"
|
||||||
:label="dict.label"
|
:label="dict.label"
|
||||||
:value="dict.value"
|
:value="dict.value"
|
||||||
|
@ -172,39 +198,31 @@
|
||||||
/>
|
/>
|
||||||
</el-select>
|
</el-select>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="水平居中" prop="horizontalCenter">
|
<el-form-item label="字体大小" prop="fontSize">
|
||||||
<el-switch
|
<el-input-number :min="20" :max="50" v-model="form.fontSize" placeholder="请输入字体大小" />
|
||||||
v-model="form.horizontalCenter"
|
|
||||||
active-color="#13ce66"
|
|
||||||
inactive-color="#ff4949">
|
|
||||||
</el-switch>
|
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="垂直居中" prop="verticalCenter">
|
<el-form-item label="字体间距" prop="letterSpacing">
|
||||||
<el-switch
|
<el-input-number :min="0" v-model="form.letterSpacing" placeholder="请输入字体间距" />
|
||||||
v-model="form.verticalCenter"
|
</el-form-item>
|
||||||
active-color="#13ce66"
|
<el-form-item label="字体坐标X" prop="fontPositionX">
|
||||||
inactive-color="#ff4949">
|
<el-input-number v-model="form.fontPositionX" placeholder="请输入字体坐标X" />
|
||||||
</el-switch>
|
</el-form-item>
|
||||||
|
<el-form-item label="字体坐标Y" prop="fontPositionY">
|
||||||
|
<el-input-number v-model="form.fontPositionY" placeholder="请输入字体坐标Y" />
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="播放时间" prop="playTime">
|
||||||
|
<el-input-number :min="0" v-model="form.playTime" placeholder="请输入播放时间" />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
|
||||||
</el-row>
|
|
||||||
<el-row>
|
|
||||||
<el-col :span="24">
|
|
||||||
<text-preview
|
<text-preview
|
||||||
:fontFamily="form.fontFamily"
|
fontStyle="SongTi"
|
||||||
:fontSize="form.fontSize"
|
:fontSize="form.fontSize"
|
||||||
:fontColor="form.fontColor"
|
|
||||||
:letterSpacing="form.letterSpacing"
|
:letterSpacing="form.letterSpacing"
|
||||||
:fontX="form.fontPositionX"
|
:fontX="form.fontPositionX"
|
||||||
:fontY="form.fontPositionY"
|
:fontY="form.fontPositionY"
|
||||||
:backgroundWidth="bgSize.width"
|
:backgroundWidth="bgSize.width"
|
||||||
:backgroundHeight="bgSize.height"
|
:backgroundHeight="bgSize.height"
|
||||||
:lineHeight="1"
|
:lineHeight="1"
|
||||||
:horizontalCenter="form.horizontalCenter"
|
|
||||||
:verticalCenter="form.verticalCenter"
|
|
||||||
:content="form.content" />
|
:content="form.content" />
|
||||||
</el-col>
|
|
||||||
</el-row>
|
|
||||||
</el-form>
|
</el-form>
|
||||||
|
|
||||||
<div slot="footer" class="dialog-footer">
|
<div slot="footer" class="dialog-footer">
|
||||||
|
@ -218,13 +236,11 @@
|
||||||
<script>
|
<script>
|
||||||
import { listContent, getContent, delContent, addContent, updateContent } from "@/api/board/content";
|
import { listContent, getContent, delContent, addContent, updateContent } from "@/api/board/content";
|
||||||
import TextPreview from "@/views/board/component/TextPreview.vue";
|
import TextPreview from "@/views/board/component/TextPreview.vue";
|
||||||
import {planTypeTreeSelect} from "@/api/board/plantype";
|
|
||||||
import {listBoardType} from "@/api/board/boardtype";
|
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: "Content",
|
name: "Content",
|
||||||
components: {TextPreview},
|
components: {TextPreview},
|
||||||
dicts: ['board_size', 'font_color', 'font_family', 'alert_type'],
|
dicts: ['board_size','font_color','font_style', 'alert_type'],
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
// 遮罩层
|
// 遮罩层
|
||||||
|
@ -245,13 +261,12 @@ export default {
|
||||||
title: "",
|
title: "",
|
||||||
// 是否显示弹出层
|
// 是否显示弹出层
|
||||||
open: false,
|
open: false,
|
||||||
planTypeOptions: [],
|
|
||||||
boardTypeOptions: [],
|
|
||||||
// 查询参数
|
// 查询参数
|
||||||
queryParams: {
|
queryParams: {
|
||||||
pageNum: 1,
|
pageNum: 1,
|
||||||
pageSize: 10,
|
pageSize: 10,
|
||||||
name: null,
|
name: null,
|
||||||
|
boardSize: null,
|
||||||
infoType: null,
|
infoType: null,
|
||||||
content: null,
|
content: null,
|
||||||
previewPath: null,
|
previewPath: null,
|
||||||
|
@ -271,7 +286,7 @@ export default {
|
||||||
name: [
|
name: [
|
||||||
{ required: true, message: "预置信息名称不能为空", trigger: "blur" }
|
{ required: true, message: "预置信息名称不能为空", trigger: "blur" }
|
||||||
],
|
],
|
||||||
boardSizeType: [
|
boardSize: [
|
||||||
{ required: true, message: "情报板尺寸不能为空", trigger: "blur" }
|
{ required: true, message: "情报板尺寸不能为空", trigger: "blur" }
|
||||||
],
|
],
|
||||||
infoType: [
|
infoType: [
|
||||||
|
@ -327,8 +342,6 @@ export default {
|
||||||
},
|
},
|
||||||
created() {
|
created() {
|
||||||
this.getList();
|
this.getList();
|
||||||
this.getPlanTypeTree();
|
|
||||||
this.getBoardTypeList();
|
|
||||||
},
|
},
|
||||||
computed:{
|
computed:{
|
||||||
bgSize() {
|
bgSize() {
|
||||||
|
@ -363,7 +376,7 @@ export default {
|
||||||
infoType: null,
|
infoType: null,
|
||||||
content: null,
|
content: null,
|
||||||
previewPath: null,
|
previewPath: null,
|
||||||
fontFamily: null,
|
fontStyle: null,
|
||||||
fontSize: null,
|
fontSize: null,
|
||||||
letterSpacing: null,
|
letterSpacing: null,
|
||||||
fontColor: null,
|
fontColor: null,
|
||||||
|
@ -375,9 +388,7 @@ export default {
|
||||||
createTime: null,
|
createTime: null,
|
||||||
updateTime: null,
|
updateTime: null,
|
||||||
createBy: null,
|
createBy: null,
|
||||||
updateBy: null,
|
updateBy: null
|
||||||
horizontalCenter: true,
|
|
||||||
verticalCenter: true,
|
|
||||||
};
|
};
|
||||||
this.resetForm("form");
|
this.resetForm("form");
|
||||||
},
|
},
|
||||||
|
@ -409,6 +420,7 @@ export default {
|
||||||
const id = row.id || this.ids
|
const id = row.id || this.ids
|
||||||
getContent(id).then(response => {
|
getContent(id).then(response => {
|
||||||
this.form = response.data;
|
this.form = response.data;
|
||||||
|
this.form.infoType += '';
|
||||||
this.open = true;
|
this.open = true;
|
||||||
this.title = "修改预置信息及模版";
|
this.title = "修改预置信息及模版";
|
||||||
});
|
});
|
||||||
|
@ -448,19 +460,7 @@ export default {
|
||||||
this.download('board/content/export', {
|
this.download('board/content/export', {
|
||||||
...this.queryParams
|
...this.queryParams
|
||||||
}, `content_${new Date().getTime()}.xlsx`)
|
}, `content_${new Date().getTime()}.xlsx`)
|
||||||
},
|
}
|
||||||
/** 查询类型下拉树结构 */
|
|
||||||
getPlanTypeTree() {
|
|
||||||
planTypeTreeSelect().then(response => {
|
|
||||||
this.planTypeOptions = response.data;
|
|
||||||
});
|
|
||||||
},
|
|
||||||
/** 查询情报板类型定义 */
|
|
||||||
getBoardTypeList() {
|
|
||||||
listBoardType().then(response => {
|
|
||||||
this.boardTypeOptions = response.rows;
|
|
||||||
});
|
|
||||||
},
|
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
</script>
|
</script>
|
||||||
|
|
|
@ -68,21 +68,41 @@
|
||||||
>删除
|
>删除
|
||||||
</el-button>
|
</el-button>
|
||||||
</el-col>
|
</el-col>
|
||||||
|
<!-- <el-col :span="1.5">-->
|
||||||
|
<!-- <el-button-->
|
||||||
|
<!-- type="warning"-->
|
||||||
|
<!-- plain-->
|
||||||
|
<!-- icon="el-icon-download"-->
|
||||||
|
<!-- size="mini"-->
|
||||||
|
<!-- @click="handleExport"-->
|
||||||
|
<!-- v-hasPermi="['board:info:export']"-->
|
||||||
|
<!-- >导出-->
|
||||||
|
<!-- </el-button>-->
|
||||||
|
<!-- </el-col>-->
|
||||||
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
|
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
|
||||||
</el-row>
|
</el-row>
|
||||||
|
|
||||||
<el-table v-loading="loading" :data="infoList" @selection-change="handleSelectionChange" append-to-body>
|
<el-table v-loading="loading" :data="infoList" @selection-change="handleSelectionChange" append-to-body>
|
||||||
<el-table-column type="selection" width="55" align="left"/>
|
<el-table-column type="selection" width="55" align="center"/>
|
||||||
<el-table-column label="唯一编号" align="left" prop="id"/>
|
<el-table-column label="唯一编号" align="center" prop="id"/>
|
||||||
<el-table-column label="所属路段" align="left" prop="roadName"/>
|
<el-table-column label="情报板名称" align="center" prop="boardName"/>
|
||||||
<el-table-column label="情报板名称" align="left" prop="boardName"/>
|
<el-table-column label="情报板路段" align="center" prop="roadName"/>
|
||||||
<el-table-column label="方向" align="left" prop="boardDirection"/>
|
<el-table-column label="情报板方向" align="center" prop="boardDirection"/>
|
||||||
<el-table-column label="工桩号" align="left" prop="boardMileage"/>
|
<el-table-column label="情报板工桩号" align="center" prop="boardMileage"/>
|
||||||
<el-table-column label="情报板类型" align="left" prop="boardSizeName" show-overflow-tooltip />
|
<el-table-column label="情报板尺寸" align="center" prop="boardSize">
|
||||||
<el-table-column label="品牌" align="left" prop="boardBrandName"/>
|
<template slot-scope="scope">
|
||||||
<el-table-column label="通讯协议" align="left" prop="boardProtocolName" show-overflow-tooltip />
|
<dict-tag :options="dict.type.board_size" :value="scope.row.boardSize"/>
|
||||||
<el-table-column label="情报板IP" align="left" prop="boardIp" show-overflow-tooltip />
|
{{ scope.row.boardSize }}
|
||||||
<el-table-column label="操作" align="left" class-name="small-padding fixed-width">
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column label="情报板品牌" align="center" prop="boardBrand"/>
|
||||||
|
<el-table-column label="情报板通讯协议" align="center" prop="boardCommunicationProtocol">
|
||||||
|
<template slot-scope="scope">
|
||||||
|
<dict-tag :options="dict.type.board_protocol" :value="scope.row.boardCommunicationProtocol"/>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column label="情报板IP" align="center" prop="boardIp"/>
|
||||||
|
<el-table-column label="操作" align="center" class-name="small-padding fixed-width">
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
<el-button
|
<el-button
|
||||||
size="mini"
|
size="mini"
|
||||||
|
@ -130,23 +150,32 @@
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="情报板类型" prop="boardSize">
|
<el-form-item label="情报板类型" prop="boardSize">
|
||||||
<el-select
|
<el-select
|
||||||
v-model="form.boardSizeType"
|
v-model="form.boardSize"
|
||||||
placeholder="请选择"
|
placeholder="请选择"
|
||||||
>
|
>
|
||||||
<el-option
|
<el-option
|
||||||
v-for="dict in this.boardTypeOptions"
|
v-for="dict in dict.type.board_size"
|
||||||
:key="dict.id"
|
:key="dict.value"
|
||||||
:label="dict.name"
|
:label="dict.label + ' ' + dict.value"
|
||||||
:value="dict.id"
|
:value="dict.value"
|
||||||
/>
|
/>
|
||||||
</el-select>
|
</el-select>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="品牌/协议" prop="boardBrandProtocol">
|
<el-form-item label="品牌" prop="boardBrand">
|
||||||
<el-cascader
|
<el-input v-model="form.boardBrand" placeholder="请输入情报板品牌"/>
|
||||||
v-model="form.boardBrandProtocol"
|
</el-form-item>
|
||||||
:options="boardProtocolOptions"
|
<el-form-item label="通讯协议" prop="boardCommunicationProtocol">
|
||||||
:props="{lable: 'lable', value: 'id', expandTrigger:'hover', emitPath: false}"
|
<el-select
|
||||||
|
v-model="form.boardCommunicationProtocol"
|
||||||
|
placeholder="全部"
|
||||||
|
>
|
||||||
|
<el-option
|
||||||
|
v-for="dict in dict.type.board_protocol"
|
||||||
|
:key="dict.value"
|
||||||
|
:label="dict.label"
|
||||||
|
:value="dict.value"
|
||||||
/>
|
/>
|
||||||
|
</el-select>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="情报板IP" prop="boardIp">
|
<el-form-item label="情报板IP" prop="boardIp">
|
||||||
<el-input v-model="form.boardIp" placeholder="请输入情报板IP"/>
|
<el-input v-model="form.boardIp" placeholder="请输入情报板IP"/>
|
||||||
|
@ -166,8 +195,6 @@ import Treeselect from "@riophae/vue-treeselect";
|
||||||
import "@riophae/vue-treeselect/dist/vue-treeselect.css";
|
import "@riophae/vue-treeselect/dist/vue-treeselect.css";
|
||||||
import TextPreview from "@/views/board/component/TextPreview.vue";
|
import TextPreview from "@/views/board/component/TextPreview.vue";
|
||||||
import {roadGroupTreeSelect} from "@/api/board/roadgroup";
|
import {roadGroupTreeSelect} from "@/api/board/roadgroup";
|
||||||
import {listBoardType} from "@/api/board/boardtype";
|
|
||||||
import {protocolTreeSelect} from "@/api/board/protocol";
|
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: "Info",
|
name: "Info",
|
||||||
|
@ -183,13 +210,8 @@ export default {
|
||||||
single: true,
|
single: true,
|
||||||
// 非多个禁用
|
// 非多个禁用
|
||||||
multiple: true,
|
multiple: true,
|
||||||
// 路段树选项
|
// 部门树选项
|
||||||
roadGroupOptions: [],
|
roadGroupOptions: [],
|
||||||
// 情报板类型列表
|
|
||||||
boardTypeOptions: [],
|
|
||||||
boardTypeId: null,
|
|
||||||
// 情报板协议树
|
|
||||||
boardProtocolOptions: [],
|
|
||||||
// 显示搜索条件
|
// 显示搜索条件
|
||||||
showSearch: true,
|
showSearch: true,
|
||||||
// 总条数
|
// 总条数
|
||||||
|
@ -230,12 +252,15 @@ export default {
|
||||||
boardMileage: [
|
boardMileage: [
|
||||||
{required: true, message: "情报板工桩号不能为空", trigger: "blur"}
|
{required: true, message: "情报板工桩号不能为空", trigger: "blur"}
|
||||||
],
|
],
|
||||||
boardSizeType: [
|
boardSize: [
|
||||||
{required: true, message: "情报板类型不能为空", trigger: "blur"}
|
{required: true, message: "情报板尺寸不能为空", trigger: "blur"}
|
||||||
],
|
],
|
||||||
boardBrandProtocol: [
|
boardBrand: [
|
||||||
{required: true, message: "情报板品牌不能为空", trigger: "blur"}
|
{required: true, message: "情报板品牌不能为空", trigger: "blur"}
|
||||||
],
|
],
|
||||||
|
boardCommunicationProtocol: [
|
||||||
|
{required: true, message: "情报板通讯协议不能为空", trigger: "blur"}
|
||||||
|
],
|
||||||
boardIp: [
|
boardIp: [
|
||||||
{required: true, message: "情报板IP不能为空", trigger: "blur"},
|
{required: true, message: "情报板IP不能为空", trigger: "blur"},
|
||||||
{
|
{
|
||||||
|
@ -250,8 +275,6 @@ export default {
|
||||||
created() {
|
created() {
|
||||||
this.getList();
|
this.getList();
|
||||||
this.getRoadTree();
|
this.getRoadTree();
|
||||||
this.getBoardTypeList();
|
|
||||||
this.getProtocolTree();
|
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
/** 查询情报板信息列表 */
|
/** 查询情报板信息列表 */
|
||||||
|
@ -276,7 +299,7 @@ export default {
|
||||||
boardRoadSection: null,
|
boardRoadSection: null,
|
||||||
boardDirection: null,
|
boardDirection: null,
|
||||||
boardMileage: null,
|
boardMileage: null,
|
||||||
boardSizeType: null,
|
boardSize: null,
|
||||||
boardBrand: null,
|
boardBrand: null,
|
||||||
boardCommunicationProtocol: null,
|
boardCommunicationProtocol: null,
|
||||||
boardIp: null,
|
boardIp: null,
|
||||||
|
@ -359,18 +382,6 @@ export default {
|
||||||
this.roadGroupOptions = response.data;
|
this.roadGroupOptions = response.data;
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
/** 查询情报板类型定义 */
|
|
||||||
getBoardTypeList() {
|
|
||||||
listBoardType().then(response => {
|
|
||||||
this.boardTypeOptions = response.rows;
|
|
||||||
});
|
|
||||||
},
|
|
||||||
/** 查询情报板协议树 */
|
|
||||||
getProtocolTree() {
|
|
||||||
protocolTreeSelect().then(response => {
|
|
||||||
this.boardProtocolOptions = response.data;
|
|
||||||
});
|
|
||||||
},
|
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
</script>
|
</script>
|
||||||
|
|
|
@ -50,6 +50,16 @@
|
||||||
v-hasPermi="['board:plan:remove']"
|
v-hasPermi="['board:plan:remove']"
|
||||||
>删除</el-button>
|
>删除</el-button>
|
||||||
</el-col>
|
</el-col>
|
||||||
|
<!-- <el-col :span="1.5">-->
|
||||||
|
<!-- <el-button-->
|
||||||
|
<!-- type="warning"-->
|
||||||
|
<!-- plain-->
|
||||||
|
<!-- icon="el-icon-download"-->
|
||||||
|
<!-- size="mini"-->
|
||||||
|
<!-- @click="handleExport"-->
|
||||||
|
<!-- v-hasPermi="['board:plan:export']"-->
|
||||||
|
<!-- >导出</el-button>-->
|
||||||
|
<!-- </el-col>-->
|
||||||
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
|
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
|
||||||
</el-row>
|
</el-row>
|
||||||
<el-table v-loading="loading" :data="planList" @selection-change="handleSelectionChange">
|
<el-table v-loading="loading" :data="planList" @selection-change="handleSelectionChange">
|
||||||
|
@ -59,7 +69,7 @@
|
||||||
<el-table-column label="等级" align="center" prop="level" />
|
<el-table-column label="等级" align="center" prop="level" />
|
||||||
<el-table-column label="最大值" align="center" prop="maxValue" />
|
<el-table-column label="最大值" align="center" prop="maxValue" />
|
||||||
<el-table-column label="最小值" align="center" prop="minValue" />
|
<el-table-column label="最小值" align="center" prop="minValue" />
|
||||||
<el-table-column label="显示内容" align="center" prop="presetContentName" />
|
<el-table-column label="显示内容" align="center" prop="displayContent" />
|
||||||
<el-table-column label="操作" align="center" class-name="small-padding fixed-width">
|
<el-table-column label="操作" align="center" class-name="small-padding fixed-width">
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
<el-button
|
<el-button
|
||||||
|
@ -105,16 +115,7 @@
|
||||||
<el-input-number :min="form.minValue" :precision="2" v-model="form.maxValue" placeholder="请输入最大值" />
|
<el-input-number :min="form.minValue" :precision="2" v-model="form.maxValue" placeholder="请输入最大值" />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="显示内容">
|
<el-form-item label="显示内容">
|
||||||
<el-select
|
<el-input v-model="form.displayContent" :min-height="192"/>
|
||||||
v-model="form.presetContentId"
|
|
||||||
placeholder="请选择">
|
|
||||||
<el-option
|
|
||||||
v-for="dict in this.contentModelOptions"
|
|
||||||
:key="dict.id"
|
|
||||||
:label="dict.name"
|
|
||||||
:value="dict.id"
|
|
||||||
/>
|
|
||||||
</el-select>
|
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-form>
|
</el-form>
|
||||||
<div slot="footer" class="dialog-footer">
|
<div slot="footer" class="dialog-footer">
|
||||||
|
@ -129,7 +130,6 @@
|
||||||
import { listPlan, getPlan, delPlan, addPlan, updatePlan } from "@/api/board/plan";
|
import { listPlan, getPlan, delPlan, addPlan, updatePlan } from "@/api/board/plan";
|
||||||
import PlanTypeTree from "@/views/board/plan/planTypeTree.vue";
|
import PlanTypeTree from "@/views/board/plan/planTypeTree.vue";
|
||||||
import {planTypeTreeSelect} from "@/api/board/plantype";
|
import {planTypeTreeSelect} from "@/api/board/plantype";
|
||||||
import {listContent} from "@/api/board/content";
|
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: "Plan",
|
name: "Plan",
|
||||||
|
@ -152,7 +152,6 @@ export default {
|
||||||
total: 0,
|
total: 0,
|
||||||
// 警报计划表格数据
|
// 警报计划表格数据
|
||||||
planList: [],
|
planList: [],
|
||||||
contentModelOptions: [],
|
|
||||||
// 弹出层标题
|
// 弹出层标题
|
||||||
title: "",
|
title: "",
|
||||||
// 是否显示弹出层
|
// 是否显示弹出层
|
||||||
|
@ -187,7 +186,7 @@ export default {
|
||||||
minValue: [
|
minValue: [
|
||||||
{ required: true, message: "最小值不能为空", trigger: "blur" }
|
{ required: true, message: "最小值不能为空", trigger: "blur" }
|
||||||
],
|
],
|
||||||
presetContentId: [
|
displayContent: [
|
||||||
{ required: true, message: "显示内容不能为空", trigger: "blur" }
|
{ required: true, message: "显示内容不能为空", trigger: "blur" }
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
|
@ -219,7 +218,7 @@ export default {
|
||||||
level: null,
|
level: null,
|
||||||
maxValue: null,
|
maxValue: null,
|
||||||
minValue: null,
|
minValue: null,
|
||||||
presetContentId: null
|
displayContent: null
|
||||||
};
|
};
|
||||||
this.resetForm("form");
|
this.resetForm("form");
|
||||||
},
|
},
|
||||||
|
@ -296,26 +295,12 @@ export default {
|
||||||
this.clickNodeData = data;
|
this.clickNodeData = data;
|
||||||
this.queryParams.type = data.id;
|
this.queryParams.type = data.id;
|
||||||
this.handleQuery();
|
this.handleQuery();
|
||||||
this.getContentList();
|
|
||||||
},
|
},
|
||||||
getPlanTypeTree() {
|
getPlanTypeTree() {
|
||||||
planTypeTreeSelect().then(response => {
|
planTypeTreeSelect().then(response => {
|
||||||
this.clickNodeData = response.data[0].children[0];
|
this.clickNodeData = response.data[0].children[0];
|
||||||
this.queryParams.type = response.data[0].children[0].id;
|
this.queryParams.type = response.data[0].children[0].id;
|
||||||
this.getList();
|
this.getList();
|
||||||
this.getContentList();
|
|
||||||
});
|
|
||||||
},
|
|
||||||
getContentList() {
|
|
||||||
this.contentModelOptions = [];
|
|
||||||
listContent({infoType: this.queryParams.type}).then(response => {
|
|
||||||
response.rows.forEach(row => {
|
|
||||||
let model = {
|
|
||||||
name: row.name + " - " + row.boardSizeTypeName + " - " + row.content,
|
|
||||||
id: row.id
|
|
||||||
}
|
|
||||||
this.contentModelOptions.push(model)
|
|
||||||
});
|
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
|
|
@ -1,270 +0,0 @@
|
||||||
<template>
|
|
||||||
<div class="app-container">
|
|
||||||
<el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="auto">
|
|
||||||
<el-form-item label="情报板品牌" prop="brand">
|
|
||||||
<el-input
|
|
||||||
v-model="queryParams.brand"
|
|
||||||
placeholder="请输入情报板品牌"
|
|
||||||
clearable
|
|
||||||
@keyup.enter.native="handleQuery"
|
|
||||||
/>
|
|
||||||
</el-form-item>
|
|
||||||
<el-form-item label="情报板通讯协议" prop="protocol">
|
|
||||||
<el-input
|
|
||||||
v-model="queryParams.protocol"
|
|
||||||
placeholder="请输入情报板通讯协议"
|
|
||||||
clearable
|
|
||||||
@keyup.enter.native="handleQuery"
|
|
||||||
/>
|
|
||||||
</el-form-item>
|
|
||||||
<el-form-item>
|
|
||||||
<el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button>
|
|
||||||
<el-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button>
|
|
||||||
</el-form-item>
|
|
||||||
</el-form>
|
|
||||||
|
|
||||||
<el-row :gutter="10" class="mb8">
|
|
||||||
<el-col :span="1.5">
|
|
||||||
<el-button
|
|
||||||
type="primary"
|
|
||||||
plain
|
|
||||||
icon="el-icon-plus"
|
|
||||||
size="mini"
|
|
||||||
@click="handleAdd"
|
|
||||||
v-hasPermi="['board:protocol:add']"
|
|
||||||
>新增</el-button>
|
|
||||||
</el-col>
|
|
||||||
<el-col :span="1.5">
|
|
||||||
<el-button
|
|
||||||
type="success"
|
|
||||||
plain
|
|
||||||
icon="el-icon-edit"
|
|
||||||
size="mini"
|
|
||||||
:disabled="single"
|
|
||||||
@click="handleUpdate"
|
|
||||||
v-hasPermi="['board:protocol:edit']"
|
|
||||||
>修改</el-button>
|
|
||||||
</el-col>
|
|
||||||
<el-col :span="1.5">
|
|
||||||
<el-button
|
|
||||||
type="danger"
|
|
||||||
plain
|
|
||||||
icon="el-icon-delete"
|
|
||||||
size="mini"
|
|
||||||
:disabled="multiple"
|
|
||||||
@click="handleDelete"
|
|
||||||
v-hasPermi="['board:protocol:remove']"
|
|
||||||
>删除</el-button>
|
|
||||||
</el-col>
|
|
||||||
<el-col :span="1.5">
|
|
||||||
<el-button
|
|
||||||
type="warning"
|
|
||||||
plain
|
|
||||||
icon="el-icon-download"
|
|
||||||
size="mini"
|
|
||||||
@click="handleExport"
|
|
||||||
v-hasPermi="['board:protocol:export']"
|
|
||||||
>导出</el-button>
|
|
||||||
</el-col>
|
|
||||||
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
|
|
||||||
</el-row>
|
|
||||||
|
|
||||||
<el-table v-loading="loading" :data="protocolList" @selection-change="handleSelectionChange">
|
|
||||||
<el-table-column type="selection" width="55" align="center" />
|
|
||||||
<el-table-column label="唯一编号" align="center" prop="id" />
|
|
||||||
<el-table-column label="情报板品牌" align="center" prop="brand" />
|
|
||||||
<el-table-column label="情报板通讯协议" align="center" prop="protocol" />
|
|
||||||
<el-table-column label="备注" align="center" prop="remark" />
|
|
||||||
<el-table-column label="操作" align="center" class-name="small-padding fixed-width">
|
|
||||||
<template slot-scope="scope">
|
|
||||||
<el-button
|
|
||||||
size="mini"
|
|
||||||
type="text"
|
|
||||||
icon="el-icon-edit"
|
|
||||||
@click="handleUpdate(scope.row)"
|
|
||||||
v-hasPermi="['board:protocol:edit']"
|
|
||||||
>修改</el-button>
|
|
||||||
<el-button
|
|
||||||
size="mini"
|
|
||||||
type="text"
|
|
||||||
icon="el-icon-delete"
|
|
||||||
@click="handleDelete(scope.row)"
|
|
||||||
v-hasPermi="['board:protocol:remove']"
|
|
||||||
>删除</el-button>
|
|
||||||
</template>
|
|
||||||
</el-table-column>
|
|
||||||
</el-table>
|
|
||||||
|
|
||||||
<pagination
|
|
||||||
v-show="total>0"
|
|
||||||
:total="total"
|
|
||||||
:page.sync="queryParams.pageNum"
|
|
||||||
:limit.sync="queryParams.pageSize"
|
|
||||||
@pagination="getList"
|
|
||||||
/>
|
|
||||||
|
|
||||||
<!-- 添加或修改情报板协议库对话框 -->
|
|
||||||
<el-dialog :title="title" :visible.sync="open" width="500px" append-to-body>
|
|
||||||
<el-form ref="form" :model="form" :rules="rules" label-width="auto">
|
|
||||||
<el-form-item label="情报板品牌" prop="brand">
|
|
||||||
<el-input v-model="form.brand" placeholder="请输入情报板品牌" />
|
|
||||||
</el-form-item>
|
|
||||||
<el-form-item label="情报板通讯协议" prop="protocol">
|
|
||||||
<el-input v-model="form.protocol" placeholder="请输入情报板通讯协议" />
|
|
||||||
</el-form-item>
|
|
||||||
<el-form-item label="备注" prop="remark">
|
|
||||||
<el-input v-model="form.remark" placeholder="请输入备注" />
|
|
||||||
</el-form-item>
|
|
||||||
</el-form>
|
|
||||||
<div slot="footer" class="dialog-footer">
|
|
||||||
<el-button type="primary" @click="submitForm">确 定</el-button>
|
|
||||||
<el-button @click="cancel">取 消</el-button>
|
|
||||||
</div>
|
|
||||||
</el-dialog>
|
|
||||||
</div>
|
|
||||||
</template>
|
|
||||||
|
|
||||||
<script>
|
|
||||||
import { listProtocol, getProtocol, delProtocol, addProtocol, updateProtocol } from "@/api/board/protocol";
|
|
||||||
|
|
||||||
export default {
|
|
||||||
name: "Protocol",
|
|
||||||
data() {
|
|
||||||
return {
|
|
||||||
// 遮罩层
|
|
||||||
loading: true,
|
|
||||||
// 选中数组
|
|
||||||
ids: [],
|
|
||||||
// 非单个禁用
|
|
||||||
single: true,
|
|
||||||
// 非多个禁用
|
|
||||||
multiple: true,
|
|
||||||
// 显示搜索条件
|
|
||||||
showSearch: true,
|
|
||||||
// 总条数
|
|
||||||
total: 0,
|
|
||||||
// 情报板协议库表格数据
|
|
||||||
protocolList: [],
|
|
||||||
// 弹出层标题
|
|
||||||
title: "",
|
|
||||||
// 是否显示弹出层
|
|
||||||
open: false,
|
|
||||||
// 查询参数
|
|
||||||
queryParams: {
|
|
||||||
pageNum: 1,
|
|
||||||
pageSize: 10,
|
|
||||||
brand: null,
|
|
||||||
protocol: null,
|
|
||||||
},
|
|
||||||
// 表单参数
|
|
||||||
form: {},
|
|
||||||
// 表单校验
|
|
||||||
rules: {
|
|
||||||
brand: [
|
|
||||||
{ required: true, message: "情报板品牌不能为空", trigger: "blur" }
|
|
||||||
],
|
|
||||||
protocol: [
|
|
||||||
{ required: true, message: "情报板通讯协议不能为空", trigger: "blur" }
|
|
||||||
],
|
|
||||||
},
|
|
||||||
};
|
|
||||||
},
|
|
||||||
created() {
|
|
||||||
this.getList();
|
|
||||||
},
|
|
||||||
methods: {
|
|
||||||
/** 查询情报板协议库列表 */
|
|
||||||
getList() {
|
|
||||||
this.loading = true;
|
|
||||||
listProtocol(this.queryParams).then(response => {
|
|
||||||
this.protocolList = response.rows;
|
|
||||||
this.total = response.total;
|
|
||||||
this.loading = false;
|
|
||||||
});
|
|
||||||
},
|
|
||||||
// 取消按钮
|
|
||||||
cancel() {
|
|
||||||
this.open = false;
|
|
||||||
this.reset();
|
|
||||||
},
|
|
||||||
// 表单重置
|
|
||||||
reset() {
|
|
||||||
this.form = {
|
|
||||||
id: null,
|
|
||||||
brand: null,
|
|
||||||
protocol: null,
|
|
||||||
remark: null
|
|
||||||
};
|
|
||||||
this.resetForm("form");
|
|
||||||
},
|
|
||||||
/** 搜索按钮操作 */
|
|
||||||
handleQuery() {
|
|
||||||
this.queryParams.pageNum = 1;
|
|
||||||
this.getList();
|
|
||||||
},
|
|
||||||
/** 重置按钮操作 */
|
|
||||||
resetQuery() {
|
|
||||||
this.resetForm("queryForm");
|
|
||||||
this.handleQuery();
|
|
||||||
},
|
|
||||||
// 多选框选中数据
|
|
||||||
handleSelectionChange(selection) {
|
|
||||||
this.ids = selection.map(item => item.id)
|
|
||||||
this.single = selection.length!==1
|
|
||||||
this.multiple = !selection.length
|
|
||||||
},
|
|
||||||
/** 新增按钮操作 */
|
|
||||||
handleAdd() {
|
|
||||||
this.reset();
|
|
||||||
this.open = true;
|
|
||||||
this.title = "添加情报板协议库";
|
|
||||||
},
|
|
||||||
/** 修改按钮操作 */
|
|
||||||
handleUpdate(row) {
|
|
||||||
this.reset();
|
|
||||||
const id = row.id || this.ids
|
|
||||||
getProtocol(id).then(response => {
|
|
||||||
this.form = response.data;
|
|
||||||
this.open = true;
|
|
||||||
this.title = "修改情报板协议库";
|
|
||||||
});
|
|
||||||
},
|
|
||||||
/** 提交按钮 */
|
|
||||||
submitForm() {
|
|
||||||
this.$refs["form"].validate(valid => {
|
|
||||||
if (valid) {
|
|
||||||
if (this.form.id != null) {
|
|
||||||
updateProtocol(this.form).then(response => {
|
|
||||||
this.$modal.msgSuccess("修改成功");
|
|
||||||
this.open = false;
|
|
||||||
this.getList();
|
|
||||||
});
|
|
||||||
} else {
|
|
||||||
addProtocol(this.form).then(response => {
|
|
||||||
this.$modal.msgSuccess("新增成功");
|
|
||||||
this.open = false;
|
|
||||||
this.getList();
|
|
||||||
});
|
|
||||||
}
|
|
||||||
}
|
|
||||||
});
|
|
||||||
},
|
|
||||||
/** 删除按钮操作 */
|
|
||||||
handleDelete(row) {
|
|
||||||
const ids = row.id || this.ids;
|
|
||||||
this.$modal.confirm('是否确认删除情报板协议库编号为"' + ids + '"的数据项?').then(function() {
|
|
||||||
return delProtocol(ids);
|
|
||||||
}).then(() => {
|
|
||||||
this.getList();
|
|
||||||
this.$modal.msgSuccess("删除成功");
|
|
||||||
}).catch(() => {});
|
|
||||||
},
|
|
||||||
/** 导出按钮操作 */
|
|
||||||
handleExport() {
|
|
||||||
this.download('board/protocol/export', {
|
|
||||||
...this.queryParams
|
|
||||||
}, `protocol_${new Date().getTime()}.xlsx`)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
};
|
|
||||||
</script>
|
|
|
@ -1,160 +0,0 @@
|
||||||
<template>
|
|
||||||
<div class="app-container">
|
|
||||||
<el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="auto">
|
|
||||||
<el-form-item label="操作人" prop="operator">
|
|
||||||
<el-input
|
|
||||||
v-model="queryParams.operator"
|
|
||||||
placeholder="请输入操作人"
|
|
||||||
clearable
|
|
||||||
@keyup.enter.native="handleQuery"
|
|
||||||
/>
|
|
||||||
</el-form-item>
|
|
||||||
<el-form-item label="情报板名称" prop="boardName">
|
|
||||||
<el-input
|
|
||||||
v-model="queryParams.boardName"
|
|
||||||
placeholder="请输入情报板名称"
|
|
||||||
clearable
|
|
||||||
@keyup.enter.native="handleQuery"
|
|
||||||
/>
|
|
||||||
</el-form-item>
|
|
||||||
<el-form-item>
|
|
||||||
<el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button>
|
|
||||||
<el-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button>
|
|
||||||
</el-form-item>
|
|
||||||
</el-form>
|
|
||||||
|
|
||||||
<el-row :gutter="10" class="mb8">
|
|
||||||
<el-col :span="1.5">
|
|
||||||
<el-button
|
|
||||||
type="danger"
|
|
||||||
plain
|
|
||||||
icon="el-icon-delete"
|
|
||||||
size="mini"
|
|
||||||
:disabled="multiple"
|
|
||||||
@click="handleDelete"
|
|
||||||
v-hasPermi="['board:releaseLog:remove']"
|
|
||||||
>删除</el-button>
|
|
||||||
</el-col>
|
|
||||||
<el-col :span="1.5">
|
|
||||||
<el-button
|
|
||||||
type="warning"
|
|
||||||
plain
|
|
||||||
icon="el-icon-download"
|
|
||||||
size="mini"
|
|
||||||
@click="handleExport"
|
|
||||||
v-hasPermi="['board:releaseLog:export']"
|
|
||||||
>导出</el-button>
|
|
||||||
</el-col>
|
|
||||||
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
|
|
||||||
</el-row>
|
|
||||||
|
|
||||||
<el-table v-loading="loading" :data="releaseLogList" @selection-change="handleSelectionChange">
|
|
||||||
<el-table-column type="selection" width="55" align="center" />
|
|
||||||
<el-table-column label="唯一编号" align="center" prop="id" />
|
|
||||||
<el-table-column label="操作人" align="center" prop="operator" />
|
|
||||||
<el-table-column label="情报板名称" align="center" prop="boardName" />
|
|
||||||
<el-table-column label="发布内容" align="center" prop="releaseContent" />
|
|
||||||
<el-table-column label="操作" align="center" class-name="small-padding fixed-width">
|
|
||||||
<template slot-scope="scope">
|
|
||||||
<el-button
|
|
||||||
size="mini"
|
|
||||||
type="text"
|
|
||||||
icon="el-icon-delete"
|
|
||||||
@click="handleDelete(scope.row)"
|
|
||||||
v-hasPermi="['board:releaseLog:remove']"
|
|
||||||
>删除</el-button>
|
|
||||||
</template>
|
|
||||||
</el-table-column>
|
|
||||||
</el-table>
|
|
||||||
|
|
||||||
<pagination
|
|
||||||
v-show="total>0"
|
|
||||||
:total="total"
|
|
||||||
:page.sync="queryParams.pageNum"
|
|
||||||
:limit.sync="queryParams.pageSize"
|
|
||||||
@pagination="getList"
|
|
||||||
/>
|
|
||||||
</div>
|
|
||||||
</template>
|
|
||||||
|
|
||||||
<script>
|
|
||||||
import {listReleaseLog, delReleaseLog,} from "@/api/board/releaseLog";
|
|
||||||
|
|
||||||
export default {
|
|
||||||
name: "ReleaseLog",
|
|
||||||
data() {
|
|
||||||
return {
|
|
||||||
// 遮罩层
|
|
||||||
loading: true,
|
|
||||||
// 选中数组
|
|
||||||
ids: [],
|
|
||||||
// 非单个禁用
|
|
||||||
single: true,
|
|
||||||
// 非多个禁用
|
|
||||||
multiple: true,
|
|
||||||
// 显示搜索条件
|
|
||||||
showSearch: true,
|
|
||||||
// 总条数
|
|
||||||
total: 0,
|
|
||||||
// 发布日志记录表格数据
|
|
||||||
releaseLogList: [],
|
|
||||||
// 查询参数
|
|
||||||
queryParams: {
|
|
||||||
pageNum: 1,
|
|
||||||
pageSize: 10,
|
|
||||||
operator: null,
|
|
||||||
boardId: null,
|
|
||||||
boardName: null,
|
|
||||||
releaseContent: null
|
|
||||||
},
|
|
||||||
};
|
|
||||||
},
|
|
||||||
created() {
|
|
||||||
this.getList();
|
|
||||||
},
|
|
||||||
methods: {
|
|
||||||
/** 查询发布日志记录列表 */
|
|
||||||
getList() {
|
|
||||||
this.loading = true;
|
|
||||||
listReleaseLog(this.queryParams).then(response => {
|
|
||||||
this.releaseLogList = response.rows;
|
|
||||||
this.total = response.total;
|
|
||||||
this.loading = false;
|
|
||||||
});
|
|
||||||
},
|
|
||||||
/** 搜索按钮操作 */
|
|
||||||
handleQuery() {
|
|
||||||
this.queryParams.pageNum = 1;
|
|
||||||
this.getList();
|
|
||||||
},
|
|
||||||
/** 重置按钮操作 */
|
|
||||||
resetQuery() {
|
|
||||||
this.resetForm("queryForm");
|
|
||||||
this.handleQuery();
|
|
||||||
},
|
|
||||||
// 多选框选中数据
|
|
||||||
handleSelectionChange(selection) {
|
|
||||||
this.ids = selection.map(item => item.id)
|
|
||||||
this.single = selection.length !== 1
|
|
||||||
this.multiple = !selection.length
|
|
||||||
},
|
|
||||||
/** 删除按钮操作 */
|
|
||||||
handleDelete(row) {
|
|
||||||
const ids = row.id || this.ids;
|
|
||||||
this.$modal.confirm('是否确认删除发布日志记录编号为"' + ids + '"的数据项?').then(function () {
|
|
||||||
return delReleaseLog(ids);
|
|
||||||
}).then(() => {
|
|
||||||
this.getList();
|
|
||||||
this.$modal.msgSuccess("删除成功");
|
|
||||||
}).catch(() => {
|
|
||||||
});
|
|
||||||
},
|
|
||||||
/** 导出按钮操作 */
|
|
||||||
handleExport() {
|
|
||||||
this.download('board/releaseLog/export', {
|
|
||||||
...this.queryParams
|
|
||||||
}, `releaseLog_${new Date().getTime()}.xlsx`)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
};
|
|
||||||
</script>
|
|
|
@ -1,272 +0,0 @@
|
||||||
<template>
|
|
||||||
<div class="app-container">
|
|
||||||
<el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="68px">
|
|
||||||
<el-form-item label="名称" prop="name">
|
|
||||||
<el-input
|
|
||||||
v-model="queryParams.name"
|
|
||||||
placeholder="请输入名称"
|
|
||||||
clearable
|
|
||||||
@keyup.enter.native="handleQuery"
|
|
||||||
/>
|
|
||||||
</el-form-item>
|
|
||||||
<el-form-item>
|
|
||||||
<el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button>
|
|
||||||
<el-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button>
|
|
||||||
</el-form-item>
|
|
||||||
</el-form>
|
|
||||||
|
|
||||||
<el-row :gutter="10" class="mb8">
|
|
||||||
<el-col :span="1.5">
|
|
||||||
<el-button
|
|
||||||
type="primary"
|
|
||||||
plain
|
|
||||||
icon="el-icon-plus"
|
|
||||||
size="mini"
|
|
||||||
@click="handleAdd"
|
|
||||||
v-hasPermi="['board:whiteIp:add']"
|
|
||||||
>新增</el-button>
|
|
||||||
</el-col>
|
|
||||||
<el-col :span="1.5">
|
|
||||||
<el-button
|
|
||||||
type="success"
|
|
||||||
plain
|
|
||||||
icon="el-icon-edit"
|
|
||||||
size="mini"
|
|
||||||
:disabled="single"
|
|
||||||
@click="handleUpdate"
|
|
||||||
v-hasPermi="['board:whiteIp:edit']"
|
|
||||||
>修改</el-button>
|
|
||||||
</el-col>
|
|
||||||
<el-col :span="1.5">
|
|
||||||
<el-button
|
|
||||||
type="danger"
|
|
||||||
plain
|
|
||||||
icon="el-icon-delete"
|
|
||||||
size="mini"
|
|
||||||
:disabled="multiple"
|
|
||||||
@click="handleDelete"
|
|
||||||
v-hasPermi="['board:whiteIp:remove']"
|
|
||||||
>删除</el-button>
|
|
||||||
</el-col>
|
|
||||||
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
|
|
||||||
</el-row>
|
|
||||||
|
|
||||||
<el-table v-loading="loading" :data="whiteIpList" @selection-change="handleSelectionChange">
|
|
||||||
<el-table-column type="selection" width="55" align="center" />
|
|
||||||
<el-table-column label="唯一标识" align="center" prop="id" />
|
|
||||||
<el-table-column label="名称" align="center" prop="name" />
|
|
||||||
<el-table-column label="IP地址" align="center" prop="ip" />
|
|
||||||
<el-table-column label="安全密钥" align="center" prop="securityKey" :formatter="(row) => formatSecurityKey(row.securityKey)" show-overflow-tooltip />
|
|
||||||
<el-table-column label="备注" align="center" prop="remark" show-overflow-tooltip />
|
|
||||||
<el-table-column label="操作" align="center" class-name="small-padding fixed-width">
|
|
||||||
<template slot-scope="scope">
|
|
||||||
<el-button
|
|
||||||
size="mini"
|
|
||||||
type="text"
|
|
||||||
icon="el-icon-edit"
|
|
||||||
@click="handleUpdate(scope.row)"
|
|
||||||
v-hasPermi="['board:whiteIp:edit']"
|
|
||||||
>修改</el-button>
|
|
||||||
<el-button
|
|
||||||
size="mini"
|
|
||||||
type="text"
|
|
||||||
icon="el-icon-delete"
|
|
||||||
@click="handleDelete(scope.row)"
|
|
||||||
v-hasPermi="['board:whiteIp:remove']"
|
|
||||||
>删除</el-button>
|
|
||||||
</template>
|
|
||||||
</el-table-column>
|
|
||||||
</el-table>
|
|
||||||
|
|
||||||
<pagination
|
|
||||||
v-show="total>0"
|
|
||||||
:total="total"
|
|
||||||
:page.sync="queryParams.pageNum"
|
|
||||||
:limit.sync="queryParams.pageSize"
|
|
||||||
@pagination="getList"
|
|
||||||
/>
|
|
||||||
|
|
||||||
<!-- 添加或修改发布源白名单对话框 -->
|
|
||||||
<el-dialog :title="title" :visible.sync="open" width="500px" append-to-body>
|
|
||||||
<el-form ref="form" :model="form" :rules="rules" label-width="80px">
|
|
||||||
<el-form-item label="名称" prop="name">
|
|
||||||
<el-input v-model="form.name" placeholder="请输入名称" />
|
|
||||||
</el-form-item>
|
|
||||||
<el-form-item label="IP地址" prop="ip">
|
|
||||||
<el-input v-model="form.ip" placeholder="请输入IP地址" />
|
|
||||||
</el-form-item>
|
|
||||||
<el-form-item label="安全密钥" prop="securityKey">
|
|
||||||
<el-input type="password" v-model="form.securityKey" placeholder="请输入安全密钥" show-password />
|
|
||||||
</el-form-item>
|
|
||||||
<el-form-item label="备注" prop="remark">
|
|
||||||
<el-input v-model="form.remark" placeholder="请输入备注" />
|
|
||||||
</el-form-item>
|
|
||||||
</el-form>
|
|
||||||
<div slot="footer" class="dialog-footer">
|
|
||||||
<el-button type="primary" @click="submitForm">确 定</el-button>
|
|
||||||
<el-button @click="cancel">取 消</el-button>
|
|
||||||
</div>
|
|
||||||
</el-dialog>
|
|
||||||
</div>
|
|
||||||
</template>
|
|
||||||
|
|
||||||
<script>
|
|
||||||
import { listWhiteIp, getWhiteIp, delWhiteIp, addWhiteIp, updateWhiteIp } from "@/api/board/whiteip";
|
|
||||||
|
|
||||||
export default {
|
|
||||||
name: "WhiteIp",
|
|
||||||
data() {
|
|
||||||
return {
|
|
||||||
// 遮罩层
|
|
||||||
loading: true,
|
|
||||||
// 选中数组
|
|
||||||
ids: [],
|
|
||||||
// 非单个禁用
|
|
||||||
single: true,
|
|
||||||
// 非多个禁用
|
|
||||||
multiple: true,
|
|
||||||
// 显示搜索条件
|
|
||||||
showSearch: true,
|
|
||||||
// 总条数
|
|
||||||
total: 0,
|
|
||||||
// 发布源白名单表格数据
|
|
||||||
whiteIpList: [],
|
|
||||||
// 弹出层标题
|
|
||||||
title: "",
|
|
||||||
// 是否显示弹出层
|
|
||||||
open: false,
|
|
||||||
// 查询参数
|
|
||||||
queryParams: {
|
|
||||||
pageNum: 1,
|
|
||||||
pageSize: 10,
|
|
||||||
name: null,
|
|
||||||
ip: null,
|
|
||||||
securityKey: null,
|
|
||||||
},
|
|
||||||
// 表单参数
|
|
||||||
form: {},
|
|
||||||
// 表单校验
|
|
||||||
rules: {
|
|
||||||
name: [
|
|
||||||
{ required: true, message: "名称不能为空", trigger: "blur" }
|
|
||||||
],
|
|
||||||
ip: [
|
|
||||||
{required: true, message: "IP地址不能为空", trigger: "blur"},
|
|
||||||
{
|
|
||||||
pattern: /^(25[0-5]|2[0-4][0-9]|1[0-9]{2}|[1-9]?[0-9])\.(25[0-5]|2[0-4][0-9]|1[0-9]{2}|[1-9]?[0-9])\.(25[0-5]|2[0-4][0-9]|1[0-9]{2}|[1-9]?[0-9])\.(25[0-5]|2[0-4][0-9]|1[0-9]{2}|[1-9]?[0-9])$/,
|
|
||||||
message: "请输入正确的 IP",
|
|
||||||
trigger: "blur"
|
|
||||||
}
|
|
||||||
],
|
|
||||||
securityKey: [
|
|
||||||
{ required: true, message: "安全密钥不能为空", trigger: "blur" }
|
|
||||||
],
|
|
||||||
}
|
|
||||||
};
|
|
||||||
},
|
|
||||||
created() {
|
|
||||||
this.getList();
|
|
||||||
},
|
|
||||||
methods: {
|
|
||||||
/** 查询发布源白名单列表 */
|
|
||||||
getList() {
|
|
||||||
this.loading = true;
|
|
||||||
listWhiteIp(this.queryParams).then(response => {
|
|
||||||
this.whiteIpList = response.rows;
|
|
||||||
this.total = response.total;
|
|
||||||
this.loading = false;
|
|
||||||
});
|
|
||||||
},
|
|
||||||
// 取消按钮
|
|
||||||
cancel() {
|
|
||||||
this.open = false;
|
|
||||||
this.reset();
|
|
||||||
},
|
|
||||||
// 表单重置
|
|
||||||
reset() {
|
|
||||||
this.form = {
|
|
||||||
id: null,
|
|
||||||
name: null,
|
|
||||||
ip: null,
|
|
||||||
securityKey: null,
|
|
||||||
remark: null
|
|
||||||
};
|
|
||||||
this.resetForm("form");
|
|
||||||
},
|
|
||||||
/** 搜索按钮操作 */
|
|
||||||
handleQuery() {
|
|
||||||
this.queryParams.pageNum = 1;
|
|
||||||
this.getList();
|
|
||||||
},
|
|
||||||
/** 重置按钮操作 */
|
|
||||||
resetQuery() {
|
|
||||||
this.resetForm("queryForm");
|
|
||||||
this.handleQuery();
|
|
||||||
},
|
|
||||||
// 多选框选中数据
|
|
||||||
handleSelectionChange(selection) {
|
|
||||||
this.ids = selection.map(item => item.id)
|
|
||||||
this.single = selection.length!==1
|
|
||||||
this.multiple = !selection.length
|
|
||||||
},
|
|
||||||
/** 新增按钮操作 */
|
|
||||||
handleAdd() {
|
|
||||||
this.reset();
|
|
||||||
this.open = true;
|
|
||||||
this.title = "添加发布源白名单";
|
|
||||||
},
|
|
||||||
/** 修改按钮操作 */
|
|
||||||
handleUpdate(row) {
|
|
||||||
this.reset();
|
|
||||||
const id = row.id || this.ids
|
|
||||||
getWhiteIp(id).then(response => {
|
|
||||||
this.form = response.data;
|
|
||||||
this.open = true;
|
|
||||||
this.title = "修改发布源白名单";
|
|
||||||
});
|
|
||||||
},
|
|
||||||
/** 提交按钮 */
|
|
||||||
submitForm() {
|
|
||||||
this.$refs["form"].validate(valid => {
|
|
||||||
if (valid) {
|
|
||||||
if (this.form.id != null) {
|
|
||||||
updateWhiteIp(this.form).then(response => {
|
|
||||||
this.$modal.msgSuccess("修改成功");
|
|
||||||
this.open = false;
|
|
||||||
this.getList();
|
|
||||||
});
|
|
||||||
} else {
|
|
||||||
addWhiteIp(this.form).then(response => {
|
|
||||||
this.$modal.msgSuccess("新增成功");
|
|
||||||
this.open = false;
|
|
||||||
this.getList();
|
|
||||||
});
|
|
||||||
}
|
|
||||||
}
|
|
||||||
});
|
|
||||||
},
|
|
||||||
/** 删除按钮操作 */
|
|
||||||
handleDelete(row) {
|
|
||||||
const ids = row.id || this.ids;
|
|
||||||
this.$modal.confirm('是否确认删除发布源白名单编号为"' + ids + '"的数据项?').then(function() {
|
|
||||||
return delWhiteIp(ids);
|
|
||||||
}).then(() => {
|
|
||||||
this.getList();
|
|
||||||
this.$modal.msgSuccess("删除成功");
|
|
||||||
}).catch(() => {});
|
|
||||||
},
|
|
||||||
/** 导出按钮操作 */
|
|
||||||
handleExport() {
|
|
||||||
this.download('board/whiteIp/export', {
|
|
||||||
...this.queryParams
|
|
||||||
}, `whiteIp_${new Date().getTime()}.xlsx`)
|
|
||||||
},
|
|
||||||
formatSecurityKey(securityKey) {
|
|
||||||
if (securityKey && securityKey.length > 6) {
|
|
||||||
return securityKey.substring(0, 6) + '*'.repeat(securityKey.length - 6);
|
|
||||||
}
|
|
||||||
return securityKey;
|
|
||||||
},
|
|
||||||
}
|
|
||||||
};
|
|
||||||
</script>
|
|
Loading…
Reference in New Issue