国际化修改
This commit is contained in:
+33
-22
@@ -1,17 +1,13 @@
|
|||||||
<template>
|
<template>
|
||||||
<a-config-provider :locale="locale">
|
<a-config-provider :locale="locale">
|
||||||
<div id="app">
|
<div id="app">
|
||||||
<div>
|
<router-view v-if="isRouterAlive" />
|
||||||
<a-button @click="changeLocale('en-us')" v-show="localeval=='zh-cn'">English</a-button >
|
|
||||||
<a-button @click="changeLocale('zh-cn')" v-show="localeval=='en-us'">中文</a-button >
|
|
||||||
</div>
|
|
||||||
<router-view/>
|
|
||||||
</div>
|
</div>
|
||||||
</a-config-provider>
|
</a-config-provider>
|
||||||
</template>
|
</template>
|
||||||
<script>
|
<script>
|
||||||
import zhCN from 'ant-design-vue/lib/locale-provider/zh_CN'
|
import zhCN from 'ant-design-vue/lib/locale-provider/zh_CN'
|
||||||
// import en from 'ant-design-vue/lib/locale-provider/en_US'
|
import enUS from 'ant-design-vue/lib/locale-provider/en_US'
|
||||||
import enquireScreen from '@/utils/device'
|
import enquireScreen from '@/utils/device'
|
||||||
import moment from 'moment'
|
import moment from 'moment'
|
||||||
import 'moment/locale/zh-cn'
|
import 'moment/locale/zh-cn'
|
||||||
@@ -23,7 +19,7 @@
|
|||||||
data () {
|
data () {
|
||||||
return {
|
return {
|
||||||
locale: zhCN,
|
locale: zhCN,
|
||||||
localeval: 'zh-cn'
|
isRouterAlive:true
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
created () {
|
created () {
|
||||||
@@ -44,30 +40,45 @@
|
|||||||
that.$store.dispatch('setSidebar', true)
|
that.$store.dispatch('setSidebar', true)
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
|
||||||
|
// 默认中文
|
||||||
|
localStorage.lang == undefined ? localStorage.setItem("language", "zh-cn") : "";
|
||||||
|
// 自己配置多语言适配
|
||||||
|
this.$root.Bus.$on("switchLanguage", value => {
|
||||||
|
let router_path = this.$route.path;
|
||||||
|
switch (value) {
|
||||||
|
case "zh-cn":
|
||||||
|
localStorage.setItem("language", "zh-cn");
|
||||||
|
break;
|
||||||
|
case "en-us":
|
||||||
|
localStorage.setItem("language", "en-us");
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
// 刷新页面
|
||||||
|
this.isRouterAlive = false; //先关闭,
|
||||||
|
this.$nextTick(function() {
|
||||||
|
this.isRouterAlive = true; //再打开
|
||||||
|
});
|
||||||
|
// 系统组件适配
|
||||||
|
let lang = localStorage.language;
|
||||||
|
if (lang == "zh-cn") {
|
||||||
|
this.locale = zhCN;
|
||||||
|
moment.locale("zh-cn");
|
||||||
|
} else if (lang == "en-us") {
|
||||||
|
this.locale = enUS;
|
||||||
|
moment.locale("en-us");
|
||||||
|
}
|
||||||
|
});
|
||||||
},
|
},
|
||||||
mounted() {
|
mounted() {
|
||||||
|
|
||||||
},
|
},
|
||||||
watch:{
|
watch:{
|
||||||
},
|
},
|
||||||
computed:{
|
computed:{
|
||||||
|
|
||||||
},
|
},
|
||||||
|
|
||||||
methods:{
|
methods:{
|
||||||
moment,
|
|
||||||
changeLocale (localeval) {
|
|
||||||
this.localeval = localeval
|
|
||||||
if (localeval === EN) {
|
|
||||||
moment.locale(EN)
|
|
||||||
this.$i18n.locale = EN
|
|
||||||
this.locale = null
|
|
||||||
} else {
|
|
||||||
moment.locale(ZH)
|
|
||||||
this.$i18n.locale = ZH
|
|
||||||
this.locale = zhCN
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|||||||
@@ -28,7 +28,7 @@ module.exports = {
|
|||||||
term:'term',
|
term:'term',
|
||||||
empty:'empty',
|
empty:'empty',
|
||||||
edit:'edit',
|
edit:'edit',
|
||||||
more:'更多',
|
more:'more',
|
||||||
areYouSure:'Are you sure to delete?',
|
areYouSure:'Are you sure to delete?',
|
||||||
details:'details',
|
details:'details',
|
||||||
password:'password',
|
password:'password',
|
||||||
@@ -210,5 +210,130 @@ module.exports = {
|
|||||||
selectSameDatabase:'Please select the same database table and data ID for comparison',
|
selectSameDatabase:'Please select the same database table and data ID for comparison',
|
||||||
DataComparison:'Data comparison',
|
DataComparison:'Data comparison',
|
||||||
PromptInformation:'Prompt information',
|
PromptInformation:'Prompt information',
|
||||||
|
enterAccountNumber:'Please enter the account number',
|
||||||
|
AddExistingUsers:'Add existing users',
|
||||||
|
newUser:'new user',
|
||||||
|
disassociate:'disassociate',
|
||||||
|
AssignDepartmentRoles:'Assign Department roles',
|
||||||
|
userDetail:'user details',
|
||||||
|
AreYouCancelAssociation:' Are you sure to cancel the association with the selected department?',
|
||||||
|
setURLListAttribute:'Please set the url.list attribute!',
|
||||||
|
setURLDeletebatchAttribute:'Please set the URL Deletebatch attribute!',
|
||||||
|
NoDepartmentSelected:'No department is selected, unable to cancel the association between department and user!',
|
||||||
|
ConfirmCancellation:'Confirm cancellation',
|
||||||
|
CancelAssociation:'Cancel the association between the user and the selected department?',
|
||||||
|
SuccessfullyDeleted:'Successfully deleted the relationship between the user and the selected department!',
|
||||||
|
setURLDeleteAttribute:'Please set the url.delete attribute!',
|
||||||
|
DepartmentRole:'Department role assignment',
|
||||||
|
DepartmentRoleName:'Department role name',
|
||||||
|
enterDepartmentRole:'Please enter department role',
|
||||||
|
NewDepartmentRole:'New department role',
|
||||||
|
DepartmentRoleInformation:'Department role information',
|
||||||
|
DepartmentRoleCode:'Department role code',
|
||||||
|
enterUserAccount:'Please enter user account',
|
||||||
|
NoConfigurableRoles:'No configurable roles!',
|
||||||
|
AreYouWantDiscardEditing:'Are you sure you want to discard editing?',
|
||||||
|
determine:'determine',
|
||||||
|
DictionaryCoding:'Dictionary coding',
|
||||||
|
enterDictionaryCode:'Please enter dictionary code',
|
||||||
|
DictionaryList:'Dictionary list',
|
||||||
|
enterName:'Please enter a name',
|
||||||
|
disable:'disable',
|
||||||
|
DataValue:'Data value',
|
||||||
|
enterDataValue:'Please enter a data value',
|
||||||
|
DictionaryRetrieval:'Dictionary retrieval',
|
||||||
|
CompletelyDelete:'Completely delete',
|
||||||
|
FirstLevelMenu:'First level menu',
|
||||||
|
Submenu:'Submenu',
|
||||||
|
ButtonsPermissions:'buttons/permissions',
|
||||||
|
enterMenuName:'Please enter menu name',
|
||||||
|
SuperiorMenu:'superior menu',
|
||||||
|
selectSuperiorMenu:'Please select superior menu',
|
||||||
|
selectParentMenu:'Please select parent menu',
|
||||||
|
MenuPath:'Menu path',
|
||||||
|
enterMenuPath:'Please enter the menu path',
|
||||||
|
FrontAssembly:'Front end assembly',
|
||||||
|
enterFrontComponents:'Please enter front-end components',
|
||||||
|
DefaultJumpAddress:'Default jump address',
|
||||||
|
enterRoutingParameters:'Please enter routing parameters',
|
||||||
|
AuthorizationID:' Authorization ID',
|
||||||
|
enterAuthorizationID:'Please enter the authorization ID, such as:',
|
||||||
|
PleaseEnterAuthorizationID:'Please enter authorization ID!',
|
||||||
|
AuthorizationPolicy:'Authorization policy',
|
||||||
|
selectAuthorizationPolicy:'Please select authorization policy',
|
||||||
|
selectStatus:'Please select a status',
|
||||||
|
MenuIcon:'Menu icon',
|
||||||
|
ClickSelectIcon:'Click the select icon',
|
||||||
|
enterMenuSort:'Please enter menu sort',
|
||||||
|
RouteMenu:'Route menu',
|
||||||
|
HideRoute:'Hide route',
|
||||||
|
CacheRoute:'Cache route',
|
||||||
|
AggregateRouting:'Aggregate routing',
|
||||||
|
OpenMode:'Open mode',
|
||||||
|
external:'external',
|
||||||
|
inside:'inside',
|
||||||
|
enterMenuTitle:'Please enter the menu title',
|
||||||
|
enterAuthorizationPolicy:'Please enter authorization policy',
|
||||||
|
AuthorizationIDExists:'Authorization ID already exists',
|
||||||
|
enterPositiveInteger:'Please enter a positive integer',
|
||||||
|
RuleName:'Rule name',
|
||||||
|
enterRuleName:'Please enter a rule name',
|
||||||
|
RuleField:'Rule field',
|
||||||
|
enterRuleField:'Please enter the rule field',
|
||||||
|
ConditionalRules:'Conditional rules',
|
||||||
|
enterConditionRule:'Please enter condition rule',
|
||||||
|
RuleValue:'Rule value',
|
||||||
|
enterRuleValue:'Please enter a rule value',
|
||||||
|
effective:'effective',
|
||||||
|
invalid:'invalid',
|
||||||
|
selectCondition:'Please select a condition',
|
||||||
|
DataPermissionRules:'Data permission rules',
|
||||||
|
LoginPassword:'Login password',
|
||||||
|
enterLoginPassword:'Please enter the login password',
|
||||||
|
ConfirmPassword:'Confirm password',
|
||||||
|
reenterLoginPassword:'Please re-enter your login password',
|
||||||
|
enterUserName:'Please enter user name',
|
||||||
|
RoleAssignment:'Role assignment',
|
||||||
|
selectUserRole:'Please select user role',
|
||||||
|
DepartmentAllocation:'Department allocation',
|
||||||
|
ClickSelectDepartment:'Click to select a department',
|
||||||
|
choice:'choice',
|
||||||
|
identity:'identity',
|
||||||
|
OrdinaryUsers:'Ordinary users',
|
||||||
|
superior:'superior',
|
||||||
|
ResponsibleDepartment:'Responsible department',
|
||||||
|
selectResponsibleDepartment:'Please select the responsible department',
|
||||||
|
selectGender:'Please select gender',
|
||||||
|
mailbox:'mailbox',
|
||||||
|
enterEmailAddress:'Please enter email address',
|
||||||
|
enterMobileNumber:'Please enter your mobile phone number',
|
||||||
|
submit:'submit',
|
||||||
|
passwordConsists:'The password consists of 8 digits, upper and lower case letters and special symbols!',
|
||||||
|
enterUserName:'Please enter user name',
|
||||||
|
enterJobNumber:'Please enter the job number',
|
||||||
|
enterCorrectLandline:'Please enter the correct landline number',
|
||||||
|
passwordsEnteredTwice:'The passwords entered twice are different',
|
||||||
|
PnumberExists:'Phone number already exists',
|
||||||
|
enterPhoneCorrect:'Please enter the phone number in the correct format',
|
||||||
|
MailboxExists:'Mailbox already exists',
|
||||||
|
enterMailboxCorrect:'Please enter a mailbox in the correct format',
|
||||||
|
UserExists:'User name already exists',
|
||||||
|
nameExists:'User name already exists',
|
||||||
|
uploadPictures:'Please upload pictures',
|
||||||
|
DepartmentSearch:'Department search',
|
||||||
|
selectSuperiorDepartment:'Please select superior department',
|
||||||
|
upload1:'upload',
|
||||||
|
UploadFailed:'Upload failed',
|
||||||
|
ResetPassword:'Reset password',
|
||||||
|
ClearSelection:'Clear selection',
|
||||||
|
BatchRestore:'Batch restore',
|
||||||
|
RestoreUser:'Restore user',
|
||||||
|
FailedQuery:'Failed to query deleted users:',
|
||||||
|
headPortrait:'head portrait',
|
||||||
|
RestorUser:'Restore user',
|
||||||
|
sureRestore:'Are you sure you want to restore this',
|
||||||
|
Users:'users',
|
||||||
|
reduction:'reduction',
|
||||||
|
UsersSucceeded:'users succeeded!',
|
||||||
|
|
||||||
}
|
}
|
||||||
@@ -211,5 +211,130 @@ module.exports = {
|
|||||||
selectSameDatabase:'请选择相同的数据库表和数据ID进行比较',
|
selectSameDatabase:'请选择相同的数据库表和数据ID进行比较',
|
||||||
DataComparison:'数据比较',
|
DataComparison:'数据比较',
|
||||||
PromptInformation:'提示信息',
|
PromptInformation:'提示信息',
|
||||||
|
enterAccountNumber:'请输入账号',
|
||||||
|
AddExistingUsers:'添加已有用户',
|
||||||
|
newUser:'新建用户',
|
||||||
|
disassociate:'取消关联',
|
||||||
|
AssignDepartmentRoles:'分配部门角色',
|
||||||
|
userDetail:'用户详情',
|
||||||
|
AreYouCancelAssociation:'确定取消与选中部门关联吗?',
|
||||||
|
setURLListAttribute:'请设置url.list属性!',
|
||||||
|
setURLDeletebatchAttribute:'请设置url.deleteBatch属性!',
|
||||||
|
NoDepartmentSelected:'未选中任何部门,无法取消部门与用户的关联!',
|
||||||
|
ConfirmCancellation:'确认取消',
|
||||||
|
CancelAssociation:'是否取消用户与选中部门的关联?',
|
||||||
|
SuccessfullyDeleted:'删除用户与选中部门关系成功!',
|
||||||
|
setURLDeleteAttribute:'请设置url.delete属性!',
|
||||||
|
DepartmentRole:'部门角色分配',
|
||||||
|
DepartmentRoleName:'部门角色名称',
|
||||||
|
enterDepartmentRole:'请输入部门角色',
|
||||||
|
NewDepartmentRole:'新建部门角色',
|
||||||
|
DepartmentRoleInformation:'部门角色信息',
|
||||||
|
DepartmentRoleCode:'部门角色编码',
|
||||||
|
enterUserAccount:'请输入用户账号',
|
||||||
|
NoConfigurableRoles:'无可配置角色!',
|
||||||
|
AreYouWantDiscardEditing:'确定放弃编辑?',
|
||||||
|
determine:'确定',
|
||||||
|
DictionaryCoding:'字典编码',
|
||||||
|
enterDictionaryCode:'请输入字典编码',
|
||||||
|
DictionaryList:'字典列表',
|
||||||
|
enterName:'请输入名称',
|
||||||
|
disable:'禁用',
|
||||||
|
DataValue:'数据值',
|
||||||
|
enterDataValue:'请输入数据值',
|
||||||
|
DictionaryRetrieval:'字典取回',
|
||||||
|
CompletelyDelete:'彻底删除',
|
||||||
|
FirstLevelMenu:'一级菜单',
|
||||||
|
Submenu:'子菜单',
|
||||||
|
ButtonsPermissions:'按钮/权限',
|
||||||
|
enterMenuName:'请输入菜单名称',
|
||||||
|
SuperiorMenu:'上级菜单',
|
||||||
|
selectSuperiorMenu:'请选择上级菜单',
|
||||||
|
selectParentMenu:'请选择父级菜单',
|
||||||
|
MenuPath:'菜单路径',
|
||||||
|
enterMenuPath:'请输入菜单路径',
|
||||||
|
FrontAssembly:'前端组件',
|
||||||
|
enterFrontComponents:'请输入前端组件',
|
||||||
|
DefaultJumpAddress:'默认跳转地址',
|
||||||
|
enterRoutingParameters:'请输入路由参数',
|
||||||
|
AuthorizationID:'授权标识',
|
||||||
|
enterAuthorizationID:'请输入授权标识, 如:',
|
||||||
|
PleaseEnterAuthorizationID:'请输入授权标识!',
|
||||||
|
AuthorizationPolicy:'授权策略',
|
||||||
|
selectAuthorizationPolicy:'请选择授权策略',
|
||||||
|
selectStatus:'请选择状态',
|
||||||
|
MenuIcon:'菜单图标',
|
||||||
|
ClickSelectIcon:'点击选择图标',
|
||||||
|
enterMenuSort:'请输入菜单排序',
|
||||||
|
RouteMenu:'是否路由菜单',
|
||||||
|
HideRoute:'隐藏路由',
|
||||||
|
CacheRoute:'是否缓存路由',
|
||||||
|
AggregateRouting:'聚合路由',
|
||||||
|
OpenMode:'打开方式',
|
||||||
|
external:'外部',
|
||||||
|
inside:'内部',
|
||||||
|
enterMenuTitle:'请输入菜单标题',
|
||||||
|
enterAuthorizationPolicy:'请输入授权策略',
|
||||||
|
AuthorizationIDExists:'授权标识已存在',
|
||||||
|
enterPositiveInteger:'请输入正整数',
|
||||||
|
RuleName:'规则名称',
|
||||||
|
enterRuleName:'请输入规则名称',
|
||||||
|
RuleField:'规则字段',
|
||||||
|
enterRuleField:'请输入规则字段',
|
||||||
|
ConditionalRules:'条件规则',
|
||||||
|
enterConditionRule:'请输入条件规则',
|
||||||
|
RuleValue:'规则值',
|
||||||
|
enterRuleValue:'请输入规则值',
|
||||||
|
effective:'有效',
|
||||||
|
invalid:'无效',
|
||||||
|
selectCondition:'请选择条件',
|
||||||
|
DataPermissionRules:'数据权限规则',
|
||||||
|
LoginPassword:'登录密码',
|
||||||
|
enterLoginPassword:'请输入登录密码',
|
||||||
|
ConfirmPassword:'确认密码',
|
||||||
|
reenterLoginPassword:'请重新输入登录密码',
|
||||||
|
enterUserName:'请输入用户姓名',
|
||||||
|
RoleAssignment:'角色分配',
|
||||||
|
selectUserRole:'请选择用户角色',
|
||||||
|
DepartmentAllocation:'部门分配',
|
||||||
|
ClickSelectDepartment:'点击选择部门',
|
||||||
|
choice:'选择',
|
||||||
|
identity:'身份',
|
||||||
|
OrdinaryUsers:'普通用户',
|
||||||
|
superior:'上级',
|
||||||
|
ResponsibleDepartment:'负责部门',
|
||||||
|
selectResponsibleDepartment:'请选择负责部门',
|
||||||
|
selectGender:'请选择性别',
|
||||||
|
mailbox:'邮箱',
|
||||||
|
enterEmailAddress:'请输入邮箱',
|
||||||
|
enterMobileNumber:'请输入手机号码',
|
||||||
|
submit:'提交',
|
||||||
|
passwordConsists:'密码由8位数字、大小写字母和特殊符号组成!',
|
||||||
|
enterUserName:'请输入用户名称',
|
||||||
|
enterJobNumber:'请输入工号',
|
||||||
|
enterCorrectLandline:'请输入正确的座机号码',
|
||||||
|
passwordsEnteredTwice:'两次输入的密码不一样',
|
||||||
|
PnumberExists:'手机号已存在',
|
||||||
|
enterPhoneCorrect:'请输入正确格式的手机号码',
|
||||||
|
MailboxExists:'邮箱已存在',
|
||||||
|
enterMailboxCorrect:'请输入正确格式的邮箱',
|
||||||
|
UserExists:'用户名已存在',
|
||||||
|
nameExists:'工号已存在',
|
||||||
|
uploadPictures:'请上传图片',
|
||||||
|
DepartmentSearch:'部门搜索',
|
||||||
|
selectSuperiorDepartment:'请选择上级部门',
|
||||||
|
upload1:'上传',
|
||||||
|
UploadFailed:'上传失败',
|
||||||
|
ResetPassword:'重新设定密码',
|
||||||
|
ClearSelection:'清空选择',
|
||||||
|
BatchRestore:'批量还原',
|
||||||
|
RestoreUser:'还原用户',
|
||||||
|
FailedQuery:'查询已删除的用户失败:',
|
||||||
|
headPortrait:'头像',
|
||||||
|
RestorUser:'恢复用户',
|
||||||
|
sureRestore:'您确定要恢复这',
|
||||||
|
Users:'个用户吗?',
|
||||||
|
reduction:'还原',
|
||||||
|
UsersSucceeded:'个用户成功!',
|
||||||
|
|
||||||
}
|
}
|
||||||
@@ -54,7 +54,7 @@
|
|||||||
text:{
|
text:{
|
||||||
type:String,
|
type:String,
|
||||||
required:false,
|
required:false,
|
||||||
default:"上传"
|
default:'上传'
|
||||||
},
|
},
|
||||||
/*这个属性用于控制文件上传的业务路径*/
|
/*这个属性用于控制文件上传的业务路径*/
|
||||||
bizPath:{
|
bizPath:{
|
||||||
@@ -135,7 +135,7 @@
|
|||||||
beforeUpload: function(file){
|
beforeUpload: function(file){
|
||||||
var fileType = file.type;
|
var fileType = file.type;
|
||||||
if(fileType.indexOf('image')<0){
|
if(fileType.indexOf('image')<0){
|
||||||
this.$message.warning('请上传图片');
|
this.$message.warning(this.$t('uploadPictures'));
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
@@ -159,7 +159,7 @@
|
|||||||
}
|
}
|
||||||
//this.$message.success(`${info.file.name} 上传成功!`);
|
//this.$message.success(`${info.file.name} 上传成功!`);
|
||||||
}else if (info.file.status === 'error') {
|
}else if (info.file.status === 'error') {
|
||||||
this.$message.error(`${info.file.name} 上传失败.`);
|
this.$message.error(`${info.file.name} `+this.$t('UploadFailed'));
|
||||||
}else if(info.file.status === 'removed'){
|
}else if(info.file.status === 'removed'){
|
||||||
this.handleDelete(info.file)
|
this.handleDelete(info.file)
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -107,6 +107,7 @@
|
|||||||
import { UI_CACHE_DB_DICT_DATA } from "@/store/mutation-types"
|
import { UI_CACHE_DB_DICT_DATA } from "@/store/mutation-types"
|
||||||
import moment from 'moment'
|
import moment from 'moment'
|
||||||
import zhCN from 'ant-design-vue/lib/locale-provider/zh_CN'
|
import zhCN from 'ant-design-vue/lib/locale-provider/zh_CN'
|
||||||
|
import enUS from 'ant-design-vue/es/locale/en_US';
|
||||||
import 'moment/locale/zh-cn'
|
import 'moment/locale/zh-cn'
|
||||||
moment.locale('zh-cn')
|
moment.locale('zh-cn')
|
||||||
const EN = 'en-us'
|
const EN = 'en-us'
|
||||||
@@ -153,6 +154,7 @@
|
|||||||
this.updateCurrentDepart()
|
this.updateCurrentDepart()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
this.localeval=localStorage.getItem('language')
|
||||||
},
|
},
|
||||||
computed: {
|
computed: {
|
||||||
...mapState({
|
...mapState({
|
||||||
@@ -197,6 +199,7 @@
|
|||||||
return that.Logout({}).then(() => {
|
return that.Logout({}).then(() => {
|
||||||
// update-begin author:wangshuai date:20200601 for: 退出登录跳转登录页面
|
// update-begin author:wangshuai date:20200601 for: 退出登录跳转登录页面
|
||||||
that.$router.push({ path: '/user/login' });
|
that.$router.push({ path: '/user/login' });
|
||||||
|
localStorage.removeItem('language')
|
||||||
// update-end author:wangshuai date:20200601 for: 退出登录跳转登录页面
|
// update-end author:wangshuai date:20200601 for: 退出登录跳转登录页面
|
||||||
//window.location.reload()
|
//window.location.reload()
|
||||||
}).catch(err => {
|
}).catch(err => {
|
||||||
@@ -267,18 +270,20 @@
|
|||||||
/*update_end author:liushaoqian date:20200507 for: 刷新缓存*/
|
/*update_end author:liushaoqian date:20200507 for: 刷新缓存*/
|
||||||
moment,
|
moment,
|
||||||
changeLocale (localeval) {
|
changeLocale (localeval) {
|
||||||
|
console.log('loacal',localeval)
|
||||||
|
this.$root.Bus.$emit('switchLanguage',localeval)
|
||||||
this.localeval = localeval
|
this.localeval = localeval
|
||||||
if (localeval === EN) {
|
if (localeval === EN) {
|
||||||
moment.locale(EN)
|
moment.locale(EN)
|
||||||
this.$i18n.locale = EN
|
this.$i18n.locale = EN
|
||||||
this.locale = null
|
this.locale = enUS
|
||||||
localStorage.setItem('language', EN)
|
// localStorage.setItem('language', EN)
|
||||||
// location.reload();
|
// location.reload();
|
||||||
} else {
|
} else {
|
||||||
moment.locale(ZH)
|
moment.locale(ZH)
|
||||||
this.$i18n.locale = ZH
|
this.$i18n.locale = ZH
|
||||||
this.locale = zhCN
|
this.locale = zhCN
|
||||||
localStorage.setItem('language', ZH)
|
// localStorage.setItem('language', ZH)
|
||||||
// location.reload();
|
// location.reload();
|
||||||
}
|
}
|
||||||
console.log('this.locale',this.locale)
|
console.log('this.locale',this.locale)
|
||||||
|
|||||||
@@ -98,6 +98,9 @@ function main() {
|
|||||||
store.commit('SET_TOKEN', Vue.ls.get(ACCESS_TOKEN))
|
store.commit('SET_TOKEN', Vue.ls.get(ACCESS_TOKEN))
|
||||||
store.commit('SET_MULTI_PAGE', Vue.ls.get(DEFAULT_MULTI_PAGE, config.multipage))
|
store.commit('SET_MULTI_PAGE', Vue.ls.get(DEFAULT_MULTI_PAGE, config.multipage))
|
||||||
},
|
},
|
||||||
render: h => h(App)
|
render: h => h(App),
|
||||||
|
data:{
|
||||||
|
Bus: new Vue()
|
||||||
|
}
|
||||||
}).$mount('#app')
|
}).$mount('#app')
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -93,7 +93,7 @@
|
|||||||
<a-form-item
|
<a-form-item
|
||||||
:labelCol="labelCol"
|
:labelCol="labelCol"
|
||||||
:wrapperCol="wrapperCol"
|
:wrapperCol="wrapperCol"
|
||||||
label="机构编码">
|
:label="$t('OrganizationCode')">
|
||||||
<a-input disabled :placeholder="$t('enterOrganizationCode')" v-decorator="['orgCode', validatorRules.orgCode ]"/>
|
<a-input disabled :placeholder="$t('enterOrganizationCode')" v-decorator="['orgCode', validatorRules.orgCode ]"/>
|
||||||
</a-form-item>
|
</a-form-item>
|
||||||
<a-form-item
|
<a-form-item
|
||||||
|
|||||||
@@ -6,7 +6,7 @@
|
|||||||
:maskClosable="false"
|
:maskClosable="false"
|
||||||
@cancel="handleCancel">
|
@cancel="handleCancel">
|
||||||
<template slot="footer">
|
<template slot="footer">
|
||||||
<a-button @click="handleCancel">关闭</a-button>
|
<a-button @click="handleCancel">{{$t('close')}}</a-button>
|
||||||
</template>
|
</template>
|
||||||
<a-table
|
<a-table
|
||||||
ref="table"
|
ref="table"
|
||||||
@@ -17,9 +17,9 @@
|
|||||||
:dataSource="dataSource"
|
:dataSource="dataSource"
|
||||||
:pagination="false">
|
:pagination="false">
|
||||||
<span slot="action" slot-scope="text, record">
|
<span slot="action" slot-scope="text, record">
|
||||||
<a @click="handleBack(record.id)"><a-icon type="redo"/>字典取回</a>
|
<a @click="handleBack(record.id)"><a-icon type="redo"/>{{$t('DictionaryRetrieval')}}</a>
|
||||||
<a-divider type="vertical"/>
|
<a-divider type="vertical"/>
|
||||||
<a @click="handleDelete(record.id)"><a-icon type="scissor"/>彻底删除</a>
|
<a @click="handleDelete(record.id)"><a-icon type="scissor"/>{{$t('CompletelyDelete')}}</a>
|
||||||
</span>
|
</span>
|
||||||
</a-table>
|
</a-table>
|
||||||
|
|
||||||
@@ -36,7 +36,7 @@
|
|||||||
return {
|
return {
|
||||||
modalWidth: '90%',
|
modalWidth: '90%',
|
||||||
modalStyle: { 'top': '20px'},
|
modalStyle: { 'top': '20px'},
|
||||||
title: '操作',
|
title: this.$t('operation'),
|
||||||
visible: false,
|
visible: false,
|
||||||
loading: false,
|
loading: false,
|
||||||
dataSource:[],
|
dataSource:[],
|
||||||
@@ -52,22 +52,22 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: '字典名称',
|
title: this.$t('DictionaryName'),
|
||||||
align: "left",
|
align: "left",
|
||||||
dataIndex: 'dictName'
|
dataIndex: 'dictName'
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: '字典编号',
|
title: this.$t('DictionaryNumber'),
|
||||||
align: "left",
|
align: "left",
|
||||||
dataIndex: 'dictCode'
|
dataIndex: 'dictCode'
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: '描述',
|
title: this.$t('describe'),
|
||||||
align: "left",
|
align: "left",
|
||||||
dataIndex: 'description'
|
dataIndex: 'description'
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: '操作',
|
title: this.$t('operation'),
|
||||||
dataIndex: 'action',
|
dataIndex: 'action',
|
||||||
align: "center",
|
align: "center",
|
||||||
scopedSlots: {customRender: 'action'}
|
scopedSlots: {customRender: 'action'}
|
||||||
|
|||||||
@@ -2,7 +2,7 @@
|
|||||||
<a-card :bordered="false">
|
<a-card :bordered="false">
|
||||||
<!-- 抽屉 -->
|
<!-- 抽屉 -->
|
||||||
<a-drawer
|
<a-drawer
|
||||||
title="字典列表"
|
:title="$t('DictionaryList')"
|
||||||
:width="screenWidth"
|
:width="screenWidth"
|
||||||
@close="onClose"
|
@close="onClose"
|
||||||
:visible="visible"
|
:visible="visible"
|
||||||
@@ -19,31 +19,31 @@
|
|||||||
<a-form layout="inline" :form="form" @keyup.enter.native="searchQuery">
|
<a-form layout="inline" :form="form" @keyup.enter.native="searchQuery">
|
||||||
<a-row :gutter="10">
|
<a-row :gutter="10">
|
||||||
<a-col :md="8" :sm="12">
|
<a-col :md="8" :sm="12">
|
||||||
<a-form-item label="名称">
|
<a-form-item :label="$t('name')">
|
||||||
<a-input style="width: 120px;" placeholder="请输入名称" v-model="queryParam.itemText"></a-input>
|
<a-input style="width: 120px;" :placeholder="$t('enterName')" v-model="queryParam.itemText"></a-input>
|
||||||
</a-form-item>
|
</a-form-item>
|
||||||
</a-col>
|
</a-col>
|
||||||
<a-col :md="9" :sm="24">
|
<a-col :md="9" :sm="24">
|
||||||
<a-form-item label="状态" style="width: 170px" :labelCol="labelCol" :wrapperCol="wrapperCol">
|
<a-form-item :label="$t('status')" style="width: 170px" :labelCol="labelCol" :wrapperCol="wrapperCol">
|
||||||
<a-select
|
<a-select
|
||||||
placeholder="请选择"
|
:placeholder="$t('pleaseSelect')"
|
||||||
v-model="queryParam.status"
|
v-model="queryParam.status"
|
||||||
>
|
>
|
||||||
<a-select-option value="1">正常</a-select-option>
|
<a-select-option value="1">{{$t('normal')}}</a-select-option>
|
||||||
<a-select-option value="0">禁用</a-select-option>
|
<a-select-option value="0">{{$t('disable')}}</a-select-option>
|
||||||
</a-select>
|
</a-select>
|
||||||
</a-form-item>
|
</a-form-item>
|
||||||
</a-col>
|
</a-col>
|
||||||
<a-col :md="7" :sm="24">
|
<a-col :md="7" :sm="24">
|
||||||
<span style="float: left;" class="table-page-search-submitButtons">
|
<span style="float: left;" class="table-page-search-submitButtons">
|
||||||
<a-button type="primary" @click="searchQuery">搜索</a-button>
|
<a-button type="primary" @click="searchQuery">{{$t('query')}}</a-button>
|
||||||
<a-button type="primary" @click="searchReset" style="margin-left: 8px">重置</a-button>
|
<a-button type="primary" @click="searchReset" style="margin-left: 8px">{{$t('reset')}}</a-button>
|
||||||
</span>
|
</span>
|
||||||
</a-col>
|
</a-col>
|
||||||
</a-row>
|
</a-row>
|
||||||
<a-row>
|
<a-row>
|
||||||
<a-col :md="2" :sm="24">
|
<a-col :md="2" :sm="24">
|
||||||
<a-button style="margin-bottom: 10px" type="primary" @click="handleAdd">新增</a-button>
|
<a-button style="margin-bottom: 10px" type="primary" @click="handleAdd">{{$t('add')}}</a-button>
|
||||||
</a-col>
|
</a-col>
|
||||||
</a-row>
|
</a-row>
|
||||||
</a-form>
|
</a-form>
|
||||||
@@ -62,10 +62,10 @@
|
|||||||
>
|
>
|
||||||
|
|
||||||
<span slot="action" slot-scope="text, record">
|
<span slot="action" slot-scope="text, record">
|
||||||
<a @click="handleEdit(record)">编辑</a>
|
<a @click="handleEdit(record)">{{$t('edit')}}</a>
|
||||||
<a-divider type="vertical"/>
|
<a-divider type="vertical"/>
|
||||||
<a-popconfirm title="确定删除吗?" @confirm="() => handleDelete(record.id)">
|
<a-popconfirm :title="$t('areYouSure')" @confirm="() => handleDelete(record.id)">
|
||||||
<a>删除</a>
|
<a>{{$t('delete')}}</a>
|
||||||
</a-popconfirm>
|
</a-popconfirm>
|
||||||
</span>
|
</span>
|
||||||
|
|
||||||
@@ -91,17 +91,17 @@
|
|||||||
return {
|
return {
|
||||||
columns: [
|
columns: [
|
||||||
{
|
{
|
||||||
title: '名称',
|
title: this.$t('name'),
|
||||||
align: "center",
|
align: "center",
|
||||||
dataIndex: 'itemText',
|
dataIndex: 'itemText',
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: '数据值',
|
title: this.$t('DataValue'),
|
||||||
align: "center",
|
align: "center",
|
||||||
dataIndex: 'itemValue',
|
dataIndex: 'itemValue',
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: '操作',
|
title: this.$t('operation'),
|
||||||
dataIndex: 'action',
|
dataIndex: 'action',
|
||||||
align: "center",
|
align: "center",
|
||||||
scopedSlots: {customRender: 'action'},
|
scopedSlots: {customRender: 'action'},
|
||||||
@@ -114,7 +114,7 @@
|
|||||||
delFlag: "1",
|
delFlag: "1",
|
||||||
status: [],
|
status: [],
|
||||||
},
|
},
|
||||||
title: "操作",
|
title: this.$t('operation'),
|
||||||
visible: false,
|
visible: false,
|
||||||
screenWidth: 800,
|
screenWidth: 800,
|
||||||
model: {},
|
model: {},
|
||||||
@@ -130,8 +130,8 @@
|
|||||||
},
|
},
|
||||||
form: this.$form.createForm(this),
|
form: this.$form.createForm(this),
|
||||||
validatorRules: {
|
validatorRules: {
|
||||||
itemText: {rules: [{required: true, message: '请输入名称!'}]},
|
itemText: {rules: [{required: true, message: this.$t('enterName')}]},
|
||||||
itemValue: {rules: [{required: true, message: '请输入数据值!'}]},
|
itemValue: {rules: [{required: true, message: this.$t('enterDataValue')}]},
|
||||||
},
|
},
|
||||||
url: {
|
url: {
|
||||||
list: "/sys/dictItem/page",
|
list: "/sys/dictItem/page",
|
||||||
@@ -185,7 +185,7 @@
|
|||||||
// 添加字典数据
|
// 添加字典数据
|
||||||
handleAdd() {
|
handleAdd() {
|
||||||
this.$refs.modalForm.add(this.dictId);
|
this.$refs.modalForm.add(this.dictId);
|
||||||
this.$refs.modalForm.title = "新增";
|
this.$refs.modalForm.title = this.$t('add');
|
||||||
},
|
},
|
||||||
showDrawer() {
|
showDrawer() {
|
||||||
this.visible = true
|
this.visible = true
|
||||||
|
|||||||
@@ -52,7 +52,7 @@
|
|||||||
<a-divider type="vertical"/>
|
<a-divider type="vertical"/>
|
||||||
<a @click="editDictItem(record)"><a-icon type="setting"/> {{$t('DictionaryConfiguration')}}</a>
|
<a @click="editDictItem(record)"><a-icon type="setting"/> {{$t('DictionaryConfiguration')}}</a>
|
||||||
<a-divider type="vertical"/>
|
<a-divider type="vertical"/>
|
||||||
<a-popconfirm title="确定删除吗?" @confirm="() =>handleDelete(record.id)">
|
<a-popconfirm :title="$t('areYouSure')" @confirm="() =>handleDelete(record.id)">
|
||||||
<a>{{$t('delete')}}</a>
|
<a>{{$t('delete')}}</a>
|
||||||
</a-popconfirm>
|
</a-popconfirm>
|
||||||
</span>
|
</span>
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
<template>
|
<template>
|
||||||
<a-drawer
|
<a-drawer
|
||||||
title="数据权限规则"
|
:title="$t('DataPermissionRules')"
|
||||||
:width="drawerWidth"
|
:width="drawerWidth"
|
||||||
@close="onClose"
|
@close="onClose"
|
||||||
:visible="visible">
|
:visible="visible">
|
||||||
@@ -16,25 +16,25 @@
|
|||||||
<a-form @keyup.enter.native="searchQuery">
|
<a-form @keyup.enter.native="searchQuery">
|
||||||
<a-row :gutter="12">
|
<a-row :gutter="12">
|
||||||
<a-col :md="8" :sm="8">
|
<a-col :md="8" :sm="8">
|
||||||
<a-form-item label="规则名称" :labelCol="{span: 8}" :wrapperCol="{span: 14, offset: 1}">
|
<a-form-item :label="$t('RuleName')" :labelCol="{span: 8}" :wrapperCol="{span: 14, offset: 1}">
|
||||||
<a-input placeholder="请输入规则名称" v-model="queryParam.ruleName"></a-input>
|
<a-input :placeholder="$t('enterRuleName')" v-model="queryParam.ruleName"></a-input>
|
||||||
</a-form-item>
|
</a-form-item>
|
||||||
</a-col>
|
</a-col>
|
||||||
<a-col :md="8" :sm="8">
|
<a-col :md="8" :sm="8">
|
||||||
<a-form-item label="规则值" :labelCol="{span: 8}" :wrapperCol="{span: 14, offset: 1}">
|
<a-form-item :label="$t('RuleValue')" :labelCol="{span: 8}" :wrapperCol="{span: 14, offset: 1}">
|
||||||
<a-input placeholder="请输入规则值" v-model="queryParam.ruleValue"></a-input>
|
<a-input :placeholder="$t('enterRuleValue')" v-model="queryParam.ruleValue"></a-input>
|
||||||
</a-form-item>
|
</a-form-item>
|
||||||
</a-col>
|
</a-col>
|
||||||
<a-col :md="7" :sm="8">
|
<a-col :md="7" :sm="8">
|
||||||
<span style="float: left;overflow: hidden;" class="table-page-search-submitButtons">
|
<span style="float: left;overflow: hidden;" class="table-page-search-submitButtons">
|
||||||
<a-button type="primary" @click="searchQuery" icon="search">查询</a-button>
|
<a-button type="primary" @click="searchQuery" icon="search">{{$t('query')}}</a-button>
|
||||||
<a-button type="primary" @click="searchReset" icon="reload" style="margin-left: 8px">重置</a-button>
|
<a-button type="primary" @click="searchReset" icon="reload" style="margin-left: 8px">{{$t('reset')}}</a-button>
|
||||||
</span>
|
</span>
|
||||||
</a-col>
|
</a-col>
|
||||||
</a-row>
|
</a-row>
|
||||||
<a-row>
|
<a-row>
|
||||||
<a-col :md="24" :sm="24">
|
<a-col :md="24" :sm="24">
|
||||||
<a-button style="margin-bottom: 10px" @click="addPermissionRule" type="primary" icon="plus">添加</a-button>
|
<a-button style="margin-bottom: 10px" @click="addPermissionRule" type="primary" icon="plus">{{$t('addTo')}}</a-button>
|
||||||
</a-col>
|
</a-col>
|
||||||
</a-row>
|
</a-row>
|
||||||
</a-form>
|
</a-form>
|
||||||
@@ -49,11 +49,11 @@
|
|||||||
:rowClassName="getRowClassname">
|
:rowClassName="getRowClassname">
|
||||||
<span slot="action" slot-scope="text, record">
|
<span slot="action" slot-scope="text, record">
|
||||||
<a @click="handleEdit(record)">
|
<a @click="handleEdit(record)">
|
||||||
<a-icon type="edit"/>编辑
|
<a-icon type="edit"/>{{$t('edit')}}
|
||||||
</a>
|
</a>
|
||||||
<a-divider type="vertical"/>
|
<a-divider type="vertical"/>
|
||||||
<a-popconfirm title="确定删除吗?" @confirm="() => handleDelete(record.id)">
|
<a-popconfirm :title="$t('areYouSure')" @confirm="() => handleDelete(record.id)">
|
||||||
<a>删除</a>
|
<a>{{$t('delete')}}</a>
|
||||||
</a-popconfirm>
|
</a-popconfirm>
|
||||||
</span>
|
</span>
|
||||||
</a-table>
|
</a-table>
|
||||||
@@ -70,22 +70,22 @@
|
|||||||
|
|
||||||
const columns = [
|
const columns = [
|
||||||
{
|
{
|
||||||
title: '规则名称',
|
title: this.$t('RuleName'),
|
||||||
dataIndex: 'ruleName',
|
dataIndex: 'ruleName',
|
||||||
key: 'ruleName'
|
key: 'ruleName'
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: '规则字段',
|
title: this.$t('RuleField'),
|
||||||
dataIndex: 'ruleColumn',
|
dataIndex: 'ruleColumn',
|
||||||
key: 'ruleColumn'
|
key: 'ruleColumn'
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: '规则值',
|
title: this.$t('RuleValue'),
|
||||||
dataIndex: 'ruleValue',
|
dataIndex: 'ruleValue',
|
||||||
key: 'ruleValue'
|
key: 'ruleValue'
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: '操作',
|
title: this.$t('operation'),
|
||||||
dataIndex: 'action',
|
dataIndex: 'action',
|
||||||
scopedSlots: {customRender: 'action'},
|
scopedSlots: {customRender: 'action'},
|
||||||
align: 'center'
|
align: 'center'
|
||||||
@@ -143,7 +143,7 @@
|
|||||||
},
|
},
|
||||||
addPermissionRule() {
|
addPermissionRule() {
|
||||||
this.$refs.modalForm.add(this.permId)
|
this.$refs.modalForm.add(this.permId)
|
||||||
this.$refs.modalForm.title = '新增'
|
this.$refs.modalForm.title = this.$t('add')
|
||||||
},
|
},
|
||||||
searchQuery() {
|
searchQuery() {
|
||||||
var params = this.getQueryParams();
|
var params = this.getQueryParams();
|
||||||
|
|||||||
@@ -65,7 +65,7 @@
|
|||||||
|
|
||||||
<a-dropdown>
|
<a-dropdown>
|
||||||
<a class="ant-dropdown-link">
|
<a class="ant-dropdown-link">
|
||||||
更多 <a-icon type="down"/>
|
{{$t('more')}} <a-icon type="down"/>
|
||||||
</a>
|
</a>
|
||||||
<a-menu slot="overlay">
|
<a-menu slot="overlay">
|
||||||
<a-menu-item>
|
<a-menu-item>
|
||||||
|
|||||||
@@ -144,7 +144,7 @@
|
|||||||
|
|
||||||
<a-menu-item v-if="record.status==1">
|
<a-menu-item v-if="record.status==1">
|
||||||
<a-popconfirm :title="$t('freezePassword')" @confirm="() => handleFrozen(record.id,2,record.username)">
|
<a-popconfirm :title="$t('freezePassword')" @confirm="() => handleFrozen(record.id,2,record.username)">
|
||||||
<a>{{$t('frozen')}}}</a>
|
<a>{{$t('frozen')}}</a>
|
||||||
</a-popconfirm>
|
</a-popconfirm>
|
||||||
</a-menu-item>
|
</a-menu-item>
|
||||||
|
|
||||||
|
|||||||
@@ -2,17 +2,17 @@
|
|||||||
<a-modal
|
<a-modal
|
||||||
:width="modalWidth"
|
:width="modalWidth"
|
||||||
:visible="visible"
|
:visible="visible"
|
||||||
title="部门搜索"
|
:title="$t('DepartmentSearch')"
|
||||||
:confirmLoading="confirmLoading"
|
:confirmLoading="confirmLoading"
|
||||||
@ok="handleSubmit"
|
@ok="handleSubmit"
|
||||||
@cancel="handleCancel"
|
@cancel="handleCancel"
|
||||||
cancelText="关闭"
|
:cancelText="$t('close')"
|
||||||
wrapClassName="ant-modal-cust-warp"
|
wrapClassName="ant-modal-cust-warp"
|
||||||
>
|
>
|
||||||
<!--部门树-->
|
<!--部门树-->
|
||||||
<template>
|
<template>
|
||||||
<a-form :form="form">
|
<a-form :form="form">
|
||||||
<a-form-item :labelCol="labelCol" :wrapperCol="wrapperCol" label="上级部门">
|
<a-form-item :labelCol="labelCol" :wrapperCol="wrapperCol" :label="$t('SuperiorDepartment')">
|
||||||
<a-tree
|
<a-tree
|
||||||
multiple
|
multiple
|
||||||
treeCheckable="tree"
|
treeCheckable="tree"
|
||||||
@@ -25,7 +25,7 @@
|
|||||||
@check="onCheck"
|
@check="onCheck"
|
||||||
:dropdownStyle="{maxHeight:'200px',overflow:'auto'}"
|
:dropdownStyle="{maxHeight:'200px',overflow:'auto'}"
|
||||||
:treeData="departTree"
|
:treeData="departTree"
|
||||||
placeholder="请选择上级部门"
|
:placeholder="$t('selectSuperiorDepartment')"
|
||||||
>
|
>
|
||||||
</a-tree>
|
</a-tree>
|
||||||
</a-form-item>
|
</a-form-item>
|
||||||
@@ -54,7 +54,7 @@
|
|||||||
departList:[], // 存储部门信息
|
departList:[], // 存储部门信息
|
||||||
modalWidth:400,
|
modalWidth:400,
|
||||||
departTree:[],
|
departTree:[],
|
||||||
title:"操作",
|
title:this.$t('operation'),
|
||||||
visible: false,
|
visible: false,
|
||||||
labelCol: {
|
labelCol: {
|
||||||
xs: { span: 24 },
|
xs: { span: 24 },
|
||||||
|
|||||||
@@ -4,63 +4,63 @@
|
|||||||
<a-form-item
|
<a-form-item
|
||||||
:labelCol="labelCol"
|
:labelCol="labelCol"
|
||||||
:wrapperCol="wrapperCol"
|
:wrapperCol="wrapperCol"
|
||||||
label="机构名称">
|
:label="$t('OrganizationName')">
|
||||||
<a-input style="border:0px;" placeholder="" v-decorator="['departName', {}]"/>
|
<a-input style="border:0px;" placeholder="" v-decorator="['departName', {}]"/>
|
||||||
</a-form-item>
|
</a-form-item>
|
||||||
<a-form-item :labelCol="labelCol" :wrapperCol="wrapperCol" label="上级部门">
|
<a-form-item :labelCol="labelCol" :wrapperCol="wrapperCol" :label="$t('SuperiorDepartment')">
|
||||||
<a-tree-select
|
<a-tree-select
|
||||||
disabled
|
disabled
|
||||||
style="width:100%;border: 0px;border: none;outline:none;"
|
style="width:100%;border: 0px;border: none;outline:none;"
|
||||||
:dropdownStyle="{maxHeight:'200px',overflow:'auto'}"
|
:dropdownStyle="{maxHeight:'200px',overflow:'auto'}"
|
||||||
:treeData="treeData"
|
:treeData="treeData"
|
||||||
v-model="model.parentId"
|
v-model="model.parentId"
|
||||||
placeholder="无">
|
:placeholder="$t('nothing')">
|
||||||
</a-tree-select>
|
</a-tree-select>
|
||||||
</a-form-item>
|
</a-form-item>
|
||||||
<a-form-item
|
<a-form-item
|
||||||
:labelCol="labelCol"
|
:labelCol="labelCol"
|
||||||
:wrapperCol="wrapperCol"
|
:wrapperCol="wrapperCol"
|
||||||
label="机构编码">
|
:label="$t('OrganizationCode')">
|
||||||
<a-input style="border:0px;" placeholder="" v-decorator="['orgCode', {}]"/>
|
<a-input style="border:0px;" placeholder="" v-decorator="['orgCode', {}]"/>
|
||||||
</a-form-item>
|
</a-form-item>
|
||||||
<a-form-item
|
<a-form-item
|
||||||
:labelCol="labelCol"
|
:labelCol="labelCol"
|
||||||
:wrapperCol="wrapperCol"
|
:wrapperCol="wrapperCol"
|
||||||
label="机构类型">
|
:label="$t('OrganizationType')">
|
||||||
<a-radio-group :disabled="true" v-decorator="['orgCategory',{}]" placeholder="请选择机构类型">
|
<a-radio-group :disabled="true" v-decorator="['orgCategory',{}]" :placeholder="$t('PleaseSelectOrganizationType')">
|
||||||
<a-radio value="1">
|
<a-radio value="1">
|
||||||
公司
|
{{$t('company')}}
|
||||||
</a-radio>
|
</a-radio>
|
||||||
<a-radio value="2">
|
<a-radio value="2">
|
||||||
部门
|
{{$t('department')}}
|
||||||
</a-radio>
|
</a-radio>
|
||||||
<a-radio value="3">
|
<a-radio value="3">
|
||||||
岗位
|
{{$t('post')}}
|
||||||
</a-radio>
|
</a-radio>
|
||||||
</a-radio-group>
|
</a-radio-group>
|
||||||
</a-form-item>
|
</a-form-item>
|
||||||
<a-form-item
|
<a-form-item
|
||||||
:labelCol="labelCol"
|
:labelCol="labelCol"
|
||||||
:wrapperCol="wrapperCol"
|
:wrapperCol="wrapperCol"
|
||||||
label="排序">
|
:label="$t('sort')">
|
||||||
<a-input-number style="border:0px;" v-decorator="[ 'departOrder',{}]"/>
|
<a-input-number style="border:0px;" v-decorator="[ 'departOrder',{}]"/>
|
||||||
</a-form-item>
|
</a-form-item>
|
||||||
<a-form-item
|
<a-form-item
|
||||||
:labelCol="labelCol"
|
:labelCol="labelCol"
|
||||||
:wrapperCol="wrapperCol"
|
:wrapperCol="wrapperCol"
|
||||||
label="手机号">
|
:label="$t('phoneNumber')">
|
||||||
<a-input style="border:0px;" placeholder="" v-decorator="['mobile', {}]"/>
|
<a-input style="border:0px;" placeholder="" v-decorator="['mobile', {}]"/>
|
||||||
</a-form-item>
|
</a-form-item>
|
||||||
<a-form-item
|
<a-form-item
|
||||||
:labelCol="labelCol"
|
:labelCol="labelCol"
|
||||||
:wrapperCol="wrapperCol"
|
:wrapperCol="wrapperCol"
|
||||||
label="地址">
|
:label="$t('address')">
|
||||||
<a-input style="border:0px;" placeholder="" v-decorator="['address', {}]"/>
|
<a-input style="border:0px;" placeholder="" v-decorator="['address', {}]"/>
|
||||||
</a-form-item>
|
</a-form-item>
|
||||||
<a-form-item
|
<a-form-item
|
||||||
:labelCol="labelCol"
|
:labelCol="labelCol"
|
||||||
:wrapperCol="wrapperCol"
|
:wrapperCol="wrapperCol"
|
||||||
label="备注">
|
:label="$t('remarks')">
|
||||||
<a-textarea style="border:0px;" placeholder="" v-decorator="['memo', {}]"/>
|
<a-textarea style="border:0px;" placeholder="" v-decorator="['memo', {}]"/>
|
||||||
</a-form-item>
|
</a-form-item>
|
||||||
</a-form>
|
</a-form>
|
||||||
|
|||||||
@@ -6,14 +6,14 @@
|
|||||||
<a-form layout="inline">
|
<a-form layout="inline">
|
||||||
<a-row :gutter="10">
|
<a-row :gutter="10">
|
||||||
<a-col :md="10" :sm="12">
|
<a-col :md="10" :sm="12">
|
||||||
<a-form-item label="部门角色名称" style="margin-left:8px">
|
<a-form-item :label="$t('DepartmentRoleName')" style="margin-left:8px">
|
||||||
<a-input placeholder="请输入部门角色" v-model="queryParam.roleName"></a-input>
|
<a-input :placeholder="$t('enterDepartmentRole')" v-model="queryParam.roleName"></a-input>
|
||||||
</a-form-item>
|
</a-form-item>
|
||||||
</a-col>
|
</a-col>
|
||||||
<span style="float: left;overflow: hidden;" class="table-page-search-submitButtons">
|
<span style="float: left;overflow: hidden;" class="table-page-search-submitButtons">
|
||||||
<a-col :md="6" :sm="24">
|
<a-col :md="6" :sm="24">
|
||||||
<a-button type="primary" @click="searchQuery" icon="search" style="margin-left: 18px">查询</a-button>
|
<a-button type="primary" @click="searchQuery" icon="search" style="margin-left: 18px">{{$t('query')}}</a-button>
|
||||||
<a-button type="primary" @click="searchReset" icon="reload" style="margin-left: 8px">重置</a-button>
|
<a-button type="primary" @click="searchReset" icon="reload" style="margin-left: 8px">{{$t('reset')}}</a-button>
|
||||||
</a-col>
|
</a-col>
|
||||||
</span>
|
</span>
|
||||||
</a-row>
|
</a-row>
|
||||||
@@ -21,20 +21,21 @@
|
|||||||
</div>
|
</div>
|
||||||
<!-- 操作按钮区域 -->
|
<!-- 操作按钮区域 -->
|
||||||
<div class="table-operator" :md="24" :sm="24">
|
<div class="table-operator" :md="24" :sm="24">
|
||||||
<a-button @click="handleAdd" type="primary" icon="plus">新建部门角色</a-button>
|
<a-button @click="handleAdd" type="primary" icon="plus">{{$t('NewDepartmentRole')}}</a-button>
|
||||||
<a-dropdown v-if="selectedRowKeys.length > 0">
|
<a-dropdown v-if="selectedRowKeys.length > 0">
|
||||||
<a-menu slot="overlay">
|
<a-menu slot="overlay">
|
||||||
<a-menu-item key="1" @click="batchDel"><a-icon type="delete"/>删除</a-menu-item>
|
<a-menu-item key="1" @click="batchDel"><a-icon type="delete"/>
|
||||||
|
{{$t('delete')}}</a-menu-item>
|
||||||
</a-menu>
|
</a-menu>
|
||||||
<a-button style="margin-left: 8px"> 批量操作 <a-icon type="down" /></a-button>
|
<a-button style="margin-left: 8px"> {{$t('batchOperation')}} <a-icon type="down" /></a-button>
|
||||||
</a-dropdown>
|
</a-dropdown>
|
||||||
</div>
|
</div>
|
||||||
<!-- table区域-begin -->
|
<!-- table区域-begin -->
|
||||||
<div>
|
<div>
|
||||||
<div class="ant-alert ant-alert-info" style="margin-bottom: 16px;">
|
<div class="ant-alert ant-alert-info" style="margin-bottom: 16px;">
|
||||||
<i class="anticon anticon-info-circle ant-alert-icon"></i> 已选择 <a style="font-weight: 600">
|
<i class="anticon anticon-info-circle ant-alert-icon"></i> {{$t('selected')}} <a style="font-weight: 600">
|
||||||
{{selectedRowKeys.length }}</a>项
|
{{selectedRowKeys.length }}</a> {{$t('term')}}
|
||||||
<a style="margin-left: 24px" @click="onClearSelected">清空</a>
|
<a style="margin-left: 24px" @click="onClearSelected">{{$t('empty')}}</a>
|
||||||
</div>
|
</div>
|
||||||
<a-table
|
<a-table
|
||||||
ref="table"
|
ref="table"
|
||||||
@@ -48,7 +49,7 @@
|
|||||||
:rowSelection="{selectedRowKeys: selectedRowKeys, onChange: onSelectChange}"
|
:rowSelection="{selectedRowKeys: selectedRowKeys, onChange: onSelectChange}"
|
||||||
@change="handleTableChange">
|
@change="handleTableChange">
|
||||||
<span slot="action" slot-scope="text, record">
|
<span slot="action" slot-scope="text, record">
|
||||||
<a @click="handleEdit(record)">编辑</a>
|
<a @click="handleEdit(record)">{{$t('edit')}}</a>
|
||||||
<a-divider type="vertical"/>
|
<a-divider type="vertical"/>
|
||||||
<a-dropdown>
|
<a-dropdown>
|
||||||
<a class="ant-dropdown-link">
|
<a class="ant-dropdown-link">
|
||||||
@@ -56,11 +57,11 @@
|
|||||||
</a>
|
</a>
|
||||||
<a-menu slot="overlay">
|
<a-menu slot="overlay">
|
||||||
<a-menu-item>
|
<a-menu-item>
|
||||||
<a @click="handlePerssion(record)">授权</a>
|
<a @click="handlePerssion(record)">{{$t('toGrantAuthorization')}}</a>
|
||||||
</a-menu-item>
|
</a-menu-item>
|
||||||
<a-menu-item>
|
<a-menu-item>
|
||||||
<a-popconfirm title="确定删除吗?" @confirm="() => handleDelete(record.id)">
|
<a-popconfirm :title="$t('areYouSure')" @confirm="() => handleDelete(record.id)">
|
||||||
<a>删除</a>
|
<a>{{$t('delete')}}</a>
|
||||||
</a-popconfirm>
|
</a-popconfirm>
|
||||||
</a-menu-item>
|
</a-menu-item>
|
||||||
</a-menu>
|
</a-menu>
|
||||||
@@ -87,31 +88,31 @@
|
|||||||
mixins: [JeroListMixin],
|
mixins: [JeroListMixin],
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
description: '部门角色信息',
|
description: this.$t('DepartmentRoleInformation'),
|
||||||
currentDeptId: '',
|
currentDeptId: '',
|
||||||
// 表头
|
// 表头
|
||||||
columns: [{
|
columns: [{
|
||||||
title: '部门角色名称',
|
title: this.$t('DepartmentRoleName'),
|
||||||
align: "center",
|
align: "center",
|
||||||
dataIndex: 'roleName'
|
dataIndex: 'roleName'
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: '部门角色编码',
|
title: this.$t('DepartmentRoleCode'),
|
||||||
align: "center",
|
align: "center",
|
||||||
dataIndex: 'roleCode'
|
dataIndex: 'roleCode'
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: '部门',
|
title: this.$t('department'),
|
||||||
align: "center",
|
align: "center",
|
||||||
dataIndex: 'departId_dictText'
|
dataIndex: 'departId_dictText'
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: '备注',
|
title: this.$t('remarks'),
|
||||||
align: "center",
|
align: "center",
|
||||||
dataIndex: 'description'
|
dataIndex: 'description'
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: '操作',
|
title: this.$t('operation'),
|
||||||
dataIndex: 'action',
|
dataIndex: 'action',
|
||||||
scopedSlots: {customRender: 'action'},
|
scopedSlots: {customRender: 'action'},
|
||||||
align: "center",
|
align: "center",
|
||||||
@@ -133,7 +134,7 @@
|
|||||||
},
|
},
|
||||||
loadData(arg) {
|
loadData(arg) {
|
||||||
if (!this.url.list) {
|
if (!this.url.list) {
|
||||||
this.$message.error("请设置url.list属性!")
|
this.$message.error(this.$t('setURLListAttribute'))
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
//加载数据 若传入参数1则加载第一页的内容
|
//加载数据 若传入参数1则加载第一页的内容
|
||||||
@@ -159,24 +160,24 @@
|
|||||||
},
|
},
|
||||||
hasSelectDept() {
|
hasSelectDept() {
|
||||||
if (this.currentDeptId == '') {
|
if (this.currentDeptId == '') {
|
||||||
this.$message.error("请选择一个部门!")
|
this.$message.error(this.$t('selectDepartmentFirst'))
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
return true;
|
return true;
|
||||||
},
|
},
|
||||||
handleEdit: function (record) {
|
handleEdit: function (record) {
|
||||||
this.$refs.modalForm.title = "编辑";
|
this.$refs.modalForm.title = this.$t('edit');
|
||||||
this.$refs.modalForm.departDisabled = true;
|
this.$refs.modalForm.departDisabled = true;
|
||||||
this.$refs.modalForm.disableSubmit = false;
|
this.$refs.modalForm.disableSubmit = false;
|
||||||
this.$refs.modalForm.edit(record,record.departId);
|
this.$refs.modalForm.edit(record,record.departId);
|
||||||
},
|
},
|
||||||
handleAdd: function () {
|
handleAdd: function () {
|
||||||
if (this.currentDeptId == '') {
|
if (this.currentDeptId == '') {
|
||||||
this.$message.error("请选择一个部门!")
|
this.$message.error(this.$t('selectDepartmentFirst'))
|
||||||
} else {
|
} else {
|
||||||
this.$refs.modalForm.departDisabled = true;
|
this.$refs.modalForm.departDisabled = true;
|
||||||
this.$refs.modalForm.add(this.currentDeptId);
|
this.$refs.modalForm.add(this.currentDeptId);
|
||||||
this.$refs.modalForm.title = "新增";
|
this.$refs.modalForm.title = this.$t('add');
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
handlePerssion: function(record){
|
handlePerssion: function(record){
|
||||||
|
|||||||
@@ -28,22 +28,22 @@
|
|||||||
</a-col>
|
</a-col>
|
||||||
</a-form-item>
|
</a-form-item>
|
||||||
</a-form>
|
</a-form>
|
||||||
<div v-else><h3>无可配置角色!</h3></div>
|
<div v-else><h3>{{$t('NoConfigurableRoles')}}!</h3></div>
|
||||||
</a-spin>
|
</a-spin>
|
||||||
<div class="drawer-bootom-button">
|
<div class="drawer-bootom-button">
|
||||||
<a-dropdown style="float: left" :trigger="['click']" placement="topCenter">
|
<a-dropdown style="float: left" :trigger="['click']" placement="topCenter">
|
||||||
<a-menu slot="overlay">
|
<a-menu slot="overlay">
|
||||||
<a-menu-item key="1" @click="checkALL">全部勾选</a-menu-item>
|
<a-menu-item key="1" @click="checkALL">{{$t('checkAll')}}</a-menu-item>
|
||||||
<a-menu-item key="2" @click="cancelCheckALL">取消全选</a-menu-item>
|
<a-menu-item key="2" @click="cancelCheckALL">{{$t('DeselectAll')}}</a-menu-item>
|
||||||
</a-menu>
|
</a-menu>
|
||||||
<a-button>
|
<a-button>
|
||||||
操作 <a-icon type="up" />
|
{{$t('operation')}} <a-icon type="up" />
|
||||||
</a-button>
|
</a-button>
|
||||||
</a-dropdown>
|
</a-dropdown>
|
||||||
<a-popconfirm title="确定放弃编辑?" @confirm="close" okText="确定" cancelText="取消">
|
<a-popconfirm :title="$t('AreYouWantDiscardEditing')" @confirm="close" :okText="$t('determine')" :cancelText="$t('cancel')">
|
||||||
<a-button style="margin-right: .8rem">取消</a-button>
|
<a-button style="margin-right: .8rem">{{$t('cancel')}}</a-button>
|
||||||
</a-popconfirm>
|
</a-popconfirm>
|
||||||
<a-button @click="handleSubmit(true)" type="primary">保存</a-button>
|
<a-button @click="handleSubmit(true)" type="primary">{{$t('preservation')}}</a-button>
|
||||||
</div>
|
</div>
|
||||||
</a-drawer>
|
</a-drawer>
|
||||||
</template>
|
</template>
|
||||||
@@ -61,7 +61,7 @@
|
|||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
currentDeptId:"",
|
currentDeptId:"",
|
||||||
title: "部门角色分配",
|
title: this.$t('DepartmentRole'),
|
||||||
visible: false,
|
visible: false,
|
||||||
model: {},
|
model: {},
|
||||||
labelCol: {
|
labelCol: {
|
||||||
|
|||||||
@@ -6,8 +6,8 @@
|
|||||||
<a-form layout="inline">
|
<a-form layout="inline">
|
||||||
<a-row :gutter="10">
|
<a-row :gutter="10">
|
||||||
<a-col :md="10" :sm="12">
|
<a-col :md="10" :sm="12">
|
||||||
<a-form-item label="用户账号" style="margin-left:8px">
|
<a-form-item :label="$t('userAccount')" style="margin-left:8px">
|
||||||
<a-input placeholder="请输入账号" v-model="queryParam.username"></a-input>
|
<a-input :placeholder="$t('enterAccountNumber')" v-model="queryParam.username"></a-input>
|
||||||
</a-form-item>
|
</a-form-item>
|
||||||
</a-col>
|
</a-col>
|
||||||
<!--<a-col :md="8" :sm="8">-->
|
<!--<a-col :md="8" :sm="8">-->
|
||||||
@@ -17,8 +17,8 @@
|
|||||||
<!--</a-col>-->
|
<!--</a-col>-->
|
||||||
<span style="float: left;overflow: hidden;" class="table-page-search-submitButtons">
|
<span style="float: left;overflow: hidden;" class="table-page-search-submitButtons">
|
||||||
<a-col :md="6" :sm="24">
|
<a-col :md="6" :sm="24">
|
||||||
<a-button type="primary" @click="searchQuery" icon="search" style="margin-left: 18px">查询</a-button>
|
<a-button type="primary" @click="searchQuery" icon="search" style="margin-left: 18px">{{$t('query')}}</a-button>
|
||||||
<a-button type="primary" @click="searchReset" icon="reload" style="margin-left: 8px">重置</a-button>
|
<a-button type="primary" @click="searchReset" icon="reload" style="margin-left: 8px">{{$t('reset')}}</a-button>
|
||||||
</a-col>
|
</a-col>
|
||||||
</span>
|
</span>
|
||||||
</a-row>
|
</a-row>
|
||||||
@@ -27,17 +27,17 @@
|
|||||||
<!-- 操作按钮区域 -->
|
<!-- 操作按钮区域 -->
|
||||||
<div class="table-operator" :md="24" :sm="24" style="margin-top: -15px">
|
<div class="table-operator" :md="24" :sm="24" style="margin-top: -15px">
|
||||||
<!--<a-button @click="handleEdit" type="primary" icon="edit" style="margin-top: 16px">用户编辑</a-button>-->
|
<!--<a-button @click="handleEdit" type="primary" icon="edit" style="margin-top: 16px">用户编辑</a-button>-->
|
||||||
<a-button @click="handleAddUserDepart" type="primary" icon="plus">添加已有用户</a-button>
|
<a-button @click="handleAddUserDepart" type="primary" icon="plus">{{$t('AddExistingUsers')}}</a-button>
|
||||||
<a-button @click="handleAdd" type="primary" icon="plus" style="margin-top: 16px">新建用户</a-button>
|
<a-button @click="handleAdd" type="primary" icon="plus" style="margin-top: 16px">{{$t('newUser')}}</a-button>
|
||||||
|
|
||||||
<a-dropdown v-if="selectedRowKeys.length > 0">
|
<a-dropdown v-if="selectedRowKeys.length > 0">
|
||||||
<a-menu slot="overlay">
|
<a-menu slot="overlay">
|
||||||
<a-menu-item key="1" @click="batchDel">
|
<a-menu-item key="1" @click="batchDel">
|
||||||
<a-icon type="delete"/>
|
<a-icon type="delete"/>
|
||||||
取消关联
|
{{$t('disassociate')}}
|
||||||
</a-menu-item>
|
</a-menu-item>
|
||||||
</a-menu>
|
</a-menu>
|
||||||
<a-button style="margin-left: 8px"> 批量操作
|
<a-button style="margin-left: 8px"> {{$t('batchOperation')}}
|
||||||
<a-icon type="down"/>
|
<a-icon type="down"/>
|
||||||
</a-button>
|
</a-button>
|
||||||
</a-dropdown>
|
</a-dropdown>
|
||||||
@@ -46,9 +46,9 @@
|
|||||||
<!-- table区域-begin -->
|
<!-- table区域-begin -->
|
||||||
<div>
|
<div>
|
||||||
<div class="ant-alert ant-alert-info" style="margin-bottom: 16px;">
|
<div class="ant-alert ant-alert-info" style="margin-bottom: 16px;">
|
||||||
<i class="anticon anticon-info-circle ant-alert-icon"></i> 已选择 <a style="font-weight: 600">{{
|
<i class="anticon anticon-info-circle ant-alert-icon"></i> {{$t('selected')}} <a style="font-weight: 600">{{
|
||||||
selectedRowKeys.length }}</a>项
|
selectedRowKeys.length }}</a> {{$t('term')}}
|
||||||
<a style="margin-left: 24px" @click="onClearSelected">清空</a>
|
<a style="margin-left: 24px" @click="onClearSelected">{{$t('empty')}}</a>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<a-table
|
<a-table
|
||||||
@@ -66,26 +66,26 @@
|
|||||||
|
|
||||||
|
|
||||||
<span slot="action" slot-scope="text, record">
|
<span slot="action" slot-scope="text, record">
|
||||||
<a @click="handleEdit(record)">编辑</a>
|
<a @click="handleEdit(record)">{{$t('edit')}}</a>
|
||||||
|
|
||||||
<a-divider type="vertical"/>
|
<a-divider type="vertical"/>
|
||||||
|
|
||||||
<a-dropdown>
|
<a-dropdown>
|
||||||
<a class="ant-dropdown-link">
|
<a class="ant-dropdown-link">
|
||||||
更多 <a-icon type="down"/>
|
{{$t('more')}} <a-icon type="down"/>
|
||||||
</a>
|
</a>
|
||||||
<a-menu slot="overlay">
|
<a-menu slot="overlay">
|
||||||
<a-menu-item>
|
<a-menu-item>
|
||||||
<a href="javascript:;" @click="handleDeptRole(record)">分配部门角色</a>
|
<a href="javascript:;" @click="handleDeptRole(record)">{{$t('AssignDepartmentRoles')}}</a>
|
||||||
</a-menu-item>
|
</a-menu-item>
|
||||||
|
|
||||||
<a-menu-item>
|
<a-menu-item>
|
||||||
<a href="javascript:;" @click="handleDetail(record)">用户详情</a>
|
<a href="javascript:;" @click="handleDetail(record)">{{$t('userDetail')}}</a>
|
||||||
</a-menu-item>
|
</a-menu-item>
|
||||||
|
|
||||||
<a-menu-item>
|
<a-menu-item>
|
||||||
<a-popconfirm title="确定取消与选中部门关联吗?" @confirm="() => handleDelete(record.id)">
|
<a-popconfirm :title="$t('AreYouCancelAssociation')" @confirm="() => handleDelete(record.id)">
|
||||||
<a>取消关联</a>
|
<a>{{$t('disassociate')}}</a>
|
||||||
</a-popconfirm>
|
</a-popconfirm>
|
||||||
</a-menu-item>
|
</a-menu-item>
|
||||||
</a-menu>
|
</a-menu>
|
||||||
@@ -121,37 +121,37 @@
|
|||||||
},
|
},
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
description: '用户信息',
|
description: this.$t('userInformation'),
|
||||||
currentDeptId: '',
|
currentDeptId: '',
|
||||||
currentDept: {},
|
currentDept: {},
|
||||||
// 表头
|
// 表头
|
||||||
columns: [{
|
columns: [{
|
||||||
title: '用户账号',
|
title: this.$t('userAccount'),
|
||||||
align: "center",
|
align: "center",
|
||||||
dataIndex: 'username'
|
dataIndex: 'username'
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: '用户名称',
|
title: this.$t('userName'),
|
||||||
align: "center",
|
align: "center",
|
||||||
dataIndex: 'realname'
|
dataIndex: 'realname'
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: '部门',
|
title: this.$t('department'),
|
||||||
align: "center",
|
align: "center",
|
||||||
dataIndex: 'orgCode'
|
dataIndex: 'orgCode'
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: '性别',
|
title: this.$t('Gender'),
|
||||||
align: "center",
|
align: "center",
|
||||||
dataIndex: 'sex_dictText'
|
dataIndex: 'sex_dictText'
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: '电话',
|
title: this.$t('phoneNumber'),
|
||||||
align: "center",
|
align: "center",
|
||||||
dataIndex: 'phone'
|
dataIndex: 'phone'
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: '操作',
|
title: this.$t('operation'),
|
||||||
dataIndex: 'action',
|
dataIndex: 'action',
|
||||||
scopedSlots: {customRender: 'action'},
|
scopedSlots: {customRender: 'action'},
|
||||||
align: "center",
|
align: "center",
|
||||||
@@ -175,7 +175,7 @@
|
|||||||
},
|
},
|
||||||
loadData(arg) {
|
loadData(arg) {
|
||||||
if (!this.url.list) {
|
if (!this.url.list) {
|
||||||
this.$message.error("请设置url.list属性!")
|
this.$message.error(this.$t('setURLListAttribute'))
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
//加载数据 若传入参数1则加载第一页的内容
|
//加载数据 若传入参数1则加载第一页的内容
|
||||||
@@ -195,16 +195,16 @@
|
|||||||
batchDel: function () {
|
batchDel: function () {
|
||||||
|
|
||||||
if (!this.url.deleteBatch) {
|
if (!this.url.deleteBatch) {
|
||||||
this.$message.error("请设置url.deleteBatch属性!")
|
this.$message.error(this.$t('setURLDeletebatchAttribute'))
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
if (!this.currentDeptId) {
|
if (!this.currentDeptId) {
|
||||||
this.$message.error("未选中任何部门,无法取消部门与用户的关联!")
|
this.$message.error(this.$t('NoDepartmentSelected'))
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
if (this.selectedRowKeys.length <= 0) {
|
if (this.selectedRowKeys.length <= 0) {
|
||||||
this.$message.warning('请选择一条记录!');
|
this.$message.warning(this.$t('selectARecored'));
|
||||||
return;
|
return;
|
||||||
} else {
|
} else {
|
||||||
var ids = "";
|
var ids = "";
|
||||||
@@ -214,12 +214,12 @@
|
|||||||
var that = this;
|
var that = this;
|
||||||
console.log(this.currentDeptId);
|
console.log(this.currentDeptId);
|
||||||
this.$confirm({
|
this.$confirm({
|
||||||
title: "确认取消",
|
title: this.$t('ConfirmCancellation'),
|
||||||
content: "是否取消用户与选中部门的关联?",
|
content: this.$t('CancelAssociation'),
|
||||||
onOk: function () {
|
onOk: function () {
|
||||||
deleteAction(that.url.deleteBatch, {depId: that.currentDeptId, userIds: ids}).then((res) => {
|
deleteAction(that.url.deleteBatch, {depId: that.currentDeptId, userIds: ids}).then((res) => {
|
||||||
if (res.success) {
|
if (res.success) {
|
||||||
that.$message.success("删除用户与选中部门关系成功!");
|
that.$message.success(this.$t('SuccessfullyDeleted'));
|
||||||
that.loadData();
|
that.loadData();
|
||||||
that.onClearSelected();
|
that.onClearSelected();
|
||||||
} else {
|
} else {
|
||||||
@@ -232,18 +232,18 @@
|
|||||||
},
|
},
|
||||||
handleDelete: function (id) {
|
handleDelete: function (id) {
|
||||||
if (!this.url.delete) {
|
if (!this.url.delete) {
|
||||||
this.$message.error("请设置url.delete属性!")
|
this.$message.error(this.$t('setURLDeleteAttribute'))
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
if (!this.currentDeptId) {
|
if (!this.currentDeptId) {
|
||||||
this.$message.error("未选中任何部门,无法取消部门与用户的关联!")
|
this.$message.error(this.$t('NoDepartmentSelected'))
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
var that = this;
|
var that = this;
|
||||||
deleteAction(that.url.delete, {depId: this.currentDeptId, userId: id}).then((res) => {
|
deleteAction(that.url.delete, {depId: this.currentDeptId, userId: id}).then((res) => {
|
||||||
if (res.success) {
|
if (res.success) {
|
||||||
that.$message.success("删除用户与选中部门关系成功!");
|
that.$message.success(this.$t('SuccessfullyDeleted'));
|
||||||
if (this.selectedRowKeys.length>0){
|
if (this.selectedRowKeys.length>0){
|
||||||
for(let i =0; i<this.selectedRowKeys.length;i++){
|
for(let i =0; i<this.selectedRowKeys.length;i++){
|
||||||
if (this.selectedRowKeys[i] == id){
|
if (this.selectedRowKeys[i] == id){
|
||||||
@@ -270,27 +270,27 @@
|
|||||||
},
|
},
|
||||||
hasSelectDept() {
|
hasSelectDept() {
|
||||||
if (this.currentDeptId == '') {
|
if (this.currentDeptId == '') {
|
||||||
this.$message.error("请选择一个部门!")
|
this.$message.error(this.$t('selectDepartmentFirst'))
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
return true;
|
return true;
|
||||||
},
|
},
|
||||||
handleAddUserDepart() {
|
handleAddUserDepart() {
|
||||||
if (this.currentDeptId == '' ) {
|
if (this.currentDeptId == '' ) {
|
||||||
this.$message.error("请选择一个部门!")
|
this.$message.error(this.$t('selectDepartmentFirst'))
|
||||||
} else {
|
} else {
|
||||||
this.$refs.selectUserModal.visible = true;
|
this.$refs.selectUserModal.visible = true;
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
handleEdit: function (record) {
|
handleEdit: function (record) {
|
||||||
this.$refs.modalForm.title = "编辑";
|
this.$refs.modalForm.title = this.$t('edit');
|
||||||
this.$refs.modalForm.departDisabled = true;
|
this.$refs.modalForm.departDisabled = true;
|
||||||
this.$refs.modalForm.disableSubmit = false;
|
this.$refs.modalForm.disableSubmit = false;
|
||||||
this.$refs.modalForm.edit(record);
|
this.$refs.modalForm.edit(record);
|
||||||
},
|
},
|
||||||
handleAdd: function () {
|
handleAdd: function () {
|
||||||
if (this.currentDeptId == '') {
|
if (this.currentDeptId == '') {
|
||||||
this.$message.error("请选择一个部门!")
|
this.$message.error(this.$t('selectDepartmentFirst'))
|
||||||
} else {
|
} else {
|
||||||
this.$refs.modalForm.departDisabled = true;
|
this.$refs.modalForm.departDisabled = true;
|
||||||
//初始化负责部门
|
//初始化负责部门
|
||||||
@@ -299,7 +299,7 @@
|
|||||||
//update-begin---author:liusq Date:20210223 for:https://gitee.com/jeecg/jeecg-boot/issues/I2SDU1------------
|
//update-begin---author:liusq Date:20210223 for:https://gitee.com/jeecg/jeecg-boot/issues/I2SDU1------------
|
||||||
this.$refs.modalForm.resultDepartOptions=[{key:this.currentDept.key,title:this.currentDept.title}]
|
this.$refs.modalForm.resultDepartOptions=[{key:this.currentDept.key,title:this.currentDept.title}]
|
||||||
//update-end---author:liusq Date:20210223 for:https://gitee.com/jeecg/jeecg-boot/issues/I2SDU1------------
|
//update-end---author:liusq Date:20210223 for:https://gitee.com/jeecg/jeecg-boot/issues/I2SDU1------------
|
||||||
this.$refs.modalForm.title = "新增";
|
this.$refs.modalForm.title = this.$t('add');
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
selectOK(data) {
|
selectOK(data) {
|
||||||
@@ -322,9 +322,9 @@
|
|||||||
handleDeptRole(record){
|
handleDeptRole(record){
|
||||||
if(this.currentDeptId != ''){
|
if(this.currentDeptId != ''){
|
||||||
this.$refs.deptRoleUser.add(record,this.currentDeptId);
|
this.$refs.deptRoleUser.add(record,this.currentDeptId);
|
||||||
this.$refs.deptRoleUser.title = "部门角色分配";
|
this.$refs.deptRoleUser.title = this.$t('DepartmentRole');
|
||||||
}else{
|
}else{
|
||||||
this.$message.warning("请先选择一个部门!");
|
this.$message.warning(this.$t('selectDepartmentFirst'));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -6,7 +6,7 @@
|
|||||||
:confirmLoading="confirmLoading"
|
:confirmLoading="confirmLoading"
|
||||||
@ok="handleOk"
|
@ok="handleOk"
|
||||||
@cancel="handleCancel"
|
@cancel="handleCancel"
|
||||||
cancelText="关闭"
|
:cancelText="$t('close')"
|
||||||
>
|
>
|
||||||
<a-spin :spinning="confirmLoading">
|
<a-spin :spinning="confirmLoading">
|
||||||
<a-form :form="form">
|
<a-form :form="form">
|
||||||
@@ -14,21 +14,21 @@
|
|||||||
<a-form-item
|
<a-form-item
|
||||||
:labelCol="labelCol"
|
:labelCol="labelCol"
|
||||||
:wrapperCol="wrapperCol"
|
:wrapperCol="wrapperCol"
|
||||||
label="字典名称">
|
:label="$t('DictionaryName')">
|
||||||
<a-input placeholder="请输入字典名称" v-decorator.trim="[ 'dictName', validatorRules.dictName]"/>
|
<a-input :placeholder="$t('enterDictionary')" v-decorator.trim="[ 'dictName', validatorRules.dictName]"/>
|
||||||
</a-form-item>
|
</a-form-item>
|
||||||
|
|
||||||
<a-form-item
|
<a-form-item
|
||||||
:labelCol="labelCol"
|
:labelCol="labelCol"
|
||||||
:wrapperCol="wrapperCol"
|
:wrapperCol="wrapperCol"
|
||||||
label="字典编码">
|
:label="$t('DictionaryCoding')">
|
||||||
<a-input placeholder="请输入字典编码" v-decorator.trim="[ 'dictCode', validatorRules.dictCode]"/>
|
<a-input :placeholder="$t('enterDictionaryCode')" v-decorator.trim="[ 'dictCode', validatorRules.dictCode]"/>
|
||||||
</a-form-item>
|
</a-form-item>
|
||||||
|
|
||||||
<a-form-item
|
<a-form-item
|
||||||
:labelCol="labelCol"
|
:labelCol="labelCol"
|
||||||
:wrapperCol="wrapperCol"
|
:wrapperCol="wrapperCol"
|
||||||
label="描述">
|
:label="$t('describe')">
|
||||||
<a-input v-decorator="[ 'description']"/>
|
<a-input v-decorator="[ 'description']"/>
|
||||||
</a-form-item>
|
</a-form-item>
|
||||||
|
|
||||||
@@ -46,7 +46,7 @@
|
|||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
value: 1,
|
value: 1,
|
||||||
title: '操作',
|
title: this.$t('operation'),
|
||||||
visible: false,
|
visible: false,
|
||||||
model: {},
|
model: {},
|
||||||
labelCol: {
|
labelCol: {
|
||||||
@@ -60,9 +60,9 @@
|
|||||||
confirmLoading: false,
|
confirmLoading: false,
|
||||||
form: this.$form.createForm(this),
|
form: this.$form.createForm(this),
|
||||||
validatorRules: {
|
validatorRules: {
|
||||||
dictName: { rules: [{ required: true, message: '请输入字典名称!' }] },
|
dictName: { rules: [{ required: true, message: this.$t('enterDictionary') }] },
|
||||||
dictCode: {
|
dictCode: {
|
||||||
rules: [{ required: true, message: '请输入字典编码!' },
|
rules: [{ required: true, message: this.$t('enterDictionaryCode') },
|
||||||
{ validator: this.validateDictCode }]
|
{ validator: this.validateDictCode }]
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,27 +1,27 @@
|
|||||||
<template>
|
<template>
|
||||||
<a-modal
|
<a-modal
|
||||||
title="重新设定密码"
|
:title="$t('ResetPassword')"
|
||||||
:width="800"
|
:width="800"
|
||||||
:visible="visible"
|
:visible="visible"
|
||||||
:confirmLoading="confirmLoading"
|
:confirmLoading="confirmLoading"
|
||||||
@ok="handleSubmit"
|
@ok="handleSubmit"
|
||||||
@cancel="handleCancel"
|
@cancel="handleCancel"
|
||||||
cancelText="关闭"
|
:cancelText="$t('close')"
|
||||||
style="top:20px;"
|
style="top:20px;"
|
||||||
>
|
>
|
||||||
<a-spin :spinning="confirmLoading">
|
<a-spin :spinning="confirmLoading">
|
||||||
<a-form :form="form">
|
<a-form :form="form">
|
||||||
|
|
||||||
<a-form-item label="用户账号" :labelCol="labelCol" :wrapperCol="wrapperCol">
|
<a-form-item :label="$t('userAccount')" :labelCol="labelCol" :wrapperCol="wrapperCol">
|
||||||
<a-input placeholder="请输入用户账号" v-decorator="[ 'username', {}]" :readOnly="true"/>
|
<a-input :placeholder="$t('enterUserAccount')" v-decorator="[ 'username', {}]" :readOnly="true"/>
|
||||||
</a-form-item>
|
</a-form-item>
|
||||||
|
|
||||||
<a-form-item label="登录密码" :labelCol="labelCol" :wrapperCol="wrapperCol" hasFeedback >
|
<a-form-item :label="$t('LoginPassword')" :labelCol="labelCol" :wrapperCol="wrapperCol" hasFeedback >
|
||||||
<a-input type="password" placeholder="请输入登录密码" v-decorator="[ 'password', validatorRules.password]" />
|
<a-input type="password" :placeholder="$t('enterLoginPassword')" v-decorator="[ 'password', validatorRules.password]" />
|
||||||
</a-form-item>
|
</a-form-item>
|
||||||
|
|
||||||
<a-form-item label="确认密码" :labelCol="labelCol" :wrapperCol="wrapperCol" hasFeedback >
|
<a-form-item :label="$t('ConfirmPassword')" :labelCol="labelCol" :wrapperCol="wrapperCol" hasFeedback >
|
||||||
<a-input type="password" @blur="handleConfirmBlur" placeholder="请重新输入登录密码" v-decorator="[ 'confirmpassword', validatorRules.confirmpassword]"/>
|
<a-input type="password" @blur="handleConfirmBlur" :placeholder="$t('reenterLoginPassword')" v-decorator="[ 'confirmpassword', validatorRules.confirmpassword]"/>
|
||||||
</a-form-item>
|
</a-form-item>
|
||||||
|
|
||||||
</a-form>
|
</a-form>
|
||||||
@@ -44,14 +44,14 @@
|
|||||||
rules: [{
|
rules: [{
|
||||||
required: true,
|
required: true,
|
||||||
pattern:/^(?=.*[a-zA-Z])(?=.*\d)(?=.*[~!@#$%^&*()_+`\-={}:";'<>?,./]).{8,}$/,
|
pattern:/^(?=.*[a-zA-Z])(?=.*\d)(?=.*[~!@#$%^&*()_+`\-={}:";'<>?,./]).{8,}$/,
|
||||||
message: '密码由8位数字、大小写字母和特殊符号组成!'
|
message: this.$t('passwordConsists')
|
||||||
}, {
|
}, {
|
||||||
validator: this.validateToNextPassword,
|
validator: this.validateToNextPassword,
|
||||||
}],
|
}],
|
||||||
},
|
},
|
||||||
confirmpassword:{
|
confirmpassword:{
|
||||||
rules: [{
|
rules: [{
|
||||||
required: true, message: '请重新输入登录密码!',
|
required: true, message: this.$t('reenterLoginPassword'),
|
||||||
}, {
|
}, {
|
||||||
validator: this.compareToFirstPassword,
|
validator: this.compareToFirstPassword,
|
||||||
}],
|
}],
|
||||||
@@ -118,7 +118,7 @@
|
|||||||
const confirmpassword=form.getFieldValue('confirmpassword');
|
const confirmpassword=form.getFieldValue('confirmpassword');
|
||||||
console.log("confirmpassword==>",confirmpassword);
|
console.log("confirmpassword==>",confirmpassword);
|
||||||
if (value && confirmpassword && value !== confirmpassword) {
|
if (value && confirmpassword && value !== confirmpassword) {
|
||||||
callback('两次输入的密码不一样!');
|
callback(this.$t('passwordsEnteredTwice'));
|
||||||
}
|
}
|
||||||
if (value && this.confirmDirty) {
|
if (value && this.confirmDirty) {
|
||||||
form.validateFields(['confirm'], { force: true })
|
form.validateFields(['confirm'], { force: true })
|
||||||
@@ -128,7 +128,7 @@
|
|||||||
compareToFirstPassword (rule, value, callback) {
|
compareToFirstPassword (rule, value, callback) {
|
||||||
const form = this.form;
|
const form = this.form;
|
||||||
if (value && value !== form.getFieldValue('password')) {
|
if (value && value !== form.getFieldValue('password')) {
|
||||||
callback('两次输入的密码不一样!');
|
callback(this.$t('passwordsEnteredTwice'));
|
||||||
} else {
|
} else {
|
||||||
callback()
|
callback()
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -6,7 +6,7 @@
|
|||||||
:confirmLoading="confirmLoading"
|
:confirmLoading="confirmLoading"
|
||||||
@ok="handleOk"
|
@ok="handleOk"
|
||||||
@cancel="handleCancel"
|
@cancel="handleCancel"
|
||||||
cancelText="关闭">
|
:cancelText="$t('close')">
|
||||||
|
|
||||||
<a-spin :spinning="confirmLoading">
|
<a-spin :spinning="confirmLoading">
|
||||||
<a-form :form="form">
|
<a-form :form="form">
|
||||||
@@ -14,36 +14,36 @@
|
|||||||
<a-form-item
|
<a-form-item
|
||||||
:labelCol="labelCol"
|
:labelCol="labelCol"
|
||||||
:wrapperCol="wrapperCol"
|
:wrapperCol="wrapperCol"
|
||||||
label="规则名称">
|
:label="$t('RuleName')">
|
||||||
<a-input placeholder="请输入规则名称" v-decorator="['ruleName', validatorRules.ruleName]"/>
|
<a-input :placeholder="$t('enterRuleName')" v-decorator="['ruleName', validatorRules.ruleName]"/>
|
||||||
</a-form-item>
|
</a-form-item>
|
||||||
<a-form-item
|
<a-form-item
|
||||||
v-show="showRuleColumn"
|
v-show="showRuleColumn"
|
||||||
:labelCol="labelCol"
|
:labelCol="labelCol"
|
||||||
:wrapperCol="wrapperCol"
|
:wrapperCol="wrapperCol"
|
||||||
label="规则字段">
|
:label="$t('RuleField')">
|
||||||
<a-input placeholder="请输入规则字段" v-decorator="['ruleColumn', validatorRules.ruleColumn]"/>
|
<a-input :placeholder="$t('enterRuleField')" v-decorator="['ruleColumn', validatorRules.ruleColumn]"/>
|
||||||
</a-form-item>
|
</a-form-item>
|
||||||
<a-form-item
|
<a-form-item
|
||||||
:labelCol="labelCol"
|
:labelCol="labelCol"
|
||||||
:wrapperCol="wrapperCol"
|
:wrapperCol="wrapperCol"
|
||||||
label="条件规则">
|
:label="$t('ConditionalRules')">
|
||||||
<j-dict-select-tag @change="handleChangeRuleCondition" v-decorator="['ruleConditions', validatorRules.ruleConditions]" placeholder="请输入条件规则" :triggerChange="true" dictCode="rule_conditions"/>
|
<j-dict-select-tag @change="handleChangeRuleCondition" v-decorator="['ruleConditions', validatorRules.ruleConditions]" :placeholder="$t('enterConditionRule')" :triggerChange="true" dictCode="rule_conditions"/>
|
||||||
</a-form-item>
|
</a-form-item>
|
||||||
<a-form-item
|
<a-form-item
|
||||||
:labelCol="labelCol"
|
:labelCol="labelCol"
|
||||||
:wrapperCol="wrapperCol"
|
:wrapperCol="wrapperCol"
|
||||||
label="规则值">
|
:label="$t('RuleValue')">
|
||||||
<a-input placeholder="请输入规则值" v-decorator="['ruleValue', validatorRules.ruleValue]"/>
|
<a-input :placeholder="$t('enterRuleValue')" v-decorator="['ruleValue', validatorRules.ruleValue]"/>
|
||||||
</a-form-item>
|
</a-form-item>
|
||||||
|
|
||||||
<a-form-item
|
<a-form-item
|
||||||
:labelCol="labelCol"
|
:labelCol="labelCol"
|
||||||
:wrapperCol="wrapperCol"
|
:wrapperCol="wrapperCol"
|
||||||
label="状态">
|
:label="$t('status')">
|
||||||
<a-radio-group buttonStyle="solid" v-decorator="['status',{initialValue:'1'}]">
|
<a-radio-group buttonStyle="solid" v-decorator="['status',{initialValue:'1'}]">
|
||||||
<a-radio-button value="1">有效</a-radio-button>
|
<a-radio-button value="1">{{$t('effective')}}</a-radio-button>
|
||||||
<a-radio-button value="0">无效</a-radio-button>
|
<a-radio-button value="0">{{$t('invalid')}}</a-radio-button>
|
||||||
</a-radio-group>
|
</a-radio-group>
|
||||||
</a-form-item>
|
</a-form-item>
|
||||||
|
|
||||||
@@ -60,7 +60,7 @@
|
|||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
queryParam: {},
|
queryParam: {},
|
||||||
title: '操作',
|
title: this.$t('operation'),
|
||||||
visible: false,
|
visible: false,
|
||||||
model: {},
|
model: {},
|
||||||
ruleConditionList: [],
|
ruleConditionList: [],
|
||||||
@@ -76,9 +76,9 @@
|
|||||||
form: this.$form.createForm(this),
|
form: this.$form.createForm(this),
|
||||||
permissionId: '',
|
permissionId: '',
|
||||||
validatorRules: {
|
validatorRules: {
|
||||||
ruleConditions: {rules: [{required: true, message: '请选择条件!'}]},
|
ruleConditions: {rules: [{required: true, message:this.$t('selectCondition')}]},
|
||||||
ruleName: {rules: [{required: true, message: '请输入规则名称!'}]},
|
ruleName: {rules: [{required: true, message: this.$t('enterRuleName')}]},
|
||||||
ruleValue: {rules: [{required: true, message: '请输入规则值!'}]},
|
ruleValue: {rules: [{required: true, message: this.$t('enterRuleValue')}]},
|
||||||
ruleColumn: {rules: []}
|
ruleColumn: {rules: []}
|
||||||
},
|
},
|
||||||
url: {
|
url: {
|
||||||
|
|||||||
@@ -10,11 +10,11 @@
|
|||||||
<a-spin :spinning="confirmLoading">
|
<a-spin :spinning="confirmLoading">
|
||||||
<a-form :form="form">
|
<a-form :form="form">
|
||||||
|
|
||||||
<a-form-item label="菜单类型" :labelCol="labelCol" :wrapperCol="wrapperCol" >
|
<a-form-item :label="$t('MenuType')" :labelCol="labelCol" :wrapperCol="wrapperCol" >
|
||||||
<a-radio-group @change="onChangeMenuType" v-decorator="['menuType',{'initialValue':localMenuType}]">
|
<a-radio-group @change="onChangeMenuType" v-decorator="['menuType',{'initialValue':localMenuType}]">
|
||||||
<a-radio :value="0">一级菜单</a-radio>
|
<a-radio :value="0">{{$t('FirstLevelMenu')}}</a-radio>
|
||||||
<a-radio :value="1">子菜单</a-radio>
|
<a-radio :value="1">{{$t('Submenu')}}</a-radio>
|
||||||
<a-radio :value="2">按钮/权限</a-radio>
|
<a-radio :value="2">{{$t('ButtonsPermissions')}}</a-radio>
|
||||||
</a-radio-group>
|
</a-radio-group>
|
||||||
</a-form-item>
|
</a-form-item>
|
||||||
|
|
||||||
@@ -23,25 +23,25 @@
|
|||||||
:wrapperCol="wrapperCol"
|
:wrapperCol="wrapperCol"
|
||||||
:label="menuLabel"
|
:label="menuLabel"
|
||||||
hasFeedback >
|
hasFeedback >
|
||||||
<a-input placeholder="请输入菜单名称" v-decorator="[ 'name', validatorRules.name]" :readOnly="disableSubmit"/>
|
<a-input :placeholder="$t('enterMenuName')" v-decorator="[ 'name', validatorRules.name]" :readOnly="disableSubmit"/>
|
||||||
</a-form-item>
|
</a-form-item>
|
||||||
|
|
||||||
|
|
||||||
<a-form-item
|
<a-form-item
|
||||||
v-show="localMenuType!=0"
|
v-show="localMenuType!=0"
|
||||||
label="上级菜单"
|
:label="$t('SuperiorMenu')"
|
||||||
:labelCol="labelCol"
|
:labelCol="labelCol"
|
||||||
:wrapperCol="wrapperCol"
|
:wrapperCol="wrapperCol"
|
||||||
:validate-status="validateStatus"
|
:validate-status="validateStatus"
|
||||||
:hasFeedback="true"
|
:hasFeedback="true"
|
||||||
:required="true">
|
:required="true">
|
||||||
<span slot="help">{{ validateStatus=='error'?'请选择上级菜单':' ' }}</span>
|
<span slot="help">{{ validateStatus=='error'? $t('selectSuperiorMenu'):' ' }}</span>
|
||||||
<a-tree-select
|
<a-tree-select
|
||||||
style="width:100%"
|
style="width:100%"
|
||||||
:dropdownStyle="{ maxHeight: '200px', overflow: 'auto' }"
|
:dropdownStyle="{ maxHeight: '200px', overflow: 'auto' }"
|
||||||
:treeData="treeData"
|
:treeData="treeData"
|
||||||
v-model="model.parentId"
|
v-model="model.parentId"
|
||||||
placeholder="请选择父级菜单"
|
:placeholder="$t('selectParentMenu')"
|
||||||
:disabled="disableSubmit"
|
:disabled="disableSubmit"
|
||||||
@change="handleParentIdChange">
|
@change="handleParentIdChange">
|
||||||
</a-tree-select>
|
</a-tree-select>
|
||||||
@@ -50,40 +50,40 @@
|
|||||||
<a-form-item
|
<a-form-item
|
||||||
:labelCol="labelCol"
|
:labelCol="labelCol"
|
||||||
:wrapperCol="wrapperCol"
|
:wrapperCol="wrapperCol"
|
||||||
label="菜单路径">
|
:label="$t('MenuPath')">
|
||||||
<a-input placeholder="请输入菜单路径" v-decorator="[ 'url',validatorRules.url]" :readOnly="disableSubmit"/>
|
<a-input :placeholder="$t('enterMenuPath')" v-decorator="[ 'url',validatorRules.url]" :readOnly="disableSubmit"/>
|
||||||
</a-form-item>
|
</a-form-item>
|
||||||
|
|
||||||
<a-form-item
|
<a-form-item
|
||||||
v-show="show"
|
v-show="show"
|
||||||
:labelCol="labelCol"
|
:labelCol="labelCol"
|
||||||
:wrapperCol="wrapperCol"
|
:wrapperCol="wrapperCol"
|
||||||
label="前端组件">
|
:label="$t('FrontAssembly')">
|
||||||
<a-input placeholder="请输入前端组件" v-decorator="[ 'component',validatorRules.component]" :readOnly="disableSubmit"/>
|
<a-input :placeholder="$t('enterFrontComponents')" v-decorator="[ 'component',validatorRules.component]" :readOnly="disableSubmit"/>
|
||||||
</a-form-item>
|
</a-form-item>
|
||||||
|
|
||||||
<a-form-item
|
<a-form-item
|
||||||
v-show="localMenuType==0"
|
v-show="localMenuType==0"
|
||||||
:labelCol="labelCol"
|
:labelCol="labelCol"
|
||||||
:wrapperCol="wrapperCol"
|
:wrapperCol="wrapperCol"
|
||||||
label="默认跳转地址">
|
:label="$t('DefaultJumpAddress')">
|
||||||
<a-input placeholder="请输入路由参数 redirect" v-decorator="[ 'redirect',{}]" :readOnly="disableSubmit"/>
|
<a-input :placeholder="$t('enterRoutingParameters')+' redirect'" v-decorator="[ 'redirect',{}]" :readOnly="disableSubmit"/>
|
||||||
</a-form-item>
|
</a-form-item>
|
||||||
|
|
||||||
<a-form-item
|
<a-form-item
|
||||||
v-show="!show"
|
v-show="!show"
|
||||||
:labelCol="labelCol"
|
:labelCol="labelCol"
|
||||||
:wrapperCol="wrapperCol"
|
:wrapperCol="wrapperCol"
|
||||||
label="授权标识">
|
:label="$t('AuthorizationID')">
|
||||||
<a-input placeholder="请输入授权标识, 如: user:list" v-decorator="[ 'perms', {rules:[{ required: false, message: '请输入授权标识!' },{validator: this.validatePerms }]}]" :readOnly="disableSubmit"/>
|
<a-input :placeholder="$t('enterAuthorizationID')+' user:list'" v-decorator="[ 'perms', {rules:[{ required: false, message: $t('PleaseEnterAuthorizationID') },{validator: this.validatePerms }]}]" :readOnly="disableSubmit"/>
|
||||||
</a-form-item>
|
</a-form-item>
|
||||||
|
|
||||||
<a-form-item
|
<a-form-item
|
||||||
v-show="!show"
|
v-show="!show"
|
||||||
:labelCol="labelCol"
|
:labelCol="labelCol"
|
||||||
:wrapperCol="wrapperCol"
|
:wrapperCol="wrapperCol"
|
||||||
label="授权策略">
|
:label="$t('AuthorizationPolicy')">
|
||||||
<j-dict-select-tag v-decorator="['permsType', {}]" placeholder="请选择授权策略" :type="'radio'" :triggerChange="true" dictCode="global_perms_type"/>
|
<j-dict-select-tag v-decorator="['permsType', {}]" :placeholder="$t('selectAuthorizationPolicy')" :type="'radio'" :triggerChange="true" dictCode="global_perms_type"/>
|
||||||
|
|
||||||
|
|
||||||
</a-form-item>
|
</a-form-item>
|
||||||
@@ -91,8 +91,8 @@
|
|||||||
v-show="!show"
|
v-show="!show"
|
||||||
:labelCol="labelCol"
|
:labelCol="labelCol"
|
||||||
:wrapperCol="wrapperCol"
|
:wrapperCol="wrapperCol"
|
||||||
label="状态">
|
:label="$t('status')">
|
||||||
<j-dict-select-tag v-decorator="['status', {}]" placeholder="请选择状态" :type="'radio'" :triggerChange="true" dictCode="valid_status"/>
|
<j-dict-select-tag v-decorator="['status', {}]" :placeholder="$t('selectStatus')" :type="'radio'" :triggerChange="true" dictCode="valid_status"/>
|
||||||
|
|
||||||
</a-form-item>
|
</a-form-item>
|
||||||
|
|
||||||
@@ -100,8 +100,8 @@
|
|||||||
v-show="show"
|
v-show="show"
|
||||||
:labelCol="labelCol"
|
:labelCol="labelCol"
|
||||||
:wrapperCol="wrapperCol"
|
:wrapperCol="wrapperCol"
|
||||||
label="菜单图标">
|
:label="$t('MenuIcon')">
|
||||||
<a-input placeholder="点击选择图标" v-model="model.icon" :readOnly="disableSubmit">
|
<a-input :placeholder="$t('ClickSelectIcon')" v-model="model.icon" :readOnly="disableSubmit">
|
||||||
<a-icon slot="addonAfter" type="setting" @click="selectIcons" />
|
<a-icon slot="addonAfter" type="setting" @click="selectIcons" />
|
||||||
</a-input>
|
</a-input>
|
||||||
</a-form-item>
|
</a-form-item>
|
||||||
@@ -110,32 +110,32 @@
|
|||||||
v-show="show"
|
v-show="show"
|
||||||
:labelCol="labelCol"
|
:labelCol="labelCol"
|
||||||
:wrapperCol="wrapperCol"
|
:wrapperCol="wrapperCol"
|
||||||
label="排序">
|
:label="$t('sort')">
|
||||||
<a-input-number placeholder="请输入菜单排序" style="width: 200px" v-decorator="[ 'sortNo',validatorRules.sortNo]" :readOnly="disableSubmit"/>
|
<a-input-number :placeholder="$t('enterMenuSort')" style="width: 200px" v-decorator="[ 'sortNo',validatorRules.sortNo]" :readOnly="disableSubmit"/>
|
||||||
</a-form-item>
|
</a-form-item>
|
||||||
|
|
||||||
<a-form-item
|
<a-form-item
|
||||||
v-show="show"
|
v-show="show"
|
||||||
:labelCol="labelCol"
|
:labelCol="labelCol"
|
||||||
:wrapperCol="wrapperCol"
|
:wrapperCol="wrapperCol"
|
||||||
label="是否路由菜单">
|
:label="$t('RouteMenu')">
|
||||||
<a-switch checkedChildren="是" unCheckedChildren="否" v-model="routeSwitch"/>
|
<a-switch :checkedChildren="$t('yes')" :unCheckedChildren="$t('not')" v-model="routeSwitch"/>
|
||||||
</a-form-item>
|
</a-form-item>
|
||||||
|
|
||||||
<a-form-item
|
<a-form-item
|
||||||
v-show="show"
|
v-show="show"
|
||||||
:labelCol="labelCol"
|
:labelCol="labelCol"
|
||||||
:wrapperCol="wrapperCol"
|
:wrapperCol="wrapperCol"
|
||||||
label="隐藏路由">
|
:label="$t('HideRoute')">
|
||||||
<a-switch checkedChildren="是" unCheckedChildren="否" v-model="menuHidden"/>
|
<a-switch :checkedChildren="$t('yes')" :unCheckedChildren="$t('not')" v-model="menuHidden"/>
|
||||||
</a-form-item>
|
</a-form-item>
|
||||||
|
|
||||||
<a-form-item
|
<a-form-item
|
||||||
v-show="show"
|
v-show="show"
|
||||||
:labelCol="labelCol"
|
:labelCol="labelCol"
|
||||||
:wrapperCol="wrapperCol"
|
:wrapperCol="wrapperCol"
|
||||||
label="是否缓存路由">
|
:label="$t('CacheRoute')">
|
||||||
<a-switch checkedChildren="是" unCheckedChildren="否" v-model="isKeepalive"/>
|
<a-switch :checkedChildren="$t('yes')" :unCheckedChildren="$t('not')" v-model="isKeepalive"/>
|
||||||
</a-form-item>
|
</a-form-item>
|
||||||
|
|
||||||
|
|
||||||
@@ -143,8 +143,8 @@
|
|||||||
v-show="show"
|
v-show="show"
|
||||||
:labelCol="labelCol"
|
:labelCol="labelCol"
|
||||||
:wrapperCol="wrapperCol"
|
:wrapperCol="wrapperCol"
|
||||||
label="聚合路由">
|
:label="$t('AggregateRouting')">
|
||||||
<a-switch checkedChildren="是" unCheckedChildren="否" v-model="alwaysShow"/>
|
<a-switch :checkedChildren="$t('yes')" :unCheckedChildren="$t('not')" v-model="alwaysShow"/>
|
||||||
</a-form-item>
|
</a-form-item>
|
||||||
|
|
||||||
<!--update_begin author:wuxianquan date:20190908 for:增加组件,外链打开方式可选 -->
|
<!--update_begin author:wuxianquan date:20190908 for:增加组件,外链打开方式可选 -->
|
||||||
@@ -152,8 +152,8 @@
|
|||||||
v-show="show"
|
v-show="show"
|
||||||
:labelCol="labelCol"
|
:labelCol="labelCol"
|
||||||
:wrapperCol="wrapperCol"
|
:wrapperCol="wrapperCol"
|
||||||
label="打开方式">
|
:label="$t('OpenMode')">
|
||||||
<a-switch checkedChildren="外部" unCheckedChildren="内部" v-model="internalOrExternal"/>
|
<a-switch :checkedChildren="$t('external')" :unCheckedChildren="$t('inside')" v-model="internalOrExternal"/>
|
||||||
</a-form-item>
|
</a-form-item>
|
||||||
<!--update_end author:wuxianquan date:20190908 for:增加组件,外链打开方式可选 -->
|
<!--update_end author:wuxianquan date:20190908 for:增加组件,外链打开方式可选 -->
|
||||||
|
|
||||||
@@ -165,9 +165,9 @@
|
|||||||
</a-spin>
|
</a-spin>
|
||||||
<a-row :style="{textAlign:'right'}">
|
<a-row :style="{textAlign:'right'}">
|
||||||
<a-button :style="{marginRight: '8px'}" @click="handleCancel">
|
<a-button :style="{marginRight: '8px'}" @click="handleCancel">
|
||||||
关闭
|
{{$t('close')}}
|
||||||
</a-button>
|
</a-button>
|
||||||
<a-button :disabled="disableSubmit" @click="handleOk" type="primary">确定</a-button>
|
<a-button :disabled="disableSubmit" @click="handleOk" type="primary">{{$t('determine')}}</a-button>
|
||||||
</a-row>
|
</a-row>
|
||||||
</div>
|
</div>
|
||||||
</a-drawer>
|
</a-drawer>
|
||||||
@@ -186,7 +186,7 @@
|
|||||||
drawerWidth:700,
|
drawerWidth:700,
|
||||||
treeData:[],
|
treeData:[],
|
||||||
treeValue: '0-0-4',
|
treeValue: '0-0-4',
|
||||||
title:"操作",
|
title:this.$t('operation'),
|
||||||
visible: false,
|
visible: false,
|
||||||
disableSubmit:false,
|
disableSubmit:false,
|
||||||
model: {},
|
model: {},
|
||||||
@@ -199,7 +199,7 @@
|
|||||||
/*update_end author:wuxianquan date:20190908 for:定义变量,初始值代表内部打开*/
|
/*update_end author:wuxianquan date:20190908 for:定义变量,初始值代表内部打开*/
|
||||||
isKeepalive:true, //是否缓存路由
|
isKeepalive:true, //是否缓存路由
|
||||||
show:true,//根据菜单类型,动态显示隐藏表单元素
|
show:true,//根据菜单类型,动态显示隐藏表单元素
|
||||||
menuLabel:'菜单名称',
|
menuLabel:this.$t('MenuName'),
|
||||||
isRequrie:true, // 是否需要验证
|
isRequrie:true, // 是否需要验证
|
||||||
labelCol: {
|
labelCol: {
|
||||||
xs: { span: 24 },
|
xs: { span: 24 },
|
||||||
@@ -220,10 +220,10 @@
|
|||||||
computed:{
|
computed:{
|
||||||
validatorRules:function() {
|
validatorRules:function() {
|
||||||
return {
|
return {
|
||||||
name:{rules: [{ required: true, message: '请输入菜单标题!' }]},
|
name:{rules: [{ required: true, message: this.$t('enterMenuTitle') }]},
|
||||||
component:{rules: [{ required: this.show, message: '请输入前端组件!' }]},
|
component:{rules: [{ required: this.show, message: this.$t('enterFrontComponents') }]},
|
||||||
url:{rules: [{ required: this.show, message: '请输入菜单路径!' }]},
|
url:{rules: [{ required: this.show, message: this.$t('enterMenuPath') }]},
|
||||||
permsType:{rules: [{ required: true, message: '请输入授权策略!' }]},
|
permsType:{rules: [{ required: true, message: this.$t('enterAuthorizationPolicy') }]},
|
||||||
sortNo:{initialValue:1.0},
|
sortNo:{initialValue:1.0},
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -279,7 +279,7 @@
|
|||||||
|
|
||||||
|
|
||||||
this.show = record.menuType==2?false:true;
|
this.show = record.menuType==2?false:true;
|
||||||
this.menuLabel = record.menuType==2?'按钮/权限':'菜单名称';
|
this.menuLabel = record.menuType==2?this.$t('ButtonsPermissions'):this.$t('MenuName');
|
||||||
|
|
||||||
if(this.model.parentId){
|
if(this.model.parentId){
|
||||||
this.localMenuType = 1;
|
this.localMenuType = 1;
|
||||||
@@ -349,7 +349,7 @@
|
|||||||
if(!value || new RegExp(/^[0-9]*[1-9][0-9]*$/).test(value)){
|
if(!value || new RegExp(/^[0-9]*[1-9][0-9]*$/).test(value)){
|
||||||
callback();
|
callback();
|
||||||
}else{
|
}else{
|
||||||
callback("请输入正整数!");
|
callback(this.$t('enterPositiveInteger'));
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
validatePerms(rule, value, callback){
|
validatePerms(rule, value, callback){
|
||||||
@@ -365,7 +365,7 @@
|
|||||||
if (res.success) {
|
if (res.success) {
|
||||||
callback()
|
callback()
|
||||||
} else {
|
} else {
|
||||||
callback("授权标识已存在!")
|
callback(this.$t('AuthorizationIDExists'))
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
}else{
|
}else{
|
||||||
@@ -376,10 +376,10 @@
|
|||||||
this.localMenuType=e.target.value
|
this.localMenuType=e.target.value
|
||||||
if(e.target.value == 2){
|
if(e.target.value == 2){
|
||||||
this.show = false;
|
this.show = false;
|
||||||
this.menuLabel = '按钮/权限';
|
this.menuLabel = this.$t('ButtonsPermissions');
|
||||||
}else{
|
}else{
|
||||||
this.show = true;
|
this.show = true;
|
||||||
this.menuLabel = '菜单名称';
|
this.menuLabel = this.$t('MenuName');
|
||||||
}
|
}
|
||||||
this.$nextTick(() => {
|
this.$nextTick(() => {
|
||||||
this.form.validateFields(['url','component'], { force: true });
|
this.form.validateFields(['url','component'], { force: true });
|
||||||
|
|||||||
@@ -7,7 +7,7 @@
|
|||||||
:visible="visible"
|
:visible="visible"
|
||||||
@ok="handleOk"
|
@ok="handleOk"
|
||||||
@cancel="handleCancel"
|
@cancel="handleCancel"
|
||||||
cancelText="关闭">
|
:cancelText="$t('close')">
|
||||||
|
|
||||||
|
|
||||||
<!-- 查询区域 -->
|
<!-- 查询区域 -->
|
||||||
@@ -16,14 +16,14 @@
|
|||||||
<a-row :gutter="24">
|
<a-row :gutter="24">
|
||||||
|
|
||||||
<a-col :span="10">
|
<a-col :span="10">
|
||||||
<a-form-item label="用户账号">
|
<a-form-item :label="$t('userAccount')">
|
||||||
<a-input placeholder="请输入用户账号" v-model="queryParam.username"></a-input>
|
<a-input :placeholder="$t('enterUserAccount')" v-model="queryParam.username"></a-input>
|
||||||
</a-form-item>
|
</a-form-item>
|
||||||
</a-col>
|
</a-col>
|
||||||
<a-col :span="8">
|
<a-col :span="8">
|
||||||
<span style="float: left;overflow: hidden;" class="table-page-search-submitButtons">
|
<span style="float: left;overflow: hidden;" class="table-page-search-submitButtons">
|
||||||
<a-button type="primary" @click="searchQuery" icon="search">查询</a-button>
|
<a-button type="primary" @click="searchQuery" icon="search">{{$t('query')}}</a-button>
|
||||||
<a-button type="primary" @click="searchReset" icon="reload" style="margin-left: 8px">重置</a-button>
|
<a-button type="primary" @click="searchReset" icon="reload" style="margin-left: 8px">{{$t('reset')}}</a-button>
|
||||||
</span>
|
</span>
|
||||||
</a-col>
|
</a-col>
|
||||||
|
|
||||||
@@ -61,7 +61,7 @@
|
|||||||
name: "SelectUserModal",
|
name: "SelectUserModal",
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
title: "添加已有用户",
|
title: this.$t('AddExistingUsers'),
|
||||||
names: [],
|
names: [],
|
||||||
visible: false,
|
visible: false,
|
||||||
placement: 'right',
|
placement: 'right',
|
||||||
@@ -81,31 +81,31 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: '用户账号',
|
title: this.$t('userAccount'),
|
||||||
align: "center",
|
align: "center",
|
||||||
width: 100,
|
width: 100,
|
||||||
dataIndex: 'username'
|
dataIndex: 'username'
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: '用户名称',
|
title: this.$t('userName'),
|
||||||
align: "center",
|
align: "center",
|
||||||
width: 100,
|
width: 100,
|
||||||
dataIndex: 'realname'
|
dataIndex: 'realname'
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: '性别',
|
title: this.$t('Gender'),
|
||||||
align: "center",
|
align: "center",
|
||||||
width: 100,
|
width: 100,
|
||||||
dataIndex: 'sex_dictText'
|
dataIndex: 'sex_dictText'
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: '电话',
|
title: this.$t('phoneNumber'),
|
||||||
align: "center",
|
align: "center",
|
||||||
width: 100,
|
width: 100,
|
||||||
dataIndex: 'phone'
|
dataIndex: 'phone'
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: '部门',
|
title: this.$t('department'),
|
||||||
align: "center",
|
align: "center",
|
||||||
width: 150,
|
width: 150,
|
||||||
dataIndex: 'orgCode'
|
dataIndex: 'orgCode'
|
||||||
@@ -113,18 +113,18 @@
|
|||||||
],
|
],
|
||||||
columns2: [
|
columns2: [
|
||||||
{
|
{
|
||||||
title: '用户账号',
|
title: this.$t('userAccount'),
|
||||||
align: "center",
|
align: "center",
|
||||||
dataIndex: 'username',
|
dataIndex: 'username',
|
||||||
|
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: '用户名称',
|
title: this.$t('userName'),
|
||||||
align: "center",
|
align: "center",
|
||||||
dataIndex: 'realname',
|
dataIndex: 'realname',
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: '操作',
|
title: this.$t('operation'),
|
||||||
dataIndex: 'action',
|
dataIndex: 'action',
|
||||||
align: "center",
|
align: "center",
|
||||||
width: 100,
|
width: 100,
|
||||||
@@ -140,7 +140,7 @@
|
|||||||
pageSize: 10,
|
pageSize: 10,
|
||||||
pageSizeOptions: ['10', '20', '30'],
|
pageSizeOptions: ['10', '20', '30'],
|
||||||
showTotal: (total, range) => {
|
showTotal: (total, range) => {
|
||||||
return range[0] + "-" + range[1] + " 共" + total + "条"
|
return range[0] + "-" + range[1] + " "+this.$t('total') + total + this.$t('strip')
|
||||||
},
|
},
|
||||||
showQuickJumper: true,
|
showQuickJumper: true,
|
||||||
showSizeChanger: true,
|
showSizeChanger: true,
|
||||||
|
|||||||
@@ -22,22 +22,22 @@
|
|||||||
<a-spin :spinning="confirmLoading">
|
<a-spin :spinning="confirmLoading">
|
||||||
<a-form :form="form">
|
<a-form :form="form">
|
||||||
|
|
||||||
<a-form-item label="用户账号" :labelCol="labelCol" :wrapperCol="wrapperCol">
|
<a-form-item :label="$t('userAccount')" :labelCol="labelCol" :wrapperCol="wrapperCol">
|
||||||
<a-input placeholder="请输入用户账号" v-decorator.trim="[ 'username', validatorRules.username]" :readOnly="!!model.id"/>
|
<a-input :placeholder="$t('enterUserAccount')" v-decorator.trim="[ 'username', validatorRules.username]" :readOnly="!!model.id"/>
|
||||||
</a-form-item>
|
</a-form-item>
|
||||||
|
|
||||||
<template v-if="!model.id">
|
<template v-if="!model.id">
|
||||||
<a-form-item label="登录密码" :labelCol="labelCol" :wrapperCol="wrapperCol" >
|
<a-form-item :label="$t('LoginPassword')" :labelCol="labelCol" :wrapperCol="wrapperCol" >
|
||||||
<a-input type="password" placeholder="请输入登录密码" autocomplete = 'new-password' v-decorator="[ 'password',validatorRules.password]" />
|
<a-input type="password" :placeholder="$t('enterLoginPassword')" autocomplete = 'new-password' v-decorator="[ 'password',validatorRules.password]" />
|
||||||
</a-form-item>
|
</a-form-item>
|
||||||
|
|
||||||
<a-form-item label="确认密码" :labelCol="labelCol" :wrapperCol="wrapperCol" >
|
<a-form-item :label="$t('ConfirmPassword')" :labelCol="labelCol" :wrapperCol="wrapperCol" >
|
||||||
<a-input type="password" @blur="handleConfirmBlur" placeholder="请重新输入登录密码" v-decorator="[ 'confirmpassword', validatorRules.confirmpassword]"/>
|
<a-input type="password" @blur="handleConfirmBlur" :placeholder="$t('reenterLoginPassword')" v-decorator="[ 'confirmpassword', validatorRules.confirmpassword]"/>
|
||||||
</a-form-item>
|
</a-form-item>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<a-form-item label="用户姓名" :labelCol="labelCol" :wrapperCol="wrapperCol" >
|
<a-form-item :label="$t('userName')" :labelCol="labelCol" :wrapperCol="wrapperCol" >
|
||||||
<a-input placeholder="请输入用户姓名" v-decorator.trim="[ 'realname', validatorRules.realname]" />
|
<a-input :placeholder="$t('enterUserName')" v-decorator.trim="[ 'realname', validatorRules.realname]" />
|
||||||
</a-form-item>
|
</a-form-item>
|
||||||
|
|
||||||
<!--<a-form-item label="工号" :labelCol="labelCol" :wrapperCol="wrapperCol">-->
|
<!--<a-form-item label="工号" :labelCol="labelCol" :wrapperCol="wrapperCol">-->
|
||||||
@@ -48,12 +48,12 @@
|
|||||||
<!--<j-select-position placeholder="请选择职务" :multiple="false" v-decorator="['post', {}]"/>-->
|
<!--<j-select-position placeholder="请选择职务" :multiple="false" v-decorator="['post', {}]"/>-->
|
||||||
<!--</a-form-item>-->
|
<!--</a-form-item>-->
|
||||||
|
|
||||||
<a-form-item label="角色分配" :labelCol="labelCol" :wrapperCol="wrapperCol" v-show="!roleDisabled" >
|
<a-form-item :label="$t('RoleAssignment')" :labelCol="labelCol" :wrapperCol="wrapperCol" v-show="!roleDisabled" >
|
||||||
<a-select
|
<a-select
|
||||||
mode="multiple"
|
mode="multiple"
|
||||||
:disabled="departDisabled"
|
:disabled="departDisabled"
|
||||||
style="width: 100%"
|
style="width: 100%"
|
||||||
placeholder="请选择用户角色"
|
:placeholder="$t('selectUserRole')"
|
||||||
optionFilterProp = "children"
|
optionFilterProp = "children"
|
||||||
v-model="selectedRole"
|
v-model="selectedRole"
|
||||||
:getPopupContainer= "(target) => target.parentNode">
|
:getPopupContainer= "(target) => target.parentNode">
|
||||||
@@ -64,13 +64,13 @@
|
|||||||
</a-form-item>
|
</a-form-item>
|
||||||
|
|
||||||
<!--部门分配-->
|
<!--部门分配-->
|
||||||
<a-form-item label="部门分配" :labelCol="labelCol" :wrapperCol="wrapperCol" v-show="!departDisabled">
|
<a-form-item :label="$t('DepartmentAllocation')" :labelCol="labelCol" :wrapperCol="wrapperCol" v-show="!departDisabled">
|
||||||
<a-input-search
|
<a-input-search
|
||||||
placeholder="点击选择部门"
|
:placeholder="$t('ClickSelectDepartment')"
|
||||||
v-model="checkedDepartNameString"
|
v-model="checkedDepartNameString"
|
||||||
readOnly
|
readOnly
|
||||||
@search="onSearch">
|
@search="onSearch">
|
||||||
<a-button slot="enterButton" icon="search">选择</a-button>
|
<a-button slot="enterButton" icon="search">{{$t('choice')}}</a-button>
|
||||||
</a-input-search>
|
</a-input-search>
|
||||||
</a-form-item>
|
</a-form-item>
|
||||||
|
|
||||||
@@ -90,19 +90,19 @@
|
|||||||
<!--</a-form-item>-->
|
<!--</a-form-item>-->
|
||||||
|
|
||||||
<!-- update--begin--autor:wangshuai-----date:20200108------for:新增身份和负责部门------ -->
|
<!-- update--begin--autor:wangshuai-----date:20200108------for:新增身份和负责部门------ -->
|
||||||
<a-form-item label="身份" :labelCol="labelCol" :wrapperCol="wrapperCol">
|
<a-form-item :label="$t('identity')" :labelCol="labelCol" :wrapperCol="wrapperCol">
|
||||||
<a-radio-group
|
<a-radio-group
|
||||||
v-model="identity"
|
v-model="identity"
|
||||||
@change="identityChange">
|
@change="identityChange">
|
||||||
<a-radio value="1">普通用户</a-radio>
|
<a-radio value="1">{{$t('OrdinaryUsers')}}</a-radio>
|
||||||
<a-radio value="2">上级</a-radio>
|
<a-radio value="2">{{$t('superior')}}</a-radio>
|
||||||
</a-radio-group>
|
</a-radio-group>
|
||||||
</a-form-item>
|
</a-form-item>
|
||||||
<a-form-item label="负责部门" :labelCol="labelCol" :wrapperCol="wrapperCol" v-if="departIdShow==true">
|
<a-form-item :label="$t('ResponsibleDepartment')" :labelCol="labelCol" :wrapperCol="wrapperCol" v-if="departIdShow==true">
|
||||||
<a-select
|
<a-select
|
||||||
mode="multiple"
|
mode="multiple"
|
||||||
style="width: 100%"
|
style="width: 100%"
|
||||||
placeholder="请选择负责部门"
|
:placeholder="$t('selectResponsibleDepartment')"
|
||||||
v-model="departIds"
|
v-model="departIds"
|
||||||
optionFilterProp = "children"
|
optionFilterProp = "children"
|
||||||
:getPopupContainer = "(target) => target.parentNode"
|
:getPopupContainer = "(target) => target.parentNode"
|
||||||
@@ -126,19 +126,19 @@
|
|||||||
<!--:getCalendarContainer="node => node.parentNode"/>-->
|
<!--:getCalendarContainer="node => node.parentNode"/>-->
|
||||||
<!--</a-form-item>-->
|
<!--</a-form-item>-->
|
||||||
|
|
||||||
<a-form-item label="性别" :labelCol="labelCol" :wrapperCol="wrapperCol">
|
<a-form-item :label="$t('Gender')" :labelCol="labelCol" :wrapperCol="wrapperCol">
|
||||||
<a-select v-decorator="[ 'sex', {}]" placeholder="请选择性别" :getPopupContainer= "(target) => target.parentNode">
|
<a-select v-decorator="[ 'sex', {}]" :placeholder="$t('selectGender')" :getPopupContainer= "(target) => target.parentNode">
|
||||||
<a-select-option :value="1">男</a-select-option>
|
<a-select-option :value="1">{{$t('male')}}</a-select-option>
|
||||||
<a-select-option :value="2">女</a-select-option>
|
<a-select-option :value="2">{{$t('female')}}</a-select-option>
|
||||||
</a-select>
|
</a-select>
|
||||||
</a-form-item>
|
</a-form-item>
|
||||||
|
|
||||||
<a-form-item label="邮箱" :labelCol="labelCol" :wrapperCol="wrapperCol">
|
<a-form-item :label="$t('mailbox')" :labelCol="labelCol" :wrapperCol="wrapperCol">
|
||||||
<a-input placeholder="请输入邮箱" v-decorator="[ 'email', validatorRules.email]" />
|
<a-input :placeholder="$t('enterEmailAddress')" v-decorator="[ 'email', validatorRules.email]" />
|
||||||
</a-form-item>
|
</a-form-item>
|
||||||
|
|
||||||
<a-form-item label="手机号码" :labelCol="labelCol" :wrapperCol="wrapperCol">
|
<a-form-item :label="$t('phoneNumber')" :labelCol="labelCol" :wrapperCol="wrapperCol">
|
||||||
<a-input placeholder="请输入手机号码" :disabled="isDisabledAuth('user:form:phone')" v-decorator="[ 'phone', validatorRules.phone]" />
|
<a-input :placeholder="$t('enterMobileNumber')" :disabled="isDisabledAuth('user:form:phone')" v-decorator="[ 'phone', validatorRules.phone]" />
|
||||||
</a-form-item>
|
</a-form-item>
|
||||||
|
|
||||||
<!--<a-form-item label="座机" :labelCol="labelCol" :wrapperCol="wrapperCol">-->
|
<!--<a-form-item label="座机" :labelCol="labelCol" :wrapperCol="wrapperCol">-->
|
||||||
@@ -154,10 +154,10 @@
|
|||||||
<depart-window ref="departWindow" @ok="modalFormOk"></depart-window>
|
<depart-window ref="departWindow" @ok="modalFormOk"></depart-window>
|
||||||
|
|
||||||
<div class="drawer-bootom-button" v-show="!disableSubmit">
|
<div class="drawer-bootom-button" v-show="!disableSubmit">
|
||||||
<a-popconfirm title="确定放弃编辑?" @confirm="handleCancel" okText="确定" cancelText="取消">
|
<a-popconfirm :title="$t('AreYouWantDiscardEditing')" @confirm="handleCancel" :okText="$t('determine')" :cancelText="$t('cancel')">
|
||||||
<a-button style="margin-right: .8rem">取消</a-button>
|
<a-button style="margin-right: .8rem">{{$t('cancel')}}</a-button>
|
||||||
</a-popconfirm>
|
</a-popconfirm>
|
||||||
<a-button @click="handleSubmit" type="primary" :loading="confirmLoading">提交</a-button>
|
<a-button @click="handleSubmit" type="primary" :loading="confirmLoading">{{$t('submit')}}</a-button>
|
||||||
</div>
|
</div>
|
||||||
</a-drawer>
|
</a-drawer>
|
||||||
</template>
|
</template>
|
||||||
@@ -201,7 +201,7 @@
|
|||||||
validatorRules:{
|
validatorRules:{
|
||||||
username:{
|
username:{
|
||||||
rules: [{
|
rules: [{
|
||||||
required: true, message: '请输入用户账号!'
|
required: true, message: this.$t('enterUserAccount')
|
||||||
},{
|
},{
|
||||||
validator: this.validateUsername,
|
validator: this.validateUsername,
|
||||||
}]
|
}]
|
||||||
@@ -210,19 +210,19 @@
|
|||||||
rules: [{
|
rules: [{
|
||||||
required: true,
|
required: true,
|
||||||
pattern:/^(?=.*[a-zA-Z])(?=.*\d)(?=.*[~!@#$%^&*()_+`\-={}:";'<>?,./]).{8,}$/,
|
pattern:/^(?=.*[a-zA-Z])(?=.*\d)(?=.*[~!@#$%^&*()_+`\-={}:";'<>?,./]).{8,}$/,
|
||||||
message: '密码由8位数字、大小写字母和特殊符号组成!'
|
message: this.$t('passwordConsists')
|
||||||
}, {
|
}, {
|
||||||
validator: this.validateToNextPassword,
|
validator: this.validateToNextPassword,
|
||||||
}],
|
}],
|
||||||
},
|
},
|
||||||
confirmpassword:{
|
confirmpassword:{
|
||||||
rules: [{
|
rules: [{
|
||||||
required: true, message: '请重新输入登录密码!',
|
required: true, message: this.$t('reenterLoginPassword'),
|
||||||
}, {
|
}, {
|
||||||
validator: this.compareToFirstPassword,
|
validator: this.compareToFirstPassword,
|
||||||
}],
|
}],
|
||||||
},
|
},
|
||||||
realname:{rules: [{ required: true, message: '请输入用户名称!' }]},
|
realname:{rules: [{ required: true, message: this.$t('enterUserName') }]},
|
||||||
phone:{rules: [{validator: this.validatePhone}]},
|
phone:{rules: [{validator: this.validatePhone}]},
|
||||||
email:{
|
email:{
|
||||||
rules: [{
|
rules: [{
|
||||||
@@ -233,19 +233,19 @@
|
|||||||
// sex:{initialValue:((!this.model.sex)?"": (this.model.sex+""))}
|
// sex:{initialValue:((!this.model.sex)?"": (this.model.sex+""))}
|
||||||
workNo: {
|
workNo: {
|
||||||
rules: [
|
rules: [
|
||||||
{ required: true, message: '请输入工号' },
|
{ required: true, message: this.$t('enterJobNumber') },
|
||||||
{ validator: this.validateWorkNo }
|
{ validator: this.validateWorkNo }
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
telephone: {
|
telephone: {
|
||||||
rules: [
|
rules: [
|
||||||
{ pattern: /^0\d{2,3}-[1-9]\d{6,7}$/, message: '请输入正确的座机号码' },
|
{ pattern: /^0\d{2,3}-[1-9]\d{6,7}$/, message: this.$t('enterCorrectLandline') },
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
departIdShow:false,
|
departIdShow:false,
|
||||||
departIds:[], //负责部门id
|
departIds:[], //负责部门id
|
||||||
title:"操作",
|
title:this.$t('operation'),
|
||||||
visible: false,
|
visible: false,
|
||||||
model: {},
|
model: {},
|
||||||
roleList:[],
|
roleList:[],
|
||||||
@@ -492,7 +492,7 @@
|
|||||||
const confirmpassword=form.getFieldValue('confirmpassword');
|
const confirmpassword=form.getFieldValue('confirmpassword');
|
||||||
|
|
||||||
if (value && confirmpassword && value !== confirmpassword) {
|
if (value && confirmpassword && value !== confirmpassword) {
|
||||||
callback('两次输入的密码不一样!');
|
callback(this.$t('passwordsEnteredTwice'));
|
||||||
}
|
}
|
||||||
if (value && this.confirmDirty) {
|
if (value && this.confirmDirty) {
|
||||||
form.validateFields(['confirm'], { force: true })
|
form.validateFields(['confirm'], { force: true })
|
||||||
@@ -502,7 +502,7 @@
|
|||||||
compareToFirstPassword (rule, value, callback) {
|
compareToFirstPassword (rule, value, callback) {
|
||||||
const form = this.form;
|
const form = this.form;
|
||||||
if (value && value !== form.getFieldValue('password')) {
|
if (value && value !== form.getFieldValue('password')) {
|
||||||
callback('两次输入的密码不一样!');
|
callback(this.$t('passwordsEnteredTwice'));
|
||||||
} else {
|
} else {
|
||||||
callback()
|
callback()
|
||||||
}
|
}
|
||||||
@@ -525,11 +525,11 @@
|
|||||||
if (res.success) {
|
if (res.success) {
|
||||||
callback()
|
callback()
|
||||||
} else {
|
} else {
|
||||||
callback("手机号已存在!")
|
callback(this.$t('PnumberExists'))
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
}else{
|
}else{
|
||||||
callback("请输入正确格式的手机号码!");
|
callback(this.$t('enterPhoneCorrect'));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
@@ -549,11 +549,11 @@
|
|||||||
if (res.success) {
|
if (res.success) {
|
||||||
callback()
|
callback()
|
||||||
} else {
|
} else {
|
||||||
callback("邮箱已存在!")
|
callback(this.$t('MailboxExists'))
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
}else{
|
}else{
|
||||||
callback("请输入正确格式的邮箱!")
|
callback(this.$t('enterMailboxCorrect'))
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
@@ -568,7 +568,7 @@
|
|||||||
if (res.success) {
|
if (res.success) {
|
||||||
callback()
|
callback()
|
||||||
} else {
|
} else {
|
||||||
callback("用户名已存在!")
|
callback(this.$t('UserExists'))
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
@@ -583,7 +583,7 @@
|
|||||||
if (res.success) {
|
if (res.success) {
|
||||||
callback()
|
callback()
|
||||||
} else {
|
} else {
|
||||||
callback("工号已存在!")
|
callback(this.$t('nameExists'))
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
@@ -602,7 +602,7 @@
|
|||||||
beforeUpload: function(file){
|
beforeUpload: function(file){
|
||||||
var fileType = file.type;
|
var fileType = file.type;
|
||||||
if(fileType.indexOf('image')<0){
|
if(fileType.indexOf('image')<0){
|
||||||
this.$message.warning('请上传图片');
|
this.$message.warning(this.$t('uploadPictures'));
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
//TODO 验证文件大小
|
//TODO 验证文件大小
|
||||||
|
|||||||
@@ -4,21 +4,21 @@
|
|||||||
:title="title"
|
:title="title"
|
||||||
:visible="innerVisible"
|
:visible="innerVisible"
|
||||||
@cancel="handleCancel"
|
@cancel="handleCancel"
|
||||||
cancelText="关闭"
|
:cancelText="$t('close')"
|
||||||
:okButtonProps="{style:{display:'none'}}"
|
:okButtonProps="{style:{display:'none'}}"
|
||||||
>
|
>
|
||||||
<a-alert type="info" showIcon style="margin-bottom: 16px;">
|
<a-alert type="info" showIcon style="margin-bottom: 16px;">
|
||||||
<template slot="message">
|
<template slot="message">
|
||||||
<span>已选择</span>
|
<span>{{$t('selected')}}</span>
|
||||||
<a style="font-weight: 600;padding: 0 4px;">{{ selectedRowKeys.length }}</a>
|
<a style="font-weight: 600;padding: 0 4px;">{{ selectedRowKeys.length }}</a>
|
||||||
<span>项</span>
|
<span>{{$t('term')}}</span>
|
||||||
<template v-if="selectedRowKeys.length>0">
|
<template v-if="selectedRowKeys.length>0">
|
||||||
<a-divider type="vertical"/>
|
<a-divider type="vertical"/>
|
||||||
<a @click="handleClearSelection">清空选择</a>
|
<a @click="handleClearSelection">{{$t('ClearSelection')}}</a>
|
||||||
<a-divider type="vertical"/>
|
<a-divider type="vertical"/>
|
||||||
<a @click="handleRevertBatch">批量还原</a>
|
<a @click="handleRevertBatch">{{$t('BatchRestore')}}</a>
|
||||||
<a-divider type="vertical"/>
|
<a-divider type="vertical"/>
|
||||||
<a @click="handleDeleteBatch">批量删除</a>
|
<a @click="handleDeleteBatch">{{$t('BatchDelete')}}</a>
|
||||||
</template>
|
</template>
|
||||||
</template>
|
</template>
|
||||||
</a-alert>
|
</a-alert>
|
||||||
@@ -43,9 +43,9 @@
|
|||||||
</template>
|
</template>
|
||||||
|
|
||||||
<span slot="action" slot-scope="text, record">
|
<span slot="action" slot-scope="text, record">
|
||||||
<a @click="handleRevert([record.id])"><a-icon type="redo"/> 还原用户</a>
|
<a @click="handleRevert([record.id])"><a-icon type="redo"/> {{$t('RestoreUser')}}</a>
|
||||||
<a-divider type="vertical"/>
|
<a-divider type="vertical"/>
|
||||||
<a @click="handleDelete([record.id])"><a-icon type="delete"/> 彻底删除</a>
|
<a @click="handleDelete([record.id])"><a-icon type="delete"/> {{$t('CompletelyDelete')}}</a>
|
||||||
</span>
|
</span>
|
||||||
</a-table>
|
</a-table>
|
||||||
|
|
||||||
@@ -65,8 +65,8 @@
|
|||||||
throw new Error(res.message)
|
throw new Error(res.message)
|
||||||
}
|
}
|
||||||
}).catch(e => {
|
}).catch(e => {
|
||||||
console.error('查询已删除的用户失败:', e)
|
console.error(this.$t('FailedQuery'), e)
|
||||||
this.$message.warning('查询已删除的用户失败:' + (e.message || e))
|
this.$message.warning(this.$t('FailedQuery') + (e.message || e))
|
||||||
}).finally(() => {
|
}).finally(() => {
|
||||||
this.loading = false
|
this.loading = false
|
||||||
})
|
})
|
||||||
@@ -89,11 +89,11 @@
|
|||||||
dataSource: [],
|
dataSource: [],
|
||||||
columns: [
|
columns: [
|
||||||
{ title: '#', align: 'center', key: 'rowIndex', width: 80, customRender: (t, r, i) => i + 1 },
|
{ title: '#', align: 'center', key: 'rowIndex', width: 80, customRender: (t, r, i) => i + 1 },
|
||||||
{ title: '账号', align: 'center', dataIndex: 'username' },
|
{ title: this.$t('account'), align: 'center', dataIndex: 'username' },
|
||||||
{ title: '姓名', align: 'center', dataIndex: 'realname', },
|
{ title: this.$t('userName'), align: 'center', dataIndex: 'realname', },
|
||||||
{ title: '头像', align: 'center', dataIndex: 'avatar', scopedSlots: { customRender: 'avatarslot' } },
|
{ title: this.$t('headPortrait'), align: 'center', dataIndex: 'avatar', scopedSlots: { customRender: 'avatarslot' } },
|
||||||
{ title: '部门', align: 'center', dataIndex: 'orgCode' },
|
{ title: this.$t('department'), align: 'center', dataIndex: 'orgCode' },
|
||||||
{ title: '操作', align: 'center', dataIndex: 'action', width: 200, scopedSlots: { customRender: 'action' } }
|
{ title: this.$t('operation'), align: 'center', dataIndex: 'action', width: 200, scopedSlots: { customRender: 'action' } }
|
||||||
],
|
],
|
||||||
url: {
|
url: {
|
||||||
getAvatar: (path) => getFileAccessHttpUrl(`${path}`),
|
getAvatar: (path) => getFileAccessHttpUrl(`${path}`),
|
||||||
@@ -136,15 +136,15 @@
|
|||||||
// 还原用户
|
// 还原用户
|
||||||
handleRevert(userIds) {
|
handleRevert(userIds) {
|
||||||
this.$confirm({
|
this.$confirm({
|
||||||
title: '恢复用户',
|
title: this.$t('RestorUser'),
|
||||||
content: `您确定要恢复这 ${userIds.length} 个用户吗?`,
|
content: this.$t('sureRestore')+` ${userIds.length} `+this.$t('Users'),
|
||||||
centered: true,
|
centered: true,
|
||||||
onOk: () => {
|
onOk: () => {
|
||||||
putAction(this.url.putRecycleBin,{userIds:userIds.join(',')}).then((res)=>{
|
putAction(this.url.putRecycleBin,{userIds:userIds.join(',')}).then((res)=>{
|
||||||
if(res.success){
|
if(res.success){
|
||||||
this.handleOk()
|
this.handleOk()
|
||||||
this.handleClearSelection()
|
this.handleClearSelection()
|
||||||
this.$message.success(`还原 ${userIds.length} 个用户成功!`)
|
this.$message.success(this.$t('reduction')+` ${userIds.length} `+this.$t('UsersSucceeded'))
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user