Merge branch 'main' of http://192.168.2.166:3180/OMC/ems_frontend_vue3
This commit is contained in:
@@ -51,15 +51,3 @@ export async function sendMMlByNE(
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
/**
|
||||
* 发送文件到网元端
|
||||
* @returns object
|
||||
*/
|
||||
export function transferToNeFile(data: Record<string, any>) {
|
||||
return request({
|
||||
url: `/ne/action/pushFile`,
|
||||
method: 'post',
|
||||
data,
|
||||
});
|
||||
}
|
||||
|
||||
@@ -8,6 +8,7 @@ import { parseObjLineToHump } from '@/utils/parse-utils';
|
||||
* @returns object
|
||||
*/
|
||||
export async function listgoldData(query: Record<string, any>) {
|
||||
console.log(query);
|
||||
let totalSQL = 'select count(*) as total from gold_kpi where 1=1 ';
|
||||
let rowsSQL =
|
||||
'SELECT gold_kpi.*,kpi_title.en_title FROM gold_kpi LEFT JOIN kpi_title on gold_kpi.kpi_id=kpi_title.kpi_id where 1=1 ';
|
||||
@@ -15,17 +16,23 @@ export async function listgoldData(query: Record<string, any>) {
|
||||
// 查询
|
||||
let querySQL = '';
|
||||
if (query.neType) {
|
||||
querySQL += ` and ne_type like '%${query.neType}%' `;
|
||||
querySQL += ` and gold_kpi.ne_type like '%${query.neType}%' `;
|
||||
}
|
||||
if (query.beginTime) {
|
||||
querySQL += ` and start_time >= '${query.beginTime}' `;
|
||||
}
|
||||
if (query.endTime) {
|
||||
querySQL += ` and start_time <= '${query.endTime}' `;
|
||||
querySQL += ` and end_time <= '${query.endTime}' `;
|
||||
}
|
||||
|
||||
// 排序
|
||||
let sortSql = ' order by start_time ';
|
||||
let sortSql = ' order by ';
|
||||
if (query.sortField) {
|
||||
sortSql += ` ${query.sortField} `;
|
||||
}else{
|
||||
sortSql += ` start_time `;
|
||||
}
|
||||
|
||||
if (query.sortOrder === 'asc') {
|
||||
sortSql += ' asc ';
|
||||
} else {
|
||||
|
||||
@@ -1,4 +1,8 @@
|
||||
import { RESULT_CODE_ERROR, RESULT_CODE_SUCCESS, RESULT_MSG_ERROR } from '@/constants/result-constants';
|
||||
import {
|
||||
RESULT_CODE_ERROR,
|
||||
RESULT_CODE_SUCCESS,
|
||||
RESULT_MSG_ERROR,
|
||||
} from '@/constants/result-constants';
|
||||
import { request, language } from '@/plugins/http-fetch';
|
||||
import { encode } from 'js-base64';
|
||||
|
||||
@@ -194,3 +198,33 @@ export function chunkUpload(data: FormData) {
|
||||
dataType: 'form-data',
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* 上传切片文件并发送文件到网元端
|
||||
* @param neType 网元类型, UPF
|
||||
* @param neId 网元标识, 001
|
||||
* @param fileData 文件对象
|
||||
* @param chunkSize 数据块大小MB,默认1MB
|
||||
* @returns
|
||||
*/
|
||||
export async function uploadFileToNE(
|
||||
neType: string,
|
||||
neId: string,
|
||||
fileData: File,
|
||||
chunkSize: number = 1
|
||||
) {
|
||||
const uploadChunkRes = await uploadFileChunk(fileData, chunkSize, 'import');
|
||||
if (uploadChunkRes.code === RESULT_CODE_SUCCESS) {
|
||||
const transferToNeFileRes = await request({
|
||||
url: `/ne/action/pushFile`,
|
||||
method: 'post',
|
||||
data: {
|
||||
uploadPath: uploadChunkRes.data.fileName,
|
||||
neType,
|
||||
neId,
|
||||
},
|
||||
});
|
||||
return transferToNeFileRes;
|
||||
}
|
||||
return uploadChunkRes;
|
||||
}
|
||||
|
||||
@@ -1319,5 +1319,12 @@ export default {
|
||||
noChange: "No change in interface settings",
|
||||
},
|
||||
},
|
||||
tool: {
|
||||
help: {
|
||||
download: "Download",
|
||||
pdfViewer: "In-browser preview",
|
||||
pdfViewerErr: "Sorry, your browser does not support PDF preview!",
|
||||
}
|
||||
},
|
||||
},
|
||||
};
|
||||
|
||||
@@ -495,7 +495,6 @@ export default {
|
||||
},
|
||||
sub: {
|
||||
subInfo:'签约信息',
|
||||
neTypePlease: '查询网元类型',
|
||||
neType: 'UDM网元类型',
|
||||
export: '导出',
|
||||
exportConfirm: '确认导出全部签约用户数据吗?',
|
||||
@@ -530,15 +529,12 @@ export default {
|
||||
ardTip:'接入控制标志(Access-Restriction-Data),可用于区分2G/3G/LTE用户,便于为2G/3G/LTE网络共存时,对不同类型用户进行区分服务',
|
||||
},
|
||||
base5G: {
|
||||
neTypePlease: '查询网元类型',
|
||||
neType: 'AMF网元对象',
|
||||
},
|
||||
ue: {
|
||||
neTypePlease: '查询网元类型',
|
||||
neType: 'SMF网元对象',
|
||||
},
|
||||
ims: {
|
||||
neTypePlease: '查询网元类型',
|
||||
neType: 'IMS网元对象',
|
||||
},
|
||||
},
|
||||
@@ -1323,5 +1319,12 @@ export default {
|
||||
noChange: "接口设置无变更",
|
||||
},
|
||||
},
|
||||
tool: {
|
||||
help: {
|
||||
download: "下载",
|
||||
pdfViewer: "浏览器内预览",
|
||||
pdfViewerErr: "很抱歉,您的浏览器不支持 PDF 预览!",
|
||||
}
|
||||
},
|
||||
},
|
||||
};
|
||||
|
||||
@@ -8,8 +8,7 @@ import useNeInfoStore from '@/store/modules/neinfo';
|
||||
import { regExpIPv4, regExpIPv6 } from '@/utils/regular-utils';
|
||||
import useI18n from '@/hooks/useI18n';
|
||||
import { getMMLByNE, sendMMlByNE } from '@/api/mmlManage/neOperate';
|
||||
import { transferToNeFile } from '@/api/mmlManage/neOperate';
|
||||
import { uploadFileChunk } from '@/api/tool/file';
|
||||
import { uploadFileToNE } from '@/api/tool/file';
|
||||
import { UploadRequestOption } from 'ant-design-vue/lib/vc-upload/interface';
|
||||
const { t } = useI18n();
|
||||
|
||||
@@ -177,20 +176,8 @@ function fnUpload(up: UploadRequestOption, name: string) {
|
||||
onOk() {
|
||||
const hide = message.loading(t('common.loading'), 0);
|
||||
state.from.uploadLoading = true;
|
||||
uploadFileChunk(up.file as File, 5, 'import')
|
||||
.then(res => {
|
||||
// 文件上传
|
||||
if (res.code === RESULT_CODE_SUCCESS) {
|
||||
const [neType, neId] = state.neType;
|
||||
return transferToNeFile({
|
||||
uploadPath: res.data.fileName,
|
||||
neType: neType,
|
||||
neId: neId,
|
||||
});
|
||||
} else {
|
||||
return res;
|
||||
}
|
||||
})
|
||||
const [neType, neId] = state.neType;
|
||||
uploadFileToNE(neType, neId, up.file as File, 5)
|
||||
.then(res => {
|
||||
// 文件转存
|
||||
if (res.code === RESULT_CODE_SUCCESS) {
|
||||
|
||||
@@ -8,8 +8,7 @@ import useNeInfoStore from '@/store/modules/neinfo';
|
||||
import { regExpIPv4, regExpIPv6 } from '@/utils/regular-utils';
|
||||
import useI18n from '@/hooks/useI18n';
|
||||
import { getMMLByOMC, sendMMlByOMC } from '@/api/mmlManage/omcOperate';
|
||||
import { transferToNeFile } from '@/api/mmlManage/neOperate';
|
||||
import { uploadFileChunk } from '@/api/tool/file';
|
||||
import { uploadFileToNE } from '@/api/tool/file';
|
||||
import { UploadRequestOption } from 'ant-design-vue/lib/vc-upload/interface';
|
||||
const { t } = useI18n();
|
||||
|
||||
@@ -173,19 +172,7 @@ function fnUpload(up: UploadRequestOption, name: string) {
|
||||
onOk() {
|
||||
const hide = message.loading(t('common.loading'), 0);
|
||||
state.from.uploadLoading = true;
|
||||
uploadFileChunk(up.file as File, 5, 'import')
|
||||
.then(res => {
|
||||
// 文件上传
|
||||
if (res.code === RESULT_CODE_SUCCESS) {
|
||||
return transferToNeFile({
|
||||
uploadPath: res.data.fileName,
|
||||
neType: 'OMC',
|
||||
neId: state.neId,
|
||||
});
|
||||
} else {
|
||||
return res;
|
||||
}
|
||||
})
|
||||
uploadFileToNE('OMC', state.neId, up.file as File, 5)
|
||||
.then(res => {
|
||||
// 文件转存
|
||||
if (res.code === RESULT_CODE_SUCCESS) {
|
||||
|
||||
@@ -9,8 +9,7 @@ import { regExpIPv4, regExpIPv6 } from '@/utils/regular-utils';
|
||||
import useI18n from '@/hooks/useI18n';
|
||||
import { getMMLByUDM, sendMMlByUDM } from '@/api/mmlManage/udmOperate';
|
||||
import { UploadRequestOption } from 'ant-design-vue/lib/vc-upload/interface';
|
||||
import { uploadFileChunk } from '@/api/tool/file';
|
||||
import { transferToNeFile } from '@/api/mmlManage/neOperate';
|
||||
import { uploadFileToNE } from '@/api/tool/file';
|
||||
const { t } = useI18n();
|
||||
|
||||
/**网元参数 */
|
||||
@@ -173,19 +172,7 @@ function fnUpload(up: UploadRequestOption, name: string) {
|
||||
onOk() {
|
||||
const hide = message.loading(t('common.loading'), 0);
|
||||
state.from.uploadLoading = true;
|
||||
uploadFileChunk(up.file as File, 5, 'import')
|
||||
.then(res => {
|
||||
// 文件上传
|
||||
if (res.code === RESULT_CODE_SUCCESS) {
|
||||
return transferToNeFile({
|
||||
uploadPath: res.data.fileName,
|
||||
neType: 'UDM',
|
||||
neId: state.neId,
|
||||
});
|
||||
} else {
|
||||
return res;
|
||||
}
|
||||
})
|
||||
uploadFileToNE('UDM', state.neId, up.file as File, 5)
|
||||
.then(res => {
|
||||
// 文件转存
|
||||
if (res.code === RESULT_CODE_SUCCESS) {
|
||||
|
||||
@@ -29,6 +29,10 @@ let queryParams = reactive({
|
||||
/**记录时间 */
|
||||
beginTime: '',
|
||||
endTime: '',
|
||||
/**排序字段 */
|
||||
sortField: 'value',
|
||||
/**排序方式 */
|
||||
sortOrder: 'asc',
|
||||
/**当前页数 */
|
||||
pageNum: 1,
|
||||
/**每页条数 */
|
||||
@@ -41,6 +45,8 @@ function fnQueryReset() {
|
||||
neType: '',
|
||||
beginTime: '',
|
||||
endTime: '',
|
||||
sortField: 'value',
|
||||
sortOrder: 'asc',
|
||||
pageNum: 1,
|
||||
pageSize: 20,
|
||||
});
|
||||
@@ -81,29 +87,24 @@ let tableColumns: ColumnsType = [
|
||||
title: t('views.perfManage.goldTarget.enTitle'),
|
||||
dataIndex: 'enTitle',
|
||||
align: 'center',
|
||||
sorter: (a: any, b: any) => {
|
||||
return 1;
|
||||
},
|
||||
},
|
||||
{
|
||||
title: t('views.perfManage.goldTarget.value'),
|
||||
dataIndex: 'value',
|
||||
key: 'value',
|
||||
align: 'center',
|
||||
sorter: (a: any, b: any) => {
|
||||
return 1;
|
||||
},
|
||||
sorter: true,
|
||||
},
|
||||
{
|
||||
title: t('views.perfManage.goldTarget.startTime'),
|
||||
dataIndex: 'startTime',
|
||||
key: 'start_time',
|
||||
align: 'center',
|
||||
customRender(opt) {
|
||||
if (!opt.value) return '';
|
||||
return parseDateToStr(opt.value);
|
||||
},
|
||||
sorter: (a: any, b: any) => {
|
||||
return 1;
|
||||
},
|
||||
sorter: true,
|
||||
},
|
||||
{
|
||||
title: t('views.perfManage.goldTarget.endTime'),
|
||||
@@ -153,7 +154,7 @@ function fnTableSize({ key }: MenuInfo) {
|
||||
function fnGetList(pageNum?: number) {
|
||||
if (tableState.loading) return;
|
||||
tableState.loading = true;
|
||||
if(pageNum){
|
||||
if (pageNum) {
|
||||
queryParams.pageNum = pageNum;
|
||||
}
|
||||
if (!queryRangePicker.value) {
|
||||
@@ -170,6 +171,19 @@ function fnGetList(pageNum?: number) {
|
||||
});
|
||||
}
|
||||
|
||||
/**表格分页、排序、筛选变化时触发操作, 排序方式,取值为 ascend descend */
|
||||
function fnTableChange(pagination: any, filters: any, sorter: any, extra: any) {
|
||||
console.log(sorter);
|
||||
const { columnKey, order } = sorter;
|
||||
if (order) {
|
||||
queryParams.sortField = columnKey;
|
||||
queryParams.sortOrder = order.replace('end', '');
|
||||
} else {
|
||||
queryParams.sortOrder = 'asc';
|
||||
}
|
||||
fnGetList(1);
|
||||
}
|
||||
|
||||
onMounted(() => {
|
||||
// 获取网元网元列表
|
||||
useNeInfoStore().fnNelist();
|
||||
@@ -189,7 +203,10 @@ onMounted(() => {
|
||||
<a-form :model="queryParams" name="queryParams" layout="horizontal">
|
||||
<a-row :gutter="16">
|
||||
<a-col :lg="6" :md="12" :xs="24">
|
||||
<a-form-item :label="t('views.perfManage.goldTarget.type')" name="neType">
|
||||
<a-form-item
|
||||
:label="t('views.perfManage.goldTarget.type')"
|
||||
name="neType"
|
||||
>
|
||||
<a-auto-complete
|
||||
v-model:value="queryParams.neType"
|
||||
:options="useNeInfoStore().getNeSelectOtions"
|
||||
@@ -198,7 +215,10 @@ onMounted(() => {
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
<a-col :lg="8" :md="12" :xs="24">
|
||||
<a-form-item :label="t('views.perfManage.goldTarget.startTime')" name="queryRangePicker">
|
||||
<a-form-item
|
||||
:label="t('views.perfManage.goldTarget.startTime')"
|
||||
name="queryRangePicker"
|
||||
>
|
||||
<a-range-picker
|
||||
v-model:value="queryRangePicker"
|
||||
allow-clear
|
||||
@@ -286,6 +306,7 @@ onMounted(() => {
|
||||
:loading="tableState.loading"
|
||||
:data-source="tableState.data"
|
||||
:size="tableState.size"
|
||||
@change="fnTableChange"
|
||||
:pagination="tablePagination"
|
||||
:scroll="{ x: true }"
|
||||
>
|
||||
|
||||
@@ -79,7 +79,13 @@ function fnDownload() {
|
||||
|
||||
/**系统使用手册跳转 */
|
||||
function fnClickHelpDoc() {
|
||||
window.open(docUrl.value, '_blank');
|
||||
// 浏览器支持 PDF 预览
|
||||
if (navigator.pdfViewerEnabled) {
|
||||
window.open(docUrl.value, '_blank');
|
||||
} else {
|
||||
// 浏览器不支持 PDF 预览
|
||||
alert(t('views.tool.help.pdfViewerErr'));
|
||||
}
|
||||
}
|
||||
|
||||
onMounted(() => {
|
||||
@@ -104,11 +110,11 @@ onMounted(() => {
|
||||
<a-space :size="12" align="center">
|
||||
<a-button type="default" @click="fnClickHelpDoc()">
|
||||
<template #icon><ToTopOutlined /> </template>
|
||||
浏览器内打开
|
||||
{{ t('views.tool.help.pdfViewer') }}
|
||||
</a-button>
|
||||
<a-button type="primary" @click="fnDownload()">
|
||||
<template #icon><DownloadOutlined /></template>
|
||||
下载
|
||||
{{ t('views.tool.help.download') }}
|
||||
</a-button>
|
||||
</a-space>
|
||||
</a-col>
|
||||
@@ -126,7 +132,9 @@ onMounted(() => {
|
||||
</a-col>
|
||||
<a-col :span="20" class="right">
|
||||
<div class="right-view">
|
||||
<a-spin size="large" style="margin: 50%" v-if="pages === 0" />
|
||||
<VuePDF
|
||||
v-else
|
||||
:pdf="pdf"
|
||||
:page="viewPage"
|
||||
:scale="viewScale"
|
||||
@@ -134,7 +142,7 @@ onMounted(() => {
|
||||
:annotations-filter="['Link']"
|
||||
@annotation="fnAnnotation"
|
||||
>
|
||||
<a-spin style="margin: 50%" />
|
||||
<a-spin size="large" style="margin: 50%" />
|
||||
</VuePDF>
|
||||
</div>
|
||||
</a-col>
|
||||
|
||||
Reference in New Issue
Block a user