diff --git a/src/views/modules/sys/role-add-or-update.vue b/src/views/modules/sys/role-add-or-update.vue index 8f46b883..670bc469 100644 --- a/src/views/modules/sys/role-add-or-update.vue +++ b/src/views/modules/sys/role-add-or-update.vue @@ -13,10 +13,10 @@ - - - + + @@ -71,14 +71,14 @@ export default { visible: false, menuList: [], deptList: [], - roleCodeList: [], + roleTypeList: [], dataForm: { id: '', name: '', menuIdList: [], deptIdList: [], remark: '', - code: '' + typeKey: '' } } }, @@ -92,7 +92,7 @@ export default { } }, created () { - this.getRoleCodeList() + this.getRoleTypeList() }, methods: { init () { @@ -170,12 +170,12 @@ export default { }).catch(() => { }) }) }, 1000, { 'leading': true, 'trailing': false }), - getRoleCodeList () { - this.$http.get(`/sys/dict/listSimple/sysRoleCode`).then(({ data: res }) => { + getRoleTypeList () { + this.$http.get(`/sys/dict/listSimple/sysRoleType`).then(({ data: res }) => { if (res.code !== 0) { return this.$message.error(res.msg) } - this.roleCodeList = res.data + this.roleTypeList = res.data }).catch(() => { }) } } diff --git a/src/views/modules/sys/role.vue b/src/views/modules/sys/role.vue index 9f7c017d..e62280e7 100644 --- a/src/views/modules/sys/role.vue +++ b/src/views/modules/sys/role.vue @@ -38,10 +38,11 @@ :label="$t('role.name')" header-align="center" align="center"> - + align="center" + :formatter="showRoleTypeFormatter"> { + if (res.code !== 0) { + return this.$message.error(res.msg) + } + this.sysRoleTypeList = res.data + }).catch(() => { }) + }, + showRoleTypeFormatter: function (row, column) { + if (row.typeKey) { + let dict = this.sysRoleTypeList.filter(item => item.dictValue === row.typeKey)[0] + if (dict) { + return dict.dictName + } + } + return '' + } } } diff --git a/src/views/modules/user/partymembers.vue b/src/views/modules/user/partymembers.vue index 954f5238..6ba2e9c4 100755 --- a/src/views/modules/user/partymembers.vue +++ b/src/views/modules/user/partymembers.vue @@ -106,6 +106,16 @@ {{ $t('export') }} + + + 点击上传 + + import mixinViewModule from '@/mixins/view-module' import AddOrUpdate from './partymembers-add-or-update' +import Cookies from 'js-cookie' export default { mixins: [mixinViewModule], data () { @@ -227,7 +238,8 @@ export default { gridOptions: [], registOptions: [], postOptions: [], - timeRange: [] + timeRange: [], + upLoadUrl: '' } }, components: { @@ -237,6 +249,7 @@ export default { this.getStreetList() this.getRegistOptions() this.getPostOptions() + this.uploadUrl = `${window.SITE_CONFIG['apiURL']}/app-user/partymembers/importExcel?token=${Cookies.get('token')}` }, methods: { selectedTime () { @@ -336,6 +349,12 @@ export default { }).catch(() => { this.dataListLoading = false }) + }, + handleExceed (files, fileList) { + this.$message.warning(`当前限制选择 3 个文件,本次选择了 ${files.length} 个文件,共选择了 ${files.length + fileList.length} 个文件`) + }, + beforeRemove (file, fileList) { + return this.$confirm(`确定移除 ${file.name}?`) } } }