[update] 用户管理 角色配置
This commit is contained in:
@@ -708,6 +708,7 @@ module.exports = {
|
||||
uploadTime: 'Upload time',
|
||||
enclosure: 'Enclosure',
|
||||
// 认证
|
||||
departmentAllocation: 'department Allocation',
|
||||
ListTitle: 'List Title',
|
||||
CopyProjectCollectionparameters: 'Copy Project Collection parameters',
|
||||
from: 'From',
|
||||
|
||||
@@ -718,6 +718,7 @@ module.exports = {
|
||||
uploadTime: '上传时间',
|
||||
enclosure: '附件',
|
||||
// 认证
|
||||
departmentAllocation: '部门配置',
|
||||
ListTitle: '清单标题',
|
||||
CopyProjectCollectionparameters: '复制项目收集参数',
|
||||
from: '从',
|
||||
|
||||
@@ -84,15 +84,16 @@
|
||||
<!-- <a-button type="primary" icon="import">{{$t('import')}}</a-button>-->
|
||||
<!-- </a-upload>-->
|
||||
<!-- <a-button type="primary" icon="hdd" @click="recycleBinVisible=true">{{$t('recycleBin')}}</a-button>-->
|
||||
<div @click="handleExportXls($t('userInformation'))" class="operator-text">
|
||||
<a-icon type="export" :rotate="-90"/>
|
||||
{{$t('export')}}
|
||||
</div>
|
||||
<a-button type="primary" icon="hdd" @click="RoleAssignment">{{$t('RoleAssignment')}}</a-button>
|
||||
<a-button type="primary" icon="hdd" @click="recycleBinVisible=true">{{$t('departmentAllocation')}}</a-button>
|
||||
<!-- <div @click="handleExportXls($t('userInformation'))" class="operator-text">-->
|
||||
<!-- <a-icon type="export" :rotate="-90"/>-->
|
||||
<!-- {{$t('export')}}-->
|
||||
<!-- </div>-->
|
||||
</div>
|
||||
|
||||
<!-- table区域-begin -->
|
||||
<div>
|
||||
<!-- :rowSelection="{selectedRowKeys: selectedRowKeys, onChange: onSelectChange}"-->
|
||||
<a-table
|
||||
ref="table"
|
||||
rowKey="id"
|
||||
@@ -100,6 +101,7 @@
|
||||
:dataSource="dataSource"
|
||||
:pagination="ipagination"
|
||||
:loading="loading"
|
||||
:row-selection="{ selectedRowKeys: selectedRowKeys, onChange: onSelectChange }"
|
||||
@change="handleTableChange">
|
||||
|
||||
<template slot="avatarslot" slot-scope="text, record, index">
|
||||
@@ -108,7 +110,7 @@
|
||||
</div>
|
||||
</template>
|
||||
<span slot="action" slot-scope="text, record">
|
||||
<a @click="handleEdit(record)" >{{$t('RoleAssignment')}}</a>
|
||||
<a @click="handleEdit(record)" >{{$t('edit')}}</a>
|
||||
</span>
|
||||
|
||||
</a-table>
|
||||
@@ -121,11 +123,15 @@
|
||||
|
||||
<!-- 用户回收站 -->
|
||||
<user-recycle-bin-modal :visible.sync="recycleBinVisible" @ok="modalFormOk"/>
|
||||
|
||||
<!-- 角色配置 -->
|
||||
<a-modal v-model="rolevisible" :title="$t('RoleAssignment')" width='650px' :footer="null">
|
||||
<role-assignment v-if='rolevisible'></role-assignment>
|
||||
</a-modal>
|
||||
</a-card>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import RoleAssignment from './modules/RoleAssignment'
|
||||
import UserModal from './modules/UserModal'
|
||||
import PasswordModal from './modules/PasswordModal'
|
||||
import { putAction, getFileAccessHttpUrl } from '@/api/manage'
|
||||
@@ -139,6 +145,7 @@
|
||||
name: 'UserList',
|
||||
mixins: [JeroListMixin],
|
||||
components: {
|
||||
RoleAssignment,
|
||||
UserModal,
|
||||
PasswordModal,
|
||||
JInput,
|
||||
@@ -151,6 +158,9 @@
|
||||
queryParam: {},
|
||||
recycleBinVisible: false,
|
||||
toggleSearchStatus:false,
|
||||
rolevisible: false, // 角色配置得弹框
|
||||
selectedRowKeys: [],
|
||||
selectedRowKeysvalue: [],
|
||||
columns: [
|
||||
{
|
||||
title: this.$t('serialNumber'),
|
||||
@@ -240,6 +250,18 @@
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
onSelectChange(val,value) {
|
||||
console.log(val)
|
||||
console.log(value)
|
||||
this.selectedRowKeys = val
|
||||
this.selectedRowKeysvalue = value
|
||||
},
|
||||
rolehandleOk() {
|
||||
console.log('角色配置得弹框控制')
|
||||
},
|
||||
RoleAssignment: function(){
|
||||
this.rolevisible = true
|
||||
},
|
||||
getAvatarView: function(avatar) {
|
||||
return getFileAccessHttpUrl(avatar)
|
||||
},
|
||||
|
||||
@@ -0,0 +1,172 @@
|
||||
<template>
|
||||
<div class='diolag-area'>
|
||||
<a-spin :spinning='spinLoading'>
|
||||
<a-form-model
|
||||
class='tag-module'
|
||||
ref='ruleForm'
|
||||
:model='form'
|
||||
:rules='rules'
|
||||
:label-col='labelCol'
|
||||
:wrapper-col='wrapperCol'
|
||||
>
|
||||
<a-row :gutter='24'>
|
||||
<a-col :span='24'>
|
||||
<a-form-item :label="$t('RoleAssignment')" :labelCol="labelCol" :wrapperCol="wrapperCol">
|
||||
<a-select
|
||||
mode="multiple"
|
||||
style="width: 100%"
|
||||
:placeholder="$t('selectUserRole')"
|
||||
optionFilterProp="children"
|
||||
v-model="selectedRole"
|
||||
:getPopupContainer="(target) => target.parentNode">
|
||||
<a-select-option v-for="(role,roleindex) in roleList" :key="roleindex.toString()" :value="role.id">
|
||||
{{ role.roleName }}
|
||||
</a-select-option>
|
||||
</a-select>
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
</a-row>
|
||||
</a-form-model>
|
||||
</a-spin>
|
||||
<div class='drawer-bootom-button'>
|
||||
<a-button style='margin-right: .8rem' @click='handleCancel'>{{ $t('cancel') }}</a-button>
|
||||
<a-button @click='handleSubmit' type='primary' :loading='confirmLoading'>{{ $t('determine') }}</a-button>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { putAction, postAction, getAction, deleteAction } from '@/api/manage'
|
||||
import axios from 'axios'
|
||||
import Vue from 'vue'
|
||||
import { ACCESS_TOKEN } from '@/store/mutation-types'
|
||||
import moment from 'moment'
|
||||
// import eventBUs from '../../common/event'
|
||||
export default {
|
||||
name: 'diolagArea',
|
||||
components: {},
|
||||
data() {
|
||||
return {
|
||||
token:Vue.ls.get(ACCESS_TOKEN),
|
||||
title: this.$t('add'),
|
||||
total: 0,
|
||||
selectedRowKeysDate: {},
|
||||
loading: false,
|
||||
editId: '',
|
||||
newVisible: false,
|
||||
selectedRole: '',
|
||||
labelCol: {
|
||||
xs: { span: 24 },
|
||||
sm: { span: 7 }
|
||||
},
|
||||
wrapperCol: {
|
||||
xs: { span: 24 },
|
||||
sm: { span: 14 }
|
||||
},
|
||||
form: {},
|
||||
rules: {},
|
||||
areaTable: [],
|
||||
flag: false, //表单提交标识
|
||||
spinLoading: false,
|
||||
confirmLoading: false,
|
||||
selectedRowKeys: [],
|
||||
roleList: [],
|
||||
}
|
||||
},
|
||||
props: {
|
||||
selectedRowKeysArray: {
|
||||
type: String,
|
||||
default: '',
|
||||
require: true
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
this.loadData()
|
||||
},
|
||||
methods: {
|
||||
loadData() {
|
||||
this.loading = true
|
||||
let params = {}
|
||||
getAction(`sys/role/queryall`, params).then(res => {
|
||||
if (res.success) {
|
||||
this.roleList = [...res.result]
|
||||
}
|
||||
}).finally(() => {
|
||||
this.loading = false
|
||||
})
|
||||
},
|
||||
searchQuery() {
|
||||
this.loadData()
|
||||
},
|
||||
searchReset() {
|
||||
this.form = {}
|
||||
this.loadData()
|
||||
},
|
||||
handleCancel() {
|
||||
this.$emit('areaVisibleTaskCutOffTimeflag', false)
|
||||
},
|
||||
handleTableChange(val) {
|
||||
},
|
||||
//保存
|
||||
handleSubmit() {
|
||||
console.log(this.selectedRole,'llllllll')
|
||||
let _this = this
|
||||
let param = {ids: this.selectedRowKeysArray, deadline: `${this.pickerDate}`, }
|
||||
postAction('/params/collectManifest/updateDeadlineBatch', param).then((res) => {
|
||||
if (res.success) {
|
||||
this.$emit('areaVisibleTaskCutOffTimeflag', false)
|
||||
this.$message.success(res.message)
|
||||
} else {
|
||||
this.$message.warning(res.message)
|
||||
}
|
||||
})
|
||||
},
|
||||
onChange(val) {
|
||||
this.pickerDate = moment(val).format('YYYY-MM-DD HH:mm:ss')
|
||||
},
|
||||
onOk(val) {
|
||||
this.pickerDate = moment(val).format('YYYY-MM-DD HH:mm:ss')
|
||||
},
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang='less' scoped>
|
||||
@import '~@assets/less/common.less';
|
||||
|
||||
.diolag-area {
|
||||
.table-area {
|
||||
margin: 20px 0;
|
||||
|
||||
.action-edit {
|
||||
margin-right: 10px;
|
||||
}
|
||||
}
|
||||
|
||||
.table-del {
|
||||
color: red;
|
||||
}
|
||||
}
|
||||
.drawer-bootom-button{
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
}
|
||||
</style>
|
||||
<style lang='less'>
|
||||
.area-module {
|
||||
.ant-modal-wrap {
|
||||
.ant-modal {
|
||||
.ant-modal-content {
|
||||
.ant-modal-footer {
|
||||
text-align: center;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
.page{
|
||||
display: flex;
|
||||
justify-content: flex-end;
|
||||
margin-bottom: 20px;
|
||||
}
|
||||
</style>
|
||||
Reference in New Issue
Block a user