From dc51b10621fc8d49ab2ee3cedb9eb3fb1b34ee9d Mon Sep 17 00:00:00 2001 From: qq787203167 <787203167@qq.com> Date: Fri, 4 Mar 2022 14:11:13 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E7=94=A8=E6=88=B7=E7=AE=A1?= =?UTF-8?q?=E7=90=86=E7=9A=84=E6=9F=A5=E8=AF=A2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- jero-web/src/common/lang/en-us.js | 6 +- jero-web/src/common/lang/zh-cn.js | 8 +- .../src/components/dict/JDictSelectTag.vue | 1 - .../src/components/libraryAddForm/index.vue | 50 +-- jero-web/src/views/system/UserList.vue | 305 ++++++++++-------- 5 files changed, 188 insertions(+), 182 deletions(-) diff --git a/jero-web/src/common/lang/en-us.js b/jero-web/src/common/lang/en-us.js index 1092e0d35..b3fbb05b0 100644 --- a/jero-web/src/common/lang/en-us.js +++ b/jero-web/src/common/lang/en-us.js @@ -6,7 +6,7 @@ module.exports = { pleaseSelect: 'please select', male: 'male', female: 'female', - RealName: 'real name', + RealName: 'User name', pleaseEnter: 'please enter', phoneNumber: 'phone number', query: 'query', @@ -413,5 +413,7 @@ module.exports = { SeeMore:'See more', OperationSuccessful:'Operation successful', operationFailed:'operation failed', - PersonnelSelection:'Personnel selection' + PersonnelSelection:'Personnel selection', + EmployeeNumber:'Employee number', + EmployeeType:'Employee type', } \ No newline at end of file diff --git a/jero-web/src/common/lang/zh-cn.js b/jero-web/src/common/lang/zh-cn.js index c6b543a81..a6599ed7a 100644 --- a/jero-web/src/common/lang/zh-cn.js +++ b/jero-web/src/common/lang/zh-cn.js @@ -1,12 +1,12 @@ module.exports = { home: '首页', - account: '账号', - EnterAccountFuzzyQuery:'输入账号模糊查询', + account: '用户账号', + EnterAccountFuzzyQuery:'输入用户账号模糊查询', Gender:'性别', pleaseSelect:'请选择', male:'男', female:'女', - RealName:'真实姓名', + RealName:'用户名称', pleaseEnter:'请输入', phoneNumber:'手机号码', query:'搜索', @@ -418,4 +418,6 @@ module.exports = { OperationSuccessful:'操作成功', operationFailed:'操作失败', PersonnelSelection:'人员选择', + EmployeeNumber:'员工号', + EmployeeType:'员工类型', } \ No newline at end of file diff --git a/jero-web/src/components/dict/JDictSelectTag.vue b/jero-web/src/components/dict/JDictSelectTag.vue index a7917a1b6..7971bb87e 100644 --- a/jero-web/src/components/dict/JDictSelectTag.vue +++ b/jero-web/src/components/dict/JDictSelectTag.vue @@ -105,6 +105,5 @@ } } - \ No newline at end of file diff --git a/jero-web/src/components/libraryAddForm/index.vue b/jero-web/src/components/libraryAddForm/index.vue index 112848c59..1e1e0398a 100644 --- a/jero-web/src/components/libraryAddForm/index.vue +++ b/jero-web/src/components/libraryAddForm/index.vue @@ -180,7 +180,7 @@ - +
* @@ -191,9 +191,9 @@ v-model="formInline[item.db_field_name]" style="width: 100%" :maxTagCount="1" - :tree-data="treeData" + :tree-data="item.tree" tree-checkable - placeholder="Please select" + :placeholder="$t('PleaseSelect')+item.db_field_txt" />
@@ -283,50 +283,6 @@ content: [] } ], - treeData: [ - { - title: 'Node1', - value: '0-0', - key: '0-0', - children: [ - { - title: 'Child Node1', - value: '0-0-0', - key: '0-0-0', - children: [ - { - title: 'Child Node1', - value: '0-0-0-0', - key: '0-0-0-0' - } - ] - } - ] - }, - { - title: 'Node2', - value: '0-1', - key: '0-1', - children: [ - { - title: 'Child Node3', - value: '0-1-0', - key: '0-1-0', - disabled: true - }, - { - title: 'Child Node4', - value: '0-1-1', - key: '0-1-1' - }, - { - title: 'Child Node5', - value: '0-1-2', - key: '0-1-2' - } - ] - } - ] } }, mounted() { diff --git a/jero-web/src/views/system/UserList.vue b/jero-web/src/views/system/UserList.vue index a5f2b7e05..771ac1267 100644 --- a/jero-web/src/views/system/UserList.vue +++ b/jero-web/src/views/system/UserList.vue @@ -5,76 +5,80 @@
- - - - - - - - - +
+
+ {{$t('account')}} +
+ +
+
+ +
+
+ {{$t('RealName')}} +
+ +
+
+ +
+
+ {{$t('EmployeeNumber')}} +
+ +
+
+ +
+
+ {{$t('EmployeeType')}} +
+ +
+
+ +
+
+ {{$t('status')}} +
+ {{$t('pleaseSelect')}} - {{$t('male')}} - {{$t('female')}} + {{$t('normal')}} + {{$t('frozen')}} - +
- - - - - - - {{$t('query')}} - {{$t('reset')}} - - {{ toggleSearchStatus ? $t('putAway') : $t('open') }} - - - - - + + + {{$t('query')}} + {{$t('reset')}} + +
- - - - - - + + + + + +
- + import UserModal from './modules/UserModal' import PasswordModal from './modules/PasswordModal' - import {putAction,getFileAccessHttpUrl} from '@/api/manage'; - import {frozenBatch} from '@/api/api' - import {JeroListMixin} from '@/mixins/JeroListMixin' + import { putAction, getFileAccessHttpUrl } from '@/api/manage' + import { frozenBatch } from '@/api/api' + import { JeroListMixin } from '@/mixins/JeroListMixin' import JInput from '@/components/jero/JInput' import UserRecycleBinModal from './modules/UserRecycleBinModal' import JSuperQuery from '@/components/jero/JSuperQuery' export default { - name: "UserList", + name: 'UserList', mixins: [JeroListMixin], components: { UserModal, @@ -132,42 +136,41 @@ { title: this.$t('serialNumber'), dataIndex: '', - key:'rowIndex', - width:20, - align:"center", - customRender:function (t,r,index) { - return parseInt(index)+1; + key: 'rowIndex', + width: 20, + align: 'center', + customRender: function(t, r, index) { + return parseInt(index) + 1 } }, { title: this.$t('userAccount'), - align: "center", + align: 'center', dataIndex: 'username', width: 120, sorter: true }, { title: this.$t('userName'), - align: "center", + align: 'center', width: 100, - dataIndex: 'realname', + dataIndex: 'realname' }, { - title: this.$t('Gender'), - align: "center", - width: 80, - dataIndex: 'sex_dictText', - sorter: true + title: this.$t('EmployeeNumber'), + align: 'center', + width: 100, + dataIndex: 'workNo' }, { - title: this.$t('phoneNumber'), - align: "center", + title: this.$t('EmployeeType'), + align: 'center', width: 100, - dataIndex: 'phone' + dataIndex: 'workerType_dictText' }, { title: this.$t('department'), - align: "center", + align: 'center', width: 180, dataIndex: 'orgCodeTxt' }, @@ -185,10 +188,10 @@ // }, { title: this.$t('status'), - align: "center", + align: 'center', width: 80, dataIndex: 'status_dictText' - }, + } // { // title: this.$t('operation'), // dataIndex: 'action', @@ -198,94 +201,94 @@ // } ], superQueryFieldList: [ - { 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' }, + { 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", - list: "/sys/user/page", - delete: "/sys/user/delete", - deleteBatch: "/sys/user/deleteBatch", - exportXlsUrl: "/sys/user/exportXls", - importExcelUrl: "sys/user/importExcel", - }, + syncUser: '/act/process/extActProcess/doSyncUser', + list: '/sys/user/page', + delete: '/sys/user/delete', + deleteBatch: '/sys/user/deleteBatch', + exportXlsUrl: '/sys/user/exportXls', + importExcelUrl: 'sys/user/importExcel' + } } }, computed: { - importExcelUrl: function(){ - return `${window._CONFIG['domianURL']}/${this.url.importExcelUrl}`; + importExcelUrl: function() { + return `${window._CONFIG['domianURL']}/${this.url.importExcelUrl}` } }, methods: { - getAvatarView: function (avatar) { + getAvatarView: function(avatar) { return getFileAccessHttpUrl(avatar) }, - batchFrozen: function (status) { + batchFrozen: function(status) { if (this.selectedRowKeys.length <= 0) { - this.$message.warning(this.$t('pleaseSelect')+this.$t('aRcord')); - return false; + this.$message.warning(this.$t('pleaseSelect') + this.$t('aRcord')) + return false } else { - let ids = ""; - let that = this; - let isAdmin = false; - that.selectionRows.forEach(function (row) { + let ids = '' + let that = this + let isAdmin = false + that.selectionRows.forEach(function(row) { if (row.username == 'admin') { - isAdmin = true; + isAdmin = true } - }); + }) if (isAdmin) { - that.$message.warning(this.$t('operationAllowedAccount')); - return; + that.$message.warning(this.$t('operationAllowedAccount')) + return } - that.selectedRowKeys.forEach(function (val) { - ids += val + ","; - }); + that.selectedRowKeys.forEach(function(val) { + ids += val + ',' + }) that.$confirm({ - title: this.$t('confirm')+this.$t('operation'), + 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) => { + onOk: function() { + frozenBatch({ ids: ids, status: status }).then((res) => { if (res.success) { - that.$message.success(res.message); - that.loadData(); - that.onClearSelected(); + that.$message.success(res.message) + that.loadData() + that.onClearSelected() } else { - that.$message.warning(res.message); + that.$message.warning(res.message) } - }); + }) } - }); + }) } }, handleMenuClick(e) { if (e.key == 1) { - this.batchDel(); + this.batchDel() } else if (e.key == 2) { - this.batchFrozen(2); + this.batchFrozen(2) } else if (e.key == 3) { - this.batchFrozen(1); + this.batchFrozen(1) } }, - handleFrozen: function (id, status, username) { - let that = this; + handleFrozen: function(id, status, username) { + let that = this //TODO 后台校验管理员角色 if ('admin' == username) { - that.$message.warning(this.$t('adminDoNotAllowOperation')); - return; + that.$message.warning(this.$t('adminDoNotAllowOperation')) + return } - frozenBatch({ids: id, status: status}).then((res) => { + frozenBatch({ ids: id, status: status }).then((res) => { if (res.success) { - that.$message.success(res.message); - that.loadData(); + that.$message.success(res.message) + that.loadData() } else { - that.$message.warning(res.message); + that.$message.warning(res.message) } - }); + }) }, handleChangePassword(username) { - this.$refs.passwordmodal.show(username); + this.$refs.passwordmodal.show(username) }, passwordModalOk() { //TODO 密码修改完成 不需要刷新页面,可以把datasource中的数据更新一下 @@ -295,5 +298,49 @@ } + \ No newline at end of file