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