---用户管理,网元管理等中英文

This commit is contained in:
lai
2023-11-08 11:21:39 +08:00
parent 8e467b95a2
commit 1bc9358d30
37 changed files with 582 additions and 404 deletions

View File

@@ -18,11 +18,13 @@ export default {
search: 'Search',
reset: 'Reset',
viewText: 'View',
view: 'View',
addText: 'Add',
editText: 'Edit',
deleteText: 'Delete',
downloadText: 'Download',
uploadText: 'Upload',
unableNull:' Cannot be empty',
moreText: 'More',
searchBarText: 'Search bar',
reloadText: 'Refresh',
@@ -82,6 +84,8 @@ export default {
// 页面
views: {
index: {
normal:'Normal',
abnormal:'Abnormal',
hostName: 'hostName',
osInfo: 'osInfo',
dbInfo: 'dbInfo',
@@ -114,12 +118,37 @@ export default {
},
configManage: {
neManage: {
reload: '重载配置',
addNe:'Add Network Element',
delSure:'Confirm deleting the data item with network element name {msg}',
editNe:'Edit Network Element',
exportSure:'Confirm exporting the configuration information with the network element name {msg}',
exportTip:'Export successful, please go to backup management for download',
getInfo:'Failed to get network element information',
neType:'Ne Type',
neTypePlease: 'Select network element type',
neId:'Ne Id',
neName:'Ne Name',
neTypeTip:'Fill in the type of network element created, such as:SMF',
uid:'rm UID',
uidTip:'Please enter a unique resource identifier',
ip:'IP Address',
mac:'Ne MAC address',
macTip:'Able to locate the physical address (MAC) of the network element',
port:'Port',
pvflag:'PV Flag',
pnf:'Physical Network Element',
vnf:'Virtual Network Element',
province:'Province',
vendorName:'Vendor Name',
dn:'Network Identification',
reload: 'Reload',
restart: 'Restart',
totalSure:'Confirm the network element with {operator} network element name {msg}',
stop: 'Stop',
start: 'Start',
export: 'Export',
import: 'Import',
fileForm:'File Source',
selectPlease:'Please select the source of the import file',
server:'Server File',
local:'Local File',
@@ -179,6 +208,7 @@ export default {
},
neUser: {
auth: {
authInfo:'Authentication Info',
neTypePlease: 'Query network element type',
neType: 'UDM Type',
export: 'Export',
@@ -415,5 +445,43 @@ export default {
down: '下行',
}
},
system:{
user: {
userInfo:' User Info',
userNum: 'User Number',
account: 'Account',
userName: 'User Name',
permission: 'Permission',
className: 'Class Name',
loginIp: 'Login address',
loginTime: 'Login Time',
status: 'Status',
userNameTip:'The account cannot start with a number and can contain uppercase and lowercase letters, numbers, and no less than 5 digits',
pwdTip:'The password should contain at least uppercase and lowercase letters, numbers, special symbols, and no less than 6 digits',
nickNameTip:'Nicknames can only contain letters, numbers, Chinese characters, and underscores, with no less than 2 digits',
emailTip:'Please enter the correct email address',
phoneTip:'Please enter the correct phone number',
resetPwd:'Reset Password',
start:'Enable',
stop:'Deactivate',
delSuss:'Successfully deleted',
sureTip:'Are you sure you want to {text} {userName} user?',
delSure:'Confirm deletion of data item with user ID {userId}?',
export:'Export',
import:'Import',
exportSure:'Are you sure to export the xlsx table file based on search criteria??',
phone:'Phone Number',
createTime:'Creation time',
userTop:'User profile',
sex:'User Gender',
email:'E-mail',
fromClass:'DEPARTMENT',
userWork:'User position',
userTip:'User Description',
loginPwd:'Login password',
updateSure:'Do you want to update existing data',
downloadObj:'Download Tpl',
}
},
},
};

View File

@@ -9,7 +9,7 @@ export default {
desc: '核心网管理平台',
loading: '请稍等...',
tipTitle: '提示',
msgSuccess: '成功 {msg}',
msgSuccess: '{msg}成功 ',
errorFields: '请正确填写 {num} 处必填信息!',
tablePaginationTotal: '总共 {total} 条',
ok: '确定',
@@ -18,11 +18,13 @@ export default {
search: '搜索',
reset: '重置',
viewText: '查看详情',
view: '查看',
addText: '新增',
editText: '编辑',
deleteText: '删除',
downloadText: '下载',
uploadText: '上传',
unableNull:'不能为空',
moreText: '更多',
searchBarText: '搜索栏',
reloadText: '刷新',
@@ -82,6 +84,8 @@ export default {
// 页面
views: {
index: {
normal:'正常',
abnormal:'异常',
hostName: '主机名',
osInfo: '操作系统信息',
dbInfo: '数据库信息',
@@ -114,12 +118,37 @@ export default {
},
configManage: {
neManage: {
addNe:'添加网元',
delSure:'确认删除网元名称为{msg}的数据项 ',
editNe:'修改网元',
exportSure:'确认导出网元名称为 {msg} 的配置信息',
exportTip:'导出成功,请到备份管理进行下载',
getInfo:'获取网元信息失败',
neType:'网元类型',
neTypePlease: '请输入网元类型',
neId:'网元内部标识',
neName:'网元名称',
neTypeTip:'填写创建的网元类型,如:SMF',
uid:'资源唯一标识',
uidTip:'请输入资源唯一标识',
ip:'IP地址',
mac:'网元物理地址',
macTip:'能够定位网元的物理地址(MAC)',
port:'端口',
pvflag:'网元虚拟化标识',
pnf:'物理网元',
vnf:'虚拟网元',
province:'网元服务省份',
vendorName:'厂商名称',
dn:'网络标识',
reload: '重载配置',
restart: '重启',
totalSure:'确认{oper}网元名称为 {msg} 的网元',
stop: '停止',
start: '启动',
export: '导出',
import: '导入',
fileForm:'文件来源',
selectPlease:'请选择导入文件来源',
server:'服务器文件',
local:'本地文件',
@@ -179,6 +208,7 @@ export default {
},
neUser: {
auth: {
authInfo:'鉴权信息',
neTypePlease: '查询网元类型',
neType: 'UDM网元类型',
export: '导出',
@@ -415,5 +445,43 @@ export default {
down: '下行',
}
},
system:{
user: {
userInfo:'用户信息',
userNum: '用户编号',
account: '登录账号',
userName: '用户昵称',
permission: '用户权限',
className: '部门名称',
loginIp: '登录地址',
loginTime: '登录时间',
status: '用户状态',
userNameTip:'账号不能以数字开头,可包含大写小写字母,数字,且不少于5位',
pwdTip:'密码至少包含大小写字母、数字、特殊符号,且不少于6位',
nickNameTip:'昵称只能包含字母、数字、中文和下划线,且不少于2位',
emailTip:'请输入正确的邮箱地址',
phoneTip:'请输入正确的手机号码',
resetPwd:'重置密码',
start:'启用',
stop:'停用',
delSuss:'删除成功',
sureTip:'确定要{text} {userName} 用户吗?',
delSure:'确认删除用户编号为{userId}的数据项?',
export:'导出',
import:'导入',
exportSure:'确认根据搜索条件导出xlsx表格文件吗?',
phone:'手机号码',
createTime:'创建时间',
userTop:'用户头像',
sex:'用户性别',
email:'电子邮箱',
fromClass:'所属部门',
userWork:'用户岗位',
userTip:'用户说明',
loginPwd:'登入密码',
updateSure:'是否更新已经存在的数据',
downloadObj:'下载模板',
}
},
},
};

View File

@@ -40,19 +40,19 @@ function fnInitstateForm() {
/**表单验证通过 */
function fnFinish() {
Modal.confirm({
title: '提示',
title: t('common.tipTitle'),
content: `确认要提交修改用户基本信息吗?`,
onOk() {
stateForm.formClick = true;
// 发送请求
const hide = message.loading('请稍等...', 0);
const hide = message.loading(t('common.loading'), 0);
const form = toRaw(stateForm.form);
updateUserProfile(form).then(res => {
hide();
stateForm.formClick = false;
if (res.code === RESULT_CODE_SUCCESS) {
Modal.success({
title: '提示',
title: t('common.tipTitle'),
content: `用户基本信息修改成功!`,
okText: '我知道了',
onOk() {
@@ -87,11 +87,11 @@ function fnBeforeUpload(file: FileType) {
/**上传变更 */
function fnUpload(up: UploadRequestOption) {
Modal.confirm({
title: '提示',
title: t('common.tipTitle'),
content: `确认要上传/变更用户头像吗?`,
onOk() {
// 发送请求
const hide = message.loading('请稍等...', 0);
const hide = message.loading(t('common.loading'), 0);
upState.value = true;
let formData = new FormData();
formData.append('file', up.file);

View File

@@ -41,17 +41,17 @@ function fnEqualToPassword(
/**表单验证通过 */
function fnFinish() {
Modal.confirm({
title: '提示',
title: t('common.tipTitle'),
content: `确认要提交修改密码吗?`,
onOk() {
state.formClick = true;
// 发送请求
const hide = message.loading('请稍等...', 0);
const hide = message.loading(t('common.loading'), 0);
updateUserPwd(state.form.oldPassword, state.form.confirmPassword)
.then(res => {
if (res.code === RESULT_CODE_SUCCESS) {
Modal.success({
title: '提示',
title: t('common.tipTitle'),
content: `恭喜您,${userName} 账号密码修改成功!`,
okText: '重新登录',
onOk() {

View File

@@ -151,7 +151,7 @@ function fnTableSize({ key }: MenuInfo) {
/**信息文件下载 */
function fnDownloadFile(row: Record<string, any>) {
Modal.confirm({
title: '提示',
title: t('common.tipTitle'),
content: `确认下载记录编号为 【${row.id}】 的数据项文件?`,
onOk() {
const key = 'downloadNeBackup';
@@ -182,11 +182,11 @@ function fnDownloadFile(row: Record<string, any>) {
*/
function fnRecordDelete(row: Record<string, any>) {
Modal.confirm({
title: '提示',
title: t('common.tipTitle'),
content: `确认删除记录编号为 【${row.id}】 的数据项?`,
onOk() {
const key = 'delNeBackup';
message.loading({ content: '请稍等...', key });
message.loading({ content: t('common.loading'), key });
delNeBackup(toRaw(row)).then(res => {
if (res.code === RESULT_CODE_SUCCESS) {
message.success({

View File

@@ -353,7 +353,7 @@ function arrayDelete(row: Record<string, any>) {
const loc = from['index']['value'];
Modal.confirm({
title: '提示',
title: t('common.tipTitle'),
content: `确认删除Index为 【${from['index']['value']}】 的数据项?`,
onOk() {
const hide = message.loading({ content: t('common.loading') });
@@ -701,7 +701,7 @@ function arrayChildDelete(row: Record<string, any>) {
const loc = `${tableState.arrayChildLoc}/${from['index']['value']}`;
Modal.confirm({
title: '提示',
title: t('common.tipTitle'),
content: `确认删除${tableState.arrayChildTitle} Index 为 【${from['index']['value']}】 的数据项?`,
onOk() {
const hide = message.loading({ content: t('common.loading') });

View File

@@ -355,7 +355,7 @@ function arrayDelete(row: Record<string, any>) {
const loc = from['index']['value'];
Modal.confirm({
title: '提示',
title: t('common.tipTitle'),
content: `确认删除Index为 【${from['index']['value']}】 的数据项?`,
onOk() {
const hide = message.loading({ content: t('common.loading') });
@@ -703,7 +703,7 @@ function arrayChildDelete(row: Record<string, any>) {
const loc = `${tableState.arrayChildLoc}/${from['index']['value']}`;
Modal.confirm({
title: '提示',
title: t('common.tipTitle'),
content: `确认删除${tableState.arrayChildTitle} Index 为 【${from['index']['value']}】 的数据项?`,
onOk() {
const hide = message.loading({ content: t('common.loading') });

View File

@@ -84,75 +84,65 @@ let tableState: TabeStateType = reactive({
/**表格字段列 */
let tableColumns: ColumnsType = [
{
title: '网元类型',
title: t('views.configManage.neManage.neType'),
dataIndex: 'neType',
align: 'center',
width: 3,
},
{
title: '网元内部标识',
title: t('views.configManage.neManage.neId'),
dataIndex: 'neId',
align: 'center',
width: 3,
},
{
title: '资源唯一标识',
title: t('views.configManage.neManage.uid'),
dataIndex: 'rmUid',
align: 'center',
width: 5,
},
{
title: '网元名称',
title: t('views.configManage.neManage.neName'),
dataIndex: 'neName',
align: 'center',
width: 5,
},
{
title: 'IP地址',
title: t('views.configManage.neManage.ip'),
dataIndex: 'ip',
align: 'center',
width: 5,
},
{
title: '端口',
title: t('views.configManage.neManage.port'),
dataIndex: 'port',
align: 'center',
width: 3,
},
{
title: '网元虚拟化标识',
title: t('views.configManage.neManage.pvflag'),
dataIndex: 'pvFlag',
align: 'center',
width: 5,
},
{
title: '网元所在省份',
title: t('views.configManage.neManage.province'),
dataIndex: 'province',
align: 'center',
width: 5,
},
{
title: '厂商名称',
title: t('views.configManage.neManage.vendorName'),
dataIndex: 'vendorName',
align: 'center',
width: 5,
},
{
title: '网络标识',
title: t('views.configManage.neManage.dn'),
dataIndex: 'dn',
align: 'center',
width: 5,
},
{
title: '修改时间',
dataIndex: 'updateTime',
align: 'center',
customRender(opt) {
if (!opt.value) return '';
return parseDateToStr(opt.value);
},
width: 5,
},
{
title: t('common.operate'),
key: 'id',
@@ -247,13 +237,13 @@ let modalState: ModalStateType = reactive({
const modalStateFrom = Form.useForm(
modalState.from,
reactive({
neType: [{ required: true, message: '网元类型不能为空' }],
neId: [{ required: true, message: '网元内部标识不能为空' }],
rmUid: [{ required: true, message: '资源唯一标识不能为空' }],
ip: [{ required: true, message: 'IP地址不能为空' }],
port: [{ required: true, message: '端口不能为空' }],
pvFlag: [{ required: true, message: '请选择网元虚拟化标识' }],
neName: [{ required: true, message: '网元名称不能为空' }],
neType: [{ required: true, message: t("views.configManage.neManage.neType")+ t("common.unableNull")}],
neId: [{ required: true, message: t("views.configManage.neManage.neId")+ t("common.unableNull") }],
rmUid: [{ required: true, message: t("views.configManage.neManage.uid")+ t("common.unableNull") }],
ip: [{ required: true, message: t("views.configManage.neManage.ip")+ t("common.unableNull") }],
port: [{ required: true, message: t("views.configManage.neManage.port")+ t("common.unableNull") }],
pvFlag: [{ required: true, message: t("views.configManage.neManage.pvflag")+ t("common.unableNull")}],
neName: [{ required: true, message: t("views.configManage.neManage.neName")+ t("common.unableNull") }],
})
);
@@ -289,7 +279,7 @@ const importStateFrom = Form.useForm(
function fnModalVisibleByEdit(row?: Record<string, any>) {
if (!row) {
modalStateFrom.resetFields();
modalState.title = '添加网元';
modalState.title = t('views.configManage.neManage.addNe');
modalState.visibleByEdit = true;
} else {
if (modalState.confirmLoading) return;
@@ -300,10 +290,10 @@ function fnModalVisibleByEdit(row?: Record<string, any>) {
hide();
if (res.code === RESULT_CODE_SUCCESS) {
modalState.from = Object.assign(modalState.from, res.data);
modalState.title = '修改网元';
modalState.title = t('views.configManage.neManage.editNe');
modalState.visibleByEdit = true;
} else {
message.error(`获取网元信息失败`, 2);
message.error(t('views.configManage.neManage.getInfo'), 2);
}
});
}
@@ -422,15 +412,15 @@ function fnModalCancel() {
*/
function fnRecordDelete(row: Record<string, any>) {
Modal.confirm({
title: '提示',
content: `确认删除网元编号为 【${row.neName}】 的数据项?`,
title: t('common.tipTitle'),
content: t('views.configManage.neManage.delSure', { msg: row.neName }),
onOk() {
const key = 'delNotice';
message.loading({ content: '请稍等...', key });
message.loading({ content: t('common.loading'), key });
delNeInfo(row).then(res => {
if (res.code === RESULT_CODE_SUCCESS) {
message.success({
content: `删除成功`,
content: t('common.msgSuccess', { msg: t('common.deleteText ') }),
key,
duration: 2,
});
@@ -455,15 +445,15 @@ function fnRecordDelete(row: Record<string, any>) {
*/
function fnRecordExport(row: Record<string, any>) {
Modal.confirm({
title: '提示',
content: `确认导出网元编号为 【${row.neName}】 的配置信息?`,
title: t('common.tipTitle'),
content: t('views.configManage.neManage.exportSure', { msg: row.neName }),
onOk() {
const key = 'exportSet';
message.loading({ content: '请稍等...', key });
message.loading({ content: t('common.loading'), key });
exportSet(row).then(res => {
if (res.code === RESULT_CODE_SUCCESS) {
message.success({
content: `导出成功,请到备份管理进行下载`,
content: t('views.configManage.neManage.exportTip'),
key,
duration: 2,
});
@@ -485,15 +475,20 @@ function fnRecordExport(row: Record<string, any>) {
*/
function fnRecordRestart(row: Record<string, any>) {
Modal.confirm({
title: '提示',
content: `确认重启网元编号为 【${row.neName}】 的网元?`,
title: t('common.tipTitle'),
content: t('views.configManage.neManage.totalSure', {
msg: row.neName,
oper: t('views.configManage.neManage.restart'),
}),
onOk() {
const key = 'restartNf';
message.loading({ content: '请稍等...', key });
message.loading({ content: t('common.loading'), key });
restartNf(row).then(res => {
if (res.code === RESULT_CODE_SUCCESS) {
message.success({
content: `重启执行成功`,
content: t('common.msgSuccess', {
msg: t('views.configManage.neManage.restart'),
}),
key,
duration: 2,
});
@@ -515,15 +510,20 @@ function fnRecordRestart(row: Record<string, any>) {
*/
function fnRecordStart(row: Record<string, any>) {
Modal.confirm({
title: '提示',
content: `确认启动网元编号为 【${row.neName}】 的网元?`,
title: t('common.tipTitle'),
content: t('views.configManage.neManage.totalSure', {
msg: row.neName,
oper: t('views.configManage.neManage.start'),
}),
onOk() {
const key = 'startNf';
message.loading({ content: '请稍等...', key });
message.loading({ content: t('common.loading'), key });
startNf(row).then(res => {
if (res.code === RESULT_CODE_SUCCESS) {
message.success({
content: `启动执行成功`,
content: t('common.msgSuccess', {
msg: t('views.configManage.neManage.start'),
}),
key,
duration: 2,
});
@@ -545,15 +545,20 @@ function fnRecordStart(row: Record<string, any>) {
*/
function fnRecordStop(row: Record<string, any>) {
Modal.confirm({
title: '提示',
content: `确认停止网元编号为 【${row.neName}】 的网元?`,
title: t('common.tipTitle'),
content: t('views.configManage.neManage.totalSure', {
msg: row.neName,
oper: t('views.configManage.neManage.stop'),
}),
onOk() {
const key = 'stopNf';
message.loading({ content: '请稍等...', key });
message.loading({ content: t('common.loading'), key });
stopNf(row).then(res => {
if (res.code === RESULT_CODE_SUCCESS) {
message.success({
content: `停止执行成功`,
content: t('common.msgSuccess', {
msg: t('views.configManage.neManage.stop'),
}),
key,
duration: 2,
});
@@ -572,15 +577,20 @@ function fnRecordStop(row: Record<string, any>) {
/**网元重新加载 */
function fnNeReload(row: Record<string, any>) {
Modal.confirm({
title: '提示',
content: `确认重新载入编号为 【${row.neName}】 的网元配置?`,
title: t('common.tipTitle'),
content: t('views.configManage.neManage.totalSure', {
msg: row.neName,
oper: t('views.configManage.neManage.reload'),
}),
onOk() {
const key = 'stopNf';
message.loading({ content: '请稍等...', key });
message.loading({ content: t('common.loading'), key });
updateNeConfigReload(row.neType, row.neId).then(res => {
if (res.code === RESULT_CODE_SUCCESS) {
message.success({
content: `网元重新加载完成`,
content: t('common.msgSuccess', {
msg: t('views.configManage.neManage.reload'),
}),
key,
duration: 2,
});
@@ -627,7 +637,7 @@ function fnRecordMore(type: string | number, row: Record<string, any>) {
if (type === 'import') {
modalState.importFrom = Object.assign(modalState.importFrom, row);
modalState.title = '导入';
modalState.title = t('views.configManage.neManage.import');
modalState.visibleByImport = true;
}
}
@@ -706,11 +716,14 @@ 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="网元类型" name="neType ">
<a-form-item
:label="t('views.configManage.neManage.neType')"
name="neType "
>
<a-input
v-model:value="queryParams.neType"
allow-clear
placeholder="请输入网元类型"
:placeholder="t('views.configManage.neManage.neTypePlease')"
></a-input>
</a-form-item>
</a-col>
@@ -797,7 +810,7 @@ onMounted(() => {
:data-source="tableState.data"
:size="tableState.size"
:pagination="tablePagination"
:scroll="{ x: 2000, y: 400 }"
:scroll="{ x: 2000, y: 480 }"
>
<template #bodyCell="{ column, record }">
<template v-if="column.key === 'id'">
@@ -882,18 +895,20 @@ onMounted(() => {
<a-row :gutter="16">
<a-col :lg="12" :md="12" :xs="24">
<a-form-item
label="网元类型"
:label="t('views.configManage.neManage.neType')"
name="neType"
v-bind="modalStateFrom.validateInfos.neType"
>
<a-input
v-model:value="modalState.from.neType"
allow-clear
placeholder="请输入网元类型"
:placeholder="t('views.configManage.neManage.neTypePlease')"
>
<template #prefix>
<a-tooltip placement="topLeft">
<template #title> 填写创建的网元类型,:SMF </template>
<template #title>{{
t('views.configManage.neManage.neTypeTip')
}}</template>
<InfoCircleOutlined style="color: rgba(0, 0, 0, 0.45)" />
</a-tooltip>
</template>
@@ -902,14 +917,13 @@ onMounted(() => {
</a-col>
<a-col :lg="12" :md="12" :xs="24">
<a-form-item
label="网元内部标识"
:label="t('views.configManage.neManage.neId')"
name="neId"
v-bind="modalStateFrom.validateInfos.neId"
>
<a-input
v-model:value="modalState.from.neId"
allow-clear
placeholder="请输入网元内部标识"
></a-input>
</a-form-item>
</a-col>
@@ -918,33 +932,36 @@ onMounted(() => {
<a-row :gutter="16">
<a-col :lg="12" :md="12" :xs="24">
<a-form-item
label="资源唯一标识"
:label="t('views.configManage.neManage.uid')"
name="rmUid"
v-bind="modalStateFrom.validateInfos.rmUid"
>
<a-input
v-model:value="modalState.from.rmUid"
allow-clear
placeholder="请输入资源唯一标识"
:placeholder="t('views.configManage.neManage.uidTip')"
>
</a-input>
</a-form-item>
</a-col>
<a-col :lg="12" :md="12" :xs="24">
<a-form-item
label="网元虚拟化标识"
:label="t('views.configManage.neManage.pvflag')"
name="pvFlag"
v-bind="modalStateFrom.validateInfos.pvFlag"
>
<a-select
v-model:value="modalState.from.pvFlag"
default-value="PNF"
placeholder="请选择网元虚拟化标识"
>
<a-select-opt-group label="物理网元">
<a-select-opt-group
:label="t('views.configManage.neManage.pnf')"
>
<a-select-option value="PNF">PNF</a-select-option>
</a-select-opt-group>
<a-select-opt-group label="虚拟网元">
<a-select-opt-group
:label="t('views.configManage.neManage.vnf')"
>
<a-select-option value="VNF">VNF</a-select-option>
</a-select-opt-group>
</a-select>
@@ -955,28 +972,20 @@ onMounted(() => {
<a-row :gutter="16">
<a-col :lg="12" :md="12" :xs="24">
<a-form-item
label="IP地址"
:label="t('views.configManage.neManage.ip')"
name="ip"
v-bind="modalStateFrom.validateInfos.ip"
>
<a-input
v-model:value="modalState.from.ip"
allow-clear
placeholder="请输入IP地址"
></a-input>
<a-input v-model:value="modalState.from.ip" allow-clear></a-input>
</a-form-item>
</a-col>
<a-col :lg="12" :md="12" :xs="24">
<a-form-item
label="端口号"
:label="t('views.configManage.neManage.port')"
name="port"
v-bind="modalStateFrom.validateInfos.port"
>
<a-input
v-model:value="modalState.from.port"
allow-clear
placeholder="请输入端口"
>
<a-input v-model:value="modalState.from.port" allow-clear>
<template #prefix>
<a-tooltip placement="topLeft">
<template #title> <div>最大范围0~65535</div> </template>
@@ -991,28 +1000,24 @@ onMounted(() => {
<a-row :gutter="16">
<a-col :lg="12" :md="12" :xs="24">
<a-form-item
label="网元名称"
:label="t('views.configManage.neManage.neName')"
name="neName"
v-bind="modalStateFrom.validateInfos.neName"
>
<a-input
v-model:value="modalState.from.neName"
allow-clear
placeholder="请输入网元名称"
>
<a-input v-model:value="modalState.from.neName" allow-clear>
</a-input>
</a-form-item>
</a-col>
<a-col :lg="12" :md="12" :xs="24">
<a-form-item label="网元地址" name="neAddress">
<a-input
v-model:value="modalState.from.neAddress"
allow-clear
placeholder="请输入网元地址"
<a-form-item
:label="t('views.configManage.neManage.mac')"
name="neAddress"
>
<a-input v-model:value="modalState.from.neAddress" allow-clear
><template #prefix>
<a-tooltip placement="topLeft">
<template #title>
<div>能够定位网元的物理地址MAC</div>
<div>{{ t('views.configManage.neManage.macTip') }}</div>
</template>
<InfoCircleOutlined style="color: rgba(0, 0, 0, 0.45)" />
</a-tooltip> </template
@@ -1023,30 +1028,30 @@ onMounted(() => {
<a-row :gutter="16">
<a-col :lg="12" :md="12" :xs="24">
<a-form-item label="网元所在省份" name="province">
<a-input
v-model:value="modalState.from.province"
allow-clear
placeholder="请输入网元所在省份"
></a-input>
</a-form-item>
</a-col>
<a-col :lg="6" :md="6" :xs="24">
<a-form-item label="厂商名称" name="vendorName">
<a-input
v-model:value="modalState.from.vendorName"
allow-clear
placeholder="请输入厂商名称"
>
<a-form-item
:label="t('views.configManage.neManage.vendorName')"
name="vendorName"
>
<a-input v-model:value="modalState.from.vendorName" allow-clear>
</a-input>
</a-form-item>
</a-col>
<a-col :lg="6" :md="6" :xs="24">
<a-form-item label="网络标识" name="dn">
<a-col :lg="12" :md="12" :xs="24">
<a-form-item :label="t('views.configManage.neManage.dn')" name="dn">
<a-input v-model:value="modalState.from.dn" allow-clear></a-input>
</a-form-item>
</a-col>
</a-row>
<a-row :gutter="16">
<a-col :lg="12" :md="12" :xs="24">
<a-form-item
:label="t('views.configManage.neManage.province')"
name="province"
>
<a-input
v-model:value="modalState.from.dn"
v-model:value="modalState.from.province"
allow-clear
placeholder="请输入网络标识"
></a-input>
</a-form-item>
</a-col>
@@ -1069,7 +1074,7 @@ onMounted(() => {
<a-row :gutter="16">
<a-col :lg="12" :md="12" :xs="24">
<a-form-item
label="网元类型"
:label="t('views.configManage.neManage.neType')"
name="neType"
v-bind="importStateFrom.validateInfos.neType"
>
@@ -1083,7 +1088,7 @@ onMounted(() => {
</a-col>
<a-col :lg="12" :md="12" :xs="24">
<a-form-item
label="网元内部标识"
:label="t('views.configManage.neManage.neId')"
name="neId"
v-bind="importStateFrom.validateInfos.neId"
>
@@ -1096,7 +1101,7 @@ onMounted(() => {
</a-row>
<a-form-item
label="文件来源"
:label="t('views.configManage.neManage.fileForm')"
name="importType"
v-bind="importStateFrom.validateInfos.importType"
>
@@ -1110,7 +1115,7 @@ onMounted(() => {
</a-form-item>
<a-form-item
label="导入远程文件"
:label="t('views.configManage.neManage.server')"
name="fileName"
v-bind="importStateFrom.validateInfos.fileName"
v-show="modalState.importFrom.importType === 'server'"
@@ -1123,7 +1128,7 @@ onMounted(() => {
</a-form-item>
<a-form-item
label="导入本地文件"
:label="t('views.configManage.neManage.local')"
name="file"
v-bind="importStateFrom.validateInfos.file"
v-show="modalState.importFrom.importType === 'local'"

View File

@@ -310,7 +310,7 @@ function fnFileModalCancel() {
/**信息文件下载 */
function fnDownloadFile(row: Record<string, any>) {
Modal.confirm({
title: '提示',
title: t('common.tipTitle'),
content: t('views.configManage.softwareManage.downloadTip', {
fileName: row.fileName,
}),

View File

@@ -587,7 +587,7 @@ function fnCancelConfirm() {
title: 'Tip',
content: `确认是否取消确认告警?`,
onOk() {
const hide = message.loading('请稍等...', 0);
const hide = message.loading(t('common.loading'), 0);
cancelConfirm(state.selectedRowKeys).then(res => {
hide();
if (res.code === RESULT_CODE_SUCCESS) {
@@ -611,7 +611,7 @@ function fnCancelConfirm() {
* 手工同步
*/
function fnSync() {
const hide = message.loading('请稍等...', 0);
const hide = message.loading(t('common.loading'), 0);
listSync().then(res => {
hide();
if (res.code === RESULT_CODE_SUCCESS) {
@@ -637,7 +637,7 @@ function fnClear() {
title: 'Tip',
content: `是否清除该告警?`,
onOk() {
const hide = message.loading('请稍等...', 0);
const hide = message.loading(t('common.loading'), 0);
clearAlarm(state.selectedRowKeys).then(res => {
hide();
if (res.code === RESULT_CODE_SUCCESS) {
@@ -662,7 +662,7 @@ function fnClear() {
*/
function fnShowSet() {
if (modalState.confirmLoading) return;
const hide = message.loading('正在打开...', 0);
const hide = message.loading(t('common.loading'), 0);
modalState.confirmLoading = true;
getPass().then(res => {
modalState.confirmLoading = false;
@@ -689,7 +689,7 @@ function fnExportAll() {
content: `确认是否导出全部活动告警信息?`,
onOk() {
const key = 'exportAlarm';
message.loading({ content: '请稍等...', key });
message.loading({ content: t('common.loading'), key });
exportAll(queryParams).then(res => {
if (res.code === RESULT_CODE_SUCCESS) {
message.success({

View File

@@ -466,7 +466,7 @@ function fnCancelConfirm() {
title: 'Tip',
content: `确认是否取消确认告警?`,
onOk() {
const hide = message.loading('请稍等...', 0);
const hide = message.loading(t('common.loading'), 0);
cancelConfirm(state.selectedRowKeys).then(res => {
hide();
if (res.code === RESULT_CODE_SUCCESS) {
@@ -495,7 +495,7 @@ function fnExportAll() {
content: `确认是否导出全部历史告警信息?`,
onOk() {
const key = 'exportAlarmHis';
message.loading({ content: '请稍等...', key });
message.loading({ content: t('common.loading'), key });
exportAll(queryParams).then(res => {
if (res.code === RESULT_CODE_SUCCESS) {
message.success({

View File

@@ -84,7 +84,7 @@ let tableState: TabeStateType = reactive({
let nfInfo: any = reactive({
obj: 'OMC',
version: '2.2311.7',
status: '正常',
status: t('views.index.normal'),
number: '',
outTimeDate: '',
});
@@ -142,7 +142,7 @@ function fnGetList() {
var errorNum = 0;
for (let i = 0; i < res.length; i++) {
if (res[i].status == '正常') {
if (res[i].status == '正常'||res[i].status=='Normal') {
rightNum++;
} else {
errorNum++;
@@ -326,7 +326,7 @@ const closeDrawer = () => {
function rowClick(record: any, index: any) {
return {
onClick: (event: any) => {
if (toRaw(record).status == '异常') {
if (toRaw(record).status == '异常'||toRaw(record).status == 'Abnormal') {
message.error(`网元状态异常`, 2);
return false;
} else {
@@ -436,7 +436,7 @@ onBeforeUnmount(() => {
>
<template #bodyCell="{ column, record }">
<template v-if="column.key === 'status'">
<div v-if="record.status == '正常'">
<div v-if="record.status == '正常'||record.status == 'Normal'">
<a-tag color="blue" @click="init(record)">{{
record.name
}}</a-tag>

View File

@@ -248,7 +248,7 @@ function fnFormLogOutFinish() {
logOutState.confirmLoading = true;
const from = toRaw(logOutState.from);
const key = 'exportLog';
message.loading({ content: '请稍等...', key });
message.loading({ content: t('common.loading'), key });
exportLog(from)
.then(res => {
if (res.code === RESULT_CODE_SUCCESS) {
@@ -288,12 +288,12 @@ let backState: ModalStateType = reactive({
/**日志备份对象保存 */
function fnFormBackFinish() {
Modal.confirm({
title: '提示',
title: t('common.tipTitle'),
content: `确认手动备份该日志类型数据到文件吗?`,
onOk() {
backState.confirmLoading = true;
const key = 'backupLog';
message.loading({ content: '请稍等...', key });
message.loading({ content: t('common.loading'), key });
backupLog(backState.from.logType)
.then(res => {
if (res.code === RESULT_CODE_SUCCESS) {
@@ -335,12 +335,12 @@ function fnBackFileList() {
/**日志备份文件下载 */
function fnBackDownload(name: string, path: string) {
Modal.confirm({
title: '提示',
title: t('common.tipTitle'),
content: `确认下载该文件吗?`,
onOk() {
backState.confirmLoading = true;
const key = 'backupDownload';
message.loading({ content: '请稍等...', key });
message.loading({ content: t('common.loading'), key });
backupDownload(path)
.then(res => {
if (res.code === RESULT_CODE_SUCCESS) {

View File

@@ -98,7 +98,7 @@ let cacheKeyTable = reactive({
function fnCacheKeyClear(cacheKey: string) {
if (isClick.value) return;
isClick.value = true;
const hide = message.loading('请稍等...', 0);
const hide = message.loading(t('common.loading'), 0);
clearCacheKey(cacheKeyTable.cacheName, cacheKey).then(res => {
hide();
isClick.value = false;
@@ -196,7 +196,7 @@ let cacheNameTableColumns: ColumnsType = [
function fnClearCacheSafe() {
if (isClick.value) return;
isClick.value = true;
const hide = message.loading('请稍等...', 0);
const hide = message.loading(t('common.loading'), 0);
clearCacheSafe().then(res => {
hide();
isClick.value = false;
@@ -223,7 +223,7 @@ function fnClearCacheSafe() {
function fnCacheNameClear(cacheName: string) {
if (isClick.value) return;
isClick.value = true;
const hide = message.loading('请稍等...', 0);
const hide = message.loading(t('common.loading'), 0);
clearCacheName(cacheName).then(res => {
hide();
isClick.value = false;

View File

@@ -264,7 +264,7 @@ function fnModalVisibleByVive(jobId: string | number) {
return;
}
if (modalState.confirmLoading) return;
const hide = message.loading('正在打开...', 0);
const hide = message.loading(t('common.loading'), 0);
modalState.confirmLoading = true;
getJob(jobId).then(res => {
modalState.confirmLoading = false;
@@ -290,7 +290,7 @@ function fnModalVisibleByEdit(jobId?: string | number) {
modalState.visibleByEdit = true;
} else {
if (modalState.confirmLoading) return;
const hide = message.loading('正在打开...', 0);
const hide = message.loading(t('common.loading'), 0);
modalState.confirmLoading = true;
getJob(jobId).then(res => {
modalState.confirmLoading = false;
@@ -318,7 +318,7 @@ function fnModalOk() {
const from = toRaw(modalState.from);
const job = from.jobId ? updateJob(from) : addJob(from);
const key = 'job';
message.loading({ content: '请稍等...', key });
message.loading({ content: t('common.loading'), key });
job
.then(res => {
if (res.code === RESULT_CODE_SUCCESS) {
@@ -374,11 +374,11 @@ function fnModalCron(opt: boolean, cronStr?: string) {
function fnRecordStatus(row: Record<string, string>) {
const text = row.status === '1' ? '开启' : '关闭';
Modal.confirm({
title: '提示',
title: t('common.tipTitle'),
content: `确定要${text} ${row.jobName} 任务吗?`,
onOk() {
const key = 'changeJobStatus';
message.loading({ content: '请稍等...', key });
message.loading({ content: t('common.loading'), key });
changeJobStatus(row.jobId, row.status).then(res => {
if (res.code === RESULT_CODE_SUCCESS) {
message.success({
@@ -408,11 +408,11 @@ function fnRecordStatus(row: Record<string, string>) {
*/
function fnRecordRunOne(row: Record<string, string>) {
Modal.confirm({
title: '提示',
title: t('common.tipTitle'),
content: `确定要立即执行一次 【${row.jobName}】 任务吗?`,
onOk() {
const key = 'runJob';
message.loading({ content: '请稍等...', key });
message.loading({ content: t('common.loading'), key });
runJob(row.jobId).then(res => {
if (res.code === RESULT_CODE_SUCCESS) {
message.success({
@@ -441,11 +441,11 @@ function fnRecordDelete(jobId: string = '0') {
jobId = tableState.selectedRowKeys.join(',');
}
Modal.confirm({
title: '提示',
title: t('common.tipTitle'),
content: `确认删除定时任务编号为 【${jobId}】 任务吗?`,
onOk() {
const key = 'delJob';
message.loading({ content: '请稍等...', key });
message.loading({ content: t('common.loading'), key });
delJob(jobId).then(res => {
if (res.code === RESULT_CODE_SUCCESS) {
message.success({
@@ -471,11 +471,11 @@ function fnRecordDelete(jobId: string = '0') {
*/
function fnResetQueueJob() {
Modal.confirm({
title: '提示',
title: t('common.tipTitle'),
content: `确定要重置并刷新调度任务吗?`,
onOk() {
const key = 'resetQueueJob';
message.loading({ content: '请稍等...', key });
message.loading({ content: t('common.loading'), key });
resetQueueJob().then(res => {
if (res.code === RESULT_CODE_SUCCESS) {
message.success({
@@ -498,11 +498,11 @@ function fnResetQueueJob() {
/**列表导出 */
function fnExportList() {
Modal.confirm({
title: '提示',
title: t('common.tipTitle'),
content: `确认根据搜索条件导出xlsx表格文件吗?`,
onOk() {
const key = 'exportJob';
message.loading({ content: '请稍等...', key });
message.loading({ content: t('common.loading'), key });
exportJob(toRaw(queryParams)).then(res => {
if (res.code === RESULT_CODE_SUCCESS) {
message.success({

View File

@@ -257,11 +257,11 @@ function fnModalCancel() {
function fnRecordDelete() {
const ids = tableState.selectedRowKeys.join(',');
Modal.confirm({
title: '提示',
title: t('common.tipTitle'),
content: `确认删除调度日志编号为 【${ids}】 的数据项吗?`,
onOk() {
const key = 'delJobLog';
message.loading({ content: '请稍等...', key });
message.loading({ content: t('common.loading'), key });
delJobLog(ids).then(res => {
if (res.code === RESULT_CODE_SUCCESS) {
message.success({
@@ -285,11 +285,11 @@ function fnRecordDelete() {
/**列表清空 */
function fnCleanList() {
Modal.confirm({
title: '提示',
title: t('common.tipTitle'),
content: `确认清空所有调度日志数据项吗?`,
onOk() {
const key = 'cleanJobLog';
message.loading({ content: '请稍等...', key });
message.loading({ content: t('common.loading'), key });
cleanJobLog().then(res => {
if (res.code === RESULT_CODE_SUCCESS) {
message.success({
@@ -313,11 +313,11 @@ function fnCleanList() {
/**列表导出 */
function fnExportList() {
Modal.confirm({
title: '提示',
title: t('common.tipTitle'),
content: `确认根据搜索条件导出xlsx表格文件吗?`,
onOk() {
const key = 'exportJobLog';
message.loading({ content: '请稍等...', key });
message.loading({ content: t('common.loading'), key });
exportJobLog(toRaw(queryParams)).then(res => {
if (res.code === RESULT_CODE_SUCCESS) {
message.success({

View File

@@ -162,10 +162,10 @@ function fnGetList() {
/** 强退按钮操作 */
function fnForceLogout(row: Record<string, string>) {
Modal.confirm({
title: '提示',
title: t('common.tipTitle'),
content: `确认强退登录账号为 ${row.userName} 的用户?`,
onOk() {
const hide = message.loading('请稍等...', 0);
const hide = message.loading(t('common.loading'), 0);
forceLogout(row.tokenId)
.then(res => {
if (res.code === RESULT_CODE_SUCCESS) {

View File

@@ -264,7 +264,7 @@ const modalStateBatchDelFrom = Form.useForm(
*/
function fnModalVisibleByVive(imsi: string) {
if (modalState.confirmLoading) return;
const hide = message.loading('正在打开...', 0);
const hide = message.loading('Waiting...', 0);
modalState.confirmLoading = true;
const neID = queryParams.neId || '-';
getAuth(neID, imsi).then(res => {
@@ -272,7 +272,7 @@ function fnModalVisibleByVive(imsi: string) {
hide();
if (res.code === RESULT_CODE_SUCCESS) {
modalState.from = Object.assign(modalState.from, res.data);
modalState.title = '查看鉴权信息';
modalState.title = t("common.view")+t("views.neUser.authInfo");
modalState.visibleByView = true;
} else {
message.error(`获取鉴权信息失败`, 2);
@@ -291,7 +291,7 @@ function fnModalVisibleByEdit(row?: Record<string, any>) {
modalState.visibleByEdit = true;
} else {
if (modalState.confirmLoading) return;
const hide = message.loading('正在打开...', 0);
const hide = message.loading(t('common.loading'), 0);
modalState.confirmLoading = true;
const neID = queryParams.neId || '-';
getAuth(neID, row?.imsi).then(res => {
@@ -487,11 +487,11 @@ function fnModalCancel() {
*/
function fnRecordDelete(row: Record<string, any>) {
Modal.confirm({
title: '提示',
title: t('common.tipTitle'),
content: `确认删除IMSI编号为: ${row.imsi} 的用户嘛?`,
onOk() {
const key = 'delNotice';
message.loading({ content: '请稍等...', key });
message.loading({ content: t('common.loading'), key });
const neID = queryParams.neId || '-';
delAuth(neID, row).then(res => {
if (res.code === RESULT_CODE_SUCCESS) {
@@ -518,7 +518,7 @@ function fnExportList(type: string) {
const neID = queryParams.neId;
if (!neID) return;
const key = 'exportAuth';
message.loading({ content: '请稍等...', key });
message.loading({ content: t('common.loading'), key });
exportAuth({
neId: neID,
type: type,

View File

@@ -367,7 +367,7 @@ function fnModalVisibleByEdit(imsi?: string) {
modalState.visibleByEdit = true;
} else {
if (modalState.confirmLoading) return;
const hide = message.loading('正在打开...', 0);
const hide = message.loading(t('common.loading'), 0);
modalState.confirmLoading = true;
const neID = queryParams.neId || '-';
getSub(neID, imsi).then(res => {
@@ -653,11 +653,11 @@ function fnRecordDelete(imsi: string) {
const neID = queryParams.neId;
if (!neID) return;
Modal.confirm({
title: '提示',
title: t('common.tipTitle'),
content: `确认删除IMSI编号为: ${imsi} 的签约用户嘛?`,
onOk() {
const key = 'delSub';
message.loading({ content: '请稍等...', key });
message.loading({ content: t('common.loading'), key });
delSub(neID, imsi).then(res => {
if (res.code === RESULT_CODE_SUCCESS) {
message.success({
@@ -683,7 +683,7 @@ function fnExportList(type: string) {
const neID = queryParams.neId;
if (!neID) return;
const key = 'exportSub';
message.loading({ content: '请稍等...', key });
message.loading({ content: t('common.loading'), key });
exportSub({
neId: neID,
type: type,

View File

@@ -377,11 +377,11 @@ function fnModalCancel() {
*/
function fnRecordRun(row: Record<string, any>) {
Modal.confirm({
title: '提示',
title: t('common.tipTitle'),
content: `确认激活编号为 【${row.id}】 的性能门限?`,
onOk() {
const key = 'taskRun';
message.loading({ content: '请稍等...', key });
message.loading({ content: t('common.loading'), key });
threRun(row).then(res => {
if (res.code === RESULT_CODE_SUCCESS) {
message.success({
@@ -408,11 +408,11 @@ function fnRecordRun(row: Record<string, any>) {
*/
function fnRecordStop(row: Record<string, any>) {
Modal.confirm({
title: '提示',
title: t('common.tipTitle'),
content: `确认挂起编号为 【${row.id}】 的性能门限?`,
onOk() {
const key = 'taskStop';
message.loading({ content: '请稍等...', key });
message.loading({ content: t('common.loading'), key });
threStop(row).then(res => {
if (res.code === RESULT_CODE_SUCCESS) {
message.success({

View File

@@ -594,11 +594,11 @@ function fnModalCancel() {
*/
function fnRecordRun(row: Record<string, any>) {
Modal.confirm({
title: '提示',
title: t('common.tipTitle'),
content: `确认激活编号为 【${row.id}】 的任务?`,
onOk() {
const key = 'taskRun';
message.loading({ content: '请稍等...', key });
message.loading({ content: t('common.loading'), key });
taskRun(row).then(res => {
if (res.code === RESULT_CODE_SUCCESS) {
message.success({
@@ -625,11 +625,11 @@ function fnRecordRun(row: Record<string, any>) {
*/
function fnRecordStop(row: Record<string, any>) {
Modal.confirm({
title: '提示',
title: t('common.tipTitle'),
content: `确认挂起编号为 【${row.id}】 的任务?`,
onOk() {
const key = 'taskStop';
message.loading({ content: '请稍等...', key });
message.loading({ content: t('common.loading'), key });
taskStop(row).then(res => {
if (res.code === RESULT_CODE_SUCCESS) {
message.success({

View File

@@ -256,7 +256,7 @@ function fnModalVisibleByEdit(configId?: string | number) {
modalState.visibleByEdit = true;
} else {
if (modalState.confirmLoading) return;
const hide = message.loading('正在打开...', 0);
const hide = message.loading(t('common.loading'), 0);
modalState.confirmLoading = true;
getConfig(configId).then(res => {
modalState.confirmLoading = false;
@@ -284,7 +284,7 @@ function fnModalOk() {
const from = toRaw(modalState.from);
const config = from.configId ? updateConfig(from) : addConfig(from);
const key = 'config';
message.loading({ content: '请稍等...', key });
message.loading({ content: t('common.loading'), key });
config
.then(res => {
if (res.code === RESULT_CODE_SUCCESS) {
@@ -332,11 +332,11 @@ function fnRecordDelete(configId: string = '0') {
configId = tableState.selectedRowKeys.join(',');
}
Modal.confirm({
title: '提示',
title: t('common.tipTitle'),
content: `确认删除参数编号为 【${configId}】 的数据项?`,
onOk() {
const key = 'delConfig';
message.loading({ content: '请稍等...', key });
message.loading({ content: t('common.loading'), key });
delConfig(configId).then(res => {
if (res.code === RESULT_CODE_SUCCESS) {
message.success({
@@ -360,11 +360,11 @@ function fnRecordDelete(configId: string = '0') {
/**列表导出 */
function fnExportList() {
Modal.confirm({
title: '提示',
title: t('common.tipTitle'),
content: `确认根据搜索条件导出xlsx表格文件吗?`,
onOk() {
const key = 'exportConfig';
message.loading({ content: '请稍等...', key });
message.loading({ content: t('common.loading'), key });
exportConfig(toRaw(queryParams)).then(res => {
if (res.code === RESULT_CODE_SUCCESS) {
message.success({
@@ -390,11 +390,11 @@ function fnExportList() {
*/
function fnRefreshCache() {
Modal.confirm({
title: '提示',
title: t('common.tipTitle'),
content: `确定要刷新参数配置缓存吗?`,
onOk() {
const key = 'refreshCache';
message.loading({ content: '请稍等...', key });
message.loading({ content: t('common.loading'), key });
refreshCache().then(res => {
if (res.code === RESULT_CODE_SUCCESS) {
message.success({

View File

@@ -211,7 +211,7 @@ function fnModalVisibleByVive(deptId: string | number) {
return;
}
if (modalState.confirmLoading) return;
const hide = message.loading('正在打开...', 0);
const hide = message.loading(t('common.loading'), 0);
modalState.confirmLoading = true;
getDept(deptId).then(res => {
modalState.confirmLoading = false;
@@ -252,7 +252,7 @@ function fnModalVisibleByEdit(
modalState.visibleByEdit = true;
} else {
if (modalState.confirmLoading) return;
const hide = message.loading('正在打开...', 0);
const hide = message.loading(t('common.loading'), 0);
modalState.confirmLoading = true;
// 获取部门信息同时查询部门列表(排除节点)
Promise.all([getDept(deptId), listDeptExcludeChild(deptId)])
@@ -295,7 +295,7 @@ function fnModalOk() {
modalState.confirmLoading = true;
const from = toRaw(modalState.from);
const dept = from.deptId ? updateDept(from) : addDept(from);
const hide = message.loading('请稍等...', 0);
const hide = message.loading(t('common.loading'), 0);
dept
.then(res => {
if (res.code === RESULT_CODE_SUCCESS) {
@@ -343,10 +343,10 @@ function fnModalCancel() {
*/
function fnRecordDelete(deptId: string | number) {
Modal.confirm({
title: '提示',
title: t('common.tipTitle'),
content: `确认删除部门编号为 【${deptId}】 的数据项?`,
onOk() {
const hide = message.loading('请稍等...', 0);
const hide = message.loading(t('common.loading'), 0);
delDept(deptId).then(res => {
hide();
if (res.code === RESULT_CODE_SUCCESS) {

View File

@@ -282,7 +282,7 @@ function fnModalVisibleByEdit(dictCode?: string | number) {
modalState.visibleByEdit = true;
} else {
if (modalState.confirmLoading) return;
const hide = message.loading('正在打开...', 0);
const hide = message.loading(t('common.loading'), 0);
modalState.confirmLoading = true;
getData(dictCode).then(res => {
modalState.confirmLoading = false;
@@ -310,7 +310,7 @@ function fnModalOk() {
const from = toRaw(modalState.from);
const dictData = from.dictCode ? updateData(from) : addData(from);
const key = 'dictData';
message.loading({ content: '请稍等...', key });
message.loading({ content: t('common.loading'), key });
dictData
.then(res => {
if (res.code === RESULT_CODE_SUCCESS) {
@@ -358,11 +358,11 @@ function fnRecordDelete(dictCode: string = '0') {
dictCode = tableState.selectedRowKeys.join(',');
}
Modal.confirm({
title: '提示',
title: t('common.tipTitle'),
content: `确认删除字典数据代码为 【${dictCode}】 的数据项?`,
onOk() {
const key = 'delData';
message.loading({ content: '请稍等...', key });
message.loading({ content: t('common.loading'), key });
delData(dictCode).then(res => {
if (res.code === RESULT_CODE_SUCCESS) {
message.success({
@@ -386,11 +386,11 @@ function fnRecordDelete(dictCode: string = '0') {
/**列表导出 */
function fnExportList() {
Modal.confirm({
title: '提示',
title: t('common.tipTitle'),
content: `确认根据搜索条件导出xlsx表格文件吗?`,
onOk() {
const key = 'exportData';
message.loading({ content: '请稍等...', key });
message.loading({ content: t('common.loading'), key });
exportData(toRaw(queryParams)).then(res => {
if (res.code === RESULT_CODE_SUCCESS) {
message.success({

View File

@@ -231,7 +231,7 @@ function fnModalVisibleByVive(dictId: string | number) {
return;
}
if (modalState.confirmLoading) return;
const hide = message.loading('正在打开...', 0);
const hide = message.loading(t('common.loading'), 0);
modalState.confirmLoading = true;
getType(dictId).then(res => {
modalState.confirmLoading = false;
@@ -257,7 +257,7 @@ function fnModalVisibleByEdit(dictId?: string | number) {
modalState.visibleByEdit = true;
} else {
if (modalState.confirmLoading) return;
const hide = message.loading('正在打开...', 0);
const hide = message.loading(t('common.loading'), 0);
modalState.confirmLoading = true;
getType(dictId).then(res => {
modalState.confirmLoading = false;
@@ -285,7 +285,7 @@ function fnModalOk() {
const from = toRaw(modalState.from);
const dictType = from.dictId ? updateType(from) : addType(from);
const key = 'dictType';
message.loading({ content: '请稍等...', key });
message.loading({ content: t('common.loading'), key });
dictType
.then(res => {
if (res.code === RESULT_CODE_SUCCESS) {
@@ -333,11 +333,11 @@ function fnRecordDelete(dictId: string = '0') {
dictId = tableState.selectedRowKeys.join(',');
}
Modal.confirm({
title: '提示',
title: t('common.tipTitle'),
content: `确认删除参数编号为 【${dictId}】 的数据项?`,
onOk() {
const key = 'delType';
message.loading({ content: '请稍等...', key });
message.loading({ content: t('common.loading'), key });
delType(dictId).then(res => {
if (res.code === RESULT_CODE_SUCCESS) {
message.success({
@@ -361,11 +361,11 @@ function fnRecordDelete(dictId: string = '0') {
/**列表导出 */
function fnExportList() {
Modal.confirm({
title: '提示',
title: t('common.tipTitle'),
content: `确认根据搜索条件导出xlsx表格文件吗?`,
onOk() {
const key = 'exportType';
message.loading({ content: '请稍等...', key });
message.loading({ content: t('common.loading'), key });
exportType(toRaw(queryParams)).then(res => {
if (res.code === RESULT_CODE_SUCCESS) {
message.success({
@@ -391,11 +391,11 @@ function fnExportList() {
*/
function fnRefreshCache() {
Modal.confirm({
title: '提示',
title: t('common.tipTitle'),
content: `确定要刷新字典数据缓存吗?`,
onOk() {
const key = 'refreshCache';
message.loading({ content: '请稍等...', key });
message.loading({ content: t('common.loading'), key });
refreshCache().then(res => {
if (res.code === RESULT_CODE_SUCCESS) {
message.success({

View File

@@ -203,11 +203,11 @@ function fnTableSelectedRows(
function fnRecordDelete() {
const ids = tableState.selectedRowKeys.join(',');
Modal.confirm({
title: '提示',
title: t('common.tipTitle'),
content: `确认删除访问编号为 【${ids}】 的数据项吗?`,
onOk() {
const key = 'delSysLogLogin';
message.loading({ content: '请稍等...', key });
message.loading({ content: t('common.loading'), key });
delSysLogLogin(ids).then(res => {
if (res.code === RESULT_CODE_SUCCESS) {
message.success({
@@ -231,11 +231,11 @@ function fnRecordDelete() {
/**列表清空 */
function fnCleanList() {
Modal.confirm({
title: '提示',
title: t('common.tipTitle'),
content: `确认清空所有登录日志数据项?`,
onOk() {
const key = 'cleanSysLogLogin';
message.loading({ content: '请稍等...', key });
message.loading({ content: t('common.loading'), key });
cleanSysLogLogin().then(res => {
if (res.code === RESULT_CODE_SUCCESS) {
message.success({
@@ -260,10 +260,10 @@ function fnCleanList() {
function fnUnlock() {
const username = tableState.selectedUserName;
Modal.confirm({
title: '提示',
title: t('common.tipTitle'),
content: `确认解锁用户 【${username}】 数据项?`,
onOk() {
const hide = message.loading('请稍等...', 0);
const hide = message.loading(t('common.loading'), 0);
unlock(username).then(res => {
hide();
if (res.code === RESULT_CODE_SUCCESS) {
@@ -285,11 +285,11 @@ function fnUnlock() {
/**列表导出 */
function fnExportList() {
Modal.confirm({
title: '提示',
title: t('common.tipTitle'),
content: `确认根据搜索条件导出xlsx表格文件吗?`,
onOk() {
const key = 'exportSysLogLogin';
message.loading({ content: '请稍等...', key });
message.loading({ content: t('common.loading'), key });
exportSysLogLogin(toRaw(queryParams)).then(res => {
if (res.code === RESULT_CODE_SUCCESS) {
message.success({

View File

@@ -256,11 +256,11 @@ function fnModalCancel() {
function fnRecordDelete() {
const ids = tableState.selectedRowKeys.join(',');
Modal.confirm({
title: '提示',
title: t('common.tipTitle'),
content: `确认删除访问编号为 【${ids}】 的数据项吗?`,
onOk() {
const key = 'delSysLogOperate';
message.loading({ content: '请稍等...', key });
message.loading({ content: t('common.loading'), key });
delSysLogOperate(ids).then(res => {
if (res.code === RESULT_CODE_SUCCESS) {
message.success({
@@ -284,11 +284,11 @@ function fnRecordDelete() {
/**列表清空 */
function fnCleanList() {
Modal.confirm({
title: '提示',
title: t('common.tipTitle'),
content: `确认清空所有登录日志数据项?`,
onOk() {
const key = 'cleanSysLogOperate';
message.loading({ content: '请稍等...', key });
message.loading({ content: t('common.loading'), key });
cleanSysLogOperate().then(res => {
if (res.code === RESULT_CODE_SUCCESS) {
message.success({
@@ -312,11 +312,11 @@ function fnCleanList() {
/**列表导出 */
function fnExportList() {
Modal.confirm({
title: '提示',
title: t('common.tipTitle'),
content: `确认根据搜索条件导出xlsx表格文件吗?`,
onOk() {
const key = 'exportSysLogOperate';
message.loading({ content: '请稍等...', key });
message.loading({ content: t('common.loading'), key });
exportSysLogOperate(toRaw(queryParams)).then(res => {
if (res.code === RESULT_CODE_SUCCESS) {
message.success({

View File

@@ -265,7 +265,7 @@ function fnModalVisibleByVive(menuId: string | number) {
return;
}
if (modalState.confirmLoading) return;
const hide = message.loading('正在打开...', 0);
const hide = message.loading(t('common.loading'), 0);
modalState.confirmLoading = true;
modalState.treeData = treeDataAll;
getMenu(menuId).then(res => {
@@ -302,7 +302,7 @@ function fnModalVisibleByEdit(
modalState.visibleByEdit = true;
} else {
if (modalState.confirmLoading) return;
const hide = message.loading('正在打开...', 0);
const hide = message.loading(t('common.loading'), 0);
modalState.confirmLoading = true;
getMenu(menuId).then(res => {
modalState.confirmLoading = false;
@@ -342,7 +342,7 @@ function fnModalOk() {
const from = toRaw(modalState.from);
const menu = from.menuId ? updateMenu(from) : addMenu(from);
const key = 'menu';
message.loading({ content: '请稍等...', key });
message.loading({ content: t('common.loading'), key });
menu
.then(res => {
if (res.code === RESULT_CODE_SUCCESS) {
@@ -388,11 +388,11 @@ function fnModalCancel() {
*/
function fnRecordDelete(menuId: string | number) {
Modal.confirm({
title: '提示',
title: t('common.tipTitle'),
content: `确认删除菜单编号为 【${menuId}】 的数据项?`,
onOk() {
const key = 'delMenu';
message.loading({ content: '请稍等...', key });
message.loading({ content: t('common.loading'), key });
delMenu(menuId).then(res => {
if (res.code === RESULT_CODE_SUCCESS) {
message.success({

View File

@@ -222,7 +222,7 @@ function fnModalVisibleByVive(postId: string | number) {
return;
}
if (modalState.confirmLoading) return;
const hide = message.loading('正在打开...', 0);
const hide = message.loading(t('common.loading'), 0);
modalState.confirmLoading = true;
getPost(postId).then(res => {
modalState.confirmLoading = false;
@@ -248,7 +248,7 @@ function fnModalVisibleByEdit(postId?: string | number) {
modalState.visibleByEdit = true;
} else {
if (modalState.confirmLoading) return;
const hide = message.loading('正在打开...', 0);
const hide = message.loading(t('common.loading'), 0);
modalState.confirmLoading = true;
getPost(postId).then(res => {
modalState.confirmLoading = false;
@@ -276,7 +276,7 @@ function fnModalOk() {
const from = toRaw(modalState.from);
const post = from.postId ? updatePost(from) : addPost(from);
const key = 'notice';
message.loading({ content: '请稍等...', key });
message.loading({ content: t('common.loading'), key });
post
.then(res => {
if (res.code === RESULT_CODE_SUCCESS) {
@@ -324,11 +324,11 @@ function fnRecordDelete(postId: string = '0') {
postId = tableState.selectedRowKeys.join(',');
}
Modal.confirm({
title: '提示',
title: t('common.tipTitle'),
content: `确认删除岗位编号为 【${postId}】 的数据项?`,
onOk() {
const key = 'delPost';
message.loading({ content: '请稍等...', key });
message.loading({ content: t('common.loading'), key });
delPost(postId).then(res => {
if (res.code === RESULT_CODE_SUCCESS) {
message.success({
@@ -352,11 +352,11 @@ function fnRecordDelete(postId: string = '0') {
/**列表导出 */
function fnExportList() {
Modal.confirm({
title: '提示',
title: t('common.tipTitle'),
content: `确认根据搜索条件导出xlsx表格文件吗?`,
onOk() {
const key = 'exportPost';
message.loading({ content: '请稍等...', key });
message.loading({ content: t('common.loading'), key });
exportPost(toRaw(queryParams)).then(res => {
if (res.code === RESULT_CODE_SUCCESS) {
message.success({

View File

@@ -210,7 +210,7 @@ function fnModalOk(userIds: string[] | number[]) {
return;
}
const key = 'authUserChecked';
message.loading({ content: '请稍等...', key });
message.loading({ content: t('common.loading'), key });
authUserChecked({
checked: true,
userIds: userIds.join(','),
@@ -243,11 +243,11 @@ function fnRecordDelete(userId: string | number) {
userId = tableState.selectedRowKeys.join(',');
}
Modal.confirm({
title: '提示',
title: t('common.tipTitle'),
content: `确认取消用户编号为 【${userId}】 的数据项授权?`,
onOk() {
const key = 'authUserChecked';
message.loading({ content: '请稍等...', key });
message.loading({ content: t('common.loading'), key });
authUserChecked({ checked: false, userIds: userId, roleId: roleId }).then(
res => {
if (res.code === RESULT_CODE_SUCCESS) {

View File

@@ -298,7 +298,7 @@ function fnModalVisibleByVive(roleId: string | number) {
return;
}
if (modalState.confirmLoading) return;
const hide = message.loading('正在打开...', 0);
const hide = message.loading(t('common.loading'), 0);
modalState.confirmLoading = true;
// 查询角色详细同时根据角色ID查询菜单下拉树结构
Promise.all([getRole(roleId), roleMenuTreeSelect(roleId)]).then(resArr => {
@@ -336,7 +336,7 @@ function fnModalVisibleByEdit(roleId?: string | number) {
modalState.visibleByEdit = true;
} else {
if (modalState.confirmLoading) return;
const hide = message.loading('正在打开...', 0);
const hide = message.loading(t('common.loading'), 0);
modalState.confirmLoading = true;
// 查询菜单下拉树结构
menuTreeSelect().then(res => {
@@ -354,7 +354,7 @@ function fnModalVisibleByEdit(roleId?: string | number) {
}
} else {
if (modalState.confirmLoading) return;
const hide = message.loading('正在打开...', 0);
const hide = message.loading(t('common.loading'), 0);
modalState.confirmLoading = true;
// 查询角色详细同时根据角色ID查询菜单下拉树结构
Promise.all([getRole(roleId), roleMenuTreeSelect(roleId)]).then(resArr => {
@@ -392,7 +392,7 @@ function fnModalOk() {
const from = toRaw(modalState.from);
const role = from.roleId ? updateRole(from) : addRole(from);
const key = 'role';
message.loading({ content: '请稍等...', key });
message.loading({ content: t('common.loading'), key });
role
.then(res => {
if (res.code === RESULT_CODE_SUCCESS) {
@@ -499,7 +499,7 @@ function fnModalCheckStrictly(checked: boolean, type: 'menu' | 'dept') {
function fnModalOkDataScope() {
if (modalState.confirmLoading) return;
modalState.confirmLoading = true;
const hide = message.loading('请稍等...', 0);
const hide = message.loading(t('common.loading'), 0);
const fromInfo = toRaw(modalState.from);
if (fromInfo.dataScope !== '2') {
fromInfo.deptIds = [];
@@ -536,7 +536,7 @@ function fnRecordDataScope(roleId: string | number) {
return;
}
if (modalState.confirmLoading) return;
const hide = message.loading('正在打开...', 0);
const hide = message.loading(t('common.loading'), 0);
modalState.confirmLoading = true;
// 查询角色详细同时根据角色ID查询部门树结构
Promise.all([getRole(roleId), roleDeptTreeSelect(roleId)])
@@ -584,10 +584,10 @@ function fnRecordAuthUser(row: Record<string, string>) {
function fnRecordStatus(row: Record<string, string>) {
const text = row.status === '1' ? '启用' : '停用';
Modal.confirm({
title: '提示',
title: t('common.tipTitle'),
content: `确定要${text} ${row.roleName} 角色吗?`,
onOk() {
const hide = message.loading('请稍等...', 0);
const hide = message.loading(t('common.loading'), 0);
changeRoleStatus(row.roleId, row.status).then(res => {
hide();
if (res.code === RESULT_CODE_SUCCESS) {
@@ -619,11 +619,11 @@ function fnRecordDelete(roleId: string = '0') {
roleId = tableState.selectedRowKeys.join(',');
}
Modal.confirm({
title: '提示',
title: t('common.tipTitle'),
content: `确认删除角色编号为 【${roleId}】 的数据项?`,
onOk() {
const key = 'delRole';
message.loading({ content: '请稍等...', key });
message.loading({ content: t('common.loading'), key });
delRole(roleId).then(res => {
if (res.code === RESULT_CODE_SUCCESS) {
message.success({
@@ -647,11 +647,11 @@ function fnRecordDelete(roleId: string = '0') {
/**列表导出 */
function fnExportList() {
Modal.confirm({
title: '提示',
title: t('common.tipTitle'),
content: `确认根据搜索条件导出xlsx表格文件吗?`,
onOk() {
const key = 'exportRole';
message.loading({ content: '请稍等...', key });
message.loading({ content: t('common.loading'), key });
exportRole(toRaw(queryParams)).then(res => {
if (res.code === RESULT_CODE_SUCCESS) {
message.success({

View File

@@ -34,11 +34,11 @@ function fnEdit(v: boolean) {
/**提交保存 */
function fnSave() {
Modal.confirm({
title: '提示',
title: t('common.tipTitle'),
content: `确认要提交当前变更的版权声明吗?`,
onOk() {
// 发送请求
const hide = message.loading('请稍等...', 0);
const hide = message.loading(t('common.loading'), 0);
state.loading = true;
changeValue({ key: 'sys.copyright', value: state.copyright }).then(
res => {

View File

@@ -48,11 +48,11 @@ function fnBeforeUpload(file: FileType) {
/**上传变更 */
function fnUpload(up: UploadRequestOption) {
Modal.confirm({
title: '提示',
title: t('common.tipTitle'),
content: `确认要上传登录界面背景文件吗?`,
onOk() {
// 发送请求
const hide = message.loading('请稍等...', 0);
const hide = message.loading(t('common.loading'), 0);
state.loading = true;
let formData = new FormData();
formData.append('file', up.file);
@@ -88,11 +88,11 @@ function fnEdit(v: boolean) {
/**提交保存 */
function fnSave() {
Modal.confirm({
title: '提示',
title: t('common.tipTitle'),
content: `确认要提交当前变更的登录界面背景吗?`,
onOk() {
// 发送请求
const hide = message.loading('请稍等...', 0);
const hide = message.loading(t('common.loading'), 0);
state.loading = true;
changeValue({ key: 'sys.loginBackground', value: state.filePath }).then(
res => {
@@ -114,11 +114,11 @@ function fnSave() {
/**还原初始背景 */
function fnRevert() {
Modal.confirm({
title: '提示',
title: t('common.tipTitle'),
content: `确认要将背景图还原到系统初始默认的背景吗?`,
onOk() {
// 发送请求
const hide = message.loading('请稍等...', 0);
const hide = message.loading(t('common.loading'), 0);
state.loading = true;
state.filePath = '#';
changeValue({ key: 'sys.loginBackground', value: state.filePath }).then(

View File

@@ -50,11 +50,11 @@ function fnBeforeUpload(file: FileType) {
/**上传变更 */
function fnUpload(up: UploadRequestOption) {
Modal.confirm({
title: '提示',
title: t('common.tipTitle'),
content: `确认要上传LOGO文件吗?`,
onOk() {
// 发送请求
const hide = message.loading('请稍等...', 0);
const hide = message.loading(t('common.loading'), 0);
state.loading = true;
let formData = new FormData();
formData.append('file', up.file);
@@ -100,7 +100,7 @@ function fnEdit(v: boolean) {
/**提交保存 */
function fnSave() {
Modal.confirm({
title: '提示',
title: t('common.tipTitle'),
content: `确认要提交当前变更的LOGO文件吗?`,
onOk() {
const reqArr = [];
@@ -120,7 +120,7 @@ function fnSave() {
}
// 发送请求
const hide = message.loading('请稍等...', 0);
const hide = message.loading(t('common.loading'), 0);
state.loading = true;
Promise.all(reqArr).then(resArr => {
state.loading = false;

View File

@@ -34,11 +34,11 @@ function fnEdit(v: boolean) {
/**提交保存 */
function fnSave() {
Modal.confirm({
title: '提示',
title: t('common.tipTitle'),
content: `确认要提交当前变更的系统名称吗?`,
onOk() {
// 发送请求
const hide = message.loading('请稍等...', 0);
const hide = message.loading(t('common.loading'), 0);
state.loading = true;
changeValue({ key: 'sys.title', value: state.title }).then(res => {
state.loading = false;

View File

@@ -20,6 +20,7 @@ import {
} from '@/api/system/user';
import { deptTreeSelect } from '@/api/system/dept';
import { saveAs } from 'file-saver';
import useI18n from '@/hooks/useI18n';
import { parseDateToStr } from '@/utils/date-utils';
import {
regExpPasswd,
@@ -34,6 +35,7 @@ import { DataNode } from 'ant-design-vue/lib/tree';
import { RESULT_CODE_SUCCESS } from '@/constants/result-constants';
const { getDict } = useDictStore();
const userStore = useUserStore();
const { t } = useI18n();
/**字典数据 */
let dict: {
@@ -116,39 +118,39 @@ let tableState: TabeStateType = reactive({
/**表格字段列 */
let tableColumns: ColumnsType = [
{
title: '用户编号',
title: t('views.system.user.userNum'),
dataIndex: 'userId',
align: 'center',
},
{
title: '登录账号',
title: t('views.system.user.account'),
dataIndex: 'userName',
align: 'center',
},
{
title: '用户昵称',
title: t('views.system.user.userName'),
dataIndex: 'nickName',
align: 'center',
},
{
title: '用户权限',
title: t('views.system.user.permission'),
key: 'roles',
align: 'center',
},
{
title: '部门名称',
title: t('views.system.user.className'),
dataIndex: 'deptId',
key: 'deptId',
align: 'center',
},
{
title: '登录地址',
title: t('views.system.user.loginIp'),
dataIndex: 'loginIp',
key: 'loginIp',
align: 'center',
},
{
title: '登录时间',
title: t('views.system.user.loginTime'),
dataIndex: 'loginDate',
align: 'center',
customRender(opt) {
@@ -157,13 +159,13 @@ let tableColumns: ColumnsType = [
},
},
{
title: '用户状态',
title: t('views.system.user.status'),
dataIndex: 'status',
key: 'status',
align: 'center',
},
{
title: '操作',
title: t('common.operate'),
key: 'userId',
align: 'center',
},
@@ -187,7 +189,8 @@ let tablePagination = reactive({
showSizeChanger: true,
/**数据总数 */
total: 0,
showTotal: (total: number) => `总共 ${total}`,
showTotal: (total: number) =>
t('common.tablePaginationTotal', { total: total }),
onChange: (page: number, pageSize: number) => {
tablePagination.current = page;
tablePagination.pageSize = pageSize;
@@ -275,35 +278,35 @@ const modalStateFrom = Form.useForm(
{
required: true,
pattern: regExpUserName,
message: '账号不能以数字开头可包含大写小写字母数字且不少于5位',
message: t('views.system.user.userNameTip'),
},
],
password: [
{
required: true,
pattern: regExpPasswd,
message: '密码至少包含大小写字母、数字、特殊符号且不少于6位',
message: t('views.system.user.userNameTip'),
},
],
nickName: [
{
required: true,
pattern: regExpNick,
message: '昵称只能包含字母、数字、中文和下划线且不少于2位',
message: t('views.system.user.nickNameTip'),
},
],
email: [
{
required: false,
pattern: regExpEmail,
message: '请输入正确的邮箱地址',
message: t('views.system.user.emailTip'),
},
],
phonenumber: [
{
required: false,
pattern: regExpMobile,
message: '请输入正确的手机号码',
message: t('views.system.user.phoneTip'),
},
],
})
@@ -319,7 +322,7 @@ function fnModalVisibleByVive(userId: string | number) {
return;
}
if (modalState.confirmLoading) return;
const hide = message.loading('正在打开...', 0);
const hide = message.loading(t('common.loading'), 0);
modalState.confirmLoading = true;
getUser(userId).then(res => {
modalState.confirmLoading = false;
@@ -343,7 +346,7 @@ function fnModalVisibleByVive(userId: string | number) {
modalState.from.postIds = postIds;
// 头像解析
modalState.from.avatar = userStore.fnAvatar(modalState.from.avatar);
modalState.title = '用户信息';
modalState.title = t('views.system.user.userInfo');
modalState.visibleByView = true;
} else {
message.error('获取用户信息失败', 2);
@@ -359,7 +362,7 @@ function fnModalVisibleByEdit(userId?: string | number) {
if (!userId) {
modalStateFrom.resetFields();
if (modalState.confirmLoading) return;
const hide = message.loading('正在打开...', 0);
const hide = message.loading(t('common.loading'), 0);
modalState.confirmLoading = true;
// 查询用户详细获取岗位和角色列表
getUser().then(res => {
@@ -382,7 +385,8 @@ function fnModalVisibleByEdit(userId?: string | number) {
modalState.from = Object.assign(modalState.from, user);
modalState.from.roleIds = roleIds;
modalState.from.postIds = postIds;
modalState.title = '添加用户信息';
modalState.title =
t('common.addText') + t('views.system.user.userInfo');
modalState.visibleByEdit = true;
} else {
message.error('获取用户信息失败', 2);
@@ -390,7 +394,7 @@ function fnModalVisibleByEdit(userId?: string | number) {
});
} else {
if (modalState.confirmLoading) return;
const hide = message.loading('正在打开...', 0);
const hide = message.loading(t('common.loading'), 0);
modalState.confirmLoading = true;
getUser(userId).then(res => {
modalState.confirmLoading = false;
@@ -412,7 +416,8 @@ function fnModalVisibleByEdit(userId?: string | number) {
modalState.from = Object.assign(modalState.from, user);
modalState.from.roleIds = roleIds;
modalState.from.postIds = postIds;
modalState.title = '修改用户信息';
modalState.title =
t('common.editText') + t('views.system.user.userInfo');
modalState.visibleByEdit = true;
} else {
message.error(`获取用户信息失败`, 2);
@@ -430,6 +435,7 @@ function fnModalOk() {
if (!modalState.from.userId) {
validateName.push('userName', 'password');
}
console.log(validateName);
modalStateFrom
.validate(validateName)
.then(() => {
@@ -437,12 +443,12 @@ function fnModalOk() {
const from = toRaw(modalState.from);
const user = from.userId ? updateUser(from) : addUser(from);
const key = 'user';
message.loading({ content: '请稍等...', key });
message.loading({ content: t('common.loading'), key });
user
.then(res => {
if (res.code === RESULT_CODE_SUCCESS) {
message.success({
content: `${modalState.title}成功`,
content: t('common.msgSuccess', { msg: modalState.title }),
key,
duration: 2,
});
@@ -462,7 +468,7 @@ function fnModalOk() {
});
})
.catch(e => {
message.error(`请正确填写 ${e.errorFields.length} 处必填信息!`, 2);
message.error(t('common.errorFields', { num: e.errorFields.length }), 3);
});
}
@@ -489,12 +495,12 @@ function fnModalOkResetPwd() {
.then(() => {
modalState.confirmLoading = true;
const key = 'user';
message.loading({ content: '请稍等...', key });
message.loading({ content: t('common.loading'), key });
resetUserPwd(modalState.from.userId, modalState.from.password)
.then(res => {
if (res.code === RESULT_CODE_SUCCESS) {
message.success({
content: `${modalState.title}成功`,
content: t('common.msgSuccess', { msg: modalState.title }),
key,
duration: 2,
});
@@ -513,7 +519,7 @@ function fnModalOkResetPwd() {
});
})
.catch(e => {
message.error(`请正确填写 ${e.errorFields.length} 处必填信息!`, 2);
message.error(t('common.errorFields', { num: e.errorFields.length }), 3);
});
}
@@ -525,7 +531,7 @@ function fnRecordResetPwd(row: Record<string, string>) {
modalStateFrom.resetFields();
modalState.from.userId = row.userId;
modalState.from.userName = row.userName;
modalState.title = '重置密码';
modalState.title = t('views.system.user.resetPwd');
modalState.visibleByResetPwd = true;
}
@@ -534,17 +540,23 @@ function fnRecordResetPwd(row: Record<string, string>) {
* @param row 用户记录对象
*/
function fnRecordStatus(row: Record<string, string>) {
const text = row.status === '1' ? '启用' : '停用';
const text =
row.status === '1'
? t('views.system.user.start')
: t('views.system.user.stop');
Modal.confirm({
title: '提示',
content: `确定要${text} ${row.userName} 用户吗?`,
title: t('common.tipTitle'),
content: t('views.system.user.sureTip', {
text: text,
userName: row.userName,
}),
onOk() {
const key = 'changeUserStatus';
message.loading({ content: '请稍等...', key });
message.loading({ content: t('common.loading'), key });
changeUserStatus(row.userId, row.status).then(res => {
if (res.code === RESULT_CODE_SUCCESS) {
message.success({
content: `${row.userName} ${text}成功`,
content: `${row.userName} ${t('common.msgSuccess', { msg: text })}`,
key: key,
duration: 2,
});
@@ -573,15 +585,15 @@ function fnRecordDelete(userId: string = '0') {
userId = tableState.selectedRowKeys.join(',');
}
Modal.confirm({
title: '提示',
content: `确认删除用户编号为 【${userId}】 的数据项?`,
title: t('common.tipTitle'),
content: t('views.system.user.delSure', { userId: userId }),
onOk() {
const key = 'delUser';
message.loading({ content: '请稍等...', key });
message.loading({ content: t('common.loading'), key });
delUser(userId).then(res => {
if (res.code === RESULT_CODE_SUCCESS) {
message.success({
content: `删除成功`,
content: t('views.system.user.delSuss'),
key,
duration: 2,
});
@@ -601,15 +613,17 @@ function fnRecordDelete(userId: string = '0') {
/**列表导出 */
function fnExportList() {
Modal.confirm({
title: '提示',
content: `确认根据搜索条件导出xlsx表格文件吗?`,
title: t('common.tipTitle'),
content: t('views.system.user.exportSure'),
onOk() {
const key = 'exportUser';
message.loading({ content: '请稍等...', key });
message.loading({ content: t('common.loading'), key });
exportUser(toRaw(queryParams)).then(res => {
if (res.code === RESULT_CODE_SUCCESS) {
message.success({
content: `已完成导出`,
content: t('common.msgSuccess', {
msg: t('views.system.user.export'),
}),
key,
duration: 2,
});
@@ -666,7 +680,7 @@ function fnModalUploadImportClose() {
/**对话框表格信息导入上传 */
function fnModalUploadImportUpload(file: File) {
const hide = message.loading('正在上传并解析数据...', 0);
const hide = message.loading(t('common.loading'), 0);
uploadImportState.loading = true;
let formData = new FormData();
formData.append('file', file);
@@ -676,7 +690,7 @@ function fnModalUploadImportUpload(file: File) {
uploadImportState.msg = res.msg?.replaceAll(/<br\/>+/g, '\r');
})
.catch((err: { code: number; msg: string }) => {
message.error(`上传失败 ${err.msg}`);
message.error(` ${err.msg}`);
})
.finally(() => {
hide();
@@ -688,7 +702,7 @@ function fnModalUploadImportUpload(file: File) {
function fnModalUploadImportExportTemplate() {
if (uploadImportState.templateDownload) return;
uploadImportState.templateDownload = true;
const hide = message.loading('正在下载...', 0);
const hide = message.loading(t('common.loading'), 0);
importTemplate()
.then(res => {
if (res.code === RESULT_CODE_SUCCESS) {
@@ -714,7 +728,7 @@ function fnModalUploadImportExportTemplate() {
function fnGetList(pageNum?: number) {
if (tableState.loading) return;
tableState.loading = true;
if(pageNum){
if (pageNum) {
queryParams.pageNum = pageNum;
}
if (!queryRangePicker.value) {
@@ -779,10 +793,12 @@ onMounted(() => {
<a-form :model="queryParams" name="queryParams" layout="horizontal">
<a-row :gutter="16">
<a-col :lg="18" :md="12" :xs="24">
<a-form-item label="部门名称" name="deptId">
<a-form-item
:label="t('views.system.user.className')"
name="deptId"
>
<a-tree-select
v-model:value="queryParams.deptId"
placeholder="部门名称"
show-search
tree-default-expand-all
:tree-data="deptTreeData"
@@ -804,11 +820,11 @@ onMounted(() => {
<a-space :size="8">
<a-button type="primary" @click.prevent="fnGetList(1)">
<template #icon><SearchOutlined /></template>
搜索
{{ t('common.search') }}
</a-button>
<a-button type="default" @click.prevent="fnQueryReset">
<template #icon><ClearOutlined /></template>
重置
{{ t('common.reset') }}
</a-button>
</a-space>
</a-form-item>
@@ -816,44 +832,49 @@ onMounted(() => {
</a-row>
<a-row :gutter="16">
<a-col :lg="6" :md="12" :xs="24">
<a-form-item label="登录账号" name="userName">
<a-form-item
:label="t('views.system.user.account')"
name="userName"
>
<a-input
v-model:value="queryParams.userName"
allow-clear
:maxlength="30"
placeholder="请输入登录账号"
></a-input>
</a-form-item>
</a-col>
<a-col :lg="6" :md="12" :xs="24">
<a-form-item label="手机号码" name="phonenumber">
<a-form-item
:label="t('views.system.user.phone')"
name="phonenumber"
>
<a-input
v-model:value="queryParams.phonenumber"
allow-clear
:maxlength="11"
placeholder="请输入手机号码"
></a-input>
</a-form-item>
</a-col>
<a-col :lg="4" :md="12" :xs="24">
<a-form-item label="用户状态" name="status">
<a-form-item :label="t('views.system.user.status')" name="status">
<a-select
v-model:value="queryParams.status"
allow-clear
placeholder="请选择"
:options="dict.sysNormalDisable"
>
</a-select>
</a-form-item>
</a-col>
<a-col :lg="8" :md="12" :xs="24">
<a-form-item label="登录时间" name="queryRangePicker">
<a-form-item
:label="t('views.system.user.loginTime')"
name="queryRangePicker"
>
<a-range-picker
v-model:value="queryRangePicker"
allow-clear
bordered
value-format="YYYY-MM-DD"
:placeholder="['登录开始', '登录结束']"
style="width: 100%"
></a-range-picker>
</a-form-item>
@@ -872,7 +893,7 @@ onMounted(() => {
v-perms:has="['system:user:add']"
>
<template #icon><PlusOutlined /></template>
新建
{{ t('common.addText') }}
</a-button>
<a-button
type="default"
@@ -882,7 +903,7 @@ onMounted(() => {
v-perms:has="['system:user:remove']"
>
<template #icon><DeleteOutlined /></template>
删除
{{ t('common.deleteText') }}
</a-button>
<a-button
type="dashed"
@@ -890,7 +911,7 @@ onMounted(() => {
v-perms:has="['system:user:import']"
>
<template #icon><ImportOutlined /></template>
导入
{{ t('views.system.user.export') }}
</a-button>
<a-button
type="dashed"
@@ -898,7 +919,7 @@ onMounted(() => {
v-perms:has="['system:user:export']"
>
<template #icon><ExportOutlined /></template>
导出
{{ t('views.system.user.import') }}
</a-button>
</a-space>
</template>
@@ -907,15 +928,15 @@ 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>
<!-- <a-tooltip>
<template #title>表格斑马纹</template>
<a-switch
v-model:checked="tableState.striped"
@@ -923,15 +944,15 @@ onMounted(() => {
un-checked-children=""
size="small"
/>
</a-tooltip>
</a-tooltip> -->
<a-tooltip>
<template #title>刷新</template>
<template #title>{{ t('common.reloadText') }}</template>
<a-button type="text" @click.prevent="fnGetList(1)">
<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>
@@ -941,9 +962,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>
@@ -1000,7 +1027,7 @@ onMounted(() => {
<template v-if="column.key === 'userId'">
<a-space :size="8" align="center" v-if="record.userId !== '1'">
<a-tooltip>
<template #title>查看详情</template>
<template #title>{{ t('common.viewText') }}</template>
<a-button
type="link"
@click.prevent="fnModalVisibleByVive(record.userId)"
@@ -1010,7 +1037,7 @@ onMounted(() => {
</a-button>
</a-tooltip>
<a-tooltip>
<template #title>编辑</template>
<template #title>{{ t('common.editText') }}</template>
<a-button
type="link"
@click.prevent="fnModalVisibleByEdit(record.userId)"
@@ -1020,7 +1047,7 @@ onMounted(() => {
</a-button>
</a-tooltip>
<a-tooltip>
<template #title>删除</template>
<template #title>{{ t('common.deleteText') }}</template>
<a-button
type="link"
@click.prevent="fnRecordDelete(record.userId)"
@@ -1030,7 +1057,9 @@ onMounted(() => {
</a-button>
</a-tooltip>
<a-tooltip>
<template #title>重置密码</template>
<template #title>{{
t('views.system.user.resetPwd')
}}</template>
<a-button
type="link"
@click.prevent="fnRecordResetPwd(record)"
@@ -1055,12 +1084,15 @@ onMounted(() => {
<a-form layout="horizontal">
<a-row :gutter="16">
<a-col :lg="12" :md="12" :xs="24">
<a-form-item label="用户编号" name="userId">
<a-form-item :label="t('views.system.user.userNum')" name="userId">
{{ modalState.from.userId }}
</a-form-item>
</a-col>
<a-col :lg="12" :md="12" :xs="24">
<a-form-item label="创建时间" name="createTime">
<a-form-item
:label="t('views.system.user.createTime')"
name="createTime"
>
<span v-if="+modalState.from.createTime > 0">
{{ parseDateToStr(+modalState.from.createTime) }}
</span>
@@ -1069,12 +1101,15 @@ onMounted(() => {
</a-row>
<a-row :gutter="16">
<a-col :lg="12" :md="12" :xs="24">
<a-form-item label="登录地址" name="loginIp">
<a-form-item :label="t('views.system.user.loginIp')" name="loginIp">
{{ modalState.from.loginIp }}
</a-form-item>
</a-col>
<a-col :lg="12" :md="12" :xs="24">
<a-form-item label="登录时间" name="loginDate">
<a-form-item
:label="t('views.system.user.loginTime')"
name="loginDate"
>
<span v-if="+modalState.from.loginDate > 0">
{{ parseDateToStr(+modalState.from.loginDate) }}
</span>
@@ -1083,7 +1118,7 @@ onMounted(() => {
</a-row>
<a-row :gutter="16">
<a-col :lg="12" :md="12" :xs="24">
<a-form-item label="用户头像" name="avatar">
<a-form-item :label="t('views.system.user.userTop')" name="avatar">
<a-avatar
shape="circle"
size="default"
@@ -1093,19 +1128,25 @@ onMounted(() => {
</a-form-item>
</a-col>
<a-col :lg="12" :md="12" :xs="24">
<a-form-item label="登录账号" name="userName">
<a-form-item
:label="t('views.system.user.account')"
name="userName"
>
{{ modalState.from.userName }}
</a-form-item>
</a-col>
</a-row>
<a-row :gutter="16">
<a-col :lg="12" :md="12" :xs="24">
<a-form-item label="用户昵称" name="nickName">
<a-form-item
:label="t('views.system.user.userName')"
name="nickName"
>
{{ modalState.from.nickName }}
</a-form-item>
</a-col>
<a-col :lg="6" :md="6" :xs="24">
<a-form-item label="用户性别" name="sex">
<a-form-item :label="t('views.system.user.sex')" name="sex">
<DictTag
:options="dict.sysUserSex"
:value="modalState.from.sex"
@@ -1113,7 +1154,7 @@ onMounted(() => {
</a-form-item>
</a-col>
<a-col :lg="6" :md="6" :xs="24">
<a-form-item label="用户状态" name="status">
<a-form-item :label="t('views.system.user.status')" name="status">
<DictTag
:options="dict.sysNormalDisable"
:value="modalState.from.status"
@@ -1124,21 +1165,23 @@ onMounted(() => {
<a-row :gutter="16">
<a-col :lg="12" :md="12" :xs="24">
<a-form-item label="手机号码" name="phonenumber">
<a-form-item
:label="t('views.system.user.phone')"
name="phonenumber"
>
{{ modalState.from.phonenumber }}
</a-form-item>
</a-col>
<a-col :lg="12" :md="12" :xs="24">
<a-form-item label="电子邮箱" name="email">
<a-form-item :label="t('views.system.user.email')" name="email">
{{ modalState.from.email }}
</a-form-item>
</a-col>
</a-row>
<a-form-item label="归属部门" name="deptId">
<a-form-item :label="t('views.system.user.fromClass')" name="deptId">
<a-tree-select
:value="modalState.from.deptId"
placeholder="归属部门"
disabled
:tree-data="deptTreeData"
:field-names="{
@@ -1156,7 +1199,10 @@ onMounted(() => {
<a-row :gutter="16">
<a-col :lg="12" :md="12" :xs="24">
<a-form-item label="用户岗位" name="postIds">
<a-form-item
:label="t('views.system.user.userWork')"
name="postIds"
>
<a-select
:value="modalState.from.postIds"
disabled
@@ -1170,12 +1216,14 @@ onMounted(() => {
</a-form-item>
</a-col>
<a-col :lg="12" :md="12" :xs="24">
<a-form-item label="用户权限" name="roleIds">
<a-form-item
:label="t('views.system.user.permission')"
name="roleIds"
>
<a-select
:value="modalState.from.roleIds"
disabled
mode="multiple"
placeholder="请选择用户权限"
option-label-prop="roleName"
:options="modalState.options.roles"
:field-names="{ label: 'roleName', value: 'roleId' }"
@@ -1185,12 +1233,14 @@ onMounted(() => {
</a-col>
</a-row>
<a-form-item label="用户说明" name="remark">
<a-form-item :label="t('views.system.user.userTip')" name="remark">
{{ modalState.from.remark }}
</a-form-item>
</a-form>
<template #footer>
<a-button key="cancel" @click="fnModalCancel">关闭</a-button>
<a-button key="cancel" @click="fnModalCancel">{{
t('common.close')
}}</a-button>
</template>
</a-modal>
@@ -1209,7 +1259,7 @@ onMounted(() => {
<a-row :gutter="16" v-if="!modalState.from.userId">
<a-col :lg="12" :md="12" :xs="24">
<a-form-item
label="登录账号"
:label="t('views.system.user.account')"
name="userName"
v-bind="modalStateFrom.validateInfos.userName"
>
@@ -1217,7 +1267,6 @@ onMounted(() => {
v-model:value="modalState.from.userName"
allow-clear
:maxlength="30"
placeholder="请输入登录账号"
>
<template #prefix>
<UserOutlined />
@@ -1227,13 +1276,12 @@ onMounted(() => {
</a-col>
<a-col :lg="12" :md="12" :xs="24">
<a-form-item
label="登录密码"
:label="t('views.system.user.loginPwd')"
name="password"
v-bind="modalStateFrom.validateInfos.password"
>
<a-input-password
v-model:value="modalState.from.password"
placeholder="登录密码"
:maxlength="26"
>
<template #prefix>
@@ -1247,7 +1295,7 @@ onMounted(() => {
<a-row :gutter="16">
<a-col :lg="12" :md="12" :xs="24">
<a-form-item
label="用户昵称"
:label="t('views.system.user.userName')"
name="nickName"
v-bind="modalStateFrom.validateInfos.nickName"
>
@@ -1255,27 +1303,24 @@ onMounted(() => {
v-model:value="modalState.from.nickName"
allow-clear
:maxlength="30"
placeholder="请输入用户昵称"
></a-input>
</a-form-item>
</a-col>
<a-col :lg="6" :md="6" :xs="24">
<a-form-item label="用户性别" name="sex">
<a-form-item :label="t('views.system.user.sex')" name="sex">
<a-select
v-model:value="modalState.from.sex"
default-value="1"
placeholder="用户性别"
:options="dict.sysUserSex"
>
</a-select>
</a-form-item>
</a-col>
<a-col :lg="6" :md="6" :xs="24">
<a-form-item label="用户状态" name="status">
<a-form-item :label="t('views.system.user.status')" name="status">
<a-select
v-model:value="modalState.from.status"
default-value="0"
placeholder="用户状态"
:options="dict.sysNormalDisable"
>
</a-select>
@@ -1286,7 +1331,7 @@ onMounted(() => {
<a-row :gutter="16">
<a-col :lg="12" :md="12" :xs="24">
<a-form-item
label="手机号码"
:label="t('views.system.user.phone')"
name="phonenumber"
v-bind="modalStateFrom.validateInfos.phonenumber"
>
@@ -1294,13 +1339,12 @@ onMounted(() => {
v-model:value="modalState.from.phonenumber"
allow-clear
:maxlength="11"
placeholder="请输入手机号码"
></a-input>
</a-form-item>
</a-col>
<a-col :lg="12" :md="12" :xs="24">
<a-form-item
label="电子邮箱"
:label="t('views.system.user.email')"
name="email"
v-bind="modalStateFrom.validateInfos.email"
>
@@ -1308,16 +1352,14 @@ onMounted(() => {
v-model:value="modalState.from.email"
allow-clear
:maxlength="40"
placeholder="请输入电子邮箱"
></a-input>
</a-form-item>
</a-col>
</a-row>
<a-form-item label="归属部门" name="deptId">
<a-form-item :label="t('views.system.user.fromClass')" name="deptId">
<a-tree-select
v-model:value="modalState.from.deptId"
placeholder="归属部门"
show-search
tree-default-expand-all
:tree-data="deptTreeData"
@@ -1336,12 +1378,11 @@ onMounted(() => {
<a-row :gutter="16">
<a-col :lg="12" :md="12" :xs="24">
<a-form-item label="用户岗位" name="postIds">
<a-form-item :label="t('views.system.user.userWork')" name="postIds">
<a-select
v-model:value="modalState.from.postIds"
allow-clear
mode="multiple"
placeholder="请选择用户岗位"
show-search
option-filter-prop="postName"
option-label-prop="postName"
@@ -1352,12 +1393,11 @@ onMounted(() => {
</a-form-item>
</a-col>
<a-col :lg="12" :md="12" :xs="24">
<a-form-item label="用户权限" name="roleIds">
<a-form-item :label="t('views.system.user.permission')" name="roleIds">
<a-select
v-model:value="modalState.from.roleIds"
:allow-clear="false"
mode="multiple"
placeholder="请选择用户权限"
show-search
option-filter-prop="roleName"
option-label-prop="roleName"
@@ -1369,13 +1409,12 @@ onMounted(() => {
</a-col>
</a-row>
<a-form-item label="用户说明" name="remark">
<a-form-item :label="t('views.system.user.userTip')" name="remark">
<a-textarea
v-model:value="modalState.from.remark"
:auto-size="{ minRows: 4, maxRows: 6 }"
:maxlength="450"
:show-count="true"
placeholder="请输入用户说明"
/>
</a-form-item>
</a-form>
@@ -1394,7 +1433,7 @@ onMounted(() => {
>
<a-form name="modalStateFromByResetPwd" layout="horizontal">
<a-form-item
label="登录账号"
:label="t('views.system.user.account')"
name="userName"
v-bind="modalStateFrom.validateInfos.userName"
>
@@ -1402,7 +1441,6 @@ onMounted(() => {
:value="modalState.from.userName"
disabled
:maxlength="30"
placeholder="登录账号"
>
<template #prefix>
<UserOutlined />
@@ -1410,13 +1448,12 @@ onMounted(() => {
</a-input>
</a-form-item>
<a-form-item
label="登录密码"
:label="t('views.system.user.loginPwd')"
name="password"
v-bind="modalStateFrom.validateInfos.password"
>
<a-input-password
v-model:value="modalState.from.password"
placeholder="登录密码"
:maxlength="26"
>
<template #prefix>
@@ -1441,16 +1478,16 @@ onMounted(() => {
<a-row :gutter="18" justify="space-between" align="middle">
<a-col :span="12">
<a-checkbox v-model:checked="uploadImportState.updateSupport">
是否更新已经存在的数据
{{t('views.system.user.updateSure')}}
</a-checkbox>
</a-col>
<a-col :span="6">
<a-button
type="link"
title="下载模板"
:title="t('views.system.user.downloadObj')"
@click.prevent="fnModalUploadImportExportTemplate"
>
下载模板
{{t('views.system.user.downloadObj')}}
</a-button>
</a-col>
</a-row>

View File

@@ -39,7 +39,7 @@ let state = reactive<{
/**下载文件 */
function fnDownload() {
const key = 'downloadFile';
message.loading({ content: '请稍等...', key });
message.loading({ content: t('common.loading'), key });
const filePath = state.downloadFilePath;
if (!filePath) return;
downloadFile(filePath).then(res => {
@@ -64,7 +64,7 @@ function fnDownload() {
/**下载切片文件 */
function fnDownloadChunk() {
const key = 'downloadFileChunk';
message.loading({ content: '请稍等...', key });
message.loading({ content: t('common.loading'), key });
const filePath = state.downloadFilePath;
downloadFileChunk(filePath, 5).then(blob => {
console.log(blob);
@@ -103,11 +103,11 @@ function fnBeforeUpload(file: FileType) {
/**上传文件 */
function fnUpload(up: UploadRequestOption) {
Modal.confirm({
title: '提示',
title: t('common.tipTitle'),
content: `确认要上传文件吗?`,
onOk() {
// 发送请求
const hide = message.loading('请稍等...', 0);
const hide = message.loading(t('common.loading'), 0);
state.loading = true;
let formData = new FormData();
formData.append('file', up.file);
@@ -132,11 +132,11 @@ function fnUploadChunk(up: UploadRequestOption) {
const fileData = up.file as File;
const item = state.fileList.find(f => f.name === fileData.name);
Modal.confirm({
title: '提示',
title: t('common.tipTitle'),
content: `确认要上传文件吗?`,
onOk() {
// 发送请求
const hide = message.loading('请稍等...', 0);
const hide = message.loading(t('common.loading'), 0);
uploadFileChunk(fileData, 4, 'default').then(res => {
hide();
if (res.code === 200) {