'增加国际化'

This commit is contained in:
caoyang
2022-01-11 23:11:08 +08:00
parent f269ee11cb
commit a2b8487cfc
20 changed files with 939 additions and 428 deletions
+5 -7
View File
@@ -11271,8 +11271,7 @@
"picomatch": {
"version": "2.2.2",
"resolved": "https://registry.npmjs.org/picomatch/-/picomatch-2.2.2.tgz",
"integrity": "sha512-q0M/9eZHzmr0AulXyPwNfZjtwZ/RBZlbN3K3CErVrk50T2ASYI7Bye0EvekFY3IP1Nt2DHu0re+V2ZHIpMkuWg==",
"optional": true
"integrity": "sha512-q0M/9eZHzmr0AulXyPwNfZjtwZ/RBZlbN3K3CErVrk50T2ASYI7Bye0EvekFY3IP1Nt2DHu0re+V2ZHIpMkuWg=="
},
"pify": {
"version": "2.3.0",
@@ -14311,8 +14310,7 @@
"version": "4.0.8",
"resolved": "https://registry.npmjs.org/rx-lite/-/rx-lite-4.0.8.tgz",
"integrity": "sha1-Cx4Rr4vESDbwSmQH6S2kJGe3lEQ=",
"dev": true,
"optional": true
"dev": true
},
"rx-lite-aggregates": {
"version": "4.0.8",
@@ -16206,9 +16204,9 @@
"integrity": "sha512-BXq3jwIagosjgNVae6tkHzzIk6a8MHFtzAdwhnV5VlvPTFxDCvIttgSiHWjdGoTJvXtmRu5HacExfdarRcFhog=="
},
"vue-i18n": {
"version": "8.22.4",
"resolved": "https://registry.npmjs.org/vue-i18n/-/vue-i18n-8.22.4.tgz",
"integrity": "sha512-XLI5s0AdqMP2Lf4I4CmdmOq8kjb5DDFGR77wAuxCfpEuYSfhTRyyx6MetgZMiL6Lxa0DasjBOiOcciU3NkL3/Q=="
"version": "8.26.8",
"resolved": "https://registry.npmjs.org/vue-i18n/-/vue-i18n-8.26.8.tgz",
"integrity": "sha512-BN2OXolO15AKS95yNF8oOtARibaO6RxyKkAYNV4XpOmL7S4eVZYMIDtyvDv+XGZaiUmBJSH9mdNqzexvGMnK2A=="
},
"vue-loader": {
"version": "15.9.6",
+1 -1
View File
@@ -34,7 +34,7 @@
"vue": "^2.6.10",
"vue-area-linkage": "^5.1.0",
"vue-cropper": "^0.5.4",
"vue-i18n": "^8.7.0",
"vue-i18n": "^8.26.8",
"vue-loader": "^15.7.0",
"vue-ls": "^3.2.0",
"vue-photo-preview": "^1.1.3",
+35 -1
View File
@@ -1,18 +1,29 @@
<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/>
</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 enquireScreen from '@/utils/device'
import moment from 'moment'
import 'moment/locale/zh-cn'
moment.locale('zh-cn')
const EN = 'en-us'
const ZH = 'zh-cn'
export default {
data () {
return {
locale: zhCN,
localeval: 'zh-cn'
}
},
created () {
@@ -32,8 +43,31 @@
that.$store.commit('TOGGLE_DEVICE', 'desktop')
that.$store.dispatch('setSidebar', true)
}
})
},
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>
+214
View File
@@ -0,0 +1,214 @@
module.exports = {
home: 'home',
account: 'account',
EnterAccountFuzzyQuery:'enter account fuzzy query',
Gender:'gender',
pleaseSelect:'please select',
male:'male',
female:'female',
RealName:'real name',
pleaseEnter:'please enter',
phoneNumber:'phone number',
query:'query',
userStatues:'user status',
normal:'normal',
frozen:'frozen',
reset:'reset',
putAway:'Put away',
open:'open',
addUser:'add user',
userInformation:'user information',
export:'export',
import:'import',
recycleBin:'recycle bin',
delete:'delete',
thaw:'thaw',
batchOperation:'batch operation',
selected:'selected',
term:'term',
empty:'empty',
edit:'edit',
more:'更多',
areYouSure:'Are you sure to delete?',
details:'details',
password:'password',
freezePassword:'Are you sure to freeze?',
youThaw:'Are you sure to thaw?',
freezePasManagementPage:'This is the user management page?',
serialNumber:'serial number',
userAccount:'user account',
userName:'User name',
department:'department',
status:'state',
operation:'operation',
aRcord:'a rcord',
operationAllowedAccount:'This operation is not allowed for administrator account, please select again!',
confirm:'confirm',
selectedAccount:'selected account?',
whether:'whether',
adminDoNotAllowOperation:'The administrator account does not allow this operation!',
advancedQuery:'advanced query',
constructor:'constructor',
advancedQueryEffective:'Advanced query criteria are already effective',
preservation:'preservation',
condition:'condition',
close:'close',
no:'no',
click:'click',
add:'add',
FilterMatching:'Filter condition matching',
AllMatching:'(All conditions require matching)',
AnyOneMatches:'(Any one of the conditions matches)',
SelectQueryField:'select query field',
matchRules:'matching rules',
beEqualTo:'be equal to',
contain:'contain',
withStart:'With start',
withEnd:'with ending',
in:'in',
notEqual:'not equal to',
granter:'greater than',
greaterOrEqual:'greater than or equal to',
less:'less than',
lessOrEqual:'less than or equal to',
user:'user',
numericalValue:'numerical value',
not:'no',
EnterValue:'Please enter a value',
SavedQuery:'saved query',
NoQueriesSaved:'No queries were saved',
SavedName:'saved name',
CannotQueryEmpty:'Cannot query empty condition',
EmptyCannotSaved:'Empty condition cannot be saved',
cannotEmpty:'cannot be empty',
name:'name',
AlreadyExists:'Already exists, overwrite?',
SavedSuccessfully:'Saved successfully',
DeleteQuery:'Delete current query?',
VersionNotSupported:'Version not supported',
SaveQueryCriteria:'Save query criteria',
roleName:'role name',
newRole:'new role',
RoleManagement:'Role management',
toGrantAuthorization:'to grant authorization',
newUser:'new user',
ExistingUsers:'Existing users',
total:'total',
strip:'',
RoleCode:'Role code',
createTime:'create time',
userName:'user name',
selectOneRule:'Please select a role!',
setAttribute:'Please set the url.list2 attribute!',
setDelAttribute:'Please set the url.delete2 attribute!',
setDelBatAttribute:'Please set the url.deleteBatch2 attribute!',
selectARecored:'Please select a record!',
confirmDeletion:'confirm deletion',
deleteAData:'Delete selected data?',
AddDepartment:'Add Department',
AddSubordinate:'Add subordinate',
DepartmentInformation:'Department information',
BatchDelete:'Batch delete',
DeleteMultiplePiecesData:'Delete multiple pieces of data',
CurrentSelection:'Current selection',
Deselect:'Deselect',
enterDepartmentName:'Please enter department name',
addTo:'add to',
cancel:'cancel',
checkAll:'check all',
DeselectAll:'Deselect all',
ExpandAll:'Expand all',
MergeAll:'Merge all',
TreeOperation:'Tree operation',
essentialInformation:'essential information',
OrganizationName:'Organization name',
EnterOrganizationDepartment:'Please enter organization / department name',
SuperiorDepartment:'Superior department',
enterOrganizationCode:'Please enter organization code',
nothing:'nothing',
OrganizationType:'Organization type',
PleaseSelectOrganizationType:'Please select organization type',
company:'company',
post:'post',
sort:'sort',
enterMobileNumber:'Please enter your mobile phone number',
enterAddress:'Please enter the address',
address:'address',
remarks:'remarks',
enterComments:'Please enter comments',
selectDepartmentFirst:'Please select a department first!',
OrganizationCode:'Organization code',
fax:'fax',
enterOrganizationType:'Please enter organization type',
sureDeleteSelected:'Are you sure you want to delete the selected',
pieceData:'piece of data and child node data?',
selectSuperiorDepartmentFirst:'Please click to select the superior department first',
deleteDepartmentData:'Are you sure you want to delete this department and child node data?',
DeleteSucceeded:'Delete succeeded',
DeletionFailed:'Deletion failed',
departmentInformationDepartment:'There is no valid department information under your department',
permissionTemporrily:'This permission is temporarily granted to ordinary employees',
DepartmentRole:'Department role',
DictionaryName:'Dictionary name',
enterDictionary:'Please enter a dictionary name',
DictionaryNumber:'Dictionary number',
enterDictionaryNumber:'Please enter the dictionary number',
DictionaryInformation:'Dictionary information',
RefreshCache:'Refresh cache',
recycleBin:'recycle bin',
DictionaryConfiguration:'Dictionary configuration',
dataDictionaryPage:'This is the data dictionary page',
describe:'describe',
DescriptionRefreshCache:'Description refresh cache complete!',
FailedRefreshCache:'Failed to refresh cache!',
refreshFailed:'refresh failed',
ClassificationDictionary:'Classification dictionary',
ClassifManagementPage:'Classification dictionary management page',
ClassificationName:'Classification name',
ClassificationCode:'Classification code',
AddSubcategory:'Add subcategory',
DataRules:'Data rules',
menuMnagementPage:'This is the menu management page',
MenuName:'Menu name',
MenuType:'Menu type',
menu:'menu',
ButtonsPermissions:'Buttons / permissions',
assembly:'assembly',
route:'route',
AddSubmenu:'Add submenu',
NoPicture:'No picture',
noFile:'no file',
adadManagementPage:'adad management page',
TenantName:'Tenant name',
TenantNumber:'Tenant number',
startTime:'start time',
endTime:'end time',
LoginLog:'Login log',
OperationLog:'Operation log',
SearchLog:'Search log',
enterSearchKeyword:'Please enter a search keyword',
OperationType:'Operation type',
selectOperationType:'Please select operation type',
RequestMethod:'Request method',
RequestParameters:'Request parameters',
logManagementPage:'This is the log management page',
LogContent:'Log content',
OperatorID:'Operator ID',
OperatorName:'Operator name',
ElapsedTime:'Elapsed time (MS)',
LogType:'Log type',
tableName:'table name',
enterTableName:'Please enter a table name',
DataID:'Data ID',
enterID:'Please enter ID',
DataComparison:'Data comparison',
DataLogManagementPage:'Data log management page',
VersionNumber:'Version number',
DataContent:'Data content',
creator:'creator',
selectTwoPiecesData:'Please select two pieces of data',
selectSameDatabase:'Please select the same database table and data ID for comparison',
DataComparison:'Data comparison',
PromptInformation:'Prompt information',
}
+215
View File
@@ -0,0 +1,215 @@
module.exports = {
home: '首页',
account: '账号',
EnterAccountFuzzyQuery:'输入账号模糊查询',
Gender:'性别',
pleaseSelect:'请选择',
male:'男',
female:'女',
RealName:'真实姓名',
pleaseEnter:'请输入',
phoneNumber:'手机号码',
query:'查询',
userStatues:'用户状态',
normal:'正常',
frozen:'冻结',
reset:'重置',
putAway:'收起',
open:'展开',
addUser:'添加用户',
userInformation:'用户信息',
export:'导出',
import:'导入',
recycleBin:'回收站',
delete:'删除',
thaw:'解冻',
batchOperation:'批量操作',
selected:'已选择',
term:'项',
empty:'清空',
edit:'编辑',
more:'更多',
areYouSure:'确定删除吗?',
details:'详情',
password:'密码',
freezePassword:'确定冻结吗?',
youThaw:'确定解冻吗',
freezePasManagementPage:'这是用户管理页面?',
serialNumber:'序号',
userAccount:'用户账号',
userName:'用户姓名',
department:'部门',
status:'状态',
operation:'操作',
aRcord:'一条记录',
operationAllowedAccount:'管理员账号不允许此操作,请重新选择',
confirm:'确认',
selectedAccount:'选中账号?',
whether:'是否',
adminDoNotAllowOperation:'管理员账号不允许此操作',
advancedQuery:'高级查询',
constructor:'构造器',
advancedQueryEffective:'已有高级查询条件生效',
preservation:'保存',
condition:'条件',
close:'关闭',
no:'没有任何',
click:'点击',
add:'新增',
FilterMatching:'过滤条件匹配',
AllMatching:'所有条件都要求匹配',
AnyOneMatches:'条件中的任意一个匹配',
SelectQueryField:'选择查询字段',
matchRules:'匹配规则',
beEqualTo:'等于',
contain:'包含',
withStart:'..开始',
withEnd:'..结尾',
in:'...',
notEqual:'不等于',
granter:'大于',
greaterOrEqual:'大于等于',
less:'小于',
lessOrEqual:'小于等于',
user:'用户',
numericalValue:'数值',
yes:'是',
not:'否',
EnterValue:'请输入值',
SavedQuery:'保存的查询',
NoQueriesSaved:'没有保存任何查询',
SavedName:'保存的名称',
CannotQueryEmpty:'不能查询空条件',
EmptyCannotSaved:'空条件不能保存',
cannotEmpty:'不能为空',
name:'名称',
AlreadyExists:'已存在是否覆盖',
SavedSuccessfully:'保存成功',
DeleteQuery:'是否删除当前查询',
VersionNotSupported:'版本不支持',
SaveQueryCriteria:'保存查询条件',
roleName:'角色名称',
newRole:'新建角色',
RoleManagement:'角色管理',
toGrantAuthorization:'授权',
newUser:'新增用户',
ExistingUsers:'已有用户',
total:'共',
strip:'条',
RoleCode:'角色编码',
createTime:'创建时间',
userName:'用户名称',
selectOneRule:'请选择一个角色',
setAttribute:'请设置url.list2属性!',
setDelAttribute:'请设置url.delete2 属性!',
setDelBatAttribute:'请设置url.deleteBatch2 属性!',
selectARecored:'请选择一条记录',
confirmDeletion:'确认删除',
deleteAData:'是否删除选中数据',
AddDepartment:'添加部门',
AddSubordinate:'添加下级',
DepartmentInformation:'部门信息',
BatchDelete:'批量删除',
DeleteMultiplePiecesData:'删除多条数据',
CurrentSelection:'当前选择',
Deselect:'取消选择',
enterDepartmentName:'请输入部门名称',
addTo:'添加',
cancel:'取消',
checkAll:"全部勾选",
DeselectAll:'取消全选',
ExpandAll:'展开所有',
MergeAll:'合并所有',
TreeOperation:'树操作',
essentialInformation:'基本信息',
OrganizationName:'机构名称',
EnterOrganizationDepartment:'请输入机构/部门名称',
SuperiorDepartment:'上级部门',
enterOrganizationCode:'请输入机构编码',
nothing:'无',
OrganizationType:'机构类型',
PleaseSelectOrganizationType:'请选择机构类型',
company:'公司',
post:'岗位',
sort:'排序',
enterMobileNumber:'请输入手机号',
enterAddress:'请输入地址',
address:'地址',
remarks:'备注',
enterComments:'请输入备注',
selectDepartmentFirst:'请先选择一个部门',
OrganizationCode:'机构编码',
fax:'传真',
enterOrganizationType:'请输入机构类型',
sureDeleteSelected:'确定要删除所选中的',
pieceData:'条数据以及子节点数据吗?',
selectSuperiorDepartmentFirst:'请先点击选中上级部门',
deleteDepartmentData:'确定要删除此部门以及子节点数据吗',
DeleteSucceeded:'删除成功',
DeletionFailed:'删除失败',
departmentInformationDepartment:'您的部门下暂无有效部门信息',
permissionTemporrily:'普通员工暂此权限',
DepartmentRole:'部门角色',
DictionaryName:'字典名称',
enterDictionary:'请输入字典名称',
DictionaryNumber:'字典编号',
enterDictionaryNumber:'请输入字典编号',
DictionaryInformation:'字典信息',
RefreshCache:'刷新缓存',
recycleBin:'回收站',
DictionaryConfiguration:'字典配置',
dataDictionaryPage:'这是数据字典页面',
describe:'描述',
DescriptionRefreshCache:'刷新缓存完成!',
FailedRefreshCache:'刷新缓存失败!',
refreshFailed:'刷新失败',
ClassificationDictionary:'分类字典',
ClassifManagementPage:'分类字典管理页面',
ClassificationName:'分类名称',
ClassificationCode:'分类编码',
AddSubcategory:'添加子分类',
DataRules:'数据规则',
menuMnagementPage:'这是菜单管理页面',
MenuName:'菜单名称',
MenuType:'菜单类型',
menu:'菜单',
ButtonsPermissions:'按钮/权限',
assembly:'组件',
route:'路径',
AddSubmenu:'添加子菜单',
NoPicture:'无图片',
noFile:'无文件',
adadManagementPage:'adad管理页面',
TenantName:'租户名称',
TenantNumber:'租户编号',
startTime:'开始时间',
endTime:'结束时间',
LoginLog:'登录日志',
OperationLog:'操作日志',
SearchLog:'搜索日志',
enterSearchKeyword:'请输入搜索关键词',
OperationType:'操作类型',
selectOperationType:'请选择操作类型',
RequestMethod:'请求方法',
RequestParameters:'请求参数',
logManagementPage:'这是日志管理页面',
LogContent:'日志内容',
OperatorID:'操作人ID',
OperatorName:'操作人名称',
ElapsedTime:'耗时(毫秒)',
LogType:'日志类型',
tableName:'表名',
enterTableName:'请输入表名',
DataID:'数据ID',
enterID:'请输入ID',
DataComparison:'数据比较',
DataLogManagementPage:'数据日志管理页面',
VersionNumber:'版本号',
DataContent:'数据内容',
creator:'创建人',
selectTwoPiecesData:'请选择两条数据',
selectSameDatabase:'请选择相同的数据库表和数据ID进行比较',
DataComparison:'数据比较',
PromptInformation:'提示信息',
}
+50 -50
View File
@@ -7,23 +7,23 @@
<span v-show="false">{{tooltipProps}}</span>
<!-- end 不知道为什么不加上这段代码就无法生效 -->
<template slot="title">
<span>已有高级查询条件生效</span>
<span>{{$t('advancedQueryEffective')}}</span>
<a-divider type="vertical"/>
<a @click="handleReset">清空</a>
<a @click="handleReset">{{$t('empty')}}</a>
</template>
<a-button-group>
<a-button type="primary" @click="handleOpen">
<a-icon type="appstore" theme="twoTone" spin/>
<span>高级查询</span>
<span>{{$t('advancedQuery')}}</span>
</a-button>
<a-button v-if="izMobile" type="primary" icon="delete" @click="handleReset"/>
</a-button-group>
</a-tooltip>
<a-button v-else type="primary" icon="filter" @click="handleOpen">高级查询</a-button>
<a-button v-else type="primary" icon="filter" @click="handleOpen">{{$t('advancedQuery')}}</a-button>
</slot>
<j-modal
title="高级查询构造器"
:title="$t('advancedQuery')+$t('constructor')"
:width="1000"
:visible="visible"
@cancel="handleCancel"
@@ -35,11 +35,11 @@
<template slot="footer">
<div style="float: left">
<a-button :loading="loading" @click="handleReset">重置</a-button>
<a-button :loading="loading" @click="handleSave">保存查询条件</a-button>
<a-button :loading="loading" @click="handleReset">{{$t('reset')}}</a-button>
<a-button :loading="loading" @click="handleSave">{{$t('SaveQueryCriteria')}}</a-button>
</div>
<a-button :loading="loading" @click="handleCancel">关闭</a-button>
<a-button :loading="loading" type="primary" @click="handleOk">查询</a-button>
<a-button :loading="loading" @click="handleCancel">{{$t('close')}}</a-button>
<a-button :loading="loading" type="primary" @click="handleOk">{{$t('query')}}</a-button>
</template>
<a-spin :spinning="loading">
@@ -48,9 +48,9 @@
<a-empty v-if="queryParamsModel.length === 0" style="margin-bottom: 12px;">
<div slot="description">
<span>没有任何查询条件</span>
<span>{{$t('no')}}+{{$t('query')}}+{{$t('condition')}}</span>
<a-divider type="vertical"/>
<a @click="handleAdd">点击新增</a>
<a @click="handleAdd">{{$t('click')}}+{{$t('add')}}</a>
</div>
</a-empty>
@@ -58,10 +58,10 @@
<a-row style="margin-bottom: 12px;">
<a-col :md="12" :xs="24">
<a-form-item label="过滤条件匹配" :labelCol="{md: 6,xs:24}" :wrapperCol="{md: 18,xs:24}" style="width: 100%;">
<a-form-item :label="$t('FilterMatching')" :labelCol="{md: 6,xs:24}" :wrapperCol="{md: 18,xs:24}" style="width: 100%;">
<a-select v-model="matchType" :getPopupContainer="node=>node.parentNode" style="width: 100%;">
<a-select-option value="and">AND(所有条件都要求匹配)</a-select-option>
<a-select-option value="or">OR(条件中的任意一个匹配)</a-select-option>
<a-select-option value="and">AND{{$t('AllMatching')}}</a-select-option>
<a-select-option value="or">OR{{$t('AnyOneMatches')}}</a-select-option>
</a-select>
</a-form-item>
</a-col>
@@ -75,7 +75,7 @@
v-model="item.field"
:treeData="fieldTreeData"
:dropdownStyle="{ maxHeight: '400px', overflow: 'auto' }"
placeholder="选择查询字段"
:placeholder="$t('SelectQueryField')"
allowClear
treeDefaultExpandAll
:getPopupContainer="node=>node.parentNode"
@@ -86,17 +86,17 @@
</a-col>
<a-col :md="4" :xs="24" style="margin-bottom: 12px;">
<a-select placeholder="匹配规则" :value="item.rule" :getPopupContainer="node=>node.parentNode" @change="handleRuleChange(item,$event)">
<a-select-option value="eq">等于</a-select-option>
<a-select-option value="like">包含</a-select-option>
<a-select-option value="right_like">以..开始</a-select-option>
<a-select-option value="left_like">以..结尾</a-select-option>
<a-select-option value="in">在...中</a-select-option>
<a-select-option value="ne">不等于</a-select-option>
<a-select-option value="gt">大于</a-select-option>
<a-select-option value="ge">大于等于</a-select-option>
<a-select-option value="lt">小于</a-select-option>
<a-select-option value="le">小于等于</a-select-option>
<a-select :placeholder="$t('matchRules')" :value="item.rule" :getPopupContainer="node=>node.parentNode" @change="handleRuleChange(item,$event)">
<a-select-option value="eq">{{$t('beEqualTo')}}</a-select-option>
<a-select-option value="like">{{$t('contain')}}</a-select-option>
<a-select-option value="right_like">{{$t('withStart')}}</a-select-option>
<a-select-option value="left_like">{{$t('withEnd')}}</a-select-option>
<a-select-option value="in">{{$t('in')}}</a-select-option>
<a-select-option value="ne">{{$t('notEqual')}}</a-select-option>
<a-select-option value="gt">{{$t('granter')}}</a-select-option>
<a-select-option value="ge">{{$t('greaterOrEqual')}}</a-select-option>
<a-select-option value="lt">{{$t('less')}}</a-select-option>
<a-select-option value="le">{{$t('lessOrEqual')}}</a-select-option>
</a-select>
</a-col>
@@ -105,8 +105,8 @@
<j-search-select-tag v-if="item.type==='sel_search'" v-model="item.val" :dict="getDictInfo(item)" placeholder="请选择"/>
<!-- 下拉多选 -->
<template v-else-if="item.type==='list_multi'">
<j-multi-select-tag v-if="item.options" v-model="item.val" :options="item.options" placeholder="请选择"/>
<j-multi-select-tag v-else v-model="item.val" :dictCode="getDictInfo(item)" placeholder="请选择"/>
<j-multi-select-tag v-if="item.options" v-model="item.val" :options="item.options" :placeholder="$t('pleaseSelect')"/>
<j-multi-select-tag v-else v-model="item.val" :dictCode="getDictInfo(item)" :placeholder="$t('pleaseSelect')"/>
</template>
<template v-else-if="item.dictCode">
@@ -121,8 +121,8 @@
></j-popup>
</template>
<template v-else>
<j-multi-select-tag v-show="allowMultiple(item)" v-model="item.val" :dictCode="item.dictCode" placeholder="请选择"/>
<j-dict-select-tag v-show="!allowMultiple(item)" v-model="item.val" :dictCode="item.dictCode" placeholder="请选择"/>
<j-multi-select-tag v-show="allowMultiple(item)" v-model="item.val" :dictCode="item.dictCode" :placeholder="$t('pleaseSelect')"/>
<j-dict-select-tag v-show="!allowMultiple(item)" v-model="item.val" :dictCode="item.dictCode" :placeholder="$t('pleaseSelect')"/>
</template>
</template>
<j-popup
@@ -137,14 +137,14 @@
v-model="item.val"
:buttons="false"
:multiple="false"
placeholder="请选择用户"
:placeholder="$t('pleaseSelect')+$t('user')"
:returnKeys="['id', item.customReturnField || 'username']"
/>
<j-select-depart
v-else-if="item.type === 'select-depart' || item.type === 'sel_depart'"
v-model="item.val"
:multi="false"
placeholder="请选择部门"
:placeholder="$t('pleaseSelect')+$t('department')"
:customReturnField="item.customReturnField || 'id'"
/>
<a-select
@@ -152,19 +152,19 @@
v-model="item.val"
:options="item.options"
allowClear
placeholder="请选择"
:placeholder="$t('pleaseSelect')"
:mode="allowMultiple(item)?'multiple':''"
/>
<j-area-linkage v-model="item.val" v-else-if="item.type==='area-linkage' || item.type==='pca'" style="width: 100%"/>
<j-date v-else-if=" item.type=='date' " v-model="item.val" placeholder="请选择日期" style="width: 100%"></j-date>
<j-date v-else-if=" item.type=='datetime' " v-model="item.val" placeholder="请选择时间" :show-time="true" date-format="YYYY-MM-DD HH:mm:ss" style="width: 100%"></j-date>
<j-date v-else-if=" item.type=='date' " v-model="item.val" :placeholder="$t('pleaseSelect')+$t('date')" style="width: 100%"></j-date>
<j-date v-else-if=" item.type=='datetime' " v-model="item.val" :placeholder="$t('pleaseSelect')+$t('time')" :show-time="true" date-format="YYYY-MM-DD HH:mm:ss" style="width: 100%"></j-date>
<a-time-picker v-else-if="item.type==='time'" :value="item.val ? moment(item.val,'HH:mm:ss') : null" format="HH:mm:ss" style="width: 100%" @change="(time,value)=>item.val=value"/>
<a-input-number v-else-if=" item.type=='int'||item.type=='number' " style="width: 100%" placeholder="请输入数值" v-model="item.val"/>
<a-select v-else-if="item.type=='switch'" placeholder="请选择" v-model="item.val">
<a-select-option value="Y"></a-select-option>
<a-select-option value="N"></a-select-option>
<a-input-number v-else-if=" item.type=='int'||item.type=='number' " style="width: 100%" :placeholder="$t('pleaseSelect')+$t('numericalValue')" v-model="item.val"/>
<a-select v-else-if="item.type=='switch'" :placeholder="$t('pleaseSelect')" v-model="item.val">
<a-select-option value="Y">{{$t('yes')}}</a-select-option>
<a-select-option value="N">{{$t('not')}}</a-select-option>
</a-select>
<a-input v-else v-model="item.val" placeholder="请输入值"/>
<a-input v-else v-model="item.val" :placeholder="$t('EnterValue')"/>
</a-col>
<a-col :md="4" :xs="0" style="margin-bottom: 12px;">
@@ -186,10 +186,10 @@
<a-card class="j-super-query-history-card" :bordered="true">
<div slot="title">
保存的查询
{{$t('SavedQuery')}}
</div>
<a-empty v-if="saveTreeData.length === 0" class="j-super-query-history-empty" description="没有保存任何查询"/>
<a-empty v-if="saveTreeData.length === 0" class="j-super-query-history-empty" :description="$t('NoQueriesSaved')"/>
<a-tree
v-else
class="j-super-query-history-tree"
@@ -208,7 +208,7 @@
</a-spin>
<a-modal title="请输入保存的名称" :visible="prompt.visible" @cancel="prompt.visible=false" @ok="handlePromptOk">
<a-modal :title="$t('pleaseEnter')+$t('SavedName')" :visible="prompt.visible" @cancel="prompt.visible=false" @ok="handlePromptOk">
<a-input v-model="prompt.value"></a-input>
</a-modal>
@@ -376,7 +376,7 @@
}
this.emitCallback(event)
} else {
this.$message.warn("不能查询空条件")
this.$message.warn(this.$t('CannotQueryEmpty'))
}
},
emitCallback(event = {}) {
@@ -434,7 +434,7 @@
handleSave() {
let queryParams = this.removeEmptyObject(this.queryParamsModel)
if (this.isNullArray(queryParams)) {
this.$message.warning('空条件不能保存')
this.$message.warning(this.$t('EmptyCannotSaved'))
} else {
this.prompt.value = ''
this.prompt.visible = true
@@ -443,7 +443,7 @@
handlePromptOk() {
let { value } = this.prompt
if(!value){
this.$message.warning('保存名称不能为空')
this.$message.warning(this.$t('preservation')+this.$t('name')+this.$t('cannotEmpty'))
return
}
// 取出查询条件
@@ -452,12 +452,12 @@
let filterList = this.saveTreeData.filter(i => i.originTitle === value)
if (filterList.length > 0) {
this.$confirm({
content: `${value} 已存在,是否覆盖?`,
content: `${value} `+this.$t('AlreadyExists'),
onOk: () => {
this.prompt.visible = false
filterList[0].records = records
this.saveToLocalStore()
this.$message.success('保存成功')
this.$message.success(this.$t('SavedSuccessfully'))
}
})
} else {
@@ -471,7 +471,7 @@
}))
// 保存到 LocalStore
this.saveToLocalStore()
this.$message.success('保存成功')
this.$message.success(this.$t('SavedSuccessfully'))
}
},
handleTreeSelect(idx, event) {
@@ -487,7 +487,7 @@
event.stopPropagation()
this.$confirm({
content: '是否删除当前查询?',
content: this.$t('DeleteQuery'),
onOk: () => {
let { eventKey } = vNode
this.saveTreeData.splice(Number.parseInt(eventKey.substring(2)), 1)
@@ -19,7 +19,6 @@
<span v-if="device === 'desktop'">欢迎进入 Jero-Boot 平台</span>
<span v-else>Jero-Boot</span>
<user-menu :theme="theme"/>
</div>
<!-- 顶部导航栏模式 -->
+31 -1
View File
@@ -32,6 +32,10 @@
</a>
</span>
<header-notice class="action"/>
<div class="action">
<span @click="changeLocale('en-us')" v-show="localeval=='zh-cn'">English</span >
<span @click="changeLocale('zh-cn')" v-show="localeval=='en-us'">中文</span >
</div>
<a-dropdown>
<span class="action action-full ant-dropdown-link user-dropdown-menu">
<a-avatar class="avatar" size="small" :src="getAvatar()"/>
@@ -101,6 +105,12 @@
import { getFileAccessHttpUrl,getAction } from "@/api/manage"
import Vue from 'vue'
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 'moment/locale/zh-cn'
moment.locale('zh-cn')
const EN = 'en-us'
const ZH = 'zh-cn'
export default {
name: "UserMenu",
@@ -111,6 +121,8 @@
searchMenuOptions:[],
searchMenuComp: 'span',
searchMenuVisible: false,
locale: zhCN,
localeval: 'zh-cn'
// update-begin author:sunjianlei date:20200219 for: 头部菜单搜索规范命名 --------------
}
},
@@ -251,8 +263,26 @@
this.$message.warn("刷新缓存失败");
console.log("刷新失败",e)
})
}
},
/*update_end author:liushaoqian date:20200507 for: 刷新缓存*/
moment,
changeLocale (localeval) {
this.localeval = localeval
if (localeval === EN) {
moment.locale(EN)
this.$i18n.locale = EN
this.locale = null
localStorage.setItem('language', EN)
// location.reload();
} else {
moment.locale(ZH)
this.$i18n.locale = ZH
this.locale = zhCN
localStorage.setItem('language', ZH)
// location.reload();
}
console.log('this.locale',this.locale)
}
}
}
</script>
+14
View File
@@ -19,6 +19,10 @@ console.log('ant-design-vue version:', version)
import Viser from 'viser-vue'
import 'ant-design-vue/dist/antd.less'; // or 'ant-design-vue/dist/antd.less'
import VueI18n from 'vue-i18n'
import LangENUS from './common/lang/en-us'
import LangZHCN from './common/lang/zh-cn'
import '@/permission' // permission control
import '@/utils/filter' // base filtermybatis-plus
import Print from 'vue-print-nb-jeecg'
@@ -62,6 +66,15 @@ Vue.use(preview)
Vue.use(vueBus);
Vue.use(JeroComponents);
Vue.use(VueAreaLinkage);
Vue.use(VueI18n)
const i18n = new VueI18n({
locale: 'zh-cn',
messages: {
'en-us': LangENUS,
'zh-cn': LangZHCN
}
})
SSO.init(() => {
main()
@@ -71,6 +84,7 @@ function main() {
new Vue({
router,
store,
i18n,
mounted() {
store.commit('SET_SIDEBAR_TYPE', Vue.ls.get(SIDEBAR_TYPE, true))
store.commit('TOGGLE_THEME', Vue.ls.get(DEFAULT_THEME, config.navTheme))
+19 -19
View File
@@ -5,20 +5,20 @@
<a-form layout="inline" @keyup.enter.native="searchQuery">
<a-row :gutter="24">
<a-col :md="6" :sm="8">
<a-form-item label="表名">
<a-input placeholder="请输入表名" v-model="queryParam.dataTable"></a-input>
<a-form-item :label="$t('tableName')">
<a-input :placeholder="$t('enterTableName')" v-model="queryParam.dataTable"></a-input>
</a-form-item>
</a-col>
<a-col :md="6" :sm="8">
<a-form-item label="数据ID">
<a-input placeholder="请输入ID" v-model="queryParam.dataId"></a-input>
<a-form-item :label="$t('DataID')">
<a-input :placeholder="$t('enterID')" v-model="queryParam.dataId"></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">查询</a-button>
<a-button style="margin-left: 8px" @click="searchReset">重置</a-button>
<a-button type="primary" @click="searchQuery">{{$t('query')}}</a-button>
<a-button style="margin-left: 8px" @click="searchReset">{{$t('reset')}}</a-button>
</a-col>
</span>
</a-row>
@@ -27,15 +27,15 @@
<!-- 操作按钮区域 -->
<div class="table-operator">
<a-button @click="handleCompare()" type="primary" icon="plus">数据比较</a-button>
<a-button @click="handleCompare()" type="primary" icon="plus">{{$t('DataComparison')}}</a-button>
</div>
<!--table区 -->
<div>
<!--已选择的清空 -->
<div class="ant-alert ant-alert-info" style="margin-bottom: 16px;">
<i class="anticon anticon-info-circle ant-alert-icon"></i>已选择&nbsp;<a style="font-weight: 600">{{ selectedRowKeys.length }}</a>&nbsp;&nbsp;
<a style="margin-left: 24px" @click="onClearSelected">清空</a>
<i class="anticon anticon-info-circle ant-alert-icon"></i>{{$t('selected')}}&nbsp;<a style="font-weight: 600">{{ selectedRowKeys.length }}</a>{{$t('term')}}&nbsp;&nbsp;
<a style="margin-left: 24px" @click="onClearSelected">{{$t('empty')}}&nbsp;&nbsp;</a>
</div>
<a-table
ref="table"
@@ -73,32 +73,32 @@
},
data() {
return {
description: '数据日志管理页面',
description: this.$t('DataLogManagementPage'),
//表头
columns: [
{
title: '表名',
title: this.$t('tableName'),
align: 'center',
dataIndex: 'dataTable',
width: "120"
}, {
title: '数据ID',
title: this.$t('DataID'),
align: 'center',
dataIndex: 'dataId',
width: "120"
}, {
title: '版本号',
title: this.$t('VersionNumber'),
align: 'center',
dataIndex: 'dataVersion',
width: "50"
}, {
title: '数据内容',
title: this.$t('DataContent'),
align: 'center',
dataIndex: 'dataContent',
width: "150",
scopedSlots: {customRender: 'dataContent'},
}, {
title: '创建人',
title: this.$t('creator'),
align: 'center',
dataIndex: 'createBy',
width: "100"
@@ -112,19 +112,19 @@
methods: {
handleCompare: function () {
if (!this.selectionRows || this.selectionRows.length != 2) {
this.openNotifIcon('请选择两条数据');
this.openNotifIcon(this.$t('selectTwoPiecesData'));
return false;
} else if (this.selectionRows[0].dataId != this.selectionRows[1].dataId) {
this.openNotifIcon('请选择相同的数据库表和数据ID进行比较');
this.openNotifIcon(this.$t('selectSameDatabase'));
return false;
} else {
this.$refs.modalForm.addModal(this.selectionRows);
this.$refs.modalForm.title = "数据比较";
this.$refs.modalForm.title = this.$t('DataComparison');
}
},
openNotifIcon(msg) {
this.$notification['warning']({
message: '提示信息',
message: this.$t('PromptInformation'),
description: msg,
});
},
+93 -93
View File
@@ -4,23 +4,23 @@
<a-card :bordered="false" style="padding: 12px 0;">
<!-- 按钮操作区域 -->
<a-row style="margin-left: 14px">
<a-button @click="handleAdd(1)" type="primary">添加部门</a-button>
<a-button @click="handleAdd(2)" type="primary">添加下级</a-button>
<a-button type="primary" icon="download" @click="handleExportXls('部门信息')">导出</a-button>
<a-button @click="handleAdd(1)" type="primary">{{$t('AddDepartment')}}</a-button>
<a-button @click="handleAdd(2)" type="primary">{{$t('AddSubordinate')}}</a-button>
<a-button type="primary" icon="download" @click="handleExportXls($t('DepartmentInformation'))">{{$t('export')}}</a-button>
<a-upload name="file" :showUploadList="false" :multiple="false" :headers="tokenHeader" :action="importExcelUrl" @change="handleImportExcel">
<a-button type="primary" icon="import">导入</a-button>
<a-button type="primary" icon="import">{{$t('import')}}</a-button>
</a-upload>
<a-button title="删除多条数据" @click="batchDel" type="default">批量删除</a-button>
<a-button :title="$t('DeleteMultiplePiecesData')" @click="batchDel" type="default">{{$t('BatchDelete')}}</a-button>
<!--<a-button @click="refresh" type="default" icon="reload" :loading="loading">刷新</a-button>-->
</a-row>
<div style="background: #fff;padding-left:16px;height: 100%; margin-top: 5px">
<a-alert type="info" :showIcon="true">
<div slot="message">
当前选择<span v-if="this.currSelected.title">{{ getCurrSelectedTitle() }}</span>
<a v-if="this.currSelected.title" style="margin-left: 10px" @click="onClearSelected">取消选择</a>
{{$t('CurrentSelection')}}<span v-if="this.currSelected.title">{{ getCurrSelectedTitle() }}</span>
<a v-if="this.currSelected.title" style="margin-left: 10px" @click="onClearSelected">{{$t('Deselect')}}</a>
</div>
</a-alert>
<a-input-search @search="onSearch" style="width:100%;margin-top: 10px" placeholder="请输入部门名称"/>
<a-input-search @search="onSearch" style="width:100%;margin-top: 10px" :placeholder="$t('enterDepartmentName')"/>
<!-- -->
<a-col :md="10" :sm="24">
<template>
@@ -42,9 +42,9 @@
</span>
<!--新增右键点击事件,和增加添加和删除功能-->
<a-menu slot="overlay">
<a-menu-item @click="handleAdd(3)" key="1">添加</a-menu-item>
<a-menu-item @click="handleDelete" key="2">删除</a-menu-item>
<a-menu-item @click="closeDrop" key="3">取消</a-menu-item>
<a-menu-item @click="handleAdd(3)" key="1">{{$t('addTo')}}</a-menu-item>
<a-menu-item @click="handleDelete" key="2">{{$t('delete')}}</a-menu-item>
<a-menu-item @click="closeDrop" key="3">{{$t('cancel')}}</a-menu-item>
</a-menu>
</a-dropdown>
</template>
@@ -57,13 +57,13 @@
<a-menu slot="overlay">
<!--<a-menu-item key="1" @click="switchCheckStrictly(1)">父子关联</a-menu-item>-->
<!--<a-menu-item key="2" @click="switchCheckStrictly(2)">取消关联</a-menu-item>-->
<a-menu-item key="3" @click="checkALL">全部勾选</a-menu-item>
<a-menu-item key="4" @click="cancelCheckALL">取消全选</a-menu-item>
<a-menu-item key="5" @click="expandAll">展开所有</a-menu-item>
<a-menu-item key="6" @click="closeAll">合并所有</a-menu-item>
<a-menu-item key="3" @click="checkALL">{{$t('checkAll')}}</a-menu-item>
<a-menu-item key="4" @click="cancelCheckALL">{{$t('DeselectAll')}}</a-menu-item>
<a-menu-item key="5" @click="expandAll">{{$t('ExpandAll')}}</a-menu-item>
<a-menu-item key="6" @click="closeAll">{{$t('MergeAll')}}</a-menu-item>
</a-menu>
<a-button>
树操作 <a-icon type="up" />
{{$t('TreeOperation')}} <a-icon type="up" />
</a-button>
</a-dropdown>
</div>
@@ -71,49 +71,49 @@
</a-col>
<a-col :md="14" :sm="24" style="background: #fff;padding: 24px;">
<a-tabs defaultActiveKey="1">
<a-tab-pane tab="基本信息" key="1" >
<a-tab-pane :tab="$t('essentialInformation')" key="1" >
<a-card :bordered="false" v-if="selectedKeys.length>0">
<a-form :form="form">
<a-form-item
:labelCol="labelCol"
:wrapperCol="wrapperCol"
label="机构名称">
<a-input placeholder="请输入机构/部门名称" v-decorator="['departName', validatorRules.departName ]"/>
:label="$t('OrganizationName')">
<a-input :placeholder="$t('EnterOrganizationDepartment')" v-decorator="['departName', validatorRules.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
style="width:100%"
:dropdownStyle="{maxHeight:'200px',overflow:'auto'}"
:treeData="treeData"
:disabled="disable"
v-model="model.parentId"
placeholder="">
:placeholder="$t('nothing')">
</a-tree-select>
</a-form-item>
<a-form-item
:labelCol="labelCol"
:wrapperCol="wrapperCol"
label="机构编码">
<a-input disabled placeholder="请输入机构编码" v-decorator="['orgCode', validatorRules.orgCode ]"/>
<a-input disabled :placeholder="$t('enterOrganizationCode')" v-decorator="['orgCode', validatorRules.orgCode ]"/>
</a-form-item>
<a-form-item
:labelCol="labelCol"
:wrapperCol="wrapperCol"
label="机构类型">
:label="$t('OrganizationType')">
<template v-if="orgCategoryDisabled">
<a-radio-group v-decorator="['orgCategory',validatorRules.orgCategory]" placeholder="请选择机构类型">
<a-radio-group v-decorator="['orgCategory',validatorRules.orgCategory]" :placeholder="$t('PleaseSelectOrganizationType')">
<a-radio value="1">
公司
{{$t('company')}}
</a-radio>
</a-radio-group>
</template>
<template v-else>
<a-radio-group v-decorator="['orgCategory',validatorRules.orgCategory]" placeholder="请选择机构类型">
<a-radio-group v-decorator="['orgCategory',validatorRules.orgCategory]" :placeholder="$t('PleaseSelectOrganizationType')">
<a-radio value="2">
部门
{{$t('department')}}
</a-radio>
<a-radio value="3">
岗位
{{$t('post')}}
</a-radio>
</a-radio-group>
</template>
@@ -121,43 +121,43 @@
<a-form-item
:labelCol="labelCol"
:wrapperCol="wrapperCol"
label="排序">
:label="$t('sort')">
<a-input-number v-decorator="[ 'departOrder',{'initialValue':0}]"/>
</a-form-item>
<a-form-item
:labelCol="labelCol"
:wrapperCol="wrapperCol"
label="手机号">
<a-input placeholder="请输入手机号" v-decorator="['mobile', {'initialValue':''}]"/>
:label="$t('phoneNumber')">
<a-input :placeholder="$t('enterMobileNumber')" v-decorator="['mobile', {'initialValue':''}]"/>
</a-form-item>
<a-form-item
:labelCol="labelCol"
:wrapperCol="wrapperCol"
label="地址">
<a-input placeholder="请输入地址" v-decorator="['address', {'initialValue':''}]"/>
:label="$t('address')">
<a-input :placeholder="$t('enterAddress')" v-decorator="['address', {'initialValue':''}]"/>
</a-form-item>
<a-form-item
:labelCol="labelCol"
:wrapperCol="wrapperCol"
label="备注">
<a-textarea placeholder="请输入备注" v-decorator="['memo', {'initialValue':''}]"/>
:label="$t('remarks')">
<a-textarea :placeholder="$t('enterComments')" v-decorator="['memo', {'initialValue':''}]"/>
</a-form-item>
</a-form>
<div class="anty-form-btn">
<a-button @click="emptyCurrForm" type="default" htmlType="button" icon="sync">重置</a-button>
<a-button @click="submitCurrForm" type="primary" htmlType="button" icon="form">保存</a-button>
<a-button @click="emptyCurrForm" type="default" htmlType="button" icon="sync">{{$t('reset')}}</a-button>
<a-button @click="submitCurrForm" type="primary" htmlType="button" icon="form">{{$t('preservation')}}</a-button>
</div>
</a-card>
<a-card v-else :bordered="false" style="height:248px !important;">
<a-empty>
<span slot="description"> 请先选择一个部门! </span>
<span slot="description"> {{$t('selectDepartmentFirst')}} </span>
</a-empty>
</a-card>
</a-tab-pane>
<!-- <a-tab-pane tab="部门权限" key="2" forceRender>-->
<!-- <depart-auth-modal ref="departAuth"/>-->
<!-- </a-tab-pane>-->
<a-tab-pane tab="用户信息" key="3">
<a-tab-pane :tab="$t('userInformation')" key="3">
<Dept-User-Info ref="DeptUserInfo"></Dept-User-Info>
</a-tab-pane>
</a-tabs>
@@ -174,44 +174,7 @@
import {JeroListMixin} from '@/mixins/JeroListMixin'
import DepartAuthModal from './modules/DepartAuthModal'
// 表头
const columns = [
{
title: '机构名称',
dataIndex: 'departName'
},
{
title: '机构类型',
align: 'center',
dataIndex: 'orgType'
},
{
title: '机构编码',
dataIndex: 'orgCode',
},
{
title: '手机号',
dataIndex: 'mobile'
},
{
title: '传真',
dataIndex: 'fax'
},
{
title: '地址',
dataIndex: 'address'
},
{
title: '排序',
align: 'center',
dataIndex: 'departOrder'
},
{
title: '操作',
align: 'center',
dataIndex: 'action',
scopedSlots: {customRender: 'action'}
}
]
export default {
name: 'DepartList',
mixins: [JeroListMixin],
@@ -237,7 +200,44 @@
model: {},
dropTrigger: '',
depart: {},
columns: columns,
columns:[
{
title: this.$t('OrganizationName'),
dataIndex: 'departName'
},
{
title: this.$t('OrganizationType'),
align: 'center',
dataIndex: 'orgType'
},
{
title: this.$t('OrganizationCode'),
dataIndex: 'orgCode',
},
{
title: this.$t('phoneNumber'),
dataIndex: 'mobile'
},
{
title: this.$t('fax'),
dataIndex: 'fax'
},
{
title: this.$t('address'),
dataIndex: 'address'
},
{
title: this.$t('sort'),
align: 'center',
dataIndex: 'departOrder'
},
{
title: this.$t('operation'),
align: 'center',
dataIndex: 'action',
scopedSlots: {customRender: 'action'}
}
],
disableSubmit: false,
checkedKeys: [],
selectedKeys: [],
@@ -261,9 +261,9 @@
edges: []
},
validatorRules: {
departName: {rules: [{required: true, message: '请输入机构/部门名称!'}]},
orgCode: {rules: [{required: true, message: '请输入机构编码!'}]},
orgCategory: {rules: [{required: true, message: '请输入机构类型!'}]},
departName: {rules: [{required: true, message: this.$t('EnterOrganizationDepartment')}]},
orgCode: {rules: [{required: true, message: this.$t('enterOrganizationCode')}]},
orgCategory: {rules: [{required: true, message: this.$t('enterOrganizationType')}]},
mobile: {rules: [{validator: this.validateMobile}]}
},
url: {
@@ -350,7 +350,7 @@
batchDel: function () {
console.log(this.checkedKeys)
if (this.checkedKeys.length <= 0) {
this.$message.warning('请选择一条记录!')
this.$message.warning(this.$t('selectARecored'))
} else {
var ids = ''
for (var a = 0; a < this.checkedKeys.length; a++) {
@@ -358,8 +358,8 @@
}
var that = this
this.$confirm({
title: '确认删除',
content: '确定要删除所选中的 ' + this.checkedKeys.length + ' 条数据,以及子节点数据吗?',
title: this.$t('confirmDeletion'),
content: this.$t('sureDeleteSelected') + this.checkedKeys.length + this.$t('pieceData'),
onOk: function () {
deleteAction(that.url.deleteBatch, {ids: ids}).then((res) => {
if (res.success) {
@@ -473,7 +473,7 @@
console.log('Received values of form: ', formData)
httpAction(this.url.edit, formData, 'put').then((res) => {
if (res.success) {
this.$message.success('保存成功!')
this.$message.success(this.$t('SavedSuccessfully'))
this.loadTree()
} else {
this.$message.error(res.message)
@@ -502,27 +502,27 @@
} else if (num == 2) {
let key = this.currSelected.key
if (!key) {
this.$message.warning('请先点击选中上级部门!')
this.$message.warning(this.$t('selectSuperiorDepartmentFirst'))
return false
}
this.$refs.departModal.add(this.selectedKeys)
this.$refs.departModal.title = '新增'
this.$refs.departModal.title = this.$t('add')
} else {
this.$refs.departModal.add(this.rightClickSelectedKey)
this.$refs.departModal.title = '新增'
this.$refs.departModal.title = this.$t('add')
}
},
handleDelete() {
var that = this
this.$confirm({
title: '确认删除',
content: '确定要删除此部门以及子节点数据吗?',
title: this.$t('confirmDeletion'),
content: this.$t('deleteDepartmentData'),
onOk: function () {
deleteByDepartId({id: that.rightClickSelectedKey}).then((resp) => {
if (resp.success) {
//删除成功后,去除已选中中的数据
that.checkedKeys.splice(that.checkedKeys.findIndex(key => key === that.rightClickSelectedKey), 1);
that.$message.success('删除成功!')
that.$message.success(this.$t('DeleteSucceeded'))
that.loadTree()
//删除后同步清空右侧基本信息内容
let orgCode=that.form.getFieldValue("orgCode");
@@ -530,14 +530,14 @@
that.onClearSelected()
}
} else {
that.$message.warning('删除失败!')
that.$message.warning(this.$t('DeletionFailed'))
}
})
}
})
},
selectDirectiveOk(record) {
console.log('选中指令数据', record)
// console.log('选中指令数据', record)
this.nodeSettingForm.setFieldsValue({directiveCode: record.directiveCode})
this.currSelected.sysCode = record.sysCode
},
+6 -6
View File
@@ -3,7 +3,7 @@
<a-col :md="8" :sm="24">
<a-card :bordered="false">
<div style="background: #fff;padding-left:16px;height: 100%; margin-top: 5px">
<a-input-search @search="onSearch" style="width:100%;margin-top: 10px" placeholder="请输入部门名称"/>
<a-input-search @search="onSearch" style="width:100%;margin-top: 10px" :placeholder="$t('enterDepartmentName')"/>
<!-- -->
<template v-if="userIdentity === '2' && departTree.length>0">
@@ -23,22 +23,22 @@
</template>
<div style="margin-top: 24px;" v-else-if="userIdentity === '2' && departTree.length==0">
<h3><span>您的部门下暂无有效部门信息</span></h3>
<h3><span>{{$t('departmentInformationDepartment')}}</span></h3>
</div>
<div style="margin-top: 24px;" v-else><h3>普通员工暂此权限</h3></div>
<div style="margin-top: 24px;" v-else><h3>{{$t('permissionTemporrily')}}</h3></div>
</div>
</a-card>
</a-col>
<a-col :md="16" :sm="24">
<a-card :bordered="false">
<a-tabs defaultActiveKey="2" @change="callback">
<a-tab-pane tab="基本信息" key="1" forceRender>
<a-tab-pane :tab="$t('essentialInformation')" key="1" forceRender>
<Dept-Base-Info ref="DeptBaseInfo"></Dept-Base-Info>
</a-tab-pane>
<a-tab-pane tab="用户信息" key="2">
<a-tab-pane :tab="$t('userInformation')" key="2">
<Dept-User-Info ref="DeptUserInfo" @clearSelectedDepartKeys="clearSelectedDepartKeys"></Dept-User-Info>
</a-tab-pane>
<a-tab-pane tab="部门角色" key="3" forceRender>
<a-tab-pane :tab="$t('DepartmentRole')" key="3" forceRender>
<dept-role-info ref="DeptRoleInfo" @clearSelectedDepartKeys="clearSelectedDepartKeys"/>
</a-tab-pane>
</a-tabs>
+22 -22
View File
@@ -6,33 +6,33 @@
<a-form layout="inline" @keyup.enter.native="searchQuery">
<a-row :gutter="12">
<a-col :md="7" :sm="8">
<a-form-item label="字典名称" :labelCol="{span: 6}" :wrapperCol="{span: 14, offset: 1}">
<a-input placeholder="请输入字典名称" v-model="queryParam.dictName"></a-input>
<a-form-item :label="$t('DictionaryName')" :labelCol="{span: 6}" :wrapperCol="{span: 14, offset: 1}">
<a-input :placeholder="$t('enterDictionary')" v-model="queryParam.dictName"></a-input>
</a-form-item>
</a-col>
<a-col :md="7" :sm="8">
<a-form-item label="字典编号" :labelCol="{span: 6}" :wrapperCol="{span: 14, offset: 1}">
<a-input placeholder="请输入字典编号" v-model="queryParam.dictCode"></a-input>
<a-form-item :label="$t('DictionaryNumber')" :labelCol="{span: 6}" :wrapperCol="{span: 14, offset: 1}">
<a-input :placeholder="$t('enterDictionaryNumber')" v-model="queryParam.dictCode"></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-form>
<div class="table-operator" style="border-top: 5px">
<a-button @click="handleAdd" type="primary" icon="plus">添加</a-button>
<a-button type="primary" icon="download" @click="handleExportXls('字典信息')">导出</a-button>
<a-button @click="handleAdd" type="primary" icon="plus">{{$t('addTo')}}</a-button>
<a-button type="primary" icon="download" @click="handleExportXls(this.$t('DictionaryInformation'))">{{$t('export')}}</a-button>
<a-upload name="file" :showUploadList="false" :multiple="false" :headers="tokenHeader" :action="importExcelUrl" @change="handleImportExcel">
<a-button type="primary" icon="import">导入</a-button>
<a-button type="primary" icon="import">{{$t('import')}}</a-button>
</a-upload>
<a-button type="primary" icon="sync" @click="refleshCache()">刷新缓存</a-button>
<a-button type="primary" icon="sync" @click="refleshCache()">{{$t('RefreshCache')}}}</a-button>
<a-button type="primary" icon="hdd" @click="openDeleteList">回收站</a-button>
<a-button type="primary" icon="hdd" @click="openDeleteList">{{$t('recycleBin')}}</a-button>
</div>
<a-table
@@ -47,13 +47,13 @@
<span slot="action" slot-scope="text, record">
<a @click="handleEdit(record)">
<a-icon type="edit"/>
编辑
{{$t('edit')}}
</a>
<a-divider type="vertical"/>
<a @click="editDictItem(record)"><a-icon type="setting"/> 字典配置</a>
<a @click="editDictItem(record)"><a-icon type="setting"/> {{$t('DictionaryConfiguration')}}</a>
<a-divider type="vertical"/>
<a-popconfirm title="确定删除吗?" @confirm="() =>handleDelete(record.id)">
<a>删除</a>
<a>{{$t('delete')}}</a>
</a-popconfirm>
</span>
</a-table>
@@ -81,7 +81,7 @@
components: {DictModal, DictItemList,DictDeleteList},
data() {
return {
description: '这是数据字典页面',
description: this.$t('dataDictionaryPage'),
visible: false,
// 查询条件
queryParam: {
@@ -101,22 +101,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'},
@@ -188,11 +188,11 @@
Vue.ls.set(UI_CACHE_DB_DICT_DATA, res.result, 7 * 24 * 60 * 60 * 1000)
}
})
this.$message.success("刷新缓存完成");
this.$message.success(this.$t('DescriptionRefreshCache'));
}
}).catch(e=>{
this.$message.warn("刷新缓存失败");
console.log("刷新失败",e)
this.$message.warn(this.$t('FailedRefreshCache'));
console.log(this.$t('refreshFailed'),e)
})
}
},
+20 -20
View File
@@ -3,8 +3,8 @@
<!--导航区域-->
<div>
<a-tabs defaultActiveKey="1" @change="callback">
<a-tab-pane tab="登录日志" key="1"></a-tab-pane>
<a-tab-pane tab="操作日志" key="2"></a-tab-pane>
<a-tab-pane :tab="$t('LoginLog')" key="1"></a-tab-pane>
<a-tab-pane :tab="$t('OperationLog')" key="2"></a-tab-pane>
</a-tabs>
</div>
@@ -14,33 +14,33 @@
<a-row :gutter="24">
<a-col :md="6" :sm="8">
<a-form-item label="搜索日志">
<a-input placeholder="请输入搜索关键词" v-model="queryParam.keyWord"></a-input>
<a-form-item :label="$t('SearchLog')">
<a-input :placeholder="$t('enterSearchKeyword')" v-model="queryParam.keyWord"></a-input>
</a-form-item>
</a-col>
<a-col :md="6" :sm="10">
<a-form-item label="创建时间" :labelCol="labelCol" :wrapperCol="wrapperCol">
<a-form-item :label="$t('createTime')" :labelCol="labelCol" :wrapperCol="wrapperCol">
<a-range-picker
style="width: 210px"
v-model="queryParam.createTimeRange"
format="YYYY-MM-DD"
:placeholder="['开始时间', '结束时间']"
:placeholder="[$t('startTime'), $t('endTime')]"
@change="onDateChange"
@ok="onDateOk"
/>
</a-form-item>
</a-col>
<a-col :md="5" :sm="8" v-if="tabKey === '2'">
<a-form-item label="操作类型" style="left: 10px">
<j-dict-select-tag v-model="queryParam.operateType" placeholder="请选择操作类型" dictCode="operate_type"/>
<a-form-item :label="$t('OperationType')" style="left: 10px">
<j-dict-select-tag v-model="queryParam.operateType" :placeholder="$t('selectOperationType')" dictCode="operate_type"/>
</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" style="left: 10px" @click="searchQuery" icon="search">查询</a-button>
<a-button type="primary" @click="searchReset" icon="reload" style="margin-left: 8px;left: 10px">重置</a-button>
<a-button type="primary" style="left: 10px" @click="searchQuery" icon="search">{{$t('query')}}</a-button>
<a-button type="primary" @click="searchReset" icon="reload" style="margin-left: 8px;left: 10px">{{$t('reset')}}</a-button>
</a-col>
</span>
@@ -60,8 +60,8 @@
@change="handleTableChange">
<div v-show="queryParam.logType==2" slot="expandedRowRender" slot-scope="record" style="margin: 0">
<div style="margin-bottom: 5px"><a-badge status="success" style="vertical-align: middle;"/><span style="vertical-align: middle;">请求方法:{{ record.method }}</span></div>
<div><a-badge status="processing" style="vertical-align: middle;"/><span style="vertical-align: middle;">请求参数:{{ record.requestParam }}</span></div>
<div style="margin-bottom: 5px"><a-badge status="success" style="vertical-align: middle;"/><span style="vertical-align: middle;">{{$t('RequestMethod')}}:{{ record.method }}</span></div>
<div><a-badge status="processing" style="vertical-align: middle;"/><span style="vertical-align: middle;">{{$t('RequestParameters')}}:{{ record.requestParam }}</span></div>
</div>
<!-- 字符串超长截取省略号显示-->
<span slot="logContent" slot-scope="text, record">
@@ -85,7 +85,7 @@
},
data () {
return {
description: '这是日志管理页面',
description: this.$t('logManagementPage'),
// 查询条件
queryParam: {
ipInfo:'',
@@ -106,20 +106,20 @@
}
},
{
title: '日志内容',
title: this.$t('LogContent'),
align:"left",
dataIndex: 'logContent',
scopedSlots: { customRender: 'logContent' },
sorter: true
},
{
title: '操作人ID',
title: this.$t('OperatorID'),
dataIndex: 'userid',
align:"center",
sorter: true
},
{
title: '操作人名称',
title: this.$t('OperatorName'),
dataIndex: 'username',
align:"center",
sorter: true
@@ -131,13 +131,13 @@
sorter: true
},
{
title: '耗时(毫秒)',
title: this.$t('ElapsedTime'),
dataIndex: 'costTime',
align:"center",
sorter: true
},
{
title: '日志类型',
title: this.$t('LogType'),
dataIndex: 'logType_dictText',
/*customRender:function (text) {
if(text==1){
@@ -151,7 +151,7 @@
align:"center",
},
{
title: '创建时间',
title: this.$t('createTime'),
dataIndex: 'createTime',
align:"center",
sorter: true
@@ -159,7 +159,7 @@
],
operateColumn:
{
title: '操作类型',
title: this.$t('OperationType'),
dataIndex: 'operateType_dictText',
align:"center",
},
+74 -70
View File
@@ -3,13 +3,13 @@
<!-- 操作按钮区域 -->
<div class="table-operator">
<a-button @click="handleAdd" type="primary" icon="plus">新增</a-button>
<a-button @click="handleAdd" type="primary" icon="plus">{{$t('add')}}</a-button>
<a-button
@click="batchDel"
v-if="selectedRowKeys.length > 0"
ghost
type="primary"
icon="delete">批量删除
icon="delete">{{$t('BatchDelete')}}
</a-button>
</div>
@@ -17,9 +17,9 @@
<div>
<div class="ant-alert ant-alert-info" style="margin-bottom: 16px;">
<i class="anticon anticon-info-circle ant-alert-icon"></i>已选择&nbsp;<a style="font-weight: 600">{{
selectedRowKeys.length }}</a>项&nbsp;&nbsp;
<a style="margin-left: 24px" @click="onClearSelected">清空</a>
<i class="anticon anticon-info-circle ant-alert-icon"></i>{{$t('selected')}}&nbsp;<a style="font-weight: 600">{{
selectedRowKeys.length }}</a>{{$t('term')}}
<a style="margin-left: 24px" @click="onClearSelected">{{$t('empty')}}</a>
</div>
<a-table
@@ -34,27 +34,27 @@
@expandedRowsChange="handleExpandedRowsChange">
<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="handleDetail(record)">详情</a>
<a href="javascript:;" @click="handleDetail(record)">{{$t('details')}}</a>
</a-menu-item>
<a-menu-item>
<a href="javascript:;" @click="handleAddSub(record)">添加下级</a>
<a href="javascript:;" @click="handleAddSub(record)">{{$t('AddSubordinate')}}</a>
</a-menu-item>
<a-menu-item>
<a href="javascript:;" @click="handleDataRule(record)">数据规则</a>
<a href="javascript:;" @click="handleDataRule(record)">{{$t('DataRules')}}</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>
@@ -86,61 +86,7 @@
import PermissionDataRuleList from './PermissionDataRuleList'
import JEllipsis from '@/components/jero/JEllipsis'
const columns = [
{
title: '菜单名称',
dataIndex: 'name',
key: 'name'
}, {
title: '菜单类型',
dataIndex: 'menuType',
key: 'menuType',
customRender: function(text) {
if (text == 0) {
return '菜单'
} else if (text == 1) {
return '菜单'
} else if (text == 2) {
return '按钮/权限'
} else {
return text
}
}
},/*{
title: '权限编码',
dataIndex: 'perms',
key: 'permissionCode',
},*/{
title: 'icon',
dataIndex: 'icon',
key: 'icon'
},
{
title: '组件',
dataIndex: 'component',
key: 'component',
scopedSlots: { customRender: 'component' }
},
{
title: '路径',
dataIndex: 'url',
key: 'url',
scopedSlots: { customRender: 'url' }
},
{
title: '排序',
dataIndex: 'sortNo',
key: 'sortNo'
},
{
title: '操作',
dataIndex: 'action',
fixed: 'right',
scopedSlots: { customRender: 'action' },
align: 'center',
width: 150
}
]
export default {
name: 'PermissionList',
@@ -152,9 +98,53 @@
},
data() {
return {
description: '这是菜单管理页面',
description: this.$t('menuMnagementPage'),
// 表头
columns: columns,
columns: [
{
title: this.$t('MenuName'),
dataIndex: 'name',
key: 'name'
}, {
title: this.$t('MenuType'),
dataIndex: 'menuType',
key: 'menuType',
customRender: this.text
},/*{
title: '权限编码',
dataIndex: 'perms',
key: 'permissionCode',
},*/{
title: 'icon',
dataIndex: 'icon',
key: 'icon'
},
{
title: this.$t('assembly'),
dataIndex: 'component',
key: 'component',
scopedSlots: { customRender: 'component' }
},
{
title: this.$t('route'),
dataIndex: 'url',
key: 'url',
scopedSlots: { customRender: 'url' }
},
{
title: this.$t('sort'),
dataIndex: 'sortNo',
key: 'sortNo'
},
{
title: this.$t('operation'),
dataIndex: 'action',
fixed: 'right',
scopedSlots: { customRender: 'action' },
align: 'center',
width: 150
}
],
loading: false,
// 展开的行,受控属性
expandedRowKeys: [],
@@ -165,6 +155,20 @@
}
}
},
computed:{
text:function(){
if (text == 0) {
return this.$t('menu')
} else if (text == 1) {
return this.$t('menu')
} else if (text == 2) {
return this.$t('ButtonsPermissions')
} else {
return text
}
}
},
methods: {
loadData() {
this.dataSource = []
@@ -180,7 +184,7 @@
this.$refs.PermissionDataRuleList.edit(record)
},
handleAddSub(record) {
this.$refs.modalForm.title = "添加子菜单";
this.$refs.modalForm.title = this.$t('AddSubmenu');
this.$refs.modalForm.localMenuType = 1;
this.$refs.modalForm.disableSubmit = false;
this.$refs.modalForm.edit({status:'1',permsType:'1',route:true,'parentId':record.id});
+46 -46
View File
@@ -8,7 +8,7 @@
<a-form layout="inline" @keyup.enter.native="searchQuery">
<a-row :gutter="24">
<a-col :md="12" :sm="8">
<a-form-item label="角色名称" :labelCol="{span: 5}" :wrapperCol="{span: 18, offset: 1}">
<a-form-item :label="$t('roleName')" :labelCol="{span: 5}" :wrapperCol="{span: 18, offset: 1}">
<a-input placeholder="" v-model="queryParam.roleName"></a-input>
</a-form-item>
</a-col>
@@ -23,8 +23,8 @@
-->
<span style="float: left;overflow: hidden;" class="table-page-search-submitButtons">
<a-col :md="12" :sm="24">
<a-button type="primary" @click="searchQuery" icon="search" style="margin-left: 21px">查询</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: 21px">{{$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>
@@ -32,18 +32,18 @@
</div>
<!-- 操作按钮区域 -->
<div class="table-operator" style="margin: 5px 0 10px 2px">
<a-button @click="handleAdd" type="primary" icon="plus">新建角色</a-button>
<a-button @click="handleAdd" type="primary" icon="plus">{{$t('newRole')}}</a-button>
<!--<a-button @click="handleEdit(model1)" type="primary" icon="plus">角色编辑</a-button>-->
<a-upload name="file" :showUploadList="false" :multiple="false" :headers="tokenHeader" :action="importExcelUrl" @change="handleImportExcel">
<a-button type="primary" icon="import">导入</a-button>
<a-button type="primary" icon="import">{{$t('import')}}</a-button>
</a-upload>
<a-button type="primary" icon="download" @click="handleExportXls('角色管理')">导出</a-button>
<a-button type="primary" icon="download" @click="handleExportXls($t('RoleManagement'))">{{$t('export')}}</a-button>
</div>
<div class="ant-alert ant-alert-info" style="margin-bottom: 16px;">
<i class="anticon anticon-info-circle ant-alert-icon">
</i> 已选择 <a><b>{{ selectedRowKeys1.length }}</b></a>
<a style="margin-left: 24px" @click="onClearSelected1">清空</a>
</i> {{$t('selected')}} <a><b>{{ selectedRowKeys1.length }}</b></a>{{$t('term')}}
<a style="margin-left: 24px" @click="onClearSelected1">{{$t('empty')}}</a>
</div>
<div style="margin-top: 15px">
@@ -60,7 +60,7 @@
:rowSelection="{selectedRowKeys: selectedRowKeys1, onChange: onSelectChange1, type:'radio'}"
@change="handleTableChange">
<span slot="action" slot-scope="text, record">
<a @click="handleOpen(record)">用户</a>
<a @click="handleOpen(record)">{{$t('user')}}</a>
<a-divider type="vertical"/>
<a-dropdown>
@@ -69,14 +69,14 @@
</a>
<a-menu slot="overlay">
<a-menu-item>
<a @click="handlePerssion(record.id)">授权</a>
<a @click="handlePerssion(record.id)">{{$t('toGrantAuthorization')}}</a>
</a-menu-item>
<a-menu-item>
<a @click="handleEdit(record)">编辑</a>
<a @click="handleEdit(record)">{{$t('edit')}}</a>
</a-menu-item>
<a-menu-item>
<a-popconfirm title="确定删除吗?" @confirm="() => handleDelete1(record.id)">
<a>删除</a>
<a-popconfirm :title="$t('areYouSure')" @confirm="() => handleDelete1(record.id)">
<a>{{$t('delete')}}</a>
</a-popconfirm>
</a-menu-item>
</a-menu>
@@ -100,14 +100,14 @@
<a-row :gutter="24">
<a-col :md="12" :sm="12">
<a-form-item label="用户账号">
<a-form-item :label="$t('userAccount')">
<a-input placeholder="" v-model="queryParam2.username"></a-input>
</a-form-item>
</a-col>
<span style="float: left;overflow: hidden;" class="table-page-search-submitButtons">
<a-col :md="9" :sm="24">
<a-button type="primary" @click="searchQuery2" icon="search" style="margin-left: 21px">查询</a-button>
<a-button type="primary" @click="searchReset2" icon="reload" style="margin-left: 8px">重置</a-button>
<a-button type="primary" @click="searchQuery2" icon="search" style="margin-left: 21px">{{$t('query')}}</a-button>
<a-button type="primary" @click="searchReset2" icon="reload" style="margin-left: 8px">{{$t('reset')}}</a-button>
</a-col>
</span>
@@ -116,18 +116,18 @@
</div>
<!-- 操作按钮区域 -->
<div class="table-operator" :md="24" :sm="24">
<a-button @click="handleAdd2" type="primary" icon="plus" style="margin-top: 16px">新增用户</a-button>
<a-button @click="handleAdd2" type="primary" icon="plus" style="margin-top: 16px">{{$t('newUser')}}</a-button>
<!--<a-button @click="handleEdit2" type="primary" icon="edit" style="margin-top: 16px">用户编辑</a-button>-->
<a-button @click="handleAddUserRole" type="primary" icon="plus" style="margin-top: 16px">已有用户</a-button>
<a-button @click="handleAddUserRole" type="primary" icon="plus" style="margin-top: 16px">{{$t('ExistingUsers')}}</a-button>
<a-dropdown v-if="selectedRowKeys2.length > 0">
<a-menu slot="overlay">
<a-menu-item key="1" @click="batchDel2">
<a-icon type="delete"/>
删除
{{$t('delete')}}
</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>
@@ -135,9 +135,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">{{
selectedRowKeys2.length }}</a>
<a style="margin-left: 24px" @click="onClearSelected2">清空</a>
<i class="anticon anticon-info-circle ant-alert-icon"></i> {{$t('selected')}} <a style="font-weight: 600">{{
selectedRowKeys2.length }}</a>{{$t('term')}}
<a style="margin-left: 24px" @click="onClearSelected2">{{$t('empty')}}</a>
</div>
<a-table
style="height:500px"
@@ -152,7 +152,7 @@
:rowSelection="{selectedRowKeys: selectedRowKeys2, onChange: onSelectChange2}"
@change="handleTableChange2">
<span slot="action" slot-scope="text, record">
<a @click="handleEdit2(record)">编辑</a>
<a @click="handleEdit2(record)">{{$t('edit')}}</a>
<a-divider type="vertical"/>
<a-dropdown>
<a class="ant-dropdown-link">
@@ -160,8 +160,8 @@
</a>
<a-menu slot="overlay">
<a-menu-item>
<a-popconfirm title="确定删除吗?" @confirm="() => handleDelete2(record.id)">
<a>删除</a>
<a-popconfirm :title="$t('areYouSure')" @confirm="() => handleDelete2(record.id)">
<a>{{$t('delete')}}</a>
</a-popconfirm>
</a-menu-item>
</a-menu>
@@ -211,7 +211,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,
@@ -222,7 +222,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,
@@ -249,17 +249,17 @@
columns:
[
{
title: '角色编码',
title: this.$t('RoleCode'),
align: 'center',
dataIndex: 'roleCode'
},
{
title: '角色名称',
title: this.$t('roleName'),
align: 'center',
dataIndex: 'roleName'
},
{
title: '创建时间',
title: this.$t('createTime'),
dataIndex: 'createTime',
align:"center",
sorter: true,
@@ -268,33 +268,33 @@
}
},
{
title: '操作',
title: this.$t('operation'),
dataIndex: 'action',
align: 'center',
scopedSlots: { customRender: 'action' }
}
],
columns2: [{
title: '用户账号',
title: this.$t('userAccount'),
align: 'center',
dataIndex: 'username',
width: 120
},
{
title: '用户名称',
title: this.$t('userName'),
align: 'center',
width: 100,
dataIndex: 'realname'
},
{
title: '状态',
title: this.$t('status'),
align: 'center',
width: 80,
dataIndex: 'status_dictText'
},
{
title: '操作',
title: this.$t('operation'),
dataIndex: 'action',
scopedSlots: { customRender: 'action' },
align: 'center',
@@ -375,20 +375,20 @@
return str
},
handleEdit2: function(record) {
this.$refs.modalForm2.title = '编辑'
this.$refs.modalForm2.title = this.$t('edit')
this.$refs.modalForm2.roleDisabled = true
this.$refs.modalForm2.edit(record)
},
handleAdd2: function() {
if (this.currentRoleId == '') {
this.$message.error('请选择一个角色!')
this.$message.error(this.$t('selectOneRule'))
} else {
this.$refs.modalForm2.roleDisabled = true
this.$refs.modalForm2.selectedRole = [this.currentRoleId]
this.$refs.modalForm2.add()
this.$refs.modalForm2.title = '新增'
this.$refs.modalForm2.title = this.$t('add')
}
},
modalFormOk2() {
@@ -397,7 +397,7 @@
},
loadData2(arg) {
if (!this.url.list2) {
this.$message.error('请设置url.list2属性!')
this.$message.error(this.$t('setAttribute'))
return
}
//加载数据 若传入参数1则加载第一页的内容
@@ -425,7 +425,7 @@
},
handleDelete2: function(id) {
if (!this.url.delete2) {
this.$message.error('请设置url.delete2属性!')
this.$message.error(this.$t('setDelAttribute'))
return
}
var that = this
@@ -441,11 +441,11 @@
batchDel2: function() {
if (!this.url.deleteBatch2) {
this.$message.error('请设置url.deleteBatch2属性!')
this.$message.error(this.$t('setDelBatAttribute'))
return
}
if (this.selectedRowKeys2.length <= 0) {
this.$message.warning('请选择一条记录!')
this.$message.warning(this.$t('selectARecored'))
return
} else {
var ids = ''
@@ -455,8 +455,8 @@
var that = this
console.log(this.currentDeptId)
this.$confirm({
title: '确认删除',
content: '是否删除选中数据?',
title: this.$t('confirmDeletion'),
content: this.$t('deleteAData'),
onOk: function() {
deleteAction(that.url.deleteBatch2, { roleId: that.currentRoleId, userIds: ids }).then((res) => {
if (res.success) {
@@ -491,7 +491,7 @@
handleAddUserRole() {
if (this.currentRoleId == '') {
this.$message.error('请选择一个角色!')
this.$message.error(this.$t('selectOneRule'))
} else {
this.$refs.selectUserModal.visible = true
}
+17 -16
View File
@@ -3,24 +3,25 @@
<!-- 操作按钮区域 -->
<div class="table-operator">
<a-button @click="handleAdd" type="primary" icon="plus">新增</a-button>
<a-button type="primary" icon="download" @click="handleExportXls('分类字典')">导出</a-button>
<a-button @click="handleAdd" type="primary" icon="plus">{{$t('add')}}</a-button>
<a-button type="primary" icon="download" @click="handleExportXls(this.$t('ClassificationDictionary'))">{{$t('export')}}</a-button>
<a-upload name="file" :showUploadList="false" :multiple="false" :headers="tokenHeader" :action="importExcelUrl" @change="handleImportExcel">
<a-button type="primary" icon="import">导入</a-button>
<a-button type="primary" icon="import">{{$t('import')}}</a-button>
</a-upload>
<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>项
<a style="margin-left: 24px" @click="onClearSelected">{{$t('empty')}}</a>
</div>
<a-table
@@ -37,13 +38,13 @@
v-bind="tableProps">
<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)">
<a>删除</a>
<a-popconfirm :title="$t('areYouSure')" @confirm="() => handleDelete(record)">
<a>{{$t('delete')}}</a>
</a-popconfirm>
<a-divider type="vertical" />
<a @click="handleAddSub(record)">添加下级</a>
<a @click="handleAddSub(record)">{{$t('AddSubordinate')}}</a>
</span>
</a-table>
@@ -68,21 +69,21 @@
},
data () {
return {
description: '分类字典管理页面',
description: this.$t('ClassifManagementPage'),
// 表头
columns: [
{
title:'分类名称',
title:this.$t('ClassificationName'),
align:"left",
dataIndex: 'name'
},
{
title:'分类编码',
title:this.$t('ClassificationCode'),
align:"left",
dataIndex: 'code'
},
{
title: '操作',
title: this.$t('operation'),
dataIndex: 'action',
align:"center",
scopedSlots: { customRender: 'action' },
@@ -260,7 +261,7 @@
this.subExpandedKeys = [];
this.getExpandKeysByPid(record.id,this.dataSource,this.dataSource)
this.$refs.modalForm.subExpandedKeys = this.subExpandedKeys;
this.$refs.modalForm.title = "添加子分类";
this.$refs.modalForm.title = this.$t('AddSubcategory');
this.$refs.modalForm.edit({'pid':record.id});
this.$refs.modalForm.disableSubmit = false;
},
+20 -19
View File
@@ -11,20 +11,21 @@
<!-- 操作按钮区域 -->
<div class="table-operator">
<a-button @click="handleAdd" type="primary" icon="plus">新增</a-button>
<a-button @click="handleAdd" type="primary" icon="plus">{{$t('add')}}</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
@@ -45,11 +46,11 @@
<div v-html="text"></div>
</template>
<template slot="imgSlot" slot-scope="text">
<span v-if="!text" style="font-size: 12px;font-style: italic;">无图片</span>
<span v-if="!text" style="font-size: 12px;font-style: italic;">{{$t('NoPicture')}}</span>
<img v-else :src="getImgView(text)" height="25px" alt="" style="max-width:80px;font-size: 12px;font-style: italic;"/>
</template>
<template slot="fileSlot" slot-scope="text">
<span v-if="!text" style="font-size: 12px;font-style: italic;">无文件</span>
<span v-if="!text" style="font-size: 12px;font-style: italic;">{{$t('noFile')}}</span>
<a-button
v-else
:ghost="true"
@@ -62,18 +63,18 @@
</template>
<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" /></a>
<a class="ant-dropdown-link">{{$t('more')}} <a-icon type="down" /></a>
<a-menu slot="overlay">
<a-menu-item>
<a @click="handleDetail(record)">详情</a>
<a @click="handleDetail(record)">{{$t('details')}}</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>
@@ -103,35 +104,35 @@
},
data () {
return {
description: 'adad管理页面',
description: this.$t('adadManagementPage'),
// 表头
columns: [
{
title:'租户名称',
title:this.$t('TenantName'),
align:"center",
dataIndex: 'name'
},{
title:'租户编号',
title:this.$t('TenantNumber'),
align:"center",
dataIndex: 'id'
},
{
title:'开始时间',
title:this.$t('startTime'),
align:"center",
dataIndex: 'beginDate'
},
{
title:'结束时间',
title:this.$t('endtime'),
align:"center",
dataIndex: 'endDate'
},
{
title:'状态',
title:this.$t('status'),
align:"center",
dataIndex: 'status_dictText'
},
{
title: '操作',
title: this.$t('operation'),
dataIndex: 'action',
align:"center",
fixed:"right",
+56 -56
View File
@@ -7,17 +7,17 @@
<a-row :gutter="24">
<a-col :md="6" :sm="12">
<a-form-item label="账号">
<j-input placeholder="输入账号模糊查询" v-model="queryParam.username"></j-input>
<a-form-item :label="$t('account')">
<j-input :placeholder="$t('EnterAccountFuzzyQuery')" v-model="queryParam.username"></j-input>
</a-form-item>
</a-col>
<a-col :md="6" :sm="8">
<a-form-item label="性别">
<a-select v-model="queryParam.sex" placeholder="请选择性别">
<a-select-option value="">请选择</a-select-option>
<a-select-option value="1"></a-select-option>
<a-select-option value="2"></a-select-option>
<a-form-item :label="$t('Gender')">
<a-select v-model="queryParam.sex" :placeholder="$t('pleaseSelect')+$t('Gender')">
<a-select-option value="">{{$t('pleaseSelect')}}</a-select-option>
<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-col>
@@ -25,23 +25,23 @@
<template v-if="toggleSearchStatus">
<a-col :md="6" :sm="8">
<a-form-item label="真实名字">
<a-input placeholder="请输入真实名字" v-model="queryParam.realname"></a-input>
<a-form-item :label="$t('RealName')">
<a-input :placeholder="$t('pleaseEnter')+$t('RealName')" v-model="queryParam.realname"></a-input>
</a-form-item>
</a-col>
<a-col :md="6" :sm="8">
<a-form-item label="手机号码">
<a-input placeholder="请输入手机号码查询" v-model="queryParam.phone"></a-input>
<a-form-item :label="$t('phoneNumber')">
<a-input :placeholder="$t('pleaseEnter')+$t('phoneNumber')+$t('query')" v-model="queryParam.phone"></a-input>
</a-form-item>
</a-col>
<a-col :md="6" :sm="8">
<a-form-item label="用户状态">
<a-select v-model="queryParam.status" placeholder="请选择">
<a-select-option value="">请选择</a-select-option>
<a-select-option value="1">正常</a-select-option>
<a-select-option value="2">冻结</a-select-option>
<a-form-item :label="$t('userStatues')">
<a-select v-model="queryParam.status" :placeholder="$t('pleaseSelect')">
<a-select-option value="">{{$t('pleaseSelect')}}</a-select-option>
<a-select-option value="1">{{$t('normal')}}</a-select-option>
<a-select-option value="2">{{$t('frozen')}}</a-select-option>
</a-select>
</a-form-item>
</a-col>
@@ -49,10 +49,10 @@
<a-col :md="6" :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>
<a @click="handleToggleSearch" style="margin-left: 8px">
{{ toggleSearchStatus ? '收起' : '展开' }}
{{ toggleSearchStatus ? $t('putAway') : $t('open') }}
<a-icon :type="toggleSearchStatus ? 'up' : 'down'"/>
</a>
</span>
@@ -64,29 +64,29 @@
<!-- 操作按钮区域 -->
<div class="table-operator" style="border-top: 5px">
<a-button @click="handleAdd" type="primary" icon="plus" >添加用户</a-button>
<a-button type="primary" icon="download" @click="handleExportXls('用户信息')">导出</a-button>
<a-button @click="handleAdd" type="primary" icon="plus" >{{$t('addUser')}}</a-button>
<a-button type="primary" icon="download" @click="handleExportXls($t('userInformation'))">{{$t('export')}}</a-button>
<a-upload name="file" :showUploadList="false" :multiple="false" :headers="tokenHeader" :action="importExcelUrl" @change="handleImportExcel">
<a-button type="primary" icon="import">导入</a-button>
<a-button type="primary" icon="import">{{$t('import')}}</a-button>
</a-upload>
<a-button type="primary" icon="hdd" @click="recycleBinVisible=true">回收站</a-button>
<a-button type="primary" icon="hdd" @click="recycleBinVisible=true">{{$t('recycleBin')}}</a-button>
<a-dropdown v-if="selectedRowKeys.length > 0">
<a-menu slot="overlay" @click="handleMenuClick">
<a-menu-item key="1">
<a-icon type="delete" @click="batchDel"/>
删除
{{$t('delete')}}
</a-menu-item>
<a-menu-item key="2">
<a-icon type="lock" @click="batchFrozen('2')"/>
冻结
{{$('frozen')}}
</a-menu-item>
<a-menu-item key="3">
<a-icon type="unlock" @click="batchFrozen('1')"/>
解冻
{{$t('thaw')}}
</a-menu-item>
</a-menu>
<a-button style="margin-left: 8px">
批量操作
{{$t('batchOperation')}}
<a-icon type="down"/>
</a-button>
</a-dropdown>
@@ -96,8 +96,8 @@
<!-- table区域-begin -->
<div>
<div class="ant-alert ant-alert-info" style="margin-bottom: 16px;">
<i class="anticon anticon-info-circle ant-alert-icon"></i>已选择&nbsp;<a style="font-weight: 600">{{ selectedRowKeys.length }}</a>项&nbsp;&nbsp;
<a style="margin-left: 24px" @click="onClearSelected">清空</a>
<i class="anticon anticon-info-circle ant-alert-icon"></i>{{$t('selected')}}&nbsp;<a style="font-weight: 600">{{ selectedRowKeys.length }}</a>{{$t('term')}}
<a style="margin-left: 24px" @click="onClearSelected">{{$t('empty')}}</a>
</div>
<a-table
@@ -119,38 +119,38 @@
</template>
<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="handleDetail(record)">详情</a>
<a href="javascript:;" @click="handleDetail(record)">{{$t('details')}}</a>
</a-menu-item>
<a-menu-item>
<a href="javascript:;" @click="handleChangePassword(record.username)">密码</a>
<a href="javascript:;" @click="handleChangePassword(record.username)">{{$t('password')}}</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-item v-if="record.status==1">
<a-popconfirm title="确定冻结吗?" @confirm="() => handleFrozen(record.id,2,record.username)">
<a>冻结</a>
<a-popconfirm :title="$t('freezePassword')" @confirm="() => handleFrozen(record.id,2,record.username)">
<a>{{$t('frozen')}}}</a>
</a-popconfirm>
</a-menu-item>
<a-menu-item v-if="record.status==2">
<a-popconfirm title="确定解冻吗?" @confirm="() => handleFrozen(record.id,1,record.username)">
<a>解冻</a>
<a-popconfirm :title="$t('youThaw')" @confirm="() => handleFrozen(record.id,1,record.username)">
<a>{{$t('thaw')}}</a>
</a-popconfirm>
</a-menu-item>
</a-menu>
@@ -194,12 +194,12 @@
},
data() {
return {
description: '这是用户管理页面',
description: this.$t('freezePasManagementPage'),
queryParam: {},
recycleBinVisible: false,
columns: [
{
title: '序号',
title: this.$t('serialNumber'),
dataIndex: '',
key:'rowIndex',
width:60,
@@ -216,33 +216,33 @@
// scopedSlots: {customRender: "avatarslot"}
// },
{
title: '用户账号',
title: this.$t('userAccount'),
align: "center",
dataIndex: 'username',
width: 120,
sorter: true
},
{
title: '用户姓名',
title: this.$t('userName'),
align: "center",
width: 100,
dataIndex: 'realname',
},
{
title: '性别',
title: this.$t('Gender'),
align: "center",
width: 80,
dataIndex: 'sex_dictText',
sorter: true
},
{
title: '手机号码',
title: this.$t('phoneNumber'),
align: "center",
width: 100,
dataIndex: 'phone'
},
{
title: '部门',
title: this.$t('department'),
align: "center",
width: 180,
dataIndex: 'orgCodeTxt'
@@ -260,13 +260,13 @@
// dataIndex: 'departIds_dictText'
// },
{
title: '状态',
title: this.$t('status'),
align: "center",
width: 80,
dataIndex: 'status_dictText'
},
{
title: '操作',
title: this.$t('operation'),
dataIndex: 'action',
scopedSlots: {customRender: 'action'},
align: "center",
@@ -274,9 +274,9 @@
}
],
superQueryFieldList: [
{ type: 'input', value: 'username', text: '用户账号', },
{ type: 'input', value: 'realname', text: '用户姓名', },
{ type: 'select', value: 'sex', text: '性别', dictCode: 'sex' },
{ type: 'input', value: 'username', text: this.$t('userAccount'), },
{ type: 'input', value: 'realname', text: this.$t('userName'), },
{ type: 'select', value: 'sex', text: this.$t('Gender'), dictCode: 'sex' },
],
url: {
syncUser: "/act/process/extActProcess/doSyncUser",
@@ -300,7 +300,7 @@
batchFrozen: function (status) {
if (this.selectedRowKeys.length <= 0) {
this.$message.warning('请选择一条记录!');
this.$message.warning(this.$t('pleaseSelect')+this.$t('aRcord'));
return false;
} else {
let ids = "";
@@ -312,15 +312,15 @@
}
});
if (isAdmin) {
that.$message.warning('管理员账号不允许此操作,请重新选择!');
that.$message.warning(this.$t('operationAllowedAccount'));
return;
}
that.selectedRowKeys.forEach(function (val) {
ids += val + ",";
});
that.$confirm({
title: "确认操作",
content: "是否" + (status == 1 ? "解冻" : "冻结") + "选中账号?",
title: this.$t('confirm')+this.$t('operation'),
content: this.whether + (status == 1 ? this.$t('thaw') : this.$t('frozen')) + this.$t('selectedAccount'),
onOk: function () {
frozenBatch({ids: ids, status: status}).then((res) => {
if (res.success) {
@@ -348,7 +348,7 @@
let that = this;
//TODO 后台校验管理员角色
if ('admin' == username) {
that.$message.warning('管理员账号不允许此操作!');
that.$message.warning(this.$t('adminDoNotAllowOperation'));
return;
}
frozenBatch({ids: id, status: status}).then((res) => {
+1
View File
@@ -334,6 +334,7 @@
message: '欢迎',
description: `${timeFix()},欢迎回来`,
});
},
cmsFailed(err){
this.$notification[ 'error' ]({