style(接口测试): 场景删除文案修改

This commit is contained in:
Jianguo-Genius 2024-04-11 15:02:30 +08:00 committed by 刘瑞斌
parent 2f5e5ada03
commit ff74e55944
5 changed files with 38 additions and 5 deletions

View File

@ -90,7 +90,7 @@ public class UserController {
@RequiresPermissions(PermissionConstants.SYSTEM_USER_READ)
public Pager<List<UserTableResponse>> list(@Validated @RequestBody BasePageRequest request) {
Page<Object> page = PageHelper.startPage(request.getCurrent(), request.getPageSize(),
StringUtils.isNotBlank(request.getSortString()) ? request.getSortString() : "create_time desc");
StringUtils.isNotBlank(request.getSortString("id")) ? request.getSortString("id") : "create_time desc,id desc");
return PageUtils.setPageInfo(page, userService.list(request));
}

View File

@ -41,4 +41,23 @@ public class BasePageRequest extends BaseCondition {
}
return sb.substring(0, sb.length() - 1);
}
public String getSortString(String defaultColumn) {
if (sort == null || sort.isEmpty()) {
return null;
}
StringBuilder sb = new StringBuilder();
for (Map.Entry<String, String> entry : sort.entrySet()) {
String column = CaseFormat.LOWER_CAMEL.to(CaseFormat.LOWER_UNDERSCORE, entry.getKey());
sb.append(column)
.append(StringUtils.SPACE)
.append(StringUtils.equalsIgnoreCase(entry.getValue(), "DESC") ? "DESC" : "ASC")
.append(",")
.append(defaultColumn)
.append(StringUtils.SPACE)
.append(StringUtils.equalsIgnoreCase(entry.getValue(), "DESC") ? "DESC" : "ASC");
return sb.toString();
}
return null;
}
}

View File

@ -1084,10 +1084,21 @@
});
selectIds = tableSelected.value as string[];
}
let content = t('api_scenario.table.deleteScenarioTip');
if (isBatch) {
content = `${t('api_scenario.table.deleteScenarioTip.schedule1')}${t(
'api_scenario.table.deleteScenarioTip.schedule2'
)}`;
} else if (record?.scheduleConfig) {
content = `${t('api_scenario.table.deleteScenarioTip.schedule1')}${t(
'api_scenario.table.deleteScenarioTip.schedule2'
)}`;
}
openModal({
type: 'error',
title,
content: t('api_scenario.table.deleteScenarioTip'),
content,
okText: t('common.confirmDelete'),
cancelText: t('common.cancel'),
okButtonProps: {

View File

@ -57,8 +57,9 @@ export default {
'api_scenario.table.valueRequired': 'Attribute value cannot be empty',
'api_scenario.table.deleteScenarioTipTitle': 'Confirm Delete {name}?',
'api_scenario.table.batchDeleteScenarioTip': 'Confirm delete {count} selected scenarios?',
'api_scenario.table.deleteScenarioTip':
'Deleting may cause failure in resources referencing this scenario. Proceed with caution!',
'api_scenario.table.deleteScenarioTip': 'Scenarios are putted in recycle bin, please be cautious!',
'api_scenario.table.deleteScenarioTip.schedule1': 'Scenarios are putted in recycle bin;',
'api_scenario.table.deleteScenarioTip.schedule2': 'Scheduled task will stop and delete, please be cautious!',
'api_scenario.table.apiStatus': 'Status',
'api_scenario.table.status.underway': 'Underway',
'api_scenario.table.status.completed': 'Completed',

View File

@ -56,7 +56,9 @@ export default {
'api_scenario.table.valueRequired': '属性值不能为空',
'api_scenario.table.deleteScenarioTipTitle': '确认删除 {name} 吗?',
'api_scenario.table.batchDeleteScenarioTip': '确认删除已选中的 {count} 条场景吗?',
'api_scenario.table.deleteScenarioTip': '删除后,可能导致引用该场景的资源执行失败,请谨慎操作!',
'api_scenario.table.deleteScenarioTip': '删除后,场景将放入回收站,可在回收站内进行数据恢复,请谨慎操作!',
'api_scenario.table.deleteScenarioTip.schedule1': '删除后,场景将放入回收站,可在回收站内进行数据恢复;',
'api_scenario.table.deleteScenarioTip.schedule2': '定时任务将停止并删除,请谨慎操作!',
'api_scenario.table.apiStatus': '状态',
'api_scenario.table.status.underway': '进行中',
'api_scenario.table.status.completed': '已完成',