This commit is contained in:
lai
2023-11-10 15:02:53 +08:00
17 changed files with 441 additions and 171 deletions

View File

@@ -1,19 +1,25 @@
<script setup lang="ts">
import { useRouter } from 'vue-router';
import useI18n from '@/hooks/useI18n';
const router = useRouter();
const { t } = useI18n();
</script>
<template>
<a-result
status="403"
title="没有访问权限"
sub-title="请不要进行非法操作您可以返回主页面或返回"
:title="t('views.error.err403.ttile')"
:sub-title="t('views.error.err403.subTitle')"
>
<template #extra>
<RouterLink :to="{ name: 'Index' }" :replace="true">
<a-button type="primary"> 返回首页 </a-button>
<a-button type="primary">
{{ t('views.error.err403.backHome') }}
</a-button>
</RouterLink>
<a-button type="default" @click="() => router.back()"> 返回 </a-button>
<a-button type="default" @click="() => router.back()">
{{ t('views.error.err403.back') }}
</a-button>
</template>
</a-result>
</template>

View File

@@ -1,23 +1,30 @@
<script setup lang="ts"></script>
<script setup lang="ts">
import useI18n from '@/hooks/useI18n';
const { t } = useI18n();
</script>
<template>
<a-result
status="404"
title="找不到匹配页面"
sub-title="对不起您正在寻找的页面不存在"
:title="t('views.error.err404.ttile')"
:sub-title="t('views.error.err404.subTitle')"
>
<template #extra>
<RouterLink :to="{ name: 'Index' }" :replace="true">
<a-button type="primary"> 返回首页 </a-button>
<a-button type="primary">
{{ t('views.error.err404.backHome') }}
</a-button>
</RouterLink>
</template>
<a-typography>
<a-typography-title> 找不到网页 </a-typography-title>
<a-typography-title>
{{ t('views.error.err404.tipTitle') }}
</a-typography-title>
<a-typography-paragraph>
1. 尝试检查URL的错误然后按浏览器上的刷新按钮
1. {{ t('views.error.err404.paragraph') }}
</a-typography-paragraph>
<a-typography-paragraph>
2. 尝试在我们的应用程序中找到其他内容
2. {{ t('views.error.err404.paragraph1') }}
</a-typography-paragraph>
</a-typography>
</a-result>

View File

