fix: 网元服务操作接口
This commit is contained in:
@@ -4,10 +4,13 @@ import { Modal, message } from 'ant-design-vue/lib';
|
||||
import useI18n from '@/hooks/useI18n';
|
||||
import { useRouter } from 'vue-router';
|
||||
import { updateNeConfigReload } from '@/api/configManage/configParam';
|
||||
import { serviceNeAction } from '@/api/ne/neInfo';
|
||||
import useLockedStore from '@/store/modules/locked';
|
||||
|
||||
export default function useNeOptions() {
|
||||
const router = useRouter();
|
||||
const { t } = useI18n();
|
||||
const lockedStore = useLockedStore();
|
||||
|
||||
/**
|
||||
* 网元启动
|
||||
@@ -21,9 +24,13 @@ export default function useNeOptions() {
|
||||
oper: t('views.configManage.neManage.start'),
|
||||
}),
|
||||
onOk() {
|
||||
const key = 'startNf';
|
||||
const key = 'start';
|
||||
message.loading({ content: t('common.loading'), key });
|
||||
startNf(row).then(res => {
|
||||
serviceNeAction({
|
||||
neType: row.neType,
|
||||
neId: row.neId,
|
||||
action: 'start',
|
||||
}).then(res => {
|
||||
if (res.code === RESULT_CODE_SUCCESS) {
|
||||
message.success({
|
||||
content: t('common.msgSuccess', {
|
||||
@@ -56,10 +63,26 @@ export default function useNeOptions() {
|
||||
oper: t('views.configManage.neManage.restart'),
|
||||
}),
|
||||
onOk() {
|
||||
const key = 'restartNf';
|
||||
const key = 'restart';
|
||||
message.loading({ content: t('common.loading'), key });
|
||||
restartNf(row).then(res => {
|
||||
serviceNeAction({
|
||||
neType: row.neType,
|
||||
neId: row.neId,
|
||||
action: 'restart',
|
||||
}).then(res => {
|
||||
if (res.code === RESULT_CODE_SUCCESS) {
|
||||
// OMC自升级
|
||||
if (row.neType.toUpperCase() === 'OMC') {
|
||||
if (res.code === RESULT_CODE_SUCCESS) {
|
||||
lockedStore.fnLock('reload');
|
||||
} else {
|
||||
message.error({
|
||||
content: `${res.msg}`,
|
||||
duration: 3,
|
||||
});
|
||||
}
|
||||
return;
|
||||
}
|
||||
message.success({
|
||||
content: t('common.msgSuccess', {
|
||||
msg: t('views.configManage.neManage.restart'),
|
||||
@@ -91,9 +114,13 @@ export default function useNeOptions() {
|
||||
oper: t('views.configManage.neManage.stop'),
|
||||
}),
|
||||
onOk() {
|
||||
const key = 'restartNf';
|
||||
const key = 'stop';
|
||||
message.loading({ content: t('common.loading'), key });
|
||||
stopNf(row).then(res => {
|
||||
serviceNeAction({
|
||||
neType: row.neType,
|
||||
neId: row.neId,
|
||||
action: 'stop',
|
||||
}).then(res => {
|
||||
if (res.code === RESULT_CODE_SUCCESS) {
|
||||
message.success({
|
||||
content: t('common.msgSuccess', {
|
||||
|
||||
Reference in New Issue
Block a user