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_VERSION = "2.240619.1"
|
||||
VITE_APP_VERSION = "2.240626"
|
||||
|
||||
# 接口基础URL地址-不带/后缀
|
||||
VITE_API_BASE_URL = "/omc-api"
|
||||
|
||||
@@ -11,7 +11,7 @@ VITE_APP_NAME = "Core Network EMS"
|
||||
VITE_APP_CODE = "CN EMS"
|
||||
|
||||
# 应用版本
|
||||
VITE_APP_VERSION = "2.240619.1"
|
||||
VITE_APP_VERSION = "2.240626"
|
||||
|
||||
# 接口基础URL地址-不带/后缀
|
||||
VITE_API_BASE_URL = "/omc-api"
|
||||
|
||||
@@ -14,7 +14,7 @@
|
||||
"dependencies": {
|
||||
"@ant-design/icons-vue": "^7.0.1",
|
||||
"@antv/g6": "~4.8.24",
|
||||
"@codemirror/lang-javascript": "^6.2.1",
|
||||
"@codemirror/lang-javascript": "^6.2.2",
|
||||
"@codemirror/lang-yaml": "^6.1.1",
|
||||
"@codemirror/merge": "^6.6.3",
|
||||
"@codemirror/theme-one-dark": "^6.1.2",
|
||||
@@ -24,12 +24,12 @@
|
||||
"@xterm/xterm": "^5.5.0",
|
||||
"ant-design-vue": "^3.2.20",
|
||||
"antdv-pro-layout": "~3.3.5",
|
||||
"antdv-pro-modal": "^3.0.9",
|
||||
"antdv-pro-modal": "^3.1.0",
|
||||
"codemirror": "^6.0.1",
|
||||
"dayjs": "^1.11.11",
|
||||
"echarts": "~5.5.0",
|
||||
"file-saver": "^2.0.5",
|
||||
"intl-tel-input": "~23.0.11",
|
||||
"intl-tel-input": "~23.0.12",
|
||||
"js-base64": "^3.7.7",
|
||||
"js-cookie": "^3.0.5",
|
||||
"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`,
|
||||
method: 'get',
|
||||
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`,
|
||||
method: 'put',
|
||||
data: data,
|
||||
timeout: 60_000,
|
||||
});
|
||||
}
|
||||
|
||||
@@ -173,5 +174,6 @@ export function serviceNeAction(data: Record<string, any>) {
|
||||
url: `/ne/action/service`,
|
||||
method: 'put',
|
||||
data: data,
|
||||
timeout: 60_000,
|
||||
});
|
||||
}
|
||||
|
||||
@@ -713,7 +713,7 @@ export default {
|
||||
uploadTitle: "Update Software",
|
||||
upload: "Upload",
|
||||
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.",
|
||||
uploadFileName: "Parses file names in the format of: amf-r2.240x.xx-xxx",
|
||||
name: "File Name",
|
||||
|
||||
@@ -713,7 +713,7 @@ export default {
|
||||
uploadTitle: "上传软件",
|
||||
upload: "上传",
|
||||
uploadNotFile: "未上传软件文件",
|
||||
uploadBatch: "上传软件包",
|
||||
uploadBatch: "批量上传",
|
||||
uploadBatchMax: "可上传多个软件包,最多同时选择{txt}个。",
|
||||
uploadFileName: "解析文件名称格式如: amf-r2.240x.xx-xxx",
|
||||
name: "文件名",
|
||||
|
||||
@@ -23,6 +23,8 @@ export default function useOptions() {
|
||||
}
|
||||
switch (type) {
|
||||
case 'int':
|
||||
// filter: "0~128"
|
||||
|
||||
if (filter && filter.indexOf('~') !== -1) {
|
||||
const filterArr = filter.split('~');
|
||||
const minInt = parseInt(filterArr[0]);
|
||||
@@ -73,6 +75,8 @@ export default function useOptions() {
|
||||
}
|
||||
break;
|
||||
case 'bool':
|
||||
// filter: '{"0":"false", "1":"true"}'
|
||||
|
||||
if (filter && filter.indexOf('{') === 1) {
|
||||
let filterJson: Record<string, any> = {};
|
||||
try {
|
||||
@@ -90,6 +94,8 @@ export default function useOptions() {
|
||||
}
|
||||
break;
|
||||
case 'string':
|
||||
// filter: "0~128"
|
||||
|
||||
// 字符串长度判断
|
||||
if (filter && filter.indexOf('~') !== -1) {
|
||||
try {
|
||||
@@ -127,6 +133,8 @@ export default function useOptions() {
|
||||
|
||||
break;
|
||||
case 'regex':
|
||||
// filter: "^[0-9]{3}$"
|
||||
|
||||
if (filter) {
|
||||
try {
|
||||
let regex = new RegExp(filter);
|
||||
|
||||
@@ -223,6 +223,12 @@ function fnModalVisibleByEdit(editId: string) {
|
||||
modalState.confirmLoading = false;
|
||||
hide();
|
||||
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);
|
||||
modalState.title = t('views.ne.neInfo.editTitle');
|
||||
modalState.visibleByEdit = true;
|
||||
@@ -286,6 +292,10 @@ function fnModalCancel() {
|
||||
*/
|
||||
function fnNeTypeChange(v: any) {
|
||||
const hostsLen = modalState.from.hosts.length;
|
||||
// OMC没有telnet
|
||||
if (hostsLen >= 2 && v === 'OMC') {
|
||||
modalState.from.hosts.splice(1, hostsLen);
|
||||
}
|
||||
// 网元默认只含22和4100
|
||||
if (hostsLen === 3 && v !== 'UPF') {
|
||||
modalState.from.hosts.pop();
|
||||
|
||||
@@ -346,6 +346,7 @@ onMounted(() => {});
|
||||
<template>
|
||||
<ProModal
|
||||
:drag="true"
|
||||
:width="650"
|
||||
:destroyOnClose="true"
|
||||
:keyboard="false"
|
||||
:mask-closable="false"
|
||||
|
||||
@@ -1,12 +1,12 @@
|
||||
<script setup lang="ts">
|
||||
import { reactive, onMounted, toRaw, watch } from 'vue';
|
||||
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 { RESULT_CODE_SUCCESS } from '@/constants/result-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 { FileType } from 'ant-design-vue/lib/upload/interface';
|
||||
import { uploadFileChunk } from '@/api/tool/file';
|
||||
const { t } = useI18n();
|
||||
const emit = defineEmits(['ok', 'cancel', 'update:visible']);
|
||||
@@ -230,6 +230,20 @@ function fnBeforeUploadFile(file: FileType) {
|
||||
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) {
|
||||
const uploadFile = modalState.uploadFiles.find(
|
||||
@@ -338,7 +352,7 @@ watch(
|
||||
() => props.visible,
|
||||
val => {
|
||||
if (val) {
|
||||
modalState.title = t('views.ne.neSoftware.uploadBatch');
|
||||
modalState.title = t('views.ne.neSoftware.uploadTitle');
|
||||
modalState.visibleByMoreFile = true;
|
||||
}
|
||||
}
|
||||
@@ -465,6 +479,7 @@ onMounted(() => {});
|
||||
showRemoveIcon: true,
|
||||
showDownloadIcon: false,
|
||||
}"
|
||||
:remove="fnBeforeRemoveFile"
|
||||
:before-upload="fnBeforeUploadFile"
|
||||
:custom-request="fnUploadFile"
|
||||
:disabled="modalState.confirmLoading"
|
||||
|
||||
@@ -66,10 +66,9 @@ function fnModalCancel() {
|
||||
{{ t('common.reset') }}
|
||||
</a-button>
|
||||
</a-col>
|
||||
<ProModal
|
||||
<a-modal
|
||||
:drag="true"
|
||||
:width="400"
|
||||
:minHeight="200"
|
||||
:width="416"
|
||||
:destroyOnClose="true"
|
||||
:mask-closable="false"
|
||||
v-model:visible="state.visible"
|
||||
@@ -84,7 +83,7 @@ function fnModalCancel() {
|
||||
<div style="color: #f5222d">
|
||||
{{ t('views.system.setting.resetTipContent') }}
|
||||
</div>
|
||||
</ProModal>
|
||||
</a-modal>
|
||||
|
||||
<a-col :lg="12" :md="12" :xs="24">
|
||||
<a-typography>
|
||||
|
||||
Reference in New Issue
Block a user