Merge remote-tracking branch 'origin/main' into practical-training
This commit is contained in:
@@ -11,7 +11,7 @@ VITE_APP_NAME = "Core Network EMS"
|
|||||||
VITE_APP_CODE = "CN EMS"
|
VITE_APP_CODE = "CN EMS"
|
||||||
|
|
||||||
# 应用版本
|
# 应用版本
|
||||||
VITE_APP_VERSION = "2.240619.1"
|
VITE_APP_VERSION = "2.240626"
|
||||||
|
|
||||||
# 接口基础URL地址-不带/后缀
|
# 接口基础URL地址-不带/后缀
|
||||||
VITE_API_BASE_URL = "/omc-api"
|
VITE_API_BASE_URL = "/omc-api"
|
||||||
|
|||||||
@@ -11,7 +11,7 @@ VITE_APP_NAME = "Core Network EMS"
|
|||||||
VITE_APP_CODE = "CN EMS"
|
VITE_APP_CODE = "CN EMS"
|
||||||
|
|
||||||
# 应用版本
|
# 应用版本
|
||||||
VITE_APP_VERSION = "2.240619.1"
|
VITE_APP_VERSION = "2.240626"
|
||||||
|
|
||||||
# 接口基础URL地址-不带/后缀
|
# 接口基础URL地址-不带/后缀
|
||||||
VITE_API_BASE_URL = "/omc-api"
|
VITE_API_BASE_URL = "/omc-api"
|
||||||
|
|||||||
@@ -14,7 +14,7 @@
|
|||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@ant-design/icons-vue": "^7.0.1",
|
"@ant-design/icons-vue": "^7.0.1",
|
||||||
"@antv/g6": "~4.8.24",
|
"@antv/g6": "~4.8.24",
|
||||||
"@codemirror/lang-javascript": "^6.2.1",
|
"@codemirror/lang-javascript": "^6.2.2",
|
||||||
"@codemirror/lang-yaml": "^6.1.1",
|
"@codemirror/lang-yaml": "^6.1.1",
|
||||||
"@codemirror/merge": "^6.6.3",
|
"@codemirror/merge": "^6.6.3",
|
||||||
"@codemirror/theme-one-dark": "^6.1.2",
|
"@codemirror/theme-one-dark": "^6.1.2",
|
||||||
@@ -24,12 +24,12 @@
|
|||||||
"@xterm/xterm": "^5.5.0",
|
"@xterm/xterm": "^5.5.0",
|
||||||
"ant-design-vue": "^3.2.20",
|
"ant-design-vue": "^3.2.20",
|
||||||
"antdv-pro-layout": "~3.3.5",
|
"antdv-pro-layout": "~3.3.5",
|
||||||
"antdv-pro-modal": "^3.0.9",
|
"antdv-pro-modal": "^3.1.0",
|
||||||
"codemirror": "^6.0.1",
|
"codemirror": "^6.0.1",
|
||||||
"dayjs": "^1.11.11",
|
"dayjs": "^1.11.11",
|
||||||
"echarts": "~5.5.0",
|
"echarts": "~5.5.0",
|
||||||
"file-saver": "^2.0.5",
|
"file-saver": "^2.0.5",
|
||||||
"intl-tel-input": "~23.0.11",
|
"intl-tel-input": "~23.0.12",
|
||||||
"js-base64": "^3.7.7",
|
"js-base64": "^3.7.7",
|
||||||
"js-cookie": "^3.0.5",
|
"js-cookie": "^3.0.5",
|
||||||
"localforage": "^1.10.0",
|
"localforage": "^1.10.0",
|
||||||
|
|||||||
@@ -18,7 +18,7 @@ export async function getParamConfigTopTab(neType: string) {
|
|||||||
url: `/api/rest/databaseManagement/v1/elementType/omc_db/objectType/param_config`,
|
url: `/api/rest/databaseManagement/v1/elementType/omc_db/objectType/param_config`,
|
||||||
method: 'get',
|
method: 'get',
|
||||||
params: {
|
params: {
|
||||||
SQL: `SELECT top_display,top_tag,method FROM param_config WHERE ne_type = '${neType}'`,
|
SQL: `SELECT id,top_display,top_tag,method FROM param_config WHERE ne_type = '${neType}' ORDER BY id ASC`,
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
// 解析数据
|
// 解析数据
|
||||||
|
|||||||
@@ -134,6 +134,7 @@ export function saveOAMFile(data: Record<string, any>) {
|
|||||||
url: `/ne/info/oamFile`,
|
url: `/ne/info/oamFile`,
|
||||||
method: 'put',
|
method: 'put',
|
||||||
data: data,
|
data: data,
|
||||||
|
timeout: 60_000,
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -173,5 +174,6 @@ export function serviceNeAction(data: Record<string, any>) {
|
|||||||
url: `/ne/action/service`,
|
url: `/ne/action/service`,
|
||||||
method: 'put',
|
method: 'put',
|
||||||
data: data,
|
data: data,
|
||||||
|
timeout: 60_000,
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -713,7 +713,7 @@ export default {
|
|||||||
uploadTitle: "Update Software",
|
uploadTitle: "Update Software",
|
||||||
upload: "Upload",
|
upload: "Upload",
|
||||||
uploadNotFile: "No software files uploaded",
|
uploadNotFile: "No software files uploaded",
|
||||||
uploadBatch: "Update Softwares",
|
uploadBatch: "Batch Upload",
|
||||||
uploadBatchMax: "Multiple packages can be uploaded, with up to {txt} selected at the same time.",
|
uploadBatchMax: "Multiple packages can be uploaded, with up to {txt} selected at the same time.",
|
||||||
uploadFileName: "Parses file names in the format of: amf-r2.240x.xx-xxx",
|
uploadFileName: "Parses file names in the format of: amf-r2.240x.xx-xxx",
|
||||||
name: "File Name",
|
name: "File Name",
|
||||||
|
|||||||
@@ -713,7 +713,7 @@ export default {
|
|||||||
uploadTitle: "上传软件",
|
uploadTitle: "上传软件",
|
||||||
upload: "上传",
|
upload: "上传",
|
||||||
uploadNotFile: "未上传软件文件",
|
uploadNotFile: "未上传软件文件",
|
||||||
uploadBatch: "上传软件包",
|
uploadBatch: "批量上传",
|
||||||
uploadBatchMax: "可上传多个软件包,最多同时选择{txt}个。",
|
uploadBatchMax: "可上传多个软件包,最多同时选择{txt}个。",
|
||||||
uploadFileName: "解析文件名称格式如: amf-r2.240x.xx-xxx",
|
uploadFileName: "解析文件名称格式如: amf-r2.240x.xx-xxx",
|
||||||
name: "文件名",
|
name: "文件名",
|
||||||
|
|||||||
@@ -23,6 +23,8 @@ export default function useOptions() {
|
|||||||
}
|
}
|
||||||
switch (type) {
|
switch (type) {
|
||||||
case 'int':
|
case 'int':
|
||||||
|
// filter: "0~128"
|
||||||
|
|
||||||
if (filter && filter.indexOf('~') !== -1) {
|
if (filter && filter.indexOf('~') !== -1) {
|
||||||
const filterArr = filter.split('~');
|
const filterArr = filter.split('~');
|
||||||
const minInt = parseInt(filterArr[0]);
|
const minInt = parseInt(filterArr[0]);
|
||||||
@@ -73,6 +75,8 @@ export default function useOptions() {
|
|||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case 'bool':
|
case 'bool':
|
||||||
|
// filter: '{"0":"false", "1":"true"}'
|
||||||
|
|
||||||
if (filter && filter.indexOf('{') === 1) {
|
if (filter && filter.indexOf('{') === 1) {
|
||||||
let filterJson: Record<string, any> = {};
|
let filterJson: Record<string, any> = {};
|
||||||
try {
|
try {
|
||||||
@@ -90,6 +94,8 @@ export default function useOptions() {
|
|||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case 'string':
|
case 'string':
|
||||||
|
// filter: "0~128"
|
||||||
|
|
||||||
// 字符串长度判断
|
// 字符串长度判断
|
||||||
if (filter && filter.indexOf('~') !== -1) {
|
if (filter && filter.indexOf('~') !== -1) {
|
||||||
try {
|
try {
|
||||||
@@ -127,6 +133,8 @@ export default function useOptions() {
|
|||||||
|
|
||||||
break;
|
break;
|
||||||
case 'regex':
|
case 'regex':
|
||||||
|
// filter: "^[0-9]{3}$"
|
||||||
|
|
||||||
if (filter) {
|
if (filter) {
|
||||||
try {
|
try {
|
||||||
let regex = new RegExp(filter);
|
let regex = new RegExp(filter);
|
||||||
|
|||||||
@@ -223,6 +223,12 @@ function fnModalVisibleByEdit(editId: string) {
|
|||||||
modalState.confirmLoading = false;
|
modalState.confirmLoading = false;
|
||||||
hide();
|
hide();
|
||||||
if (res.code === RESULT_CODE_SUCCESS) {
|
if (res.code === RESULT_CODE_SUCCESS) {
|
||||||
|
// OMC没有telnet
|
||||||
|
if (res.data.neType === 'OMC') {
|
||||||
|
res.data.hosts = res.data.hosts.filter(
|
||||||
|
(s: any) => s.hostType === 'ssh'
|
||||||
|
);
|
||||||
|
}
|
||||||
Object.assign(modalState.from, res.data);
|
Object.assign(modalState.from, res.data);
|
||||||
modalState.title = t('views.ne.neInfo.editTitle');
|
modalState.title = t('views.ne.neInfo.editTitle');
|
||||||
modalState.visibleByEdit = true;
|
modalState.visibleByEdit = true;
|
||||||
@@ -286,6 +292,10 @@ function fnModalCancel() {
|
|||||||
*/
|
*/
|
||||||
function fnNeTypeChange(v: any) {
|
function fnNeTypeChange(v: any) {
|
||||||
const hostsLen = modalState.from.hosts.length;
|
const hostsLen = modalState.from.hosts.length;
|
||||||
|
// OMC没有telnet
|
||||||
|
if (hostsLen >= 2 && v === 'OMC') {
|
||||||
|
modalState.from.hosts.splice(1, hostsLen);
|
||||||
|
}
|
||||||
// 网元默认只含22和4100
|
// 网元默认只含22和4100
|
||||||
if (hostsLen === 3 && v !== 'UPF') {
|
if (hostsLen === 3 && v !== 'UPF') {
|
||||||
modalState.from.hosts.pop();
|
modalState.from.hosts.pop();
|
||||||
|
|||||||
@@ -346,6 +346,7 @@ onMounted(() => {});
|
|||||||
<template>
|
<template>
|
||||||
<ProModal
|
<ProModal
|
||||||
:drag="true"
|
:drag="true"
|
||||||
|
:width="650"
|
||||||
:destroyOnClose="true"
|
:destroyOnClose="true"
|
||||||
:keyboard="false"
|
:keyboard="false"
|
||||||
:mask-closable="false"
|
:mask-closable="false"
|
||||||
|
|||||||
@@ -1,12 +1,12 @@
|
|||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
import { reactive, onMounted, toRaw, watch } from 'vue';
|
import { reactive, onMounted, toRaw, watch } from 'vue';
|
||||||
import { message, Upload, notification } from 'ant-design-vue/lib';
|
import { message, Upload, notification } from 'ant-design-vue/lib';
|
||||||
|
import type { UploadRequestOption } from 'ant-design-vue/lib/vc-upload/interface';
|
||||||
|
import type { FileType, UploadFile } from 'ant-design-vue/lib/upload/interface';
|
||||||
import useI18n from '@/hooks/useI18n';
|
import useI18n from '@/hooks/useI18n';
|
||||||
import { RESULT_CODE_SUCCESS } from '@/constants/result-constants';
|
import { RESULT_CODE_SUCCESS } from '@/constants/result-constants';
|
||||||
import { NE_TYPE_LIST, NE_EXPAND_LIST } from '@/constants/ne-constants';
|
import { NE_TYPE_LIST, NE_EXPAND_LIST } from '@/constants/ne-constants';
|
||||||
import { UploadRequestOption } from 'ant-design-vue/lib/vc-upload/interface';
|
|
||||||
import { addNeSoftware } from '@/api/ne/neSoftware';
|
import { addNeSoftware } from '@/api/ne/neSoftware';
|
||||||
import { FileType } from 'ant-design-vue/lib/upload/interface';
|
|
||||||
import { uploadFileChunk } from '@/api/tool/file';
|
import { uploadFileChunk } from '@/api/tool/file';
|
||||||
const { t } = useI18n();
|
const { t } = useI18n();
|
||||||
const emit = defineEmits(['ok', 'cancel', 'update:visible']);
|
const emit = defineEmits(['ok', 'cancel', 'update:visible']);
|
||||||
@@ -230,6 +230,20 @@ function fnBeforeUploadFile(file: FileType) {
|
|||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**表单上传前删除 */
|
||||||
|
function fnBeforeRemoveFile(file: UploadFile) {
|
||||||
|
const fileName = file.name;
|
||||||
|
// 取网元类型判断是否支持
|
||||||
|
let neType = '';
|
||||||
|
const neTypeIndex = fileName.indexOf('-');
|
||||||
|
if (neTypeIndex !== -1) {
|
||||||
|
neType = fileName.substring(0, neTypeIndex).toUpperCase();
|
||||||
|
}
|
||||||
|
const idx = modalState.from.findIndex(item => item.neType === neType);
|
||||||
|
modalState.from.splice(idx, 1);
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
/**表单上传文件 */
|
/**表单上传文件 */
|
||||||
function fnUploadFile(up: UploadRequestOption) {
|
function fnUploadFile(up: UploadRequestOption) {
|
||||||
const uploadFile = modalState.uploadFiles.find(
|
const uploadFile = modalState.uploadFiles.find(
|
||||||
@@ -338,7 +352,7 @@ watch(
|
|||||||
() => props.visible,
|
() => props.visible,
|
||||||
val => {
|
val => {
|
||||||
if (val) {
|
if (val) {
|
||||||
modalState.title = t('views.ne.neSoftware.uploadBatch');
|
modalState.title = t('views.ne.neSoftware.uploadTitle');
|
||||||
modalState.visibleByMoreFile = true;
|
modalState.visibleByMoreFile = true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -465,6 +479,7 @@ onMounted(() => {});
|
|||||||
showRemoveIcon: true,
|
showRemoveIcon: true,
|
||||||
showDownloadIcon: false,
|
showDownloadIcon: false,
|
||||||
}"
|
}"
|
||||||
|
:remove="fnBeforeRemoveFile"
|
||||||
:before-upload="fnBeforeUploadFile"
|
:before-upload="fnBeforeUploadFile"
|
||||||
:custom-request="fnUploadFile"
|
:custom-request="fnUploadFile"
|
||||||
:disabled="modalState.confirmLoading"
|
:disabled="modalState.confirmLoading"
|
||||||
|
|||||||
@@ -66,10 +66,9 @@ function fnModalCancel() {
|
|||||||
{{ t('common.reset') }}
|
{{ t('common.reset') }}
|
||||||
</a-button>
|
</a-button>
|
||||||
</a-col>
|
</a-col>
|
||||||
<ProModal
|
<a-modal
|
||||||
:drag="true"
|
:drag="true"
|
||||||
:width="400"
|
:width="416"
|
||||||
:minHeight="200"
|
|
||||||
:destroyOnClose="true"
|
:destroyOnClose="true"
|
||||||
:mask-closable="false"
|
:mask-closable="false"
|
||||||
v-model:visible="state.visible"
|
v-model:visible="state.visible"
|
||||||
@@ -84,7 +83,7 @@ function fnModalCancel() {
|
|||||||
<div style="color: #f5222d">
|
<div style="color: #f5222d">
|
||||||
{{ t('views.system.setting.resetTipContent') }}
|
{{ t('views.system.setting.resetTipContent') }}
|
||||||
</div>
|
</div>
|
||||||
</ProModal>
|
</a-modal>
|
||||||
|
|
||||||
<a-col :lg="12" :md="12" :xs="24">
|
<a-col :lg="12" :md="12" :xs="24">
|
||||||
<a-typography>
|
<a-typography>
|
||||||
|
|||||||
Reference in New Issue
Block a user