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

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

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

View File

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