Merge remote-tracking branch 'origin/dev' into dev
# Conflicts: # safety-eval-app/src/main/java/org/qinan/safetyeval/app/orchestrator/QualFilingOrchestrator.javadev
commit
7f751daffe
|
|
@ -17,6 +17,7 @@ import org.springframework.validation.annotation.Validated;
|
|||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 部门适配层(Controller)
|
||||
|
|
@ -61,4 +62,10 @@ public class OrgDepartmentController {
|
|||
public PageResponse<OrgDepartmentCO> page(@Validated OrgDepartmentPageQuery query) {
|
||||
return orgDepartmentApi.page(query);
|
||||
}
|
||||
|
||||
@ApiOperation("部门树列表")
|
||||
@GetMapping("/tree")
|
||||
public SingleResponse<List<OrgDepartmentCO>> tree(@Validated OrgDepartmentPageQuery query) {
|
||||
return orgDepartmentApi.tree(query);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -17,6 +17,12 @@ import org.springframework.beans.factory.annotation.Autowired;
|
|||
import org.springframework.context.annotation.Lazy;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.Collection;
|
||||
import java.util.LinkedHashMap;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
* 部门执行器(App层)
|
||||
*
|
||||
|
|
@ -77,7 +83,6 @@ public class OrgDepartmentExecutor implements OrgDepartmentApi {
|
|||
domainQuery.setPageSize(query.getSize());
|
||||
domainQuery.setTenantId(AuthUserContextAdapter.getCurrentTenantId());
|
||||
domainQuery.setOrgId(ThreadLocalUserInfoAdapter.getOrgId());
|
||||
domainQuery.setParentId(query.getParentId());
|
||||
domainQuery.setDeptName(query.getDeptName());
|
||||
|
||||
PageResult<OrgDepartmentEntity> pageResult = orgDepartmentDomainService.page(domainQuery);
|
||||
|
|
@ -89,6 +94,58 @@ public class OrgDepartmentExecutor implements OrgDepartmentApi {
|
|||
pageResult.getTotal());
|
||||
}
|
||||
|
||||
@Override
|
||||
public SingleResponse<List<OrgDepartmentCO>> tree(OrgDepartmentPageQuery query) {
|
||||
OrgDepartmentQuery domainQuery = new OrgDepartmentQuery();
|
||||
domainQuery.setTenantId(AuthUserContextAdapter.getCurrentTenantId());
|
||||
domainQuery.setOrgId(query.getOrgId() == null ? ThreadLocalUserInfoAdapter.get() : query.getOrgId());
|
||||
domainQuery.setDeptName(query.getDeptName());
|
||||
|
||||
List<OrgDepartmentEntity> matched = orgDepartmentDomainService.list(domainQuery);
|
||||
Map<Long, OrgDepartmentEntity> nodeMap = new LinkedHashMap<>();
|
||||
for (OrgDepartmentEntity entity : matched) {
|
||||
collectWithAncestors(entity, nodeMap);
|
||||
}
|
||||
return SingleResponse.success(buildTree(nodeMap.values()));
|
||||
}
|
||||
|
||||
private void collectWithAncestors(OrgDepartmentEntity entity, Map<Long, OrgDepartmentEntity> nodeMap) {
|
||||
OrgDepartmentEntity current = entity;
|
||||
while (current != null && current.getId() != null) {
|
||||
if (nodeMap.containsKey(current.getId())) {
|
||||
return;
|
||||
}
|
||||
nodeMap.put(current.getId(), current);
|
||||
Long parentId = current.getParentId();
|
||||
if (parentId == null || parentId == 0L) {
|
||||
return;
|
||||
}
|
||||
current = orgDepartmentDomainService.get(parentId);
|
||||
}
|
||||
}
|
||||
|
||||
private List<OrgDepartmentCO> buildTree(Collection<OrgDepartmentEntity> entities) {
|
||||
Map<String, OrgDepartmentCO> idToCo = new LinkedHashMap<>();
|
||||
for (OrgDepartmentEntity entity : entities) {
|
||||
idToCo.put(String.valueOf(entity.getId()), toCO(entity));
|
||||
}
|
||||
|
||||
List<OrgDepartmentCO> roots = new ArrayList<>();
|
||||
for (OrgDepartmentCO co : idToCo.values()) {
|
||||
String parentId = co.getParentId();
|
||||
if (parentId == null || "0".equals(parentId) || !idToCo.containsKey(parentId)) {
|
||||
roots.add(co);
|
||||
continue;
|
||||
}
|
||||
OrgDepartmentCO parent = idToCo.get(parentId);
|
||||
if (parent.getChildren() == null) {
|
||||
parent.setChildren(new ArrayList<>());
|
||||
}
|
||||
parent.getChildren().add(co);
|
||||
}
|
||||
return roots;
|
||||
}
|
||||
|
||||
private OrgDepartmentCO toCO(OrgDepartmentEntity entity) {
|
||||
if (entity == null) {
|
||||
return null;
|
||||
|
|
|
|||
|
|
@ -275,8 +275,8 @@ public class QualFilingChangeExecutor implements QualFilingChangeApi {
|
|||
}
|
||||
|
||||
// 编辑场景:对比请求数据与已有变更数据,生成变更明细
|
||||
if (!cmd.isAdd()) {
|
||||
Long changeId = cmd.getQualFilingChangeAddCmd().getId();
|
||||
if (cmd.getOriginChangeFilingId() != null) {
|
||||
Long changeId = cmd.getOriginChangeFilingId();
|
||||
List<QualFilingChangeDetailEntity> details = diffFromCmd(changeId
|
||||
, entity, commitmentEntity, equipmentEntities
|
||||
, materialEntities, personnelEntities, personnelCertEntities);
|
||||
|
|
@ -295,7 +295,7 @@ public class QualFilingChangeExecutor implements QualFilingChangeApi {
|
|||
}
|
||||
|
||||
Long id = qualFilingChangeDomainService.aggregationSaveOrEdit(entity, commitmentEntity
|
||||
, equipmentEntities, materialEntities, personnelEntities, personnelCertEntities, cmd.isAdd());
|
||||
, equipmentEntities, materialEntities, personnelEntities, personnelCertEntities);
|
||||
|
||||
QualFilingChangeCO co = new QualFilingChangeCO();
|
||||
co.setId(id);
|
||||
|
|
@ -313,7 +313,8 @@ public class QualFilingChangeExecutor implements QualFilingChangeApi {
|
|||
if (changeEntity == null) {
|
||||
throw new BizException(ErrorCode.QUAL_FILING_CHANGE_NOT_FOUND);
|
||||
}
|
||||
if (QualFilingStatusEnum.REVIEWING.getCode() != changeEntity.getFilingStatusCode()) {
|
||||
if (QualFilingStatusEnum.REVIEWING.getCode() != changeEntity.getFilingStatusCode()
|
||||
&& QualFilingStatusEnum.CHANGE_REVIEWING.getCode() != changeEntity.getFilingStatusCode()) {
|
||||
throw new BizException(ErrorCode.STATUS_NOT_APPROVED);
|
||||
}
|
||||
|
||||
|
|
@ -434,8 +435,8 @@ public class QualFilingChangeExecutor implements QualFilingChangeApi {
|
|||
*/
|
||||
private void validateBeforeSaveOrEdit(AggregationSaveOrEditQualFilingChangeCmd cmd) {
|
||||
QualFilingChangeAddCmd addCmd = cmd.getQualFilingChangeAddCmd();
|
||||
cmd.setOriginChangeFilingId(addCmd.getId());
|
||||
if (addCmd.getId() == null) {
|
||||
cmd.setAdd(true);
|
||||
// 新增:根据filingId统计qualFilingChange表中filingStatusCode != 1的记录数,有则不允许新增
|
||||
int count = qualFilingChangeDomainService.countByFilingIdAndStatusNot(
|
||||
addCmd.getFilingId(), QualFilingStatusEnum.FILED.getCode());
|
||||
|
|
@ -443,7 +444,6 @@ public class QualFilingChangeExecutor implements QualFilingChangeApi {
|
|||
throw new BizException(ErrorCode.QUAL_FILING_STATUS_INVALID, "存在进行中的备案变更,不允许新增");
|
||||
}
|
||||
} else {
|
||||
cmd.setAdd(false);
|
||||
// 修改:根据id查询变更记录,filing_status_code = 1 则不允许修改
|
||||
QualFilingChangeEntity existing = qualFilingChangeDomainService.get(addCmd.getId());
|
||||
if (existing == null) {
|
||||
|
|
@ -457,12 +457,9 @@ public class QualFilingChangeExecutor implements QualFilingChangeApi {
|
|||
if (count > 0) {
|
||||
throw new BizException(ErrorCode.QUAL_FILING_STATUS_INVALID, "存在进行中的备案变更,不允许新增");
|
||||
}
|
||||
cmd.setAdd(true);
|
||||
cmd.getQualFilingChangeAddCmd().setId(null);
|
||||
cmd.getQualFilingChangeAddCmd().setChangeFilingId(existing.getId());
|
||||
cmd.getQualFilingChangeAddCmd().setFilingId(existing.getFilingId());
|
||||
} else {
|
||||
cmd.setAdd(false);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -7,6 +7,8 @@ import org.qinan.safetyeval.client.dto.OrgDepartmentAddCmd;
|
|||
import org.qinan.safetyeval.client.dto.OrgDepartmentModifyCmd;
|
||||
import org.qinan.safetyeval.client.dto.OrgDepartmentPageQuery;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 部门接口定义(Client层)
|
||||
*
|
||||
|
|
@ -23,4 +25,6 @@ public interface OrgDepartmentApi {
|
|||
SingleResponse<Void> delete(Long id);
|
||||
|
||||
PageResponse<OrgDepartmentCO> page(OrgDepartmentPageQuery query);
|
||||
|
||||
SingleResponse<List<OrgDepartmentCO>> tree(OrgDepartmentPageQuery query);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -3,6 +3,8 @@ package org.qinan.safetyeval.client.co;
|
|||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 部门CO(Client Object)
|
||||
*
|
||||
|
|
@ -34,4 +36,7 @@ public class OrgDepartmentCO {
|
|||
|
||||
@ApiModelProperty(value = "租户ID")
|
||||
private String tenantId;
|
||||
|
||||
@ApiModelProperty(value = "子部门")
|
||||
private List<OrgDepartmentCO> children;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -10,8 +10,8 @@ import java.util.List;
|
|||
@Data
|
||||
public class AggregationSaveOrEditQualFilingChangeCmd {
|
||||
|
||||
@ApiModelProperty(hidden = true, value = "是否变更新增")
|
||||
private boolean add;
|
||||
@ApiModelProperty(hidden = true, value = "变更的id")
|
||||
private Long originChangeFilingId;
|
||||
|
||||
@ApiModelProperty(value = "基本信息")
|
||||
@NotNull
|
||||
|
|
|
|||
|
|
@ -1,9 +1,10 @@
|
|||
package org.qinan.safetyeval.client.dto;
|
||||
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import java.math.BigDecimal;
|
||||
import lombok.Data;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
|
||||
/**
|
||||
* 资质备案申请新增命令
|
||||
*
|
||||
|
|
@ -87,7 +88,7 @@ public class QualFilingAddCmd {
|
|||
@ApiModelProperty(value = "备案状态名称")
|
||||
private String filingStatusName;
|
||||
|
||||
@ApiModelProperty(value = "申请类型编码(1资质备案申请2变更备案草稿3已备案资质填报-暂时不用)")
|
||||
@ApiModelProperty(value = "申请类型编码(1资质备案申请2变更备案草稿-暂时不用3已备案资质填报)")
|
||||
private Integer applyTypeCode;
|
||||
|
||||
@ApiModelProperty(value = "申请类型名称")
|
||||
|
|
|
|||
|
|
@ -4,6 +4,8 @@ import org.qinan.safetyeval.domain.entity.OrgDepartmentEntity;
|
|||
import org.qinan.safetyeval.domain.query.OrgDepartmentQuery;
|
||||
import org.qinan.safetyeval.domain.query.PageResult;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 部门Gateway接口(Domain层定义)
|
||||
*
|
||||
|
|
@ -20,4 +22,6 @@ public interface OrgDepartmentGateway {
|
|||
void delete(Long id);
|
||||
|
||||
PageResult<OrgDepartmentEntity> page(OrgDepartmentQuery query);
|
||||
|
||||
List<OrgDepartmentEntity> list(OrgDepartmentQuery query);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -33,5 +33,5 @@ public interface QualFilingChangeGateway {
|
|||
|
||||
Long aggregationSaveOrEdit(QualFilingChangeEntity entity, QualFilingCommitmentChangeE commitmentEntity,
|
||||
List<QualFilingEquipmentChangeE> equipmentEntities, List<QualFilingMaterialChangeE> materialEntities,
|
||||
List<QualFilingPersonnelChangeE> personnelEntities, List<QualFilingPersonnelCertChangeE> personnelCertEntities, boolean add);
|
||||
List<QualFilingPersonnelChangeE> personnelEntities, List<QualFilingPersonnelCertChangeE> personnelCertEntities);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -7,6 +7,8 @@ import org.qinan.safetyeval.domain.gateway.OrgDepartmentGateway;
|
|||
import org.qinan.safetyeval.domain.query.OrgDepartmentQuery;
|
||||
import org.qinan.safetyeval.domain.query.PageResult;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
|
|
@ -48,4 +50,8 @@ public class OrgDepartmentDomainService {
|
|||
public PageResult<OrgDepartmentEntity> page(OrgDepartmentQuery query) {
|
||||
return orgDepartmentGateway.page(query);
|
||||
}
|
||||
|
||||
public List<OrgDepartmentEntity> list(OrgDepartmentQuery query) {
|
||||
return orgDepartmentGateway.list(query);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -66,8 +66,8 @@ public class QualFilingChangeDomainService {
|
|||
|
||||
public Long aggregationSaveOrEdit(QualFilingChangeEntity entity, QualFilingCommitmentChangeE commitmentEntity,
|
||||
List<QualFilingEquipmentChangeE> equipmentEntities, List<QualFilingMaterialChangeE> materialEntities,
|
||||
List<QualFilingPersonnelChangeE> personnelEntities, List<QualFilingPersonnelCertChangeE> personnelCertEntities, boolean add) {
|
||||
List<QualFilingPersonnelChangeE> personnelEntities, List<QualFilingPersonnelCertChangeE> personnelCertEntities) {
|
||||
return qualFilingChangeGateway.aggregationSaveOrEdit(entity, commitmentEntity, equipmentEntities, materialEntities
|
||||
, personnelEntities, personnelCertEntities,add);
|
||||
, personnelEntities, personnelCertEntities);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -63,6 +63,24 @@ public class OrgDepartmentGatewayImpl implements OrgDepartmentGateway {
|
|||
|
||||
@Override
|
||||
public PageResult<OrgDepartmentEntity> page(OrgDepartmentQuery query) {
|
||||
Page<OrgDepartmentDO> page = new Page<>(query.getPageNum(), query.getPageSize());
|
||||
IPage<OrgDepartmentDO> result = orgDepartmentMapper.selectPage(page, buildQueryWrapper(query));
|
||||
|
||||
List<OrgDepartmentEntity> entities = result.getRecords().stream()
|
||||
.map(this::toEntity)
|
||||
.collect(Collectors.toList());
|
||||
|
||||
return PageResult.of(entities, result.getTotal(), result.getCurrent(), result.getSize());
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<OrgDepartmentEntity> list(OrgDepartmentQuery query) {
|
||||
return orgDepartmentMapper.selectList(buildQueryWrapper(query)).stream()
|
||||
.map(this::toEntity)
|
||||
.collect(Collectors.toList());
|
||||
}
|
||||
|
||||
private LambdaQueryWrapper<OrgDepartmentDO> buildQueryWrapper(OrgDepartmentQuery query) {
|
||||
LambdaQueryWrapper<OrgDepartmentDO> wrapper = new LambdaQueryWrapper<>();
|
||||
wrapper.eq(OrgDepartmentDO::getDeleteEnum, "false");
|
||||
if (query.getOrgId() != null) {
|
||||
|
|
@ -74,15 +92,7 @@ public class OrgDepartmentGatewayImpl implements OrgDepartmentGateway {
|
|||
if (StringUtils.hasText(query.getDeptName())) {
|
||||
wrapper.like(OrgDepartmentDO::getDeptName, query.getDeptName());
|
||||
}
|
||||
|
||||
Page<OrgDepartmentDO> page = new Page<>(query.getPageNum(), query.getPageSize());
|
||||
IPage<OrgDepartmentDO> result = orgDepartmentMapper.selectPage(page, wrapper);
|
||||
|
||||
List<OrgDepartmentEntity> entities = result.getRecords().stream()
|
||||
.map(this::toEntity)
|
||||
.collect(Collectors.toList());
|
||||
|
||||
return PageResult.of(entities, result.getTotal(), result.getCurrent(), result.getSize());
|
||||
return wrapper;
|
||||
}
|
||||
|
||||
private OrgDepartmentDO toDO(OrgDepartmentEntity entity) {
|
||||
|
|
|
|||
|
|
@ -366,6 +366,7 @@ public class OrgInfoGatewayImpl implements OrgInfoGateway {
|
|||
entity.setFilingRecordStatusCode(dataObject.getFilingRecordStatusCode());
|
||||
entity.setFilingRecordStatusName(dataObject.getFilingRecordStatusName());
|
||||
entity.setAttachmentUrls(dataObject.getAttachmentUrls());
|
||||
entity.setCreateId(dataObject.getCreateId());
|
||||
entity.setState(dataObject.getState());
|
||||
entity.setTenantId(dataObject.getTenantId());
|
||||
entity.setCreateTime(dataObject.getCreateTime());
|
||||
|
|
|
|||
|
|
@ -4,6 +4,8 @@ import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
|||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import org.qinan.safetyeval.domain.entity.OrgResignApplyEntity;
|
||||
import org.qinan.safetyeval.domain.exception.BizException;
|
||||
import org.qinan.safetyeval.domain.exception.ErrorCode;
|
||||
import org.qinan.safetyeval.domain.gateway.OrgResignApplyGateway;
|
||||
import org.qinan.safetyeval.domain.query.OrgResignApplyQuery;
|
||||
import org.qinan.safetyeval.domain.query.PageResult;
|
||||
|
|
@ -36,6 +38,11 @@ public class OrgResignApplyGatewayImpl implements OrgResignApplyGateway {
|
|||
|
||||
@Override
|
||||
public OrgResignApplyEntity save(OrgResignApplyEntity entity) {
|
||||
if (orgResignApplyMapper.exists(new LambdaQueryWrapper<OrgResignApplyDO>()
|
||||
.eq(OrgResignApplyDO::getPersonnelId, entity.getPersonnelId())
|
||||
.eq(OrgResignApplyDO::getAuditStatusCode, 0))) {
|
||||
throw new BizException(ErrorCode.UNKNOWN_ERROR, "人员离职申请已存在");
|
||||
}
|
||||
OrgResignApplyDO dataObject = toDO(entity);
|
||||
InsertFieldDefaults.apply(dataObject);
|
||||
orgResignApplyMapper.insert(dataObject);
|
||||
|
|
|
|||
|
|
@ -125,6 +125,7 @@ public class QualFilingChangeGatewayImpl implements QualFilingChangeGateway {
|
|||
if (query.getFilingStatusCode() != null) {
|
||||
wrapper.eq(QualFilingChangeDO::getFilingStatusCode, query.getFilingStatusCode());
|
||||
}
|
||||
wrapper.orderByDesc(QualFilingChangeDO::getId);
|
||||
|
||||
Page<QualFilingChangeDO> page = new Page<>(query.getPageNum(), query.getPageSize());
|
||||
IPage<QualFilingChangeDO> result = qualFilingChangeMapper.selectPage(page, wrapper);
|
||||
|
|
@ -140,7 +141,7 @@ public class QualFilingChangeGatewayImpl implements QualFilingChangeGateway {
|
|||
@Transactional(rollbackFor = Exception.class)
|
||||
public Long aggregationSaveOrEdit(QualFilingChangeEntity entity, QualFilingCommitmentChangeE commitmentEntity
|
||||
, List<QualFilingEquipmentChangeE> equipmentEntities, List<QualFilingMaterialChangeE> materialEntities
|
||||
, List<QualFilingPersonnelChangeE> personnelEntities, List<QualFilingPersonnelCertChangeE> personnelCertEntities, boolean add) {
|
||||
, List<QualFilingPersonnelChangeE> personnelEntities, List<QualFilingPersonnelCertChangeE> personnelCertEntities) {
|
||||
//保存基础信息
|
||||
QualFilingChangeDO dataObject = qualFilingChangeDoConvertor.convertEeToDo(entity);
|
||||
if (Objects.nonNull(dataObject.getId())) {
|
||||
|
|
|
|||
|
|
@ -0,0 +1,92 @@
|
|||
<!doctype html><html lang="zh"><head data-built-info="@cqsjjb/scripts@2.0.0-rspack.1 Frontend_Env[production] Build_Date[2026/7/8 09:09:40] App_Identifier[safetyEval]"><meta charset="UTF-8"/><meta name="renderer" content="webkit"/><meta http-equiv="X-UA-Compatible" content="IE=edge,Chrome=1"/><meta name="viewport" content="width=device-width,minimum-scale=1,maximum-scale=1,user-scalable=no,viewport-fit=cover"><title>--</title><script>(function () {
|
||||
const APP_ENV = {
|
||||
antd: {
|
||||
'ant-prefix': 'micro-temp',
|
||||
fontFamily: 'PingFangSC-Regular',
|
||||
colorPrimary: '#1677ff',
|
||||
borderRadius: parseInt('2')
|
||||
},
|
||||
appKey: '',
|
||||
basename: 'safetyEval',
|
||||
API_HOST: ''
|
||||
};
|
||||
const injectedApiHost = APP_ENV.API_HOST;
|
||||
const isDev = 'production' === 'development';
|
||||
// 开发环境优先 jjb.config 注入的 API_HOST,避免 sessionStorage 残留网关地址导致 Network Error
|
||||
if (isDev && injectedApiHost && injectedApiHost.indexOf('http') === 0) {
|
||||
APP_ENV.API_HOST = injectedApiHost;
|
||||
} else {
|
||||
APP_ENV.API_HOST = sessionStorage.API_HOST || injectedApiHost || window.location.origin;
|
||||
}
|
||||
window.process = {
|
||||
env: { app: APP_ENV },
|
||||
NODE_ENV: 'production'
|
||||
};
|
||||
window.__JJB_ENVIRONMENT__ = {
|
||||
API_HOST: APP_ENV.API_HOST,
|
||||
redirect: '',
|
||||
FRAMEWORK: APP_ENV.antd
|
||||
};
|
||||
})();
|
||||
|
||||
// 抑制 ResizeObserver 在页面/标签切换时的无害告警,避免 dev overlay 误报
|
||||
(function () {
|
||||
if (typeof window.ResizeObserver !== 'undefined') {
|
||||
var NativeResizeObserver = window.ResizeObserver;
|
||||
window.ResizeObserver = class extends NativeResizeObserver {
|
||||
constructor(callback) {
|
||||
super(function (entries, observer) {
|
||||
window.requestAnimationFrame(function () {
|
||||
callback(entries, observer);
|
||||
});
|
||||
});
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
function isResizeObserverLoopError(message) {
|
||||
return typeof message === 'string' && message.indexOf('ResizeObserver loop') !== -1;
|
||||
}
|
||||
|
||||
function isAxiosNetworkError(reason) {
|
||||
if (!reason) return false;
|
||||
var msg = typeof reason === 'string' ? reason : (reason.message || '');
|
||||
return msg === 'Network Error' || (reason.isAxiosError && msg === 'Network Error');
|
||||
}
|
||||
|
||||
window.addEventListener('error', function (event) {
|
||||
if (isResizeObserverLoopError(event.message)) {
|
||||
event.stopImmediatePropagation();
|
||||
event.preventDefault();
|
||||
}
|
||||
});
|
||||
|
||||
window.addEventListener('unhandledrejection', function (event) {
|
||||
if (isAxiosNetworkError(event.reason)) {
|
||||
console.warn('[dev] API unreachable:', event.reason?.config?.url || event.reason?.message);
|
||||
event.preventDefault();
|
||||
}
|
||||
});
|
||||
})();
|
||||
window.jjbCommonGlobalConfig = {
|
||||
// http拦截器
|
||||
httpInterceptor: {
|
||||
// 请求拦截
|
||||
request: (url, method, params, headers) => {
|
||||
// 处理你的请求拦截
|
||||
|
||||
// 给请求头添加一个租户ID
|
||||
if(sessionStorage.getItem('orgInfoId')){
|
||||
headers.orgInfoId = sessionStorage.getItem('orgInfoId');
|
||||
}
|
||||
|
||||
return Promise.resolve([
|
||||
url,
|
||||
method,
|
||||
params,
|
||||
headers
|
||||
])
|
||||
},
|
||||
|
||||
}
|
||||
}</script><script defer="defer" src="/safetyEval/static/js/379.7b4c2533d0a3b689.js"></script><script defer="defer" src="/safetyEval/static/js/121.ae75e71830bf4ae0.js"></script><script defer="defer" src="/safetyEval/static/js/289.f12da2fe2f6ad2ae.js"></script><script defer="defer" src="/safetyEval/static/js/main.adcf98be0f4fcd43.js"></script><link href="/safetyEval/static/css/main.cb6068c6562f0d94.css" rel="stylesheet"></head><body><noscript>此网页需要开启JavaScript功能。</noscript><div id="root" style="width: 100%; height: 100%; position: relative;overflow-y: auto"></div><script type="text/javascript">/* @cqsjjb/script 输出当前应用基本信息 */console.log("%c@cqsjjb/scripts@2.0.0-rspack.1 Frontend_Env[production] Build_Date[2026/7/8 09:09:40] App_Identifier[safetyEval] Frontend_Branch[dev] Backend_Branch[<branch-name>]", "color: #1890ff; border-radius: 2px; padding: 0 4px; border: 1px solid #1890ff; background: #f9fcff")</script></body></html>
|
||||
|
|
@ -1,70 +0,0 @@
|
|||
<!doctype html><html lang="zh"><head data-built-info="@cqsjjb/scripts@2.0.0-rspack.1 Frontend_Env[production] Build_Date[2026/7/3 13:51:08] App_Identifier[safetyEval]"><meta charset="UTF-8"/><meta name="renderer" content="webkit"/><meta http-equiv="X-UA-Compatible" content="IE=edge,Chrome=1"/><meta name="viewport" content="width=device-width,minimum-scale=1,maximum-scale=1,user-scalable=no,viewport-fit=cover"><title>--</title><script>(function () {
|
||||
const APP_ENV = {
|
||||
antd: {
|
||||
'ant-prefix': 'micro-temp',
|
||||
fontFamily: 'PingFangSC-Regular',
|
||||
colorPrimary: '#1677ff',
|
||||
borderRadius: parseInt('2')
|
||||
},
|
||||
appKey: '',
|
||||
basename: 'safetyEval',
|
||||
API_HOST: ''
|
||||
};
|
||||
const injectedApiHost = APP_ENV.API_HOST;
|
||||
const isDev = 'production' === 'development';
|
||||
// 开发环境优先 jjb.config 注入的 API_HOST,避免 sessionStorage 残留网关地址导致 Network Error
|
||||
if (isDev && injectedApiHost && injectedApiHost.indexOf('http') === 0) {
|
||||
APP_ENV.API_HOST = injectedApiHost;
|
||||
} else {
|
||||
APP_ENV.API_HOST = sessionStorage.API_HOST || injectedApiHost || window.location.origin;
|
||||
}
|
||||
window.process = {
|
||||
env: { app: APP_ENV },
|
||||
NODE_ENV: 'production'
|
||||
};
|
||||
window.__JJB_ENVIRONMENT__ = {
|
||||
API_HOST: APP_ENV.API_HOST,
|
||||
redirect: '',
|
||||
FRAMEWORK: APP_ENV.antd
|
||||
};
|
||||
})();
|
||||
|
||||
// 抑制 ResizeObserver 在页面/标签切换时的无害告警,避免 dev overlay 误报
|
||||
(function () {
|
||||
if (typeof window.ResizeObserver !== 'undefined') {
|
||||
var NativeResizeObserver = window.ResizeObserver;
|
||||
window.ResizeObserver = class extends NativeResizeObserver {
|
||||
constructor(callback) {
|
||||
super(function (entries, observer) {
|
||||
window.requestAnimationFrame(function () {
|
||||
callback(entries, observer);
|
||||
});
|
||||
});
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
function isResizeObserverLoopError(message) {
|
||||
return typeof message === 'string' && message.indexOf('ResizeObserver loop') !== -1;
|
||||
}
|
||||
|
||||
function isAxiosNetworkError(reason) {
|
||||
if (!reason) return false;
|
||||
var msg = typeof reason === 'string' ? reason : (reason.message || '');
|
||||
return msg === 'Network Error' || (reason.isAxiosError && msg === 'Network Error');
|
||||
}
|
||||
|
||||
window.addEventListener('error', function (event) {
|
||||
if (isResizeObserverLoopError(event.message)) {
|
||||
event.stopImmediatePropagation();
|
||||
event.preventDefault();
|
||||
}
|
||||
});
|
||||
|
||||
window.addEventListener('unhandledrejection', function (event) {
|
||||
if (isAxiosNetworkError(event.reason)) {
|
||||
console.warn('[dev] API unreachable:', event.reason?.config?.url || event.reason?.message);
|
||||
event.preventDefault();
|
||||
}
|
||||
});
|
||||
})();</script><script defer="defer" src="/safetyEval/static/js/320.52b7a201e2fab018.js"></script><script defer="defer" src="/safetyEval/static/js/121.ae75e71830bf4ae0.js"></script><script defer="defer" src="/safetyEval/static/js/289.f12da2fe2f6ad2ae.js"></script><script defer="defer" src="/safetyEval/static/js/main.c7ee7df8dda8d4ef.js"></script><link href="/safetyEval/static/css/main.f1fe1233254250fd.css" rel="stylesheet"></head><body><noscript>此网页需要开启JavaScript功能。</noscript><div id="root" style="width: 100%; height: 100%; position: relative;overflow-y: auto"></div><script type="text/javascript">/* @cqsjjb/script 输出当前应用基本信息 */console.log("%c@cqsjjb/scripts@2.0.0-rspack.1 Frontend_Env[production] Build_Date[2026/7/3 13:51:08] App_Identifier[safetyEval] Frontend_Branch[dev] Backend_Branch[<branch-name>]", "color: #1890ff; border-radius: 2px; padding: 0 4px; border: 1px solid #1890ff; background: #f9fcff")</script></body></html>
|
||||
File diff suppressed because it is too large
Load Diff
|
|
@ -1 +1 @@
|
|||
module.exports={javaGit:"<git-url>",javaGitName:"<git-name>",environment:{development:{javaGitBranch:"<branch-name>",API_HOST:"http://192.168.0.134"},production:{javaGitBranch:"<branch-name>",API_HOST:""}},appIdentifier:"safetyEval",contextInject:{appKey:"",fileUrl:"https://skqhdg.porthebei.com:9004/file/uploadFiles2/"},windowInject:{title:"微应用模板",links:[],element:{root:{id:"root"}},scripts:[]},server:{port:"8081",host:"0.0.0.0",open:!1},framework:{antd:{"ant-prefix":"micro-temp",fontFamily:"PingFangSC-Regular",colorPrimary:"#1677ff",borderRadius:2}},webpackConfig:{htmlWebpackPluginOption:{inject:!0}}};
|
||||
module.exports={javaGit:"<git-url>",javaGitName:"<git-name>",environment:{development:{javaGitBranch:"<branch-name>",API_HOST:"http://192.168.0.149"},production:{javaGitBranch:"<branch-name>",API_HOST:""}},appIdentifier:"safetyEval",contextInject:{appKey:"",fileUrl:"https://skqhdg.porthebei.com:9004/file/uploadFiles2/"},windowInject:{title:"微应用模板",links:[],element:{root:{id:"root"}},scripts:[]},server:{port:"8081",host:"192.168.0.187",open:!1},framework:{antd:{"ant-prefix":"micro-temp",fontFamily:"PingFangSC-Regular",colorPrimary:"#1677ff",borderRadius:2}},webpackConfig:{htmlWebpackPluginOption:{inject:!0}}};
|
||||
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
Loading…
Reference in New Issue