--引入i18包
This commit is contained in:
@@ -8,6 +8,8 @@ import { regExpEmail, regExpMobile, regExpNick } from '@/utils/regular-utils';
|
||||
import useUserStore from '@/store/modules/user';
|
||||
import useDictStore from '@/store/modules/dict';
|
||||
import { RESULT_CODE_SUCCESS } from '@/constants/result-constants';
|
||||
import useI18n from '@/hooks/useI18n';
|
||||
const { t } = useI18n();
|
||||
const uerStore = useUserStore();
|
||||
const { getDict } = useDictStore();
|
||||
|
||||
|
||||
@@ -6,6 +6,8 @@ import { regExpPasswd } from '@/utils/regular-utils';
|
||||
import useUserStore from '@/store/modules/user';
|
||||
import { useRouter } from 'vue-router';
|
||||
import { RESULT_CODE_SUCCESS } from '@/constants/result-constants';
|
||||
import useI18n from '@/hooks/useI18n';
|
||||
const { t } = useI18n();
|
||||
const { userName, fnLogOut } = useUserStore();
|
||||
const router = useRouter();
|
||||
|
||||
|
||||
@@ -788,7 +788,6 @@ onMounted(() => {
|
||||
<a-input
|
||||
v-model:value="queryParams.neType"
|
||||
allow-clear
|
||||
placeholder="查询告警设备类型"
|
||||
></a-input>
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
@@ -800,7 +799,6 @@ onMounted(() => {
|
||||
<a-input
|
||||
v-model:value="queryParams.neName"
|
||||
allow-clear
|
||||
placeholder="查询告警网元名称"
|
||||
></a-input>
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
@@ -812,7 +810,6 @@ onMounted(() => {
|
||||
<a-input
|
||||
v-model:value="queryParams.neId"
|
||||
allow-clear
|
||||
placeholder="查询告警网元标识"
|
||||
></a-input>
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
@@ -841,7 +838,6 @@ onMounted(() => {
|
||||
<a-input
|
||||
v-model:value="queryParams.alarmCode"
|
||||
allow-clear
|
||||
placeholder="查询告警编号"
|
||||
></a-input>
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
@@ -1045,7 +1041,7 @@ onMounted(() => {
|
||||
<template v-if="column.key === 'alarm_id'">
|
||||
<a-space :size="8" align="center">
|
||||
<a-tooltip>
|
||||
<template #title>查看详情</template>
|
||||
<template #title>{{ t('common.viewText') }}</template>
|
||||
<a-button
|
||||
type="link"
|
||||
@click.prevent="fnModalVisibleByVive(record)"
|
||||
|
||||
3
src/views/monitor/cache/index.vue
vendored
3
src/views/monitor/cache/index.vue
vendored
@@ -13,7 +13,8 @@ import { ColumnsType } from 'ant-design-vue/lib/table/Table';
|
||||
import { message } from 'ant-design-vue/lib';
|
||||
import { hasPermissions } from '@/plugins/auth-user';
|
||||
import { RESULT_CODE_SUCCESS } from '@/constants/result-constants';
|
||||
|
||||
import useI18n from '@/hooks/useI18n';
|
||||
const { t } = useI18n();
|
||||
/**请求点击 */
|
||||
let isClick = ref<boolean>(false);
|
||||
|
||||
|
||||
@@ -23,6 +23,8 @@ import useDictStore from '@/store/modules/dict';
|
||||
import { hasPermissions } from '@/plugins/auth-user';
|
||||
import { MENU_PATH_INLINE } from '@/constants/menu-constants';
|
||||
import { RESULT_CODE_SUCCESS } from '@/constants/result-constants';
|
||||
import useI18n from '@/hooks/useI18n';
|
||||
const { t } = useI18n();
|
||||
const { getDict } = useDictStore();
|
||||
const router = useRouter();
|
||||
const route = useRoute();
|
||||
|
||||
@@ -18,6 +18,8 @@ import { parseDateToStr } from '@/utils/date-utils';
|
||||
import useTabsStore from '@/store/modules/tabs';
|
||||
import useDictStore from '@/store/modules/dict';
|
||||
import { RESULT_CODE_SUCCESS } from '@/constants/result-constants';
|
||||
import useI18n from '@/hooks/useI18n';
|
||||
const { t } = useI18n();
|
||||
const tabsStore = useTabsStore();
|
||||
const { getDict } = useDictStore();
|
||||
const route = useRoute();
|
||||
|
||||
@@ -230,10 +230,12 @@ let modalState: ModalStateType = reactive({
|
||||
const modalStateFrom = Form.useForm(
|
||||
modalState.from,
|
||||
reactive({
|
||||
imsi: [{ required: true, message: 'IMSI'+t('common.unableNull') }],
|
||||
amf: [{ required: true, message: 'AMF'+t('common.unableNull') }],
|
||||
ki: [{ required: true, message: 'KI'+t('common.unableNull') }],
|
||||
algoIndex: [{ required: true, message: 'algoIndex'+t('common.unableNull') }],
|
||||
imsi: [{ required: true, message: 'IMSI' + t('common.unableNull') }],
|
||||
amf: [{ required: true, message: 'AMF' + t('common.unableNull') }],
|
||||
ki: [{ required: true, message: 'KI' + t('common.unableNull') }],
|
||||
algoIndex: [
|
||||
{ required: true, message: 'algoIndex' + t('common.unableNull') },
|
||||
],
|
||||
})
|
||||
);
|
||||
|
||||
@@ -241,11 +243,18 @@ const modalStateFrom = Form.useForm(
|
||||
const modalStateBatchFrom = Form.useForm(
|
||||
modalState.BatchForm,
|
||||
reactive({
|
||||
num: [{ required: true, message: t('views.neUser.auth.num')+t('common.unableNull') }],
|
||||
imsi: [{ required: true, message: 'IMSI'+t('common.unableNull') }],
|
||||
amf: [{ required: true, message: 'AMF'+t('common.unableNull') }],
|
||||
ki: [{ required: true, message: 'KI'+t('common.unableNull') }],
|
||||
algoIndex: [{ required: true, message: 'algoIndex'+t('common.unableNull') }],
|
||||
num: [
|
||||
{
|
||||
required: true,
|
||||
message: t('views.neUser.auth.num') + t('common.unableNull'),
|
||||
},
|
||||
],
|
||||
imsi: [{ required: true, message: 'IMSI' + t('common.unableNull') }],
|
||||
amf: [{ required: true, message: 'AMF' + t('common.unableNull') }],
|
||||
ki: [{ required: true, message: 'KI' + t('common.unableNull') }],
|
||||
algoIndex: [
|
||||
{ required: true, message: 'algoIndex' + t('common.unableNull') },
|
||||
],
|
||||
})
|
||||
);
|
||||
|
||||
@@ -253,8 +262,13 @@ const modalStateBatchFrom = Form.useForm(
|
||||
const modalStateBatchDelFrom = Form.useForm(
|
||||
modalState.BatchDelForm,
|
||||
reactive({
|
||||
num: [{ required: true, message: t('views.neUser.auth.delNum')+t('common.unableNull') }],
|
||||
imsi: [{ required: true, message: 'IMSI'+t('common.unableNull') }],
|
||||
num: [
|
||||
{
|
||||
required: true,
|
||||
message: t('views.neUser.auth.delNum') + t('common.unableNull'),
|
||||
},
|
||||
],
|
||||
imsi: [{ required: true, message: 'IMSI' + t('common.unableNull') }],
|
||||
})
|
||||
);
|
||||
|
||||
@@ -271,7 +285,8 @@ function fnModalVisibleByVive(imsi: string) {
|
||||
.then(res => {
|
||||
if (res.code === RESULT_CODE_SUCCESS) {
|
||||
modalState.from = Object.assign(modalState.from, res.data);
|
||||
modalState.title = t('common.viewText') + t('views.neUser.auth.authInfo');
|
||||
modalState.title =
|
||||
t('common.viewText') + t('views.neUser.auth.authInfo');
|
||||
modalState.visibleByView = true;
|
||||
} else {
|
||||
message.error(`获取鉴权信息失败`, 2);
|
||||
@@ -290,7 +305,7 @@ function fnModalVisibleByVive(imsi: string) {
|
||||
function fnModalVisibleByEdit(row?: Record<string, any>) {
|
||||
if (!row) {
|
||||
modalStateFrom.resetFields(); //重置表单
|
||||
modalState.title = t('common.addText')+t('views.neUser.auth.authInfo');
|
||||
modalState.title = t('common.addText') + t('views.neUser.auth.authInfo');
|
||||
modalState.visibleByEdit = true;
|
||||
} else {
|
||||
if (modalState.confirmLoading) return;
|
||||
@@ -301,7 +316,8 @@ function fnModalVisibleByEdit(row?: Record<string, any>) {
|
||||
.then(res => {
|
||||
if (res.code === RESULT_CODE_SUCCESS) {
|
||||
modalState.from = Object.assign(modalState.from, res.data);
|
||||
modalState.title = t('common.editText')+t('views.neUser.auth.authInfo');
|
||||
modalState.title =
|
||||
t('common.editText') + t('views.neUser.auth.authInfo');
|
||||
modalState.visibleByEdit = true;
|
||||
} else {
|
||||
message.error(`获取鉴权信息失败`, 2);
|
||||
@@ -321,11 +337,13 @@ function fnModalVisibleByEdit(row?: Record<string, any>) {
|
||||
function fnModalVisibleByBatch(batchFlag?: number) {
|
||||
if (batchFlag) {
|
||||
modalStateBatchFrom.resetFields(); //重置表单
|
||||
modalState.title = t('views.neUser.auth.batchAddText')+t('views.neUser.auth.authInfo');
|
||||
modalState.title =
|
||||
t('views.neUser.auth.batchAddText') + t('views.neUser.auth.authInfo');
|
||||
modalState.visibleByBatch = true;
|
||||
} else {
|
||||
modalStateBatchFrom.resetFields(); //重置表单
|
||||
modalState.title = t('views.neUser.auth.batchDelText')+t('views.neUser.auth.authInfo');
|
||||
modalState.title =
|
||||
t('views.neUser.auth.batchDelText') + t('views.neUser.auth.authInfo');
|
||||
modalState.visibleByBatchDel = true;
|
||||
}
|
||||
}
|
||||
@@ -494,7 +512,7 @@ function fnModalCancel() {
|
||||
function fnRecordDelete(row: Record<string, any>) {
|
||||
Modal.confirm({
|
||||
title: t('common.tipTitle'),
|
||||
content: t('views.neUser.auth.delSure',{imsi:row.imsi}),
|
||||
content: t('views.neUser.auth.delSure', { imsi: row.imsi }),
|
||||
onOk() {
|
||||
const key = 'delNotice';
|
||||
message.loading({ content: t('common.loading'), key });
|
||||
@@ -502,7 +520,7 @@ function fnRecordDelete(row: Record<string, any>) {
|
||||
delAuth(neID, row).then(res => {
|
||||
if (res.code === RESULT_CODE_SUCCESS) {
|
||||
message.success({
|
||||
content: t('common.msgSuccess', { msg: t('common.deleteText') }),
|
||||
content: t('common.msgSuccess', { msg: t('common.deleteText') }),
|
||||
key,
|
||||
duration: 2,
|
||||
});
|
||||
@@ -531,7 +549,7 @@ function fnExportList(type: string) {
|
||||
}).then(res => {
|
||||
if (res.code === RESULT_CODE_SUCCESS) {
|
||||
message.success({
|
||||
content: t('common.msgSuccess', { msg: t('common.export') }),
|
||||
content: t('common.msgSuccess', { msg: t('common.export') }),
|
||||
key,
|
||||
duration: 2,
|
||||
});
|
||||
@@ -668,7 +686,7 @@ onMounted(() => {
|
||||
}
|
||||
} else {
|
||||
message.warning({
|
||||
content:t('views.neUser.auth.noListData'),
|
||||
content: t('views.neUser.auth.noListData'),
|
||||
duration: 2,
|
||||
});
|
||||
}
|
||||
@@ -701,10 +719,7 @@ onMounted(() => {
|
||||
</a-col>
|
||||
<a-col :lg="6" :md="12" :xs="24">
|
||||
<a-form-item label="IMSI" name="imsi">
|
||||
<a-input
|
||||
v-model:value="queryParams.imsi"
|
||||
allow-clear
|
||||
></a-input>
|
||||
<a-input v-model:value="queryParams.imsi" allow-clear></a-input>
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
<a-col :lg="6" :md="12" :xs="24">
|
||||
@@ -954,11 +969,7 @@ onMounted(() => {
|
||||
@ok="fnModalOk"
|
||||
@cancel="fnModalCancel"
|
||||
>
|
||||
<a-form
|
||||
name="modalStateFrom"
|
||||
layout="horizontal"
|
||||
:label-col="{ span: 6 }"
|
||||
>
|
||||
<a-form name="modalStateFrom" layout="horizontal">
|
||||
<a-row :gutter="16">
|
||||
<a-col :lg="12" :md="12" :xs="24">
|
||||
<a-form-item
|
||||
@@ -974,6 +985,14 @@ onMounted(() => {
|
||||
</a-input>
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
<a-col :lg="12" :md="12" :xs="24">
|
||||
<a-form-item label="Status" name="status">
|
||||
<a-select value="1">
|
||||
<a-select-option value="1">Active</a-select-option>
|
||||
<a-select-option value="0">Inactive</a-select-option>
|
||||
</a-select>
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
</a-row>
|
||||
<a-row :gutter="16">
|
||||
<a-col :lg="12" :md="12" :xs="24">
|
||||
@@ -995,10 +1014,7 @@ onMounted(() => {
|
||||
name="algo"
|
||||
v-bind="modalStateFrom.validateInfos.algoIndex"
|
||||
>
|
||||
<a-input
|
||||
v-model:value="modalState.from.algoIndex"
|
||||
allow-clear
|
||||
>
|
||||
<a-input v-model:value="modalState.from.algoIndex" allow-clear>
|
||||
</a-input>
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
@@ -1047,10 +1063,7 @@ onMounted(() => {
|
||||
@ok="fnBatchModalOk"
|
||||
@cancel="fnBatchModalCancel"
|
||||
>
|
||||
<a-form
|
||||
name="modalStateBatchFrom"
|
||||
layout="horizontal"
|
||||
>
|
||||
<a-form name="modalStateBatchFrom" layout="horizontal">
|
||||
<a-row :gutter="16">
|
||||
<a-col :lg="12" :md="12" :xs="24">
|
||||
<a-form-item
|
||||
@@ -1058,23 +1071,16 @@ onMounted(() => {
|
||||
name="imsi"
|
||||
v-bind="modalStateBatchFrom.validateInfos.imsi"
|
||||
>
|
||||
<a-input
|
||||
v-model:value="modalState.BatchForm.imsi"
|
||||
allow-clear
|
||||
>
|
||||
<a-input v-model:value="modalState.BatchForm.imsi" allow-clear>
|
||||
</a-input>
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
<a-col :lg="12" :md="12" :xs="24">
|
||||
<a-form-item
|
||||
:label="t('views.neUser.auth.num')"
|
||||
name="num"
|
||||
v-bind="modalStateBatchFrom.validateInfos.num"
|
||||
>
|
||||
<a-input-number
|
||||
v-model:value="modalState.BatchForm.num"
|
||||
style="width: 100%"
|
||||
></a-input-number>
|
||||
<a-form-item label="Status" name="status">
|
||||
<a-select value="1">
|
||||
<a-select-option value="1">Active</a-select-option>
|
||||
<a-select-option value="0">Inactive</a-select-option>
|
||||
</a-select>
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
</a-row>
|
||||
@@ -1114,26 +1120,34 @@ onMounted(() => {
|
||||
name="ki"
|
||||
v-bind="modalStateBatchFrom.validateInfos.ki"
|
||||
>
|
||||
<a-input
|
||||
v-model:value="modalState.BatchForm.ki"
|
||||
allow-clear
|
||||
>
|
||||
<a-input v-model:value="modalState.BatchForm.ki" allow-clear>
|
||||
</a-input>
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
<a-col :lg="12" :md="12" :xs="24">
|
||||
<a-form-item
|
||||
label="OPC"
|
||||
name="opc"
|
||||
v-bind="modalStateBatchFrom.validateInfos.opc"
|
||||
:label="t('views.neUser.auth.num')"
|
||||
name="num"
|
||||
v-bind="modalStateBatchFrom.validateInfos.num"
|
||||
>
|
||||
<a-input
|
||||
v-model:value="modalState.BatchForm.opc"
|
||||
allow-clear
|
||||
></a-input>
|
||||
<a-input-number
|
||||
v-model:value="modalState.BatchForm.num"
|
||||
style="width: 100%"
|
||||
></a-input-number>
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
</a-row>
|
||||
|
||||
<a-form-item
|
||||
label="OPC"
|
||||
name="opc"
|
||||
v-bind="modalStateBatchFrom.validateInfos.opc"
|
||||
>
|
||||
<a-input
|
||||
v-model:value="modalState.BatchForm.opc"
|
||||
allow-clear
|
||||
></a-input>
|
||||
</a-form-item>
|
||||
</a-form>
|
||||
</a-modal>
|
||||
|
||||
@@ -1161,14 +1175,11 @@ onMounted(() => {
|
||||
name="imsi"
|
||||
v-bind="modalStateBatchDelFrom.validateInfos.imsi"
|
||||
>
|
||||
<a-input
|
||||
v-model:value="modalState.BatchDelForm.imsi"
|
||||
allow-clear
|
||||
>
|
||||
<a-input v-model:value="modalState.BatchDelForm.imsi" allow-clear>
|
||||
<template #prefix>
|
||||
<a-tooltip placement="topLeft">
|
||||
<template #title>
|
||||
{{t('views.neUser.auth.imsiTip')}}
|
||||
{{ t('views.neUser.auth.imsiTip') }}
|
||||
</template>
|
||||
<InfoCircleOutlined style="color: rgba(0, 0, 0, 0.45)" />
|
||||
</a-tooltip>
|
||||
|
||||
@@ -18,6 +18,8 @@ import { saveAs } from 'file-saver';
|
||||
import { parseDateToStr } from '@/utils/date-utils';
|
||||
import useDictStore from '@/store/modules/dict';
|
||||
import { RESULT_CODE_SUCCESS } from '@/constants/result-constants';
|
||||
import useI18n from '@/hooks/useI18n';
|
||||
const { t } = useI18n();
|
||||
const { getDict } = useDictStore();
|
||||
|
||||
/**字典数据 */
|
||||
|
||||
@@ -18,6 +18,8 @@ import { regExpMobile, regExpEmail } from '@/utils/regular-utils';
|
||||
import useDictStore from '@/store/modules/dict';
|
||||
import { parseDataToTree } from '@/utils/parse-tree-utils';
|
||||
import { RESULT_CODE_SUCCESS } from '@/constants/result-constants';
|
||||
import useI18n from '@/hooks/useI18n';
|
||||
const { t } = useI18n();
|
||||
const { getDict } = useDictStore();
|
||||
|
||||
/**字典数据 */
|
||||
|
||||
@@ -20,6 +20,8 @@ import { parseDateToStr } from '@/utils/date-utils';
|
||||
import useTabsStore from '@/store/modules/tabs';
|
||||
import useDictStore from '@/store/modules/dict';
|
||||
import { RESULT_CODE_SUCCESS } from '@/constants/result-constants';
|
||||
import useI18n from '@/hooks/useI18n';
|
||||
const { t } = useI18n();
|
||||
const tabsStore = useTabsStore();
|
||||
const { parseDataDict, getDict } = useDictStore();
|
||||
const route = useRoute();
|
||||
|
||||
@@ -20,6 +20,8 @@ import { parseDateToStr } from '@/utils/date-utils';
|
||||
import useDictStore from '@/store/modules/dict';
|
||||
import { MENU_PATH_INLINE } from '@/constants/menu-constants';
|
||||
import { RESULT_CODE_SUCCESS } from '@/constants/result-constants';
|
||||
import useI18n from '@/hooks/useI18n';
|
||||
const { t } = useI18n();
|
||||
const { getDict } = useDictStore();
|
||||
const router = useRouter();
|
||||
const route = useRoute();
|
||||
|
||||
@@ -16,6 +16,8 @@ import { saveAs } from 'file-saver';
|
||||
import { parseDateToStr } from '@/utils/date-utils';
|
||||
import useDictStore from '@/store/modules/dict';
|
||||
import { RESULT_CODE_SUCCESS } from '@/constants/result-constants';
|
||||
import useI18n from '@/hooks/useI18n';
|
||||
const { t } = useI18n();
|
||||
const { getDict } = useDictStore();
|
||||
|
||||
/**字典数据 */
|
||||
|
||||
@@ -15,6 +15,8 @@ import { saveAs } from 'file-saver';
|
||||
import { parseDateToStr } from '@/utils/date-utils';
|
||||
import useDictStore from '@/store/modules/dict';
|
||||
import { RESULT_CODE_SUCCESS } from '@/constants/result-constants';
|
||||
import useI18n from '@/hooks/useI18n';
|
||||
const { t } = useI18n();
|
||||
const { getDict } = useDictStore();
|
||||
|
||||
/**字典数据 */
|
||||
|
||||
@@ -27,6 +27,8 @@ import {
|
||||
} from '@/constants/menu-constants';
|
||||
import useDictStore from '@/store/modules/dict';
|
||||
import { RESULT_CODE_SUCCESS } from '@/constants/result-constants';
|
||||
import useI18n from '@/hooks/useI18n';
|
||||
const { t } = useI18n();
|
||||
const { getDict } = useDictStore();
|
||||
|
||||
/**字体图标可选择数据 */
|
||||
|
||||
@@ -17,6 +17,8 @@ import { saveAs } from 'file-saver';
|
||||
import { parseDateToStr } from '@/utils/date-utils';
|
||||
import useDictStore from '@/store/modules/dict';
|
||||
import { RESULT_CODE_SUCCESS } from '@/constants/result-constants';
|
||||
import useI18n from '@/hooks/useI18n';
|
||||
const { t } = useI18n();
|
||||
const { getDict } = useDictStore();
|
||||
|
||||
/**字典数据 */
|
||||
|
||||
@@ -12,6 +12,8 @@ import { parseDateToStr } from '@/utils/date-utils';
|
||||
import useTabsStore from '@/store/modules/tabs';
|
||||
import useDictStore from '@/store/modules/dict';
|
||||
import { RESULT_CODE_SUCCESS } from '@/constants/result-constants';
|
||||
import useI18n from '@/hooks/useI18n';
|
||||
const { t } = useI18n();
|
||||
const tabsStore = useTabsStore();
|
||||
const { getDict } = useDictStore();
|
||||
const route = useRoute();
|
||||
|
||||
@@ -26,6 +26,8 @@ import { parseTreeKeys, parseTreeNodeKeys } from '@/utils/parse-tree-utils';
|
||||
import { hasPermissions } from '@/plugins/auth-user';
|
||||
import { MENU_PATH_INLINE } from '@/constants/menu-constants';
|
||||
import { RESULT_CODE_SUCCESS } from '@/constants/result-constants';
|
||||
import useI18n from '@/hooks/useI18n';
|
||||
const { t } = useI18n();
|
||||
const { getDict } = useDictStore();
|
||||
const router = useRouter();
|
||||
const route = useRoute();
|
||||
|
||||
@@ -12,7 +12,8 @@ import {
|
||||
uploadFile,
|
||||
uploadFileChunk,
|
||||
} from '@/api/tool/file';
|
||||
|
||||
import useI18n from '@/hooks/useI18n';
|
||||
const { t } = useI18n();
|
||||
let state = reactive<{
|
||||
/**上传状态 */
|
||||
loading: boolean;
|
||||
|
||||
Reference in New Issue
Block a user