---完善性能板块国际化
This commit is contained in:
@@ -91,22 +91,22 @@ let tableColumns: ColumnsType = [
|
||||
align: 'center',
|
||||
},
|
||||
{
|
||||
title: '统计设置',
|
||||
title: t('views.perfManage.perfThreshold.staticSet'),
|
||||
dataIndex: 'kpiSet',
|
||||
align: 'center',
|
||||
},
|
||||
{
|
||||
title: '门限值',
|
||||
title: t('views.perfManage.perfThreshold.threValue'),
|
||||
dataIndex: 'threshold',
|
||||
align: 'center',
|
||||
},
|
||||
{
|
||||
title: '告警级别',
|
||||
title: t('views.perfManage.perfThreshold.alarmLevel'),
|
||||
dataIndex: 'origSeverity',
|
||||
align: 'center',
|
||||
},
|
||||
{
|
||||
title: '状态',
|
||||
title: t('views.perfManage.perfThreshold.status'),
|
||||
dataIndex: 'status',
|
||||
key: 'status',
|
||||
align: 'center',
|
||||
@@ -188,7 +188,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;
|
||||
}
|
||||
listPerfThreshold(toRaw(queryParams)).then(res => {
|
||||
@@ -325,7 +325,7 @@ function fnModalVisibleByEdit(id?: string) {
|
||||
* 进行表达规则校验
|
||||
*/
|
||||
function fnModalOk() {
|
||||
console.log(modalState.from)
|
||||
console.log(modalState.from);
|
||||
modalStateFrom
|
||||
.validate()
|
||||
.then(e => {
|
||||
@@ -378,14 +378,16 @@ function fnModalCancel() {
|
||||
function fnRecordRun(row: Record<string, any>) {
|
||||
Modal.confirm({
|
||||
title: t('common.tipTitle'),
|
||||
content: `确认激活编号为 【${row.id}】 的性能门限?`,
|
||||
content: t('views.perfManage.perfThreshold.letupSure', { id: row.id }),
|
||||
onOk() {
|
||||
const key = 'taskRun';
|
||||
message.loading({ content: t('common.loading'), key });
|
||||
threRun(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,
|
||||
});
|
||||
@@ -409,14 +411,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.perfThreshold.stopSure', { id: row.id }),
|
||||
onOk() {
|
||||
const key = 'taskStop';
|
||||
message.loading({ content: t('common.loading'), key });
|
||||
threStop(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,
|
||||
});
|
||||
@@ -441,7 +445,7 @@ function fnTaskModalVisible(type: string | number, row: Record<string, any>) {
|
||||
if (row.status === 'Active') {
|
||||
var key = 'Active';
|
||||
message.error({
|
||||
content: `禁止激活已激活的性能门限`,
|
||||
content: t('views.perfManage.perfThreshold.letUpWarning'),
|
||||
key: key,
|
||||
duration: 2,
|
||||
});
|
||||
@@ -454,7 +458,7 @@ function fnTaskModalVisible(type: string | number, row: Record<string, any>) {
|
||||
if (row.status === 'Inactive') {
|
||||
var key = 'stop';
|
||||
message.error({
|
||||
content: `禁止挂起未激活的性能门限`,
|
||||
content: t('views.perfManage.perfThreshold.stopWarning'),
|
||||
key: key,
|
||||
duration: 2,
|
||||
});
|
||||
|
||||
@@ -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,
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user