|
@@ -161,7 +161,7 @@ const getFindRolesByOrg = () => {
|
|
|
characterList.value = [];
|
|
|
const list = await getFindRolesByOrgIds([props.form.id]);
|
|
|
list.forEach((item) => {
|
|
|
- if (item.roleName !== '管理员' && item.roleName !== '工程师') {
|
|
|
+ if (item.roleName !== '管理员' && item.roleName !== '运维人员') {
|
|
|
characterList.value.push(item);
|
|
|
}
|
|
|
});
|
|
@@ -192,15 +192,15 @@ onMounted(() => {
|
|
|
|
|
|
<template>
|
|
|
<div>
|
|
|
- <div class="character"><span class="character-text">*</span>创建角色</div>
|
|
|
+ <div class="character"><span class="character-text">*</span>{{ t('createCustomer.createCharacter') }}</div>
|
|
|
<AFlex :vertical="true" :gap="16">
|
|
|
<AFlex align="center">
|
|
|
- <AFlex class="input-style" align="center"> 管理员 </AFlex>
|
|
|
- <div class="input-style-text">默认角色</div>
|
|
|
+ <AFlex class="input-style" align="center"> {{ t('roleManage.administrator') }} </AFlex>
|
|
|
+ <div class="input-style-text">{{ t('roleManage.defaultRole') }}</div>
|
|
|
</AFlex>
|
|
|
<AFlex align="center">
|
|
|
- <AFlex class="input-style" align="center"> 运维人员 </AFlex>
|
|
|
- <div class="input-style-text">默认角色</div>
|
|
|
+ <AFlex class="input-style" align="center"> {{ t('roleManage.operationsStaff') }} </AFlex>
|
|
|
+ <div class="input-style-text">{{ t('roleManage.defaultRole') }}</div>
|
|
|
</AFlex>
|
|
|
<AFlex align="center" v-for="(item, index) in characterList" :key="index">
|
|
|
<AFlex class="input-style input-background" align="center"> {{ item.roleName }} </AFlex>
|
|
@@ -219,12 +219,12 @@ onMounted(() => {
|
|
|
<AButton type="primary" ghost class="icon-button button-style" @click="addCharacter">
|
|
|
<AFlex align="center">
|
|
|
<SvgIcon name="plus" />
|
|
|
- <span> 增加角色 </span>
|
|
|
+ <span> {{ t('roleManage.increaseCharacter') }} </span>
|
|
|
</AFlex>
|
|
|
</AButton>
|
|
|
<AModal
|
|
|
v-model:open="characterOpen"
|
|
|
- :title="characterTitle ? '添加角色' : '编辑角色'"
|
|
|
+ :title="characterTitle ? t('roleManage.addCharacters') : t('roleManage.editorialRole')"
|
|
|
width="920px"
|
|
|
:mask-closable="false"
|
|
|
:footer="null"
|
|
@@ -238,10 +238,14 @@ onMounted(() => {
|
|
|
:rules="rules"
|
|
|
:label-col="{ span: 3 }"
|
|
|
>
|
|
|
- <AFormItem label="角色名称" name="roleName">
|
|
|
- <AInput class="input-width" v-model:value="characterForm.roleName" placeholder="请输入角色名称" />
|
|
|
+ <AFormItem :label="t('roleManage.characterName')" name="roleName">
|
|
|
+ <AInput
|
|
|
+ class="input-width"
|
|
|
+ v-model:value="characterForm.roleName"
|
|
|
+ :placeholder="t('roleManage.pleaseEnterRoleName')"
|
|
|
+ />
|
|
|
</AFormItem>
|
|
|
- <AFormItem label="角色描述">
|
|
|
+ <AFormItem :label="t('roleManage.characterDescription')">
|
|
|
<ATextarea
|
|
|
class="input-width"
|
|
|
v-model:value="characterForm.remark"
|
|
@@ -249,10 +253,14 @@ onMounted(() => {
|
|
|
:auto-size="{ minRows: 4 }"
|
|
|
/>
|
|
|
</AFormItem>
|
|
|
- <AFormItem label="菜单权限配置">
|
|
|
+ <AFormItem :label="t('roleManage.menuPermissionConfig')">
|
|
|
<div class="permission-configuration">
|
|
|
- <ACheckbox class="select-all" :indeterminate="indeterminate" v-model:checked="checked" @change="selectAll"
|
|
|
- >全选</ACheckbox
|
|
|
+ <ACheckbox
|
|
|
+ class="select-all"
|
|
|
+ :indeterminate="indeterminate"
|
|
|
+ v-model:checked="checked"
|
|
|
+ @change="selectAll"
|
|
|
+ >{{ t('common.selectAll') }}</ACheckbox
|
|
|
>
|
|
|
<ATree
|
|
|
v-model:expanded-keys="expandedKeys"
|
|
@@ -267,7 +275,7 @@ onMounted(() => {
|
|
|
</AForm>
|
|
|
<AFlex justify="flex-end" class="footer">
|
|
|
<AButton class="button-right" type="primary" ghost @click="cancelSave">{{ $t('common.cancel') }}</AButton>
|
|
|
- <AButton type="primary" @click="characterSave">保存</AButton>
|
|
|
+ <AButton type="primary" @click="characterSave">{{ t('common.save') }}</AButton>
|
|
|
</AFlex>
|
|
|
</AModal>
|
|
|
<ConfirmModal
|