国际化修改
This commit is contained in:
@@ -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