'增加国际化'

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
+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' ]({