Merge branch 'main' of http://121.37.111.42:3000/zhengsl/WholeProcessPlatform into main_hzz
This commit is contained in:
commit
88f5bcffad
@ -24,17 +24,23 @@ public class MyMetaObjectHandler implements MetaObjectHandler {
|
|||||||
public void insertFill(MetaObject metaObject) {
|
public void insertFill(MetaObject metaObject) {
|
||||||
Date now = new Date();
|
Date now = new Date();
|
||||||
|
|
||||||
// 自动填充创建时间
|
// 创建时间
|
||||||
this.strictInsertFill(metaObject, "createdAt", Date.class, now);
|
this.strictInsertFill(metaObject, "createdAt", Date.class, now);
|
||||||
|
|
||||||
// 自动填充更新时间
|
// 更新时间
|
||||||
this.strictInsertFill(metaObject, "updatedAt", Date.class, now);
|
this.strictInsertFill(metaObject, "updatedAt", Date.class, now);
|
||||||
|
// 更新时间
|
||||||
|
this.strictInsertFill(metaObject, "modifyTime", Date.class, now);
|
||||||
|
|
||||||
try {
|
try {
|
||||||
String userId = SecurityUtils.getUserId();
|
String userId = SecurityUtils.getUserId();
|
||||||
// 自动填充更新时间
|
// 创建人
|
||||||
this.strictInsertFill(metaObject, "createdBy", String.class, userId );
|
this.strictInsertFill(metaObject, "createdBy", String.class, userId );
|
||||||
|
//创建人
|
||||||
// 自动填充更新时间
|
this.strictInsertFill(metaObject, "recordUser", String.class, userId );
|
||||||
|
// 更新人
|
||||||
|
this.strictInsertFill(metaObject, "modifyUser", String.class, userId);
|
||||||
|
// 更新人
|
||||||
this.strictInsertFill(metaObject, "updatedBy", String.class, userId);
|
this.strictInsertFill(metaObject, "updatedBy", String.class, userId);
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
log.info("message{}",e.getMessage());
|
log.info("message{}",e.getMessage());
|
||||||
@ -47,12 +53,21 @@ public class MyMetaObjectHandler implements MetaObjectHandler {
|
|||||||
*/
|
*/
|
||||||
@Override
|
@Override
|
||||||
public void updateFill(MetaObject metaObject) {
|
public void updateFill(MetaObject metaObject) {
|
||||||
// 自动填充更新时间
|
Date date = new Date();
|
||||||
this.strictUpdateFill(metaObject, "updatedAt", Date.class, new Date());
|
// 更新时间
|
||||||
|
this.strictUpdateFill(metaObject, "updatedAt", Date.class, date);
|
||||||
|
// 删除时间
|
||||||
|
this.strictUpdateFill(metaObject, "deleteTime", Date.class, date);
|
||||||
|
// 跟新时间
|
||||||
|
this.strictInsertFill(metaObject, "modifyTime", Date.class, date);
|
||||||
try {
|
try {
|
||||||
String userId = SecurityUtils.getUserId();
|
String userId = SecurityUtils.getUserId();
|
||||||
// 自动填充更新人
|
// 更新人
|
||||||
this.strictInsertFill(metaObject, "updatedBy", String.class, userId);
|
this.strictInsertFill(metaObject, "updatedBy", String.class, userId);
|
||||||
|
// 删除人
|
||||||
|
this.strictInsertFill(metaObject, "deleteUser", String.class, userId);
|
||||||
|
// 更新人
|
||||||
|
this.strictInsertFill(metaObject, "modifyUser", String.class, userId);
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
log.info("message{}",e.getMessage());
|
log.info("message{}",e.getMessage());
|
||||||
}
|
}
|
||||||
|
|||||||
@ -4,23 +4,24 @@ import cn.hutool.core.date.DateUtil;
|
|||||||
import cn.hutool.core.util.StrUtil;
|
import cn.hutool.core.util.StrUtil;
|
||||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||||
import com.yfd.platform.annotation.Log;
|
import com.yfd.platform.annotation.Log;
|
||||||
|
import com.yfd.platform.common.DataSourceRequest;
|
||||||
|
import com.yfd.platform.common.exception.BizException;
|
||||||
import com.yfd.platform.config.ResponseResult;
|
import com.yfd.platform.config.ResponseResult;
|
||||||
import com.yfd.platform.system.domain.PushConfig;
|
import com.yfd.platform.qgc_data.domain.ApprovalMain;
|
||||||
import com.yfd.platform.system.domain.PushConfigTargetRequest;
|
import com.yfd.platform.system.domain.*;
|
||||||
import com.yfd.platform.system.domain.PushHistory;
|
import com.yfd.platform.system.service.*;
|
||||||
import com.yfd.platform.system.domain.PushHistoryDetail;
|
import com.yfd.platform.utils.DataSourceRequestUtil;
|
||||||
import com.yfd.platform.system.service.IPushConfigService;
|
|
||||||
import io.swagger.v3.oas.annotations.Operation;
|
import io.swagger.v3.oas.annotations.Operation;
|
||||||
import io.swagger.v3.oas.annotations.tags.Tag;
|
import io.swagger.v3.oas.annotations.tags.Tag;
|
||||||
import jakarta.annotation.Resource;
|
import jakarta.annotation.Resource;
|
||||||
import org.springframework.web.bind.annotation.GetMapping;
|
import org.springframework.web.bind.annotation.*;
|
||||||
import org.springframework.web.bind.annotation.PostMapping;
|
|
||||||
import org.springframework.web.bind.annotation.RequestBody;
|
|
||||||
import org.springframework.web.bind.annotation.RequestMapping;
|
|
||||||
import org.springframework.web.bind.annotation.RequestParam;
|
|
||||||
import org.springframework.web.bind.annotation.RestController;
|
|
||||||
|
|
||||||
|
import java.text.ParseException;
|
||||||
|
import java.text.SimpleDateFormat;
|
||||||
import java.util.Date;
|
import java.util.Date;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
import static cn.hutool.core.date.DateUtil.parseDate;
|
||||||
|
|
||||||
@RestController
|
@RestController
|
||||||
@RequestMapping("/system/pushConfig")
|
@RequestMapping("/system/pushConfig")
|
||||||
@ -30,14 +31,32 @@ public class PushConfigController {
|
|||||||
@Resource
|
@Resource
|
||||||
private IPushConfigService pushConfigService;
|
private IPushConfigService pushConfigService;
|
||||||
|
|
||||||
|
@Resource
|
||||||
|
private IUserService userService;
|
||||||
|
|
||||||
|
@Resource
|
||||||
|
private ISysRoleService roleService;
|
||||||
|
|
||||||
|
@Resource
|
||||||
|
private IPushHistoryService pushHistoryService;
|
||||||
|
|
||||||
|
@Resource
|
||||||
|
private IPushHistoryDetailService pushHistoryDetailService;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@Operation(summary = "查询推送配置列表")
|
@Operation(summary = "查询推送配置列表")
|
||||||
@GetMapping("/getPushConfigList")
|
@PostMapping("/getPushConfigList")
|
||||||
public ResponseResult getPushConfigList(Page<PushConfig> page,
|
public ResponseResult getPushConfigList(@RequestBody DataSourceRequest request) {
|
||||||
String categoryName,
|
|
||||||
String messageType,
|
Page<PushConfig> pushConfigPage = DataSourceRequestUtil.executeQuery(request, PushConfig.class, pushConfigService);
|
||||||
Integer targetType,
|
return ResponseResult.successData(pushConfigPage);
|
||||||
Integer status) {
|
|
||||||
return ResponseResult.successData(pushConfigService.getPushConfigPage(page, categoryName, messageType, targetType, status));
|
// String categoryName = null;
|
||||||
|
// String messageType = null;
|
||||||
|
// Integer targetType = null;
|
||||||
|
// Integer status = null;
|
||||||
|
// return ResponseResult.successData(pushConfigService.getPushConfigPage(page, categoryName, messageType, targetType, status));
|
||||||
}
|
}
|
||||||
|
|
||||||
@Operation(summary = "根据ID查询推送配置")
|
@Operation(summary = "根据ID查询推送配置")
|
||||||
@ -63,7 +82,7 @@ public class PushConfigController {
|
|||||||
@Log(module = "推送配置", value = "删除推送配置")
|
@Log(module = "推送配置", value = "删除推送配置")
|
||||||
@Operation(summary = "删除推送配置")
|
@Operation(summary = "删除推送配置")
|
||||||
@PostMapping("/deletePushConfig")
|
@PostMapping("/deletePushConfig")
|
||||||
public ResponseResult deletePushConfig(@RequestParam String ids) {
|
public ResponseResult deletePushConfig(@RequestBody List<String> ids) {
|
||||||
return pushConfigService.deletePushConfig(ids) ? ResponseResult.success() : ResponseResult.error("删除失败");
|
return pushConfigService.deletePushConfig(ids) ? ResponseResult.success() : ResponseResult.error("删除失败");
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -102,23 +121,78 @@ public class PushConfigController {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Operation(summary = "查询推送历史主表")
|
@Operation(summary = "查询推送历史主表")
|
||||||
@GetMapping("/getPushHistoryList")
|
@PostMapping("/postPushHistoryList")
|
||||||
public ResponseResult getPushHistoryList(Page<PushHistory> page,
|
public ResponseResult getPushHistoryList(@RequestBody DataSourceRequest request) {
|
||||||
String configId,
|
// 1. 预处理日期过滤器
|
||||||
Integer status,
|
List<DataSourceRequest.FilterDescriptor> filters = request.getFilter().getFilters();
|
||||||
String messageTypeCode,
|
for (DataSourceRequest.FilterDescriptor filter : filters) {
|
||||||
String startTime,
|
String field = filter.getField();
|
||||||
String endTime) {
|
// 判断是否为日期字段(根据你的实体字段名)
|
||||||
Date start = StrUtil.isBlank(startTime) ? null : DateUtil.parse(startTime);
|
if (isDateField(field)) {
|
||||||
Date end = StrUtil.isBlank(endTime) ? null : DateUtil.parse(endTime);
|
Object value = filter.getValue();
|
||||||
return ResponseResult.successData(pushConfigService.getPushHistoryPage(page, configId, status, messageTypeCode, start, end));
|
if (value != null) {
|
||||||
|
String strValue = value.toString();
|
||||||
|
if (StrUtil.isNotBlank(strValue)) {
|
||||||
|
Date dateValue = parseDate(strValue);
|
||||||
|
// 关键:将转换后的 Date 对象重新设置回 filter
|
||||||
|
filter.setValue(dateValue);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// 2. 调用通用查询
|
||||||
|
Page<PushHistory> pushHistoryPage = DataSourceRequestUtil.executeQuery(request, PushHistory.class, pushHistoryService);
|
||||||
|
return ResponseResult.successData(pushHistoryPage);
|
||||||
|
}
|
||||||
|
|
||||||
|
// 辅助方法:判断字段是否为日期类型(根据你的实体类字段名)
|
||||||
|
private boolean isDateField(String field) {
|
||||||
|
// 这些字段在 PushHistory 中都是 Date 类型
|
||||||
|
return "planTime".equals(field)
|
||||||
|
|| "createdAt".equals(field)
|
||||||
|
|| "updatedAt".equals(field)
|
||||||
|
|| "modifyTime".equals(field)
|
||||||
|
|| "deleteTime".equals(field);
|
||||||
|
}
|
||||||
|
|
||||||
|
// 辅助方法:解析日期字符串
|
||||||
|
private Date parseDate(String dateStr) {
|
||||||
|
try {
|
||||||
|
return new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").parse(dateStr);
|
||||||
|
} catch (ParseException e) {
|
||||||
|
throw new BizException("日期格式错误,请使用 yyyy-MM-dd HH:mm:ss 格式: " + dateStr);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@Operation(summary = "查询推送历史明细")
|
@Operation(summary = "查询推送历史明细")
|
||||||
@GetMapping("/getPushHistoryDetailList")
|
@PostMapping("/getPushHistoryDetailList")
|
||||||
public ResponseResult getPushHistoryDetailList(Page<PushHistoryDetail> page,
|
public ResponseResult getPushHistoryDetailList(@RequestBody DataSourceRequest request) {
|
||||||
String historyId,
|
Page<PushHistoryDetail> pushHistoryDetailPage = DataSourceRequestUtil.executeQuery(request, PushHistoryDetail.class, pushHistoryDetailService);
|
||||||
Integer status) {
|
return ResponseResult.successData(pushHistoryDetailPage);
|
||||||
return ResponseResult.successData(pushConfigService.getPushHistoryDetailPage(page, historyId, status));
|
}
|
||||||
|
|
||||||
|
@GetMapping("/queryUsersList")
|
||||||
|
@Operation(summary = "查询状态正常的用户列表")
|
||||||
|
@ResponseBody
|
||||||
|
public ResponseResult queryUsersList( @RequestParam(value = "name", required = false) String name,@RequestHeader(value = "Tenant_id", required = false) String tenantId) {
|
||||||
|
|
||||||
|
List<SysUser> sysUserList = userService.queryUsersList(name,StrUtil.trimToNull(tenantId));
|
||||||
|
return ResponseResult.successData(sysUserList);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@Operation(summary = "根据historyId查推送历史明细详情")
|
||||||
|
@GetMapping("/getPushHistoryDetailById")
|
||||||
|
public ResponseResult getPushHistoryDetailById(@RequestParam String historyId) {
|
||||||
|
return ResponseResult.successData(pushHistoryDetailService.getPushHistoryDetailById(historyId));
|
||||||
|
}
|
||||||
|
|
||||||
|
@GetMapping("/queryRolesList")
|
||||||
|
@Operation(summary = "查询角色类型列表")
|
||||||
|
@ResponseBody
|
||||||
|
public ResponseResult queryRolesList( @RequestParam(value = "roleName", required = false) String roleName,@RequestHeader(value = "Tenant_id", required = false) String tenantId) {
|
||||||
|
List<SysRole> sysRoleList = roleService.queryRolesList(roleName,StrUtil.trimToNull(tenantId));
|
||||||
|
return ResponseResult.successData(sysRoleList);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -1,8 +1,6 @@
|
|||||||
package com.yfd.platform.system.domain;
|
package com.yfd.platform.system.domain;
|
||||||
|
|
||||||
import com.baomidou.mybatisplus.annotation.IdType;
|
import com.baomidou.mybatisplus.annotation.*;
|
||||||
import com.baomidou.mybatisplus.annotation.TableId;
|
|
||||||
import com.baomidou.mybatisplus.annotation.TableName;
|
|
||||||
import lombok.Data;
|
import lombok.Data;
|
||||||
|
|
||||||
import java.io.Serializable;
|
import java.io.Serializable;
|
||||||
@ -15,6 +13,7 @@ public class PushConfig implements Serializable {
|
|||||||
private static final long serialVersionUID = 1L;
|
private static final long serialVersionUID = 1L;
|
||||||
|
|
||||||
@TableId(type = IdType.ASSIGN_UUID)
|
@TableId(type = IdType.ASSIGN_UUID)
|
||||||
|
@TableField("ID")
|
||||||
private String id;
|
private String id;
|
||||||
|
|
||||||
private String categoryCode;
|
private String categoryCode;
|
||||||
@ -41,16 +40,20 @@ public class PushConfig implements Serializable {
|
|||||||
|
|
||||||
private Integer status;
|
private Integer status;
|
||||||
|
|
||||||
|
@TableField(fill = FieldFill.INSERT)
|
||||||
private Date createdAt;
|
private Date createdAt;
|
||||||
|
|
||||||
private Date updatedAt;
|
@TableField(fill = FieldFill.INSERT)
|
||||||
|
|
||||||
private String recordUser;
|
private String recordUser;
|
||||||
|
|
||||||
|
@TableField(fill = FieldFill.UPDATE)
|
||||||
private String modifyUser;
|
private String modifyUser;
|
||||||
|
|
||||||
|
@TableField(fill = FieldFill.INSERT_UPDATE)
|
||||||
private Date modifyTime;
|
private Date modifyTime;
|
||||||
|
|
||||||
|
/** 是否已删除:0=未删除 1=已删除 */
|
||||||
|
@TableField("IS_DELETED")
|
||||||
private Integer isDeleted;
|
private Integer isDeleted;
|
||||||
|
|
||||||
private String deleteUser;
|
private String deleteUser;
|
||||||
|
|||||||
@ -12,10 +12,16 @@ public class PushConfigTargetRequest implements Serializable {
|
|||||||
|
|
||||||
private String configId;
|
private String configId;
|
||||||
|
|
||||||
|
// /**
|
||||||
|
// * 0-用户,1-角色
|
||||||
|
// */
|
||||||
|
// private Integer type;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 0-用户,1-角色
|
* 1-所有人,2-按人,3-按角色
|
||||||
*/
|
*/
|
||||||
private Integer type;
|
private Integer targetType;
|
||||||
|
|
||||||
|
|
||||||
private List<String> userRoleIds;
|
private List<String> userRoleIds;
|
||||||
}
|
}
|
||||||
|
|||||||
@ -0,0 +1,10 @@
|
|||||||
|
package com.yfd.platform.system.domain;
|
||||||
|
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
@Data
|
||||||
|
public class PushHistoryDetailStatistics {
|
||||||
|
private Integer pendingCount; // 待推送(0)
|
||||||
|
private Integer successCount; // 成功(1)
|
||||||
|
private Integer failCount; // 失败(2)
|
||||||
|
}
|
||||||
@ -0,0 +1,15 @@
|
|||||||
|
package com.yfd.platform.system.domain;
|
||||||
|
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
import java.io.Serializable;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
@Data
|
||||||
|
public class PushTargetVo implements Serializable {
|
||||||
|
|
||||||
|
private Integer targetType;
|
||||||
|
|
||||||
|
private List<String> userRoleIds;
|
||||||
|
private List<PushConfigTargetVo> pushConfigTargetVoList;
|
||||||
|
}
|
||||||
@ -0,0 +1,28 @@
|
|||||||
|
package com.yfd.platform.system.domain;
|
||||||
|
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
import java.io.Serializable;
|
||||||
|
@Data
|
||||||
|
public class SdWtbhVo implements Serializable{
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
private static final long serialVersionUID = 1L;
|
||||||
|
|
||||||
|
private String stcd;
|
||||||
|
|
||||||
|
private String stnm;
|
||||||
|
|
||||||
|
private String baseId;
|
||||||
|
|
||||||
|
private String baseName;
|
||||||
|
|
||||||
|
private String sttpCode;
|
||||||
|
|
||||||
|
private String sttpName;
|
||||||
|
|
||||||
|
private String rstcd;
|
||||||
|
|
||||||
|
private String warnState;
|
||||||
|
}
|
||||||
@ -2,6 +2,20 @@ package com.yfd.platform.system.mapper;
|
|||||||
|
|
||||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||||
import com.yfd.platform.system.domain.PushHistoryDetail;
|
import com.yfd.platform.system.domain.PushHistoryDetail;
|
||||||
|
import com.yfd.platform.system.domain.PushHistoryDetailStatistics;
|
||||||
|
import org.apache.ibatis.annotations.Mapper;
|
||||||
|
import org.apache.ibatis.annotations.Param;
|
||||||
|
import org.apache.ibatis.annotations.Select;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
import java.util.Map;
|
||||||
|
@Mapper
|
||||||
public interface PushHistoryDetailMapper extends BaseMapper<PushHistoryDetail> {
|
public interface PushHistoryDetailMapper extends BaseMapper<PushHistoryDetail> {
|
||||||
|
@Select("SELECT " +
|
||||||
|
"COUNT(CASE WHEN STATUS = 0 THEN 1 END) AS pendingCount, " +
|
||||||
|
"COUNT(CASE WHEN STATUS = 1 THEN 1 END) AS successCount, " +
|
||||||
|
"COUNT(CASE WHEN STATUS = 2 THEN 1 END) AS failCount " +
|
||||||
|
"FROM PUSH_HISTORY_DETAIL " +
|
||||||
|
"WHERE HISTORY_ID = #{historyId}")
|
||||||
|
PushHistoryDetailStatistics countByHistoryId(@Param("historyId") String historyId);
|
||||||
}
|
}
|
||||||
|
|||||||
@ -2,11 +2,7 @@ package com.yfd.platform.system.service;
|
|||||||
|
|
||||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||||
import com.baomidou.mybatisplus.extension.service.IService;
|
import com.baomidou.mybatisplus.extension.service.IService;
|
||||||
import com.yfd.platform.system.domain.PushConfig;
|
import com.yfd.platform.system.domain.*;
|
||||||
import com.yfd.platform.system.domain.PushConfigTargetRequest;
|
|
||||||
import com.yfd.platform.system.domain.PushConfigTargetVo;
|
|
||||||
import com.yfd.platform.system.domain.PushHistory;
|
|
||||||
import com.yfd.platform.system.domain.PushHistoryDetail;
|
|
||||||
|
|
||||||
import java.util.Date;
|
import java.util.Date;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
@ -23,7 +19,7 @@ public interface IPushConfigService extends IService<PushConfig> {
|
|||||||
|
|
||||||
boolean updatePushConfig(PushConfig pushConfig);
|
boolean updatePushConfig(PushConfig pushConfig);
|
||||||
|
|
||||||
boolean deletePushConfig(String ids);
|
boolean deletePushConfig(List<String> ids);
|
||||||
|
|
||||||
boolean setPushConfigStatus(String id, Integer status);
|
boolean setPushConfigStatus(String id, Integer status);
|
||||||
|
|
||||||
@ -31,7 +27,7 @@ public interface IPushConfigService extends IService<PushConfig> {
|
|||||||
|
|
||||||
boolean savePushTargets(PushConfigTargetRequest request);
|
boolean savePushTargets(PushConfigTargetRequest request);
|
||||||
|
|
||||||
List<PushConfigTargetVo> getPushTargets(String configId);
|
PushTargetVo getPushTargets(String configId);
|
||||||
|
|
||||||
Page<PushHistory> getPushHistoryPage(Page<PushHistory> page,
|
Page<PushHistory> getPushHistoryPage(Page<PushHistory> page,
|
||||||
String configId,
|
String configId,
|
||||||
|
|||||||
@ -4,4 +4,5 @@ import com.baomidou.mybatisplus.extension.service.IService;
|
|||||||
import com.yfd.platform.system.domain.PushHistoryDetail;
|
import com.yfd.platform.system.domain.PushHistoryDetail;
|
||||||
|
|
||||||
public interface IPushHistoryDetailService extends IService<PushHistoryDetail> {
|
public interface IPushHistoryDetailService extends IService<PushHistoryDetail> {
|
||||||
|
Object getPushHistoryDetailById(String historyId);
|
||||||
}
|
}
|
||||||
|
|||||||
@ -65,4 +65,6 @@ public interface ISysRoleService extends IService<SysRole> {
|
|||||||
boolean setMenuById(String id, String menuIds);
|
boolean setMenuById(String id, String menuIds);
|
||||||
|
|
||||||
List<SysRole> selectRoleList(String rolename, String tenantId);
|
List<SysRole> selectRoleList(String rolename, String tenantId);
|
||||||
|
|
||||||
|
List<SysRole> queryRolesList(String roleName, String tenantId);
|
||||||
}
|
}
|
||||||
|
|||||||
@ -183,4 +183,5 @@ public interface IUserService extends IService<SysUser> {
|
|||||||
************************************/
|
************************************/
|
||||||
Page<SysUser> queryPendingAuditUsers(Page<SysUser> page, String name, String regStatus, String tenantId);
|
Page<SysUser> queryPendingAuditUsers(Page<SysUser> page, String name, String regStatus, String tenantId);
|
||||||
|
|
||||||
|
List<SysUser> queryUsersList(String name, String tenantId);
|
||||||
}
|
}
|
||||||
|
|||||||
File diff suppressed because it is too large
Load Diff
@ -2,10 +2,23 @@ package com.yfd.platform.system.service.impl;
|
|||||||
|
|
||||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||||
import com.yfd.platform.system.domain.PushHistoryDetail;
|
import com.yfd.platform.system.domain.PushHistoryDetail;
|
||||||
|
import com.yfd.platform.system.domain.PushHistoryDetailStatistics;
|
||||||
import com.yfd.platform.system.mapper.PushHistoryDetailMapper;
|
import com.yfd.platform.system.mapper.PushHistoryDetailMapper;
|
||||||
import com.yfd.platform.system.service.IPushHistoryDetailService;
|
import com.yfd.platform.system.service.IPushHistoryDetailService;
|
||||||
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
import org.springframework.stereotype.Service;
|
import org.springframework.stereotype.Service;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
import java.util.Map;
|
||||||
|
|
||||||
@Service
|
@Service
|
||||||
public class PushHistoryDetailServiceImpl extends ServiceImpl<PushHistoryDetailMapper, PushHistoryDetail> implements IPushHistoryDetailService {
|
public class PushHistoryDetailServiceImpl extends ServiceImpl<PushHistoryDetailMapper, PushHistoryDetail> implements IPushHistoryDetailService {
|
||||||
|
@Autowired
|
||||||
|
private PushHistoryDetailMapper pushHistoryDetailMapper;
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public Object getPushHistoryDetailById(String historyId) {
|
||||||
|
return pushHistoryDetailMapper.countByHistoryId(historyId);
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@ -1,6 +1,8 @@
|
|||||||
package com.yfd.platform.system.service.impl;
|
package com.yfd.platform.system.service.impl;
|
||||||
|
|
||||||
import cn.hutool.core.util.IdUtil;
|
import cn.hutool.core.util.IdUtil;
|
||||||
|
import cn.hutool.core.util.StrUtil;
|
||||||
|
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||||
import com.yfd.platform.config.ResponseResult;
|
import com.yfd.platform.config.ResponseResult;
|
||||||
@ -172,4 +174,15 @@ public class SysRoleServiceImpl extends ServiceImpl<SysRoleMapper, SysRole> impl
|
|||||||
return roleMapper.selectRoleList(rolename, tenantId);
|
return roleMapper.selectRoleList(rolename, tenantId);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public List<SysRole> queryRolesList(String roleName, String tenantId) {
|
||||||
|
LambdaQueryWrapper<SysRole> queryWrapper = new LambdaQueryWrapper<>();
|
||||||
|
queryWrapper.eq(StrUtil.isNotBlank(tenantId), SysRole::getTenantId, tenantId);
|
||||||
|
queryWrapper.like(StrUtil.isNotBlank(roleName),SysRole::getRolename, roleName);
|
||||||
|
queryWrapper.ne(SysRole::getLevel, 1);
|
||||||
|
queryWrapper.orderByDesc(SysRole::getLevel);
|
||||||
|
List<SysRole> sysRoleList = this.list( queryWrapper);
|
||||||
|
return sysRoleList;
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@ -904,4 +904,20 @@ public class UserServiceImpl extends ServiceImpl<SysUserMapper, SysUser> impleme
|
|||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public List<SysUser> queryUsersList(String name, String tenantId) {
|
||||||
|
LambdaQueryWrapper<SysUser> queryWrapper = new LambdaQueryWrapper<>();
|
||||||
|
queryWrapper.eq(StrUtil.isNotBlank(tenantId), SysUser::getTenantId, tenantId);
|
||||||
|
queryWrapper.eq(SysUser::getStatus, 1);
|
||||||
|
queryWrapper.and(StrUtil.isNotBlank(name), wrapper ->
|
||||||
|
wrapper.like(SysUser::getNickname, name)
|
||||||
|
.or()
|
||||||
|
.like(SysUser::getRealName, name)
|
||||||
|
);
|
||||||
|
queryWrapper.orderByDesc(SysUser::getRegTime);
|
||||||
|
List<SysUser> sysUserList = this.list( queryWrapper);
|
||||||
|
return sysUserList;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
28
backend/src/main/java/com/yfd/platform/utils/CronUtil.java
Normal file
28
backend/src/main/java/com/yfd/platform/utils/CronUtil.java
Normal file
@ -0,0 +1,28 @@
|
|||||||
|
package com.yfd.platform.utils;
|
||||||
|
|
||||||
|
import cn.hutool.cron.pattern.CronPattern;
|
||||||
|
import cn.hutool.cron.pattern.CronPatternUtil;
|
||||||
|
import cn.hutool.core.date.DateUtil;
|
||||||
|
import cn.hutool.core.date.DateField;
|
||||||
|
import java.util.Date;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Cron 表达式工具类(基于 Hutool 6.x)
|
||||||
|
* 支持 6 位或 7 位表达式(秒 分 时 日 月 星期 [年])
|
||||||
|
*/
|
||||||
|
public class CronUtil {
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 校验 Cron 表达式是否合法
|
||||||
|
* @param expression Cron 表达式(支持 6 或 7 个字段)
|
||||||
|
* @return true-合法,false-非法
|
||||||
|
*/
|
||||||
|
public static boolean isValid(String expression) {
|
||||||
|
try {
|
||||||
|
CronPattern.of(expression);
|
||||||
|
return true;
|
||||||
|
} catch (Exception e) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@ -41,6 +41,14 @@ export function getEngInfoDropdown(data: any) {
|
|||||||
data
|
data
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
// 根据河段获取电站
|
||||||
|
export function getByRvcd(data: any) {
|
||||||
|
return request({
|
||||||
|
url: '/env/engInfo/getByRvcd',
|
||||||
|
method: 'get',
|
||||||
|
params:data
|
||||||
|
});
|
||||||
|
}
|
||||||
// 根据id获取电站信息
|
// 根据id获取电站信息
|
||||||
export function getEngInfoById(params: any) {
|
export function getEngInfoById(params: any) {
|
||||||
return request({
|
return request({
|
||||||
|
|||||||
@ -70,7 +70,7 @@ export function setPushConfigSmsSwitch(data: any) {
|
|||||||
return request({
|
return request({
|
||||||
url: '/system/pushConfig/setPushConfigSmsSwitch',
|
url: '/system/pushConfig/setPushConfigSmsSwitch',
|
||||||
method: 'post',
|
method: 'post',
|
||||||
data
|
params:data
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
//获取推送历史列表
|
//获取推送历史列表
|
||||||
|
|||||||
@ -23,19 +23,33 @@
|
|||||||
placeholder="请输入倾斜影像名称"
|
placeholder="请输入倾斜影像名称"
|
||||||
/>
|
/>
|
||||||
</a-form-item>
|
</a-form-item>
|
||||||
<a-form-item label="所在河段" name="hbrvcdName">
|
<a-form-item label="所在河段" name="hbrvcd">
|
||||||
<a-input
|
<a-select
|
||||||
v-model:value="formData.hbrvcdName"
|
v-model:value="formData.hbrvcd"
|
||||||
|
show-search
|
||||||
style="width: 100%"
|
style="width: 100%"
|
||||||
placeholder="请输入所在河段"
|
placeholder="请选择所在河段"
|
||||||
|
:options="riverOptions"
|
||||||
|
:filter-option="filterOption"
|
||||||
|
:disabled="isEdit"
|
||||||
|
@change="handleRiverSelect"
|
||||||
/>
|
/>
|
||||||
</a-form-item>
|
</a-form-item>
|
||||||
<a-form-item label="所属电站" name="ennm">
|
<a-form-item label="所属电站" name="rstcd">
|
||||||
<a-input
|
<a-select
|
||||||
|
v-model:value="formData.rstcd"
|
||||||
|
show-search
|
||||||
|
style="width: 100%"
|
||||||
|
placeholder="请选择所属电站"
|
||||||
|
:options="ennmOptions"
|
||||||
|
:filter-option="filterOption"
|
||||||
|
:disabled="isEdit"
|
||||||
|
/>
|
||||||
|
<!-- <a-input
|
||||||
v-model:value="formData.ennm"
|
v-model:value="formData.ennm"
|
||||||
style="width: 100%"
|
style="width: 100%"
|
||||||
placeholder="请输入所属电站"
|
placeholder="请输入所属电站"
|
||||||
/>
|
/> -->
|
||||||
</a-form-item>
|
</a-form-item>
|
||||||
<a-form-item label="倾斜影像URL" name="url">
|
<a-form-item label="倾斜影像URL" name="url">
|
||||||
<a-input
|
<a-input
|
||||||
@ -76,9 +90,9 @@
|
|||||||
:min="0"
|
:min="0"
|
||||||
/>
|
/>
|
||||||
</a-form-item>
|
</a-form-item>
|
||||||
<a-form-item label="备注" name="description">
|
<a-form-item label="备注" name="comments">
|
||||||
<a-textarea
|
<a-textarea
|
||||||
v-model:value="formData.description"
|
v-model:value="formData.comments"
|
||||||
:rows="4"
|
:rows="4"
|
||||||
style="width: 100%"
|
style="width: 100%"
|
||||||
placeholder="请输入备注"
|
placeholder="请输入备注"
|
||||||
@ -89,33 +103,34 @@
|
|||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script lang="ts" setup>
|
<script lang="ts" setup>
|
||||||
import { ref, reactive, computed, watch } from "vue";
|
import { ref, reactive, computed, watch } from 'vue';
|
||||||
import { message } from "ant-design-vue";
|
import { message } from 'ant-design-vue';
|
||||||
import type { Rule } from "ant-design-vue/es/form";
|
import type { Rule } from 'ant-design-vue/es/form';
|
||||||
import dayjs from "dayjs";
|
import dayjs from 'dayjs';
|
||||||
|
import { getEngInfoDropdown } from '@/api/select';
|
||||||
interface Props {
|
interface Props {
|
||||||
visible: boolean;
|
visible: boolean;
|
||||||
initialValues?: any | null;
|
initialValues?: any | null;
|
||||||
loading?: boolean;
|
loading?: boolean;
|
||||||
|
riverOptions?: any[];
|
||||||
}
|
}
|
||||||
|
|
||||||
const localLoading = ref(false);
|
const localLoading = ref(false);
|
||||||
const props = withDefaults(defineProps<Props>(), {
|
const props = withDefaults(defineProps<Props>(), {
|
||||||
visible: false,
|
visible: false,
|
||||||
initialValues: null,
|
initialValues: null,
|
||||||
loading: false,
|
loading: false,
|
||||||
|
riverOptions: () => []
|
||||||
});
|
});
|
||||||
|
|
||||||
const modalVisible = computed({
|
const modalVisible = computed({
|
||||||
get: () => props.visible,
|
get: () => props.visible,
|
||||||
set: (val) => emit("update:visible", val),
|
set: val => emit('update:visible', val)
|
||||||
});
|
});
|
||||||
|
|
||||||
const emit = defineEmits<{
|
const emit = defineEmits<{
|
||||||
(e: "update:visible", value: boolean): void;
|
(e: 'update:visible', value: boolean): void;
|
||||||
(e: "cancel"): void;
|
(e: 'cancel'): void;
|
||||||
(e: "ok", values: any): void;
|
(e: 'ok', values: any): void;
|
||||||
}>();
|
}>();
|
||||||
|
|
||||||
const formRef = ref();
|
const formRef = ref();
|
||||||
@ -123,23 +138,23 @@ const formRef = ref();
|
|||||||
const defaultFormData = reactive({
|
const defaultFormData = reactive({
|
||||||
id: undefined,
|
id: undefined,
|
||||||
stnm: undefined,
|
stnm: undefined,
|
||||||
hbrvcdName: undefined,
|
hbrvcd: undefined,
|
||||||
ennm: undefined,
|
rstcd: undefined,
|
||||||
url: undefined,
|
url: undefined,
|
||||||
location: undefined,
|
location: undefined,
|
||||||
accuracy: undefined,
|
accuracy: undefined,
|
||||||
boundary: undefined,
|
boundary: undefined,
|
||||||
height: undefined,
|
height: undefined,
|
||||||
description: undefined,
|
comments: undefined
|
||||||
});
|
});
|
||||||
const formData: any = reactive({ ...defaultFormData });
|
const formData: any = reactive({ ...defaultFormData });
|
||||||
|
|
||||||
const rules: Record<string, Rule[]> = {
|
const rules: Record<string, Rule[]> = {
|
||||||
stnm: [{ required: true, message: "请输入倾斜影像名称", trigger: "blur" }],
|
stnm: [{ required: true, message: '请输入倾斜影像名称', trigger: 'blur' }],
|
||||||
hbrvcdName: [{ required: true, message: "请输入所在河段", trigger: "blur" }],
|
hbrvcd: [{ required: true, message: '请输入所在河段', trigger: 'blur' }],
|
||||||
ennm: [{ required: true, message: "请输入所属电站", trigger: "blur" }],
|
rstcd: [{ required: true, message: '请输入所属电站', trigger: 'blur' }],
|
||||||
url: [{ required: true, message: "请输入倾斜影像URL", trigger: "blur" }],
|
url: [{ required: true, message: '请输入倾斜影像URL', trigger: 'blur' }],
|
||||||
location: [{ required: true, message: "请输入模型坐标", trigger: "blur" }],
|
location: [{ required: true, message: '请输入模型坐标', trigger: 'blur' }]
|
||||||
};
|
};
|
||||||
|
|
||||||
const isEdit = computed(() => !!props.initialValues);
|
const isEdit = computed(() => !!props.initialValues);
|
||||||
@ -147,25 +162,33 @@ const isEdit = computed(() => !!props.initialValues);
|
|||||||
const handleOk = async () => {
|
const handleOk = async () => {
|
||||||
try {
|
try {
|
||||||
await formRef.value.validate();
|
await formRef.value.validate();
|
||||||
|
const ennmItem = ennmOptions.value.find(item => item.value == formData.rstcd);
|
||||||
|
const riverItem = props.riverOptions.find(item => item.value == formData.hbrvcd);
|
||||||
const submitValues = {
|
const submitValues = {
|
||||||
...formData,
|
...formData,
|
||||||
|
ennm: ennmItem?.ennm || '',
|
||||||
|
lgtd: ennmItem?.lgtd || '',
|
||||||
|
lttd: ennmItem?.lttd || '',
|
||||||
|
hbrvcdName: riverItem?.label || '',
|
||||||
|
baseId: riverItem?.baseId || '',
|
||||||
|
baseName: riverItem?.baseName || '',
|
||||||
captureDate: formData.captureDate
|
captureDate: formData.captureDate
|
||||||
? dayjs(formData.captureDate).format("YYYY-MM-DD")
|
? dayjs(formData.captureDate).format('YYYY-MM-DD')
|
||||||
: undefined,
|
: undefined
|
||||||
};
|
};
|
||||||
emit("ok", submitValues);
|
emit('ok', submitValues);
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
console.error("Validate Failed:", error);
|
console.error('Validate Failed:', error);
|
||||||
message.error("请检查表单填写是否正确");
|
message.error('请检查表单填写是否正确');
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
const initForm = () => {
|
const initForm = () => {
|
||||||
if (props.initialValues) {
|
if (props.initialValues) {
|
||||||
const values = props.initialValues;
|
const values = props.initialValues;
|
||||||
Object.keys(formData).forEach((key) => {
|
Object.keys(formData).forEach(key => {
|
||||||
if (values.hasOwnProperty(key)) {
|
if (values.hasOwnProperty(key)) {
|
||||||
if (key === "captureDate" && values[key]) {
|
if (key === 'captureDate' && values[key]) {
|
||||||
formData[key] = dayjs(values[key]);
|
formData[key] = dayjs(values[key]);
|
||||||
} else {
|
} else {
|
||||||
formData[key] = values[key];
|
formData[key] = values[key];
|
||||||
@ -185,23 +208,44 @@ const resetForm = () => {
|
|||||||
};
|
};
|
||||||
|
|
||||||
const handleCancel = () => {
|
const handleCancel = () => {
|
||||||
emit("update:visible", false);
|
emit('update:visible', false);
|
||||||
emit("cancel");
|
emit('cancel');
|
||||||
resetForm();
|
resetForm();
|
||||||
};
|
};
|
||||||
|
// 搜索过滤
|
||||||
|
const filterOption = (inputValue: string, option: any) => {
|
||||||
|
const label = option.label || option.name || '';
|
||||||
|
const reachcdName = option.reachcdName || '';
|
||||||
|
const keyword = inputValue || '';
|
||||||
|
|
||||||
|
return label.indexOf(keyword) !== -1 || reachcdName.indexOf(keyword) !== -1;
|
||||||
|
};
|
||||||
|
const ennmOptions = ref([]);
|
||||||
|
const handleRiverSelect = async (value: any) => {
|
||||||
|
let res: any = await getEngInfoDropdown({ reachcd: value });
|
||||||
|
if (res?.data?.length > 0) {
|
||||||
|
res.data.forEach((item: any) => {
|
||||||
|
item.value = item.stcd;
|
||||||
|
item.label = item.ennm;
|
||||||
|
});
|
||||||
|
ennmOptions.value = res.data;
|
||||||
|
} else {
|
||||||
|
ennmOptions.value = [];
|
||||||
|
}
|
||||||
|
};
|
||||||
watch(
|
watch(
|
||||||
() => props.visible,
|
() => props.visible,
|
||||||
(newVisible) => {
|
newVisible => {
|
||||||
if (newVisible) {
|
if (newVisible) {
|
||||||
initForm();
|
initForm();
|
||||||
|
handleRiverSelect('');
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{ immediate: false }
|
{ immediate: false }
|
||||||
);
|
);
|
||||||
|
|
||||||
defineExpose({
|
defineExpose({
|
||||||
localLoading,
|
localLoading
|
||||||
});
|
});
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
|
|||||||
@ -23,6 +23,8 @@ import BasicSearch from "@/components/BasicSearch/index.vue";
|
|||||||
|
|
||||||
interface Props {
|
interface Props {
|
||||||
handleAdd: () => void;
|
handleAdd: () => void;
|
||||||
|
riverOptions: any[];
|
||||||
|
riverOptionsLoad: boolean;
|
||||||
}
|
}
|
||||||
|
|
||||||
const props = defineProps<Props>();
|
const props = defineProps<Props>();
|
||||||
@ -34,6 +36,7 @@ const emit = defineEmits<{
|
|||||||
|
|
||||||
const initSearchData = {
|
const initSearchData = {
|
||||||
stnm: "",
|
stnm: "",
|
||||||
|
rvcd:""
|
||||||
};
|
};
|
||||||
|
|
||||||
const searchData = ref<any>({ ...initSearchData });
|
const searchData = ref<any>({ ...initSearchData });
|
||||||
@ -47,13 +50,16 @@ const searchList: any = computed(() => [
|
|||||||
},
|
},
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
type: "Select",
|
type: 'Select',
|
||||||
name: "hbrvcdName",
|
name: 'rvcd',
|
||||||
label: "所在河段",
|
label: '所在河段',
|
||||||
|
width: 300,
|
||||||
fieldProps: {
|
fieldProps: {
|
||||||
allowClear: true,
|
allowClear: true
|
||||||
},
|
},
|
||||||
},
|
options: props.riverOptions,
|
||||||
|
loading: props.riverOptionsLoad
|
||||||
|
}
|
||||||
]);
|
]);
|
||||||
|
|
||||||
const onSearchFinish = (values: any) => {
|
const onSearchFinish = (values: any) => {
|
||||||
|
|||||||
@ -3,6 +3,8 @@
|
|||||||
<div class="content">
|
<div class="content">
|
||||||
<TiltPhotoManagementSearch
|
<TiltPhotoManagementSearch
|
||||||
ref="tiltPhotoManagementSearch"
|
ref="tiltPhotoManagementSearch"
|
||||||
|
:river-options="riverOptions"
|
||||||
|
:river-options-load="riverOptionsLoad"
|
||||||
:handle-add="handleAdd"
|
:handle-add="handleAdd"
|
||||||
@reset="handleReset"
|
@reset="handleReset"
|
||||||
@search-finish="onSearchFinish"
|
@search-finish="onSearchFinish"
|
||||||
@ -36,6 +38,8 @@
|
|||||||
<TiltPhotoManagementForm
|
<TiltPhotoManagementForm
|
||||||
ref="tiltPhotoManagementForm"
|
ref="tiltPhotoManagementForm"
|
||||||
v-model:visible="editModalVisible"
|
v-model:visible="editModalVisible"
|
||||||
|
:river-options="riverOptions"
|
||||||
|
:river-options-load="riverOptionsLoad"
|
||||||
:initial-values="currentRecord"
|
:initial-values="currentRecord"
|
||||||
@cancel="editModalCancel"
|
@cancel="editModalCancel"
|
||||||
@ok="handleEditSubmit"
|
@ok="handleEditSubmit"
|
||||||
@ -54,6 +58,7 @@ import {
|
|||||||
saveTiltPhoto,
|
saveTiltPhoto,
|
||||||
deleteTiltPhoto
|
deleteTiltPhoto
|
||||||
} from '@/api/system/map/TiltPhotoManagement';
|
} from '@/api/system/map/TiltPhotoManagement';
|
||||||
|
import { getRvcdDropdown } from '@/api/select';
|
||||||
// 表格列配置
|
// 表格列配置
|
||||||
const columns = [
|
const columns = [
|
||||||
{
|
{
|
||||||
@ -73,14 +78,14 @@ const columns = [
|
|||||||
{
|
{
|
||||||
title: 'URL',
|
title: 'URL',
|
||||||
dataIndex: 'url',
|
dataIndex: 'url',
|
||||||
key: 'url',
|
key: 'url'
|
||||||
width: 360
|
// width: 360
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: '所在河段',
|
title: '所在河段',
|
||||||
dataIndex: 'hbrvcdName',
|
dataIndex: 'hbrvcdName',
|
||||||
key: 'hbrvcdName',
|
key: 'hbrvcdName',
|
||||||
width: 120
|
width: 280
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: '所属电站',
|
title: '所属电站',
|
||||||
@ -91,7 +96,8 @@ const columns = [
|
|||||||
{
|
{
|
||||||
title: '创建人',
|
title: '创建人',
|
||||||
key: 'recordUser',
|
key: 'recordUser',
|
||||||
dataIndex: 'recordUser'
|
dataIndex: 'recordUser',
|
||||||
|
width: 150
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: '创建时间',
|
title: '创建时间',
|
||||||
@ -108,9 +114,9 @@ const columns = [
|
|||||||
{
|
{
|
||||||
title: '操作',
|
title: '操作',
|
||||||
key: 'action',
|
key: 'action',
|
||||||
width: 80,
|
width: 120,
|
||||||
fixed: 'right',
|
fixed: 'right',
|
||||||
slots: { customRender: 'status' }
|
slots: { customRender: 'action' }
|
||||||
}
|
}
|
||||||
];
|
];
|
||||||
|
|
||||||
@ -171,6 +177,12 @@ const onSearchFinish = (values: any) => {
|
|||||||
operator: 'contains',
|
operator: 'contains',
|
||||||
dataType: 'string',
|
dataType: 'string',
|
||||||
value: values.stnm
|
value: values.stnm
|
||||||
|
},
|
||||||
|
{
|
||||||
|
field: 'rvcd',
|
||||||
|
operator: 'contains',
|
||||||
|
dataType: 'string',
|
||||||
|
value: values.rvcd
|
||||||
}
|
}
|
||||||
].filter(Boolean)
|
].filter(Boolean)
|
||||||
};
|
};
|
||||||
@ -211,7 +223,20 @@ const handleEditSubmit = async (values: any) => {
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
const initOption = async () => {};
|
const riverOptions = ref<any>([]);
|
||||||
|
const riverOptionsLoad = ref(false);
|
||||||
|
const initOption = () => {
|
||||||
|
const params = {};
|
||||||
|
riverOptionsLoad.value = true;
|
||||||
|
getRvcdDropdown(params).then((res: any) => {
|
||||||
|
res.data.forEach((item: any) => {
|
||||||
|
item.value = item.rvcd;
|
||||||
|
item.label = item.rvnm;
|
||||||
|
});
|
||||||
|
riverOptions.value = res.data || [];
|
||||||
|
riverOptionsLoad.value = false;
|
||||||
|
});
|
||||||
|
};
|
||||||
onMounted(() => {
|
onMounted(() => {
|
||||||
initOption();
|
initOption();
|
||||||
});
|
});
|
||||||
|
|||||||
@ -18,7 +18,8 @@
|
|||||||
<template #isSms="{ column, record }">
|
<template #isSms="{ column, record }">
|
||||||
<a-switch
|
<a-switch
|
||||||
v-model:checked="record.isSms"
|
v-model:checked="record.isSms"
|
||||||
:checkedValue="'1'"
|
:unCheckedValue="0"
|
||||||
|
:checkedValue="1"
|
||||||
@change="switchChange(record.isSms, record)"
|
@change="switchChange(record.isSms, record)"
|
||||||
/>
|
/>
|
||||||
</template>
|
</template>
|
||||||
@ -67,7 +68,7 @@
|
|||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
import { ref, nextTick, onMounted } from 'vue';
|
import { ref, nextTick, computed,onMounted } from 'vue';
|
||||||
import BasicTable from '@/components/BasicTable/index.vue';
|
import BasicTable from '@/components/BasicTable/index.vue';
|
||||||
import ConfigManagementForm from './ConfigManagementForm.vue';
|
import ConfigManagementForm from './ConfigManagementForm.vue';
|
||||||
import PushTargetModal from './PushTargetModal.vue';
|
import PushTargetModal from './PushTargetModal.vue';
|
||||||
@ -173,7 +174,7 @@ const handleDelete = (record: any) => {
|
|||||||
zIndex: 2002,
|
zIndex: 2002,
|
||||||
onOk: async () => {
|
onOk: async () => {
|
||||||
try {
|
try {
|
||||||
let res = await deletePushConfig([record.id]);
|
let res:any = await deletePushConfig([record.id]);
|
||||||
if ((res.code = 0)) {
|
if ((res.code = 0)) {
|
||||||
message.success('删除成功');
|
message.success('删除成功');
|
||||||
}
|
}
|
||||||
|
|||||||
@ -42,17 +42,17 @@
|
|||||||
<template #status="{ record }">
|
<template #status="{ record }">
|
||||||
<span
|
<span
|
||||||
:class="
|
:class="
|
||||||
record.status === '1'
|
record.status == '1'
|
||||||
? 'text-success'
|
? 'text-success'
|
||||||
: record.status === '2'
|
: record.status == '2'
|
||||||
? 'text-error'
|
? 'text-error'
|
||||||
: ''
|
: ''
|
||||||
"
|
"
|
||||||
>
|
>
|
||||||
{{
|
{{
|
||||||
record.status === '1'
|
record.status == '1'
|
||||||
? '推送成功'
|
? '推送成功'
|
||||||
: record.status === '2'
|
: record.status == '2'
|
||||||
? '推送失败'
|
? '推送失败'
|
||||||
: '待推送'
|
: '待推送'
|
||||||
}}
|
}}
|
||||||
@ -167,7 +167,11 @@ watch(
|
|||||||
handleSearch();
|
handleSearch();
|
||||||
}
|
}
|
||||||
let res1 = await getPushHistoryDetailById({ historyId: props.record.id });
|
let res1 = await getPushHistoryDetailById({ historyId: props.record.id });
|
||||||
const { failCount = 0, pendingCount = 0, successCount = 0 } = res1.data || {};
|
const {
|
||||||
|
failCount = 0,
|
||||||
|
pendingCount = 0,
|
||||||
|
successCount = 0
|
||||||
|
} = res1.data || {};
|
||||||
const total = failCount + pendingCount + successCount;
|
const total = failCount + pendingCount + successCount;
|
||||||
resultStatusOption.value = resultStatusOption.value.map(item => {
|
resultStatusOption.value = resultStatusOption.value.map(item => {
|
||||||
let count = 0;
|
let count = 0;
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user