---完善性能板块国际化

This commit is contained in:
lai
2023-11-11 11:20:54 +08:00
parent 9c28e19413
commit 1c82719af0
7 changed files with 90 additions and 39 deletions

View File

@@ -216,7 +216,7 @@ function fnRecordDelete(row: Record<string, any>) {
function fnGetList(pageNum?: number) {
if (tableState.loading) return;
tableState.loading = true;
if(pageNum){
if (pageNum) {
queryParams.pageNum = pageNum;
}
listPerfTask(toRaw(queryParams)).then(res => {
@@ -595,14 +595,16 @@ function fnModalCancel() {
function fnRecordRun(row: Record<string, any>) {
Modal.confirm({
title: t('common.tipTitle'),
content: `确认激活编号为 【${row.id}】 的任务?`,
content: t('views.perfManage.taskManage.letupSure', { id: row.id }),
onOk() {
const key = 'taskRun';
message.loading({ content: t('common.loading'), key });
taskRun(row).then(res => {
if (res.code === RESULT_CODE_SUCCESS) {
message.success({
content: `激活成功`,
content: t('common.msgSuccess', {
msg: t('views.configManage.softwareManage.runBtn'),
}),
key,
duration: 2,
});
@@ -626,14 +628,16 @@ function fnRecordRun(row: Record<string, any>) {
function fnRecordStop(row: Record<string, any>) {
Modal.confirm({
title: t('common.tipTitle'),
content: `确认挂起编号为 【${row.id}】 的任务?`,
content: t('views.perfManage.taskManage.stopSure', { id: row.id }),
onOk() {
const key = 'taskStop';
message.loading({ content: t('common.loading'), key });
taskStop(row).then(res => {
if (res.code === RESULT_CODE_SUCCESS) {
message.success({
content: `挂起成功`,
content: t('common.msgSuccess', {
msg: t('views.perfManage.taskManage.stopTask'),
}),
key,
duration: 2,
});
@@ -658,7 +662,7 @@ function fnTaskModalVisible(type: string | number, row: Record<string, any>) {
if (row.status === 'Active') {
var key = 'Active';
message.error({
content: `禁止激活已激活的任务`,
content: t('views.perfManage.taskManage.letUpWarning'),
key: key,
duration: 2,
});
@@ -671,7 +675,7 @@ function fnTaskModalVisible(type: string | number, row: Record<string, any>) {
if (row.status === 'Inactive') {
var key = 'stop';
message.error({
content: `禁止挂起未激活的测量任务`,
content: t('views.perfManage.taskManage.stopWarning'),
key: key,
duration: 2,
});