ref: v3变更,,完成整合,同步v2.2508.4 -250902
This commit is contained in:
@@ -5,12 +5,11 @@ import { message, Form, Modal } from 'ant-design-vue/es';
|
||||
import { RESULT_CODE_SUCCESS } from '@/constants/result-constants';
|
||||
import { NE_TYPE_LIST } from '@/constants/ne-constants';
|
||||
import { regExpIPv4, regExpIPv6 } from '@/utils/regular-utils';
|
||||
import { addNeInfo, updateNeInfo } from '@/api/ne/neInfo';
|
||||
import { addNeInfo, updateNeInfo, getNeInfo } from '@/api/ne/neInfo';
|
||||
import { neHostAuthorizedRSA, testNeHost } from '@/api/ne/neHost';
|
||||
import useDictStore from '@/store/modules/dict';
|
||||
import useI18n from '@/hooks/useI18n';
|
||||
import useI18n from '@/hooks/useI18n';
|
||||
import { currentCoreUid } from '@/hooks/useCoreUid';
|
||||
import { getNeInfoByNF } from '@/api/ne/neAction';
|
||||
const { getDict } = useDictStore();
|
||||
const { t } = useI18n();
|
||||
const emit = defineEmits(['ok', 'cancel', 'update:open']);
|
||||
@@ -19,18 +18,14 @@ const props = defineProps({
|
||||
type: Boolean,
|
||||
default: false,
|
||||
},
|
||||
id: {
|
||||
type: Number,
|
||||
default: 0,
|
||||
},
|
||||
coreUid: {
|
||||
type: String,
|
||||
default: '',
|
||||
},
|
||||
neUid: {
|
||||
type: String,
|
||||
default: '',
|
||||
},
|
||||
neType: {
|
||||
type: String,
|
||||
default: '',
|
||||
},
|
||||
});
|
||||
|
||||
/**字典数据 */
|
||||
@@ -210,8 +205,8 @@ function modalStateFromEqualIPV4AndIPV6(
|
||||
* @param coreUid 核心网ID
|
||||
* @param neUid 网元ID
|
||||
*/
|
||||
function fnModalVisibleByEdit(coreUid: string, neUid: string) {
|
||||
if (!coreUid || !neUid) {
|
||||
function fnModalVisibleByEdit(coreUid: string, id: number) {
|
||||
if (!coreUid || !id) {
|
||||
modalStateFrom.resetFields();
|
||||
modalState.title = t('views.ne.neInfo.addTitle');
|
||||
modalState.openByEdit = true;
|
||||
@@ -219,7 +214,7 @@ function fnModalVisibleByEdit(coreUid: string, neUid: string) {
|
||||
if (modalState.confirmLoading) return;
|
||||
const hide = message.loading(t('common.loading'), 0);
|
||||
modalState.confirmLoading = true;
|
||||
getNeInfoByNF(coreUid, neUid).then(res => {
|
||||
getNeInfo(coreUid, id).then(res => {
|
||||
modalState.confirmLoading = false;
|
||||
hide();
|
||||
if (res.code === RESULT_CODE_SUCCESS) {
|
||||
@@ -334,7 +329,7 @@ function fnNeIPChange(e: any) {
|
||||
watch(
|
||||
() => props.open,
|
||||
val => {
|
||||
if (val) fnModalVisibleByEdit(props.coreUid, props.neUid);
|
||||
if (val) fnModalVisibleByEdit(props.coreUid, props.id);
|
||||
}
|
||||
);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user