@@ -17,6 +17,7 @@ const { t } = useI18n();
/**开始结束时间类型 */
type RangePickerType = {
placeholder: [string, string];
ranges: Record<string, [Dayjs, Dayjs]>;
/**全局时间 */
all: [string, string];
@@ -34,14 +35,24 @@ type RangePickerType = {
/**开始结束时间 */
let rangePicker = reactive<RangePickerType>({
placeholder: [
t('views.monitor.monitor.startTime'),
t('views.monitor.monitor.endTime'),
],
ranges: {
昨天: [
[t('views.monitor.monitor.today')]: [
dayjs().subtract(1, 'day').startOf('day'),
dayjs().subtract(1, 'day').endOf('day'),
],
今天: [dayjs().startOf('day'), dayjs()],
本周: [dayjs().startOf('week'), dayjs().endOf('week')],
本月: [dayjs().startOf('month'), dayjs().endOf('month')],
[t('views.monitor.monitor.yesterday')]: [dayjs().startOf('day'), dayjs()],
[t('views.monitor.monitor.week')]: [
dayjs().startOf('week'),
dayjs().endOf('week'),
],
[t('views.monitor.monitor.month')]: [
dayjs().startOf('month'),
dayjs().endOf('month'),
],
},
all: ['', ''],
load: ['', ''],
@@ -427,7 +438,10 @@ onMounted(() => {
<a-form name="queryParams" layout="horizontal">
<a-row :gutter="16">
<a-col :lg="10" :md="10" :xs="24">
<a-form-item label="全局过滤" name="neTypeSelect">
<a-form-item
:label="t('views.monitor.monitor.filter')"
name="neTypeSelect"
>
<a-range-picker
v-model:value="rangePicker.all"
:allow-clear="false"
@@ -435,7 +449,7 @@ onMounted(() => {
value-format="YYYY-MM-DD HH:mm:ss"
format="YYYY-MM-DD HH:mm:ss"
show-time
:placeholder="['开始时间', '结束时间']"
:placeholder="rangePicker.placeholder"
:ranges="rangePicker.ranges"
style="width: 100%"
></a-range-picker>
@@ -469,7 +483,7 @@ onMounted(() => {
value-format="YYYY-MM-DD HH:mm:ss"
format="YYYY-MM-DD HH:mm:ss"
show-time
:placeholder="['开始时间', '结束时间']"
:placeholder="rangePicker.placeholder"
style="width: 100%"
@change="(_:any, d:[string,string]) => fnGetQuery('load', d)"
></a-range-picker>
@@ -499,7 +513,7 @@ onMounted(() => {
value-format="YYYY-MM-DD HH:mm:ss"
format="YYYY-MM-DD HH:mm:ss"
show-time
:placeholder="['开始时间', '结束时间']"
:placeholder="rangePicker.placeholder"
style="width: 100%"
@change="(_:any, d:[string,string]) => fnGetQuery('cpu', d)"
></a-range-picker>
@@ -527,7 +541,7 @@ onMounted(() => {
value-format="YYYY-MM-DD HH:mm:ss"
format="YYYY-MM-DD HH:mm:ss"
show-time
:placeholder="['开始时间', '结束时间']"
:placeholder="rangePicker.placeholder"
style="width: 100%"
@change="(_:any, d:[string,string]) => fnGetQuery('memory', d)"
></a-range-picker>
@@ -557,7 +571,7 @@ onMounted(() => {
value-format="YYYY-MM-DD HH:mm:ss"
format="YYYY-MM-DD HH:mm:ss"
show-time
:placeholder="['开始时间', '结束时间']"
:placeholder="rangePicker.placeholder"
style="width: 100%"
@change="fnGetQueryIO"
></a-range-picker>
@@ -585,7 +599,7 @@ onMounted(() => {
value-format="YYYY-MM-DD HH:mm:ss"
format="YYYY-MM-DD HH:mm:ss"
show-time
:placeholder="['开始时间', '结束时间']"
:placeholder="rangePicker.placeholder"
style="width: 100%"
@change="fnGetQueryNetwork"
></a-range-picker>

View File

@@ -465,7 +465,7 @@ onMounted(() => {
<a-input
v-model:value="queryParams.configName"
allow-clear
placeholder="请输入参数名称"
:placeholder="t('common.ipnutPlease')"
></a-input>
</a-form-item>
</a-col>
@@ -474,7 +474,7 @@ onMounted(() => {
<a-input
v-model:value="queryParams.configKey"
allow-clear
placeholder="请输入参数键名"
:placeholder="t('common.ipnutPlease')"
></a-input>
</a-form-item>
</a-col>
@@ -483,7 +483,7 @@ onMounted(() => {
<a-select
v-model:value="queryParams.configType"
allow-clear
placeholder="请选择"
:placeholder="t('common.selectPlease')"
:options="dict.sysYesNo"
>
</a-select>
@@ -496,7 +496,6 @@ onMounted(() => {
allow-clear
bordered
value-format="YYYY-MM-DD"
:placeholder="['创建开始', '创建结束']"
style="width: 100%"
></a-range-picker>
</a-form-item>
@@ -506,12 +505,12 @@ onMounted(() => {
<a-space :size="8">
<a-button type="primary" @click.prevent="fnGetList">
<template #icon><SearchOutlined /></template>
搜索</a-button
>
{{ t('common.search') }}
</a-button>
<a-button type="default" @click.prevent="fnQueryReset">
<template #icon><ClearOutlined /></template>
重置</a-button
>
{{ t('common.reset') }}
</a-button>
</a-space>
</a-form-item>
</a-col>
@@ -529,7 +528,7 @@ onMounted(() => {
v-perms:has="['system:config:add']"
>
<template #icon><PlusOutlined /></template>
新建
{{ t('common.addText') }}
</a-button>
<a-button
type="default"
@@ -539,7 +538,7 @@ onMounted(() => {
v-perms:has="['system:config:remove']"
>
<template #icon><DeleteOutlined /></template>
删除
{{ t('common.deleteText') }}
</a-button>
<a-button
type="dashed"
@@ -556,7 +555,7 @@ onMounted(() => {
v-perms:has="['system:config:export']"
>
<template #icon><ExportOutlined /></template>
导出
{{ t('common.export') }}
</a-button>
</a-space>
</template>
@@ -565,31 +564,31 @@ onMounted(() => {
<template #extra>
<a-space :size="8" align="center">
<a-tooltip>
<template #title>搜索栏</template>
<template #title>{{ t('common.searchBarText') }}</template>
<a-switch
v-model:checked="tableState.seached"
checked-children=""
un-checked-children=""
:checked-children="t('common.switch.show')"
:un-checked-children="t('common.switch.hide')"
size="small"
/>
</a-tooltip>
<a-tooltip>
<template #title>表格斑马纹</template>
<template #title>{{ t('common.tableStripedText') }}</template>
<a-switch
v-model:checked="tableState.striped"
checked-children=""
un-checked-children=""
:checked-children="t('common.switch.open')"
:un-checked-children="t('common.switch.shut')"
size="small"
/>
</a-tooltip>
<a-tooltip>
<template #title>刷新</template>
<template #title>{{ t('common.reloadText') }}</template>
<a-button type="text" @click.prevent="fnGetList">
<template #icon><ReloadOutlined /></template>
</a-button>
</a-tooltip>
<a-tooltip placement="topRight">
<template #title>密度</template>
<template #title>{{ t('common.sizeText') }}</template>
<a-dropdown placement="bottomRight" trigger="click">
<a-button type="text">
<template #icon><ColumnHeightOutlined /></template>
@@ -599,9 +598,15 @@ onMounted(() => {
:selected-keys="[tableState.size as string]"
@click="fnTableSize"
>
<a-menu-item key="default">默认</a-menu-item>
<a-menu-item key="middle">中等</a-menu-item>
<a-menu-item key="small">紧凑</a-menu-item>
<a-menu-item key="default">
{{ t('common.size.default') }}
</a-menu-item>
<a-menu-item key="middle">
{{ t('common.size.middle') }}
</a-menu-item>
<a-menu-item key="small">
{{ t('common.size.small') }}
</a-menu-item>
</a-menu>
</template>
</a-dropdown>

View File

@@ -35,7 +35,7 @@ function fnEdit(v: boolean) {
function fnSave() {
Modal.confirm({
title: t('common.tipTitle'),
content: `确认要提交当前变更的版权声明吗?`,
content: t('views.system.setting.sysCopyrightTipContent'),
onOk() {
// 发送请求
const hide = message.loading(t('common.loading'), 0);
@@ -45,7 +45,7 @@ function fnSave() {
state.loading = false;
hide();
if (res.code === RESULT_CODE_SUCCESS) {
message.success('提交保存成功', 3);
message.success(t('views.system.setting.saveSuccess'), 3);
appStore.copyright = state.copyright;
fnEdit(false);
} else {
@@ -72,7 +72,7 @@ onMounted(() => {
v-model:value="state.copyright"
allow-clear
:maxlength="40"
placeholder="输入版权声明"
:placeholder="t('views.system.setting.sysCopyrightPlease')"
></a-input>
</a-form-item>
@@ -82,7 +82,7 @@ onMounted(() => {
:disabled="state.copyright === state.flag"
@click="fnSave"
>
提交保存
{{ t('views.system.setting.saveSubmit') }}
</a-button>
<a-button style="margin-left: 10px" @click="fnEdit(false)">
{{ t('common.cancel') }}
@@ -92,15 +92,17 @@ onMounted(() => {
<template v-else>
<div class="sys-copyright">{{ state.copyright }}</div>
<a-button type="dashed" @click="fnEdit(true)"> 编辑 </a-button>
<a-button type="dashed" @click="fnEdit(true)">
{{ t('common.editText') }}
</a-button>
</template>
</a-col>
<a-col :lg="12" :md="12" :xs="24">
<a-typography>
<a-typography-paragraph>
版权声明限制
{{ t('views.system.setting.sysCopyrightLimitation') }}
<a-typography-text mark>40</a-typography-text>
位字符长度
{{ t('views.system.setting.charMaxLen') }}
</a-typography-paragraph>
</a-typography>
</a-col>

View File

@@ -36,11 +36,14 @@ function fnBeforeUpload(file: FileType) {
'image/webp',
].includes(file.type);
if (!isJpgOrPng) {
message.error('只支持上传图片格式jpg、png、svg、webp', 3);
message.error(
t('views.system.setting.uploadFormat', { format: 'jpg、png、svg、webp' }),
3
);
}
const isLt10M = file.size / 1024 / 1024 < 10;
if (!isLt10M) {
message.error('图片文件大小必须小于 10MB', 3);
message.error(t('views.system.setting.uploadSize', { size: 10 }), 3);
}
return isJpgOrPng && isLt10M;
}
@@ -49,7 +52,7 @@ function fnBeforeUpload(file: FileType) {
function fnUpload(up: UploadRequestOption) {
Modal.confirm({
title: t('common.tipTitle'),
content: `确认要上传登录界面背景文件吗?`,
content: t('views.system.setting.sysLoginBgTipContentUpload'),
onOk() {
// 发送请求
const hide = message.loading(t('common.loading'), 0);
@@ -61,7 +64,7 @@ function fnUpload(up: UploadRequestOption) {
state.loading = false;
hide();
if (res.code === RESULT_CODE_SUCCESS) {
message.success('文件上传成功,提交保存生效', 3);
message.success(t('views.system.setting.uploadSuccess'), 3);
state.filePath = res.data.fileName;
// 兼容旧前端可改配置文件
const baseUrl = import.meta.env.PROD
@@ -89,7 +92,7 @@ function fnEdit(v: boolean) {
function fnSave() {
Modal.confirm({
title: t('common.tipTitle'),
content: `确认要提交当前变更的登录界面背景吗?`,
content: t('views.system.setting.sysLoginBgTipContent'),
onOk() {
// 发送请求
const hide = message.loading(t('common.loading'), 0);
@@ -99,7 +102,7 @@ function fnSave() {
state.loading = false;
hide();
if (res.code === RESULT_CODE_SUCCESS) {
message.success('提交保存成功', 3);
message.success(t('views.system.setting.saveSuccess'), 3);
appStore.loginBackground = state.filePath;
fnEdit(false);
} else {
@@ -115,7 +118,7 @@ function fnSave() {
function fnRevert() {
Modal.confirm({
title: t('common.tipTitle'),
content: `确认要将背景图还原到系统初始默认的背景吗?`,
content: t('views.system.setting.sysLoginBgTipContentRevert'),
onOk() {
// 发送请求
const hide = message.loading(t('common.loading'), 0);
@@ -126,7 +129,7 @@ function fnRevert() {
state.loading = false;
hide();
if (res.code === RESULT_CODE_SUCCESS) {
message.success('还原成功', 3);
message.success(t('views.system.setting.revertSuccess'), 3);
appStore.loginBackground = state.filePath;
fnEdit(false);
} else {
@@ -148,7 +151,9 @@ onMounted(() => {
<a-row :gutter="16">
<a-col :lg="12" :md="12" :xs="24" style="margin-bottom: 30px">
<div class="sys-login-bg">
<span v-if="state.flag === '#'">暂无背景图</span>
<span v-if="state.flag === '#'">
{{ t('views.system.setting.sysLoginBgNone') }}
</span>
<a-image :src="state.flag" v-else />
</div>
@@ -164,7 +169,7 @@ onMounted(() => {
:custom-request="fnUpload"
>
<a-button type="link" :disabled="state.loading">
上传背景
{{ t('views.system.setting.sysLoginBgUpload') }}
</a-button>
</a-upload>
</a-form-item>
@@ -175,7 +180,7 @@ onMounted(() => {
:disabled="state.filePath === state.flag"
@click="fnSave"
>
提交保存
{{ t('views.system.setting.saveSubmit') }}
</a-button>
<a-button style="margin-left: 10px" @click="fnEdit(false)">
{{ t('common.cancel') }}
@@ -184,23 +189,25 @@ onMounted(() => {
</a-form>
<template v-else>
<a-button type="default" @click="fnEdit(true)"> 编辑 </a-button>
<a-button type="default" @click="fnEdit(true)">
{{ t('common.editText') }}
</a-button>
<a-button
type="text"
danger
style="margin-left: 10px"
@click="fnRevert"
>
还原
{{ t('views.system.setting.revert') }}
</a-button>
</template>
</a-col>
<a-col :lg="12" :md="12" :xs="24">
<a-typography>
<a-typography-paragraph>
系统登录界面背景样式如预览区域所示请以实际显示为准<br />
请将选择合适的图片进行进行上传<br />
通过点击还原按钮将背景图还原到系统初始默认的背景
{{ t('views.system.setting.sysLoginBgInstruction') }}<br />
{{ t('views.system.setting.sysLoginBgInstruction1') }}<br />
{{ t('views.system.setting.sysLoginBgInstruction2') }}
</a-typography-paragraph>
</a-typography>
</a-col>

View File

@@ -51,7 +51,7 @@ function fnBeforeUpload(file: FileType) {
function fnUpload(up: UploadRequestOption) {
Modal.confirm({
title: t('common.tipTitle'),
content: `确认要上传LOGO文件吗?`,
content: t('views.system.setting.sysLogoTipContentUpload'),
onOk() {
// 发送请求
const hide = message.loading(t('common.loading'), 0);
@@ -63,7 +63,7 @@ function fnUpload(up: UploadRequestOption) {
state.loading = false;
hide();
if (res.code === RESULT_CODE_SUCCESS) {
message.success('文件上传成功,提交保存生效', 3);
message.success(t('views.system.setting.uploadSuccess'), 3);
state.filePath = res.data.fileName;
// 兼容旧前端可改配置文件
const baseUrl = import.meta.env.PROD
@@ -101,7 +101,7 @@ function fnEdit(v: boolean) {
function fnSave() {
Modal.confirm({
title: t('common.tipTitle'),
content: `确认要提交当前变更的LOGO文件吗?`,
content: t('views.system.setting.sysLogoTipContent'),
onOk() {
const reqArr = [];
// 改变LOGO地址
@@ -126,7 +126,7 @@ function fnSave() {
state.loading = false;
hide();
if (resArr[0].code === RESULT_CODE_SUCCESS) {
message.success('提交保存成功', 3);
message.success(t('views.system.setting.saveSuccess'), 3);
if (state.filePath) {
appStore.setLOGO(state.type, state.filePath);
}
@@ -175,15 +175,19 @@ onMounted(() => {
{{ appStore.appName }}
</h1>
</div>
<div class="header-menu">首页</div>
<div class="header-menu">Menu</div>
</div>
<a-form layout="vertical" v-if="state.edite">
<a-form-item>
<a-space direction="horizontal" :size="18">
<a-radio-group v-model:value="state.type" button-style="solid">
<a-radio value="brand">全图</a-radio>
<a-radio value="icon">小图</a-radio>
<a-radio value="brand">
{{ t('views.system.setting.sysLogoBrand') }}
</a-radio>
<a-radio value="icon">
{{ t('views.system.setting.sysLogoIcon') }}
</a-radio>
</a-radio-group>
<a-upload
name="file"
@@ -195,7 +199,7 @@ onMounted(() => {
:custom-request="fnUpload"
>
<a-button type="link" :loading="state.loading">
上传LOGO
{{ t('views.system.setting.sysLogoUpload') }}
</a-button>
</a-upload>
</a-space>
@@ -203,7 +207,7 @@ onMounted(() => {
<a-form-item>
<a-button type="primary" :disabled="changeStatus" @click="fnSave">
提交保存
{{ t('views.system.setting.saveSubmit') }}
</a-button>
<a-button style="margin-left: 10px" @click="fnEdit(false)">
{{ t('common.cancel') }}
@@ -211,24 +215,31 @@ onMounted(() => {
</a-form-item>
</a-form>
<a-button type="dashed" @click="fnEdit(true)" v-else> 编辑 </a-button>
<a-button type="dashed" @click="fnEdit(true)" v-else>
{{ t('common.editText') }}
</a-button>
</a-col>
<a-col :lg="12" :md="12" :xs="24">
<a-typography>
<a-typography-paragraph>
系统LOGO展示样式如预览区域所示<br />
如需变更请将图片进行对应处理调整后在进行上传
{{ t('views.system.setting.sysLogoInstruction') }}<br />
{{ t('views.system.setting.sysLogoInstruction1') }}
</a-typography-paragraph>
<a-typography-title :level="5">全图</a-typography-title>
<a-typography-title :level="5">{{
t('views.system.setting.sysLogoBrand')
}}</a-typography-title>
<a-typography-paragraph>
将整张图片展示到系统LOGO区域请使用透明背景尺寸比例大小
{{ t('views.system.setting.sysLogoInstruction2') }}
<a-typography-text mark>174x48</a-typography-text>
</a-typography-paragraph>
<a-typography-title :level="5">小图</a-typography-title>
<a-typography-title :level="5">
{{ t('views.system.setting.sysLogoIcon') }}
</a-typography-title>
<a-typography-paragraph>
以LOGO+系统名称的形式展示到系统LOGO区域<br />
LOGO尺寸比例大小<a-typography-text mark>1:1</a-typography-text>
列如<a-typography-text mark>132x132</a-typography-text>
{{ t('views.system.setting.sysLogoInstruction3') }}<br />
{{ t('views.system.setting.sysLogoInstruction4') }}
<a-typography-text mark>1:1</a-typography-text>
eg<a-typography-text mark>132x132</a-typography-text>
</a-typography-paragraph>
</a-typography>
</a-col>

View File

@@ -35,7 +35,7 @@ function fnEdit(v: boolean) {
function fnSave() {
Modal.confirm({
title: t('common.tipTitle'),
content: `确认要提交当前变更的系统名称吗?`,
content: t('views.system.setting.sysNameTipContent'),
onOk() {
// 发送请求
const hide = message.loading(t('common.loading'), 0);
@@ -44,7 +44,7 @@ function fnSave() {
state.loading = false;
hide();
if (res.code === RESULT_CODE_SUCCESS) {
message.success('提交保存成功', 3);
message.success(t('views.system.setting.saveSuccess'), 3);
appStore.appName = state.title;
fnEdit(false);
} else {
@@ -71,7 +71,7 @@ onMounted(() => {
allow-clear
:maxlength="11"
style="width: 224px"
placeholder="输入系统名称"
:placeholder="t('views.system.setting.sysNamePlease')"
></a-input>
</a-form-item>
@@ -81,7 +81,7 @@ onMounted(() => {
:disabled="state.title === state.flag"
@click="fnSave"
>
提交保存
{{ t('views.system.setting.saveSubmit') }}
</a-button>
<a-button style="margin-left: 10px" @click="fnEdit(false)">
{{ t('common.cancel') }}
@@ -91,15 +91,17 @@ onMounted(() => {
<template v-else>
<div class="sys-title">{{ state.title }}</div>
<a-button type="dashed" @click="fnEdit(true)"> 编辑 </a-button>
<a-button type="dashed" @click="fnEdit(true)">
{{ t('common.editText') }}
</a-button>
</template>
</a-col>
<a-col :lg="12" :md="12" :xs="24">
<a-typography>
<a-typography-paragraph>
系统名称限制
{{ t('views.system.setting.sysNameLimitation') }}
<a-typography-text mark>11</a-typography-text>
位字符长度
{{ t('views.system.setting.charMaxLen') }}
</a-typography-paragraph>
</a-typography>
</a-col>

View File

@@ -4,18 +4,28 @@ import ChangeLogo from './components/change-logo.vue';
import ChangeLogoBG from './components/change-login-bg.vue';
import ChangeTitle from './components/change-title.vue';
import ChangeCopyright from './components/change-copyright.vue';
import useI18n from '@/hooks/useI18n';
const { t } = useI18n();
</script>
<template>
<PageContainer>
<a-card :bordered="false">
<a-divider orientation="left">系统LOGO</a-divider>
<a-divider orientation="left">
{{ t('views.system.setting.sysLogo') }}
</a-divider>
<ChangeLogo></ChangeLogo>
<a-divider orientation="left">系统名称</a-divider>
<a-divider orientation="left">
{{ t('views.system.setting.sysName') }}
</a-divider>
<ChangeTitle></ChangeTitle>
<a-divider orientation="left">版权声明</a-divider>
<a-divider orientation="left">
{{ t('views.system.setting.sysCopyright') }}
</a-divider>
<ChangeCopyright></ChangeCopyright>
<a-divider orientation="left">登录界面背景</a-divider>
<a-divider orientation="left">
{{ t('views.system.setting.sysLoginBg') }}
</a-divider>
<ChangeLogoBG></ChangeLogoBG>
</a-card>
</PageContainer>

View File

@@ -840,6 +840,7 @@ onMounted(() => {
v-model:value="queryParams.userName"
allow-clear
:maxlength="30"
:placeholder="t('common.ipnutPlease')"
></a-input>
</a-form-item>
</a-col>
@@ -852,6 +853,7 @@ onMounted(() => {
v-model:value="queryParams.phonenumber"
allow-clear
:maxlength="11"
:placeholder="t('common.ipnutPlease')"
></a-input>
</a-form-item>
</a-col>
@@ -861,6 +863,7 @@ onMounted(() => {
v-model:value="queryParams.status"
allow-clear
:options="dict.sysNormalDisable"
:placeholder="t('common.selectPlease')"
>
</a-select>
</a-form-item>
@@ -911,7 +914,7 @@ onMounted(() => {
v-perms:has="['system:user:import']"
>
<template #icon><ImportOutlined /></template>
{{ t('views.system.user.import') }}
{{ t('common.import') }}
</a-button>
<a-button
type="dashed"
@@ -919,7 +922,7 @@ onMounted(() => {
v-perms:has="['system:user:export']"
>
<template #icon><ExportOutlined /></template>
{{ t('views.system.user.export') }}
{{ t('common.export') }}
</a-button>
</a-space>
</template>
@@ -936,15 +939,15 @@ onMounted(() => {
size="small"
/>
</a-tooltip>
<!-- <a-tooltip>
<template #title>表格斑马纹</template>
<a-tooltip>
<template #title>{{ t('common.tableStripedText') }}</template>
<a-switch
v-model:checked="tableState.striped"
checked-children=""
un-checked-children=""
:checked-children="t('common.switch.open')"
:un-checked-children="t('common.switch.shut')"
size="small"
/>
</a-tooltip> -->
</a-tooltip>
<a-tooltip>
<template #title>{{ t('common.reloadText') }}</template>
<a-button type="text" @click.prevent="fnGetList(1)">
@@ -962,15 +965,15 @@ onMounted(() => {
:selected-keys="[tableState.size as string]"
@click="fnTableSize"
>
<a-menu-item key="default">{{
t('common.size.default')
}}</a-menu-item>
<a-menu-item key="middle">{{
t('common.size.middle')
}}</a-menu-item>
<a-menu-item key="small">{{
t('common.size.small')
}}</a-menu-item>
<a-menu-item key="default">
{{ t('common.size.default') }}
</a-menu-item>
<a-menu-item key="middle">
{{ t('common.size.middle') }}</a-menu-item
>
<a-menu-item key="small">
{{ t('common.size.small') }}
</a-menu-item>
</a-menu>
</template>
</a-dropdown>
@@ -1207,7 +1210,7 @@ onMounted(() => {
:value="modalState.from.postIds"
disabled
mode="multiple"
placeholder="请选择用户岗位"
:placeholder="t('views.system.user.userWorkPlease')"
option-label-prop="postName"
:options="modalState.options.posts"
:field-names="{ label: 'postName', value: 'postId' }"
@@ -1238,9 +1241,9 @@ onMounted(() => {
</a-form-item>
</a-form>
<template #footer>
<a-button key="cancel" @click="fnModalCancel">{{
t('common.close')
}}</a-button>
<a-button key="cancel" @click="fnModalCancel">
{{ t('common.close') }}
</a-button>
</template>
</a-modal>

View File

@@ -454,7 +454,7 @@ onMounted(() => {
<template v-if="column.key === 'id'">
<a-space :size="8" align="center">
<a-tooltip>
<template #title>查看详情</template>
<template #title>{{ t('common.viewText') }}</template>
<a-button type="link" @click.prevent="fnModalVisible(record)">
<template #icon><ProfileOutlined /></template>
</a-button>

View File

@@ -52,13 +52,13 @@ let modalState: ModalStateType = reactive({
},
upfCmdOptions: [
{
label: '适合其他网元异常UPF配合抓包的情况',
label: t('views.traceManage.pcap.execUPFCmdA'),
start: 'pcap trace rx tx max 100000 intfc any',
stop: 'pcap trace rx tx off',
value: 'pcap trace',
},
{
label: '适合UPF异常需要抓包分析的情况',
label: t('views.traceManage.pcap.execUPFCmdB'),
start: 'pcap dispatch trace on max 100000',
stop: 'pcap dispatch trace off',
value: 'pcap dispatch',

View File

@@ -224,7 +224,7 @@ function fnRecordDelete(id: string) {
function fnGetList(pageNum?: number) {
if (tableState.loading) return;
tableState.loading = true;
if(pageNum){
if (pageNum) {
queryParams.pageNum = pageNum;
}
listTraceTask(toRaw(queryParams)).then(res => {
@@ -432,7 +432,7 @@ function fnModalVisibleByVive(id: string) {
*/
function fnModalVisibleByEdit(id?: string) {
if (!id) {
fnModalCancel()
fnModalCancel();
modalState.title = t('views.traceManage.task.addTask');
modalState.visibleByEdit = true;
} else {
@@ -492,7 +492,7 @@ function fnModalOk() {
content: t('common.msgSuccess', { msg: modalState.title }),
duration: 3,
});
fnModalCancel()
fnModalCancel();
} else {
message.error({
content: `${res.msg}`,
@@ -569,25 +569,31 @@ onMounted(() => {
</a-form-item>
</a-col>
<a-col :lg="6" :md="12" :xs="24">
<a-form-item label="开始时间" name="beginTime">
<a-form-item
:label="t('views.traceManage.task.startTime')"
name="beginTime"
>
<a-date-picker
show-time
v-model:value="queryParams.beginTime"
value-format="YYYY-MM-DD HH:mm:ss"
format="YYYY-MM-DD HH:mm:ss"
placeholder="查询结束时间"
:placeholder="t('views.traceManage.task.startTime')"
style="width: 100%"
/>
</a-form-item>
</a-col>
<a-col :lg="6" :md="12" :xs="24">
<a-form-item label="结束时间" name="endTime">
<a-form-item
:label="t('views.traceManage.task.endTime')"
name="endTime"
>
<a-date-picker
show-time
v-model:value="queryParams.endTime"
value-format="YYYY-MM-DD HH:mm:ss"
format="YYYY-MM-DD HH:mm:ss"
placeholder="查询结束时间"
:placeholder="t('views.traceManage.task.endTime')"
style="width: 100%"
/>
</a-form-item>
@@ -648,15 +654,15 @@ onMounted(() => {
:selected-keys="[tableState.size as string]"
@click="fnTableSize"
>
<a-menu-item key="default">{{
t('common.size.default')
}}</a-menu-item>
<a-menu-item key="middle">{{
t('common.size.middle')
}}</a-menu-item>
<a-menu-item key="small">{{
t('common.size.small')
}}</a-menu-item>
<a-menu-item key="default">
{{ t('common.size.default') }}
</a-menu-item>
<a-menu-item key="middle">
{{ t('common.size.middle') }}
</a-menu-item>
<a-menu-item key="small">
{{ t('common.size.small') }}
</a-menu-item>
</a-menu>
</template>
</a-dropdown>