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

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', search: 'Search',
reset: 'Reset', reset: 'Reset',
viewText: 'View', viewText: 'View',
view: 'View',
addText: 'Add', addText: 'Add',
editText: 'Edit', editText: 'Edit',
deleteText: 'Delete', deleteText: 'Delete',
downloadText: 'Download', downloadText: 'Download',
uploadText: 'Upload', uploadText: 'Upload',
unableNull:' Cannot be empty',
moreText: 'More', moreText: 'More',
searchBarText: 'Search bar', searchBarText: 'Search bar',
reloadText: 'Refresh', reloadText: 'Refresh',
@@ -82,6 +84,8 @@ export default {
// 页面 // 页面
views: { views: {
index: { index: {
normal:'Normal',
abnormal:'Abnormal',
hostName: 'hostName', hostName: 'hostName',
osInfo: 'osInfo', osInfo: 'osInfo',
dbInfo: 'dbInfo', dbInfo: 'dbInfo',
@@ -114,12 +118,37 @@ export default {
}, },
configManage: { configManage: {
neManage: { 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', restart: 'Restart',
totalSure:'Confirm the network element with {operator} network element name {msg}',
stop: 'Stop', stop: 'Stop',
start: 'Start', start: 'Start',
export: 'Export', export: 'Export',
import: 'Import', import: 'Import',
fileForm:'File Source',
selectPlease:'Please select the source of the import file', selectPlease:'Please select the source of the import file',
server:'Server File', server:'Server File',
local:'Local File', local:'Local File',
@@ -179,6 +208,7 @@ export default {
}, },
neUser: { neUser: {
auth: { auth: {
authInfo:'Authentication Info',
neTypePlease: 'Query network element type', neTypePlease: 'Query network element type',
neType: 'UDM Type', neType: 'UDM Type',
export: 'Export', export: 'Export',
@@ -415,5 +445,43 @@ export default {
down: '下行', 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: '核心网管理平台', desc: '核心网管理平台',
loading: '请稍等...', loading: '请稍等...',
tipTitle: '提示', tipTitle: '提示',
msgSuccess: '成功 {msg}', msgSuccess: '{msg}成功 ',
errorFields: '请正确填写 {num} 处必填信息!', errorFields: '请正确填写 {num} 处必填信息!',
tablePaginationTotal: '总共 {total} 条', tablePaginationTotal: '总共 {total} 条',
ok: '确定', ok: '确定',
@@ -18,11 +18,13 @@ export default {
search: '搜索', search: '搜索',
reset: '重置', reset: '重置',
viewText: '查看详情', viewText: '查看详情',
view: '查看',
addText: '新增', addText: '新增',
editText: '编辑', editText: '编辑',
deleteText: '删除', deleteText: '删除',
downloadText: '下载', downloadText: '下载',
uploadText: '上传', uploadText: '上传',
unableNull:'不能为空',
moreText: '更多', moreText: '更多',
searchBarText: '搜索栏', searchBarText: '搜索栏',
reloadText: '刷新', reloadText: '刷新',
@@ -82,6 +84,8 @@ export default {
// 页面 // 页面
views: { views: {
index: { index: {
normal:'正常',
abnormal:'异常',
hostName: '主机名', hostName: '主机名',
osInfo: '操作系统信息', osInfo: '操作系统信息',
dbInfo: '数据库信息', dbInfo: '数据库信息',
@@ -114,12 +118,37 @@ export default {
}, },
configManage: { configManage: {
neManage: { 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: '重载配置', reload: '重载配置',
restart: '重启', restart: '重启',
totalSure:'确认{oper}网元名称为 {msg} 的网元',
stop: '停止', stop: '停止',
start: '启动', start: '启动',
export: '导出', export: '导出',
import: '导入', import: '导入',
fileForm:'文件来源',
selectPlease:'请选择导入文件来源', selectPlease:'请选择导入文件来源',
server:'服务器文件', server:'服务器文件',
local:'本地文件', local:'本地文件',
@@ -179,6 +208,7 @@ export default {
}, },
neUser: { neUser: {
auth: { auth: {
authInfo:'鉴权信息',
neTypePlease: '查询网元类型', neTypePlease: '查询网元类型',
neType: 'UDM网元类型', neType: 'UDM网元类型',
export: '导出', export: '导出',
@@ -415,5 +445,43 @@ export default {
down: '下行', 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() { function fnFinish() {
Modal.confirm({ Modal.confirm({
title: '提示', title: t('common.tipTitle'),
content: `确认要提交修改用户基本信息吗?`, content: `确认要提交修改用户基本信息吗?`,
onOk() { onOk() {
stateForm.formClick = true; stateForm.formClick = true;
// 发送请求 // 发送请求
const hide = message.loading('请稍等...', 0); const hide = message.loading(t('common.loading'), 0);
const form = toRaw(stateForm.form); const form = toRaw(stateForm.form);
updateUserProfile(form).then(res => { updateUserProfile(form).then(res => {
hide(); hide();
stateForm.formClick = false; stateForm.formClick = false;
if (res.code === RESULT_CODE_SUCCESS) { if (res.code === RESULT_CODE_SUCCESS) {
Modal.success({ Modal.success({
title: '提示', title: t('common.tipTitle'),
content: `用户基本信息修改成功!`, content: `用户基本信息修改成功!`,
okText: '我知道了', okText: '我知道了',
onOk() { onOk() {
@@ -87,11 +87,11 @@ function fnBeforeUpload(file: FileType) {
/**上传变更 */ /**上传变更 */
function fnUpload(up: UploadRequestOption) { function fnUpload(up: UploadRequestOption) {
Modal.confirm({ Modal.confirm({
title: '提示', title: t('common.tipTitle'),
content: `确认要上传/变更用户头像吗?`, content: `确认要上传/变更用户头像吗?`,
onOk() { onOk() {
// 发送请求 // 发送请求
const hide = message.loading('请稍等...', 0); const hide = message.loading(t('common.loading'), 0);
upState.value = true; upState.value = true;
let formData = new FormData(); let formData = new FormData();
formData.append('file', up.file); formData.append('file', up.file);

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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