用户管理修改
This commit is contained in:
@@ -7,15 +7,16 @@
|
|||||||
<!-- 搜索区域 -->
|
<!-- 搜索区域 -->
|
||||||
<a-form layout="inline" @keyup.enter.native="searchQuery">
|
<a-form layout="inline" @keyup.enter.native="searchQuery">
|
||||||
<a-row :gutter="24">
|
<a-row :gutter="24">
|
||||||
<a-col :md="6" :sm="12">
|
<a-col :xl="6" :lg="8" :md="8" :sm="24">
|
||||||
<a-form-item label="角色名称" :labelCol="{span: 5}" :wrapperCol="{span: 18, offset: 1}">
|
<a-form-item label="角色名称" :labelCol="{span: 5}" :wrapperCol="{span: 18, offset: 1}">
|
||||||
<a-input placeholder="请输入角色名称" v-model="queryParam.roleName"></a-input>
|
<a-input placeholder="请输入角色名称" v-model="queryParam.roleName"></a-input>
|
||||||
</a-form-item>
|
</a-form-item>
|
||||||
</a-col>
|
</a-col>
|
||||||
<span style="float: left;overflow: hidden;" class="table-page-search-submitButtons">
|
<span style="float: left;overflow: hidden;" class="table-page-search-submitButtons">
|
||||||
<a-col :md="12" :sm="24">
|
<a-col :xl="6" :lg="8" :md="8" :sm="24">
|
||||||
<a-button type="primary" @click="searchQuery" icon="search" style="margin-left: 21px" v-has="'sys:role:search'">查询</a-button>
|
<a-button type="primary" @click="searchQuery" icon="search" style="margin-left: 21px"
|
||||||
<a-button type="primary" @click="searchReset" icon="reload" style="margin-left: 8px">重置</a-button>
|
v-has="'sys:role:search'">查询</a-button>
|
||||||
|
<a-button class="reset-button" @click="searchReset" icon="reload" style="margin-left: 8px">重置</a-button>
|
||||||
</a-col>
|
</a-col>
|
||||||
</span>
|
</span>
|
||||||
</a-row>
|
</a-row>
|
||||||
@@ -24,7 +25,8 @@
|
|||||||
<!-- 操作按钮区域 -->
|
<!-- 操作按钮区域 -->
|
||||||
<div class="table-operator" style="margin: 5px 0 10px 2px">
|
<div class="table-operator" style="margin: 5px 0 10px 2px">
|
||||||
<a-button @click="handleAdd" type="primary" icon="plus" v-has="'sys:role:add'">新增</a-button>
|
<a-button @click="handleAdd" type="primary" icon="plus" v-has="'sys:role:add'">新增</a-button>
|
||||||
<a-button @click="handleAddLowerLevel" type="primary" icon="plus" v-has="'sys:role:addLowerLevel'">添加下级</a-button>
|
<a-button @click="handleAddLowerLevel" type="primary" icon="plus" v-has="'sys:role:addLowerLevel'">添加下级
|
||||||
|
</a-button>
|
||||||
<a-button @click="batchDel" type="danger" icon="delete" v-has="'sys:role:batchDel'">批量删除</a-button>
|
<a-button @click="batchDel" type="danger" icon="delete" v-has="'sys:role:batchDel'">批量删除</a-button>
|
||||||
</div>
|
</div>
|
||||||
<div style="margin-top: 15px">
|
<div style="margin-top: 15px">
|
||||||
@@ -60,8 +62,8 @@
|
|||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
<script>
|
<script>
|
||||||
import { JeroListMixin } from '@/mixins/JeroListMixin'
|
import {JeroListMixin} from '@/mixins/JeroListMixin'
|
||||||
import { postAction } from '@/api/manage'
|
import {postAction} from '@/api/manage'
|
||||||
import RoleModal from './modules/RoleModal'
|
import RoleModal from './modules/RoleModal'
|
||||||
import UserRoleModal from './modules/UserRoleModal'
|
import UserRoleModal from './modules/UserRoleModal'
|
||||||
import JEllipsis from '@comp/jero/JEllipsis'
|
import JEllipsis from '@comp/jero/JEllipsis'
|
||||||
@@ -94,13 +96,13 @@ export default {
|
|||||||
align: 'center',
|
align: 'center',
|
||||||
dataIndex: 'roleCode',
|
dataIndex: 'roleCode',
|
||||||
width: 160,
|
width: 160,
|
||||||
scopedSlots: { customRender: 'text' }
|
scopedSlots: {customRender: 'text'}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: '角色名称',
|
title: '角色名称',
|
||||||
align: 'center',
|
align: 'center',
|
||||||
dataIndex: 'roleName',
|
dataIndex: 'roleName',
|
||||||
scopedSlots: { customRender: 'text' }
|
scopedSlots: {customRender: 'text'}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: '上级角色',
|
title: '上级角色',
|
||||||
@@ -119,7 +121,7 @@ export default {
|
|||||||
dataIndex: 'createTime',
|
dataIndex: 'createTime',
|
||||||
align: 'center',
|
align: 'center',
|
||||||
sorter: true,
|
sorter: true,
|
||||||
scopedSlots: { customRender: 'text' },
|
scopedSlots: {customRender: 'text'},
|
||||||
customRender: (text) => {
|
customRender: (text) => {
|
||||||
return moment(text).format('YYYY-MM-DD HH:mm:ss')
|
return moment(text).format('YYYY-MM-DD HH:mm:ss')
|
||||||
}
|
}
|
||||||
@@ -128,7 +130,7 @@ export default {
|
|||||||
title: '操作',
|
title: '操作',
|
||||||
dataIndex: 'action',
|
dataIndex: 'action',
|
||||||
align: 'center',
|
align: 'center',
|
||||||
scopedSlots: { customRender: 'action' }
|
scopedSlots: {customRender: 'action'}
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
url: {
|
url: {
|
||||||
@@ -146,7 +148,7 @@ export default {
|
|||||||
},
|
},
|
||||||
computed: {
|
computed: {
|
||||||
importExcelUrl: function () {
|
importExcelUrl: function () {
|
||||||
return `${ window._CONFIG['domianURL'] }/${ this.url.importExcelUrl }`
|
return `${window._CONFIG['domianURL']}/${this.url.importExcelUrl}`
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
@@ -173,11 +175,11 @@ export default {
|
|||||||
* */
|
* */
|
||||||
handleAddLowerLevel() {
|
handleAddLowerLevel() {
|
||||||
if (this.selectedRowKeys.length === 0) {
|
if (this.selectedRowKeys.length === 0) {
|
||||||
this.$message.warning('请选择一条记录')
|
this.$message.warning('请选择上级角色')
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
if (this.selectedRowKeys.length > 1) {
|
if (this.selectedRowKeys.length > 1) {
|
||||||
this.$message.warning('只能选择一条记录')
|
this.$message.warning('只能选择一个角色')
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
// 将这行的角色id作为新建角色的的父级id
|
// 将这行的角色id作为新建角色的的父级id
|
||||||
|
|||||||
@@ -7,18 +7,28 @@
|
|||||||
<a-form layout="inline" @keyup.enter.native="searchQuery">
|
<a-form layout="inline" @keyup.enter.native="searchQuery">
|
||||||
<a-row :gutter="24">
|
<a-row :gutter="24">
|
||||||
|
|
||||||
<a-col :md="6" :sm="12">
|
<a-col :xl="6" :lg="8" :md="8" :sm="24">
|
||||||
<a-form-item label="用户账号">
|
<a-form-item label="用户账号">
|
||||||
<a-input placeholder="请输入用户账号" v-model="queryParam.username"></a-input>
|
<a-input placeholder="请输入用户账号" v-model="queryParam.username"></a-input>
|
||||||
</a-form-item>
|
</a-form-item>
|
||||||
</a-col>
|
</a-col>
|
||||||
|
|
||||||
<a-col :md="6" :sm="12">
|
<a-col :xl="6" :lg="8" :md="8" :sm="24">
|
||||||
|
<a-form-item label="用户姓名">
|
||||||
|
<a-input placeholder="请输入用户姓名" v-model="queryParam.realname"></a-input>
|
||||||
|
</a-form-item>
|
||||||
|
</a-col>
|
||||||
|
|
||||||
|
<a-col :xl="6" :lg="8" :md="8" :sm="24">
|
||||||
<a-form-item
|
<a-form-item
|
||||||
label="角色类型"
|
label="角色类型"
|
||||||
:labelCol="labelCol"
|
:labelCol="labelCol"
|
||||||
:wrapperCol="wrapperCol">
|
:wrapperCol="wrapperCol">
|
||||||
<a-tree-select
|
<a-tree-select
|
||||||
|
:multiple="false"
|
||||||
|
show-search
|
||||||
|
tree-default-expand-all
|
||||||
|
tree-node-filter-prop="title"
|
||||||
style="width:100%"
|
style="width:100%"
|
||||||
:dropdownStyle="{ maxHeight: '200px', overflow: 'auto' }"
|
:dropdownStyle="{ maxHeight: '200px', overflow: 'auto' }"
|
||||||
:treeData="treeRoleData"
|
:treeData="treeRoleData"
|
||||||
@@ -29,12 +39,16 @@
|
|||||||
</a-form-item>
|
</a-form-item>
|
||||||
</a-col>
|
</a-col>
|
||||||
|
|
||||||
<a-col :md="6" :sm="12">
|
<a-col :xl="6" :lg="8" :md="8" :sm="24">
|
||||||
<a-form-item
|
<a-form-item
|
||||||
label="组织机构"
|
label="组织机构"
|
||||||
:labelCol="labelCol"
|
:labelCol="labelCol"
|
||||||
:wrapperCol="wrapperCol">
|
:wrapperCol="wrapperCol">
|
||||||
<a-tree-select
|
<a-tree-select
|
||||||
|
:multiple="false"
|
||||||
|
show-search
|
||||||
|
tree-default-expand-all
|
||||||
|
tree-node-filter-prop="title"
|
||||||
style="width:100%"
|
style="width:100%"
|
||||||
:dropdownStyle="{ maxHeight: '200px',maxWidth:'100px','overflow-x':'hidden',' overflo-y': 'auto' }"
|
:dropdownStyle="{ maxHeight: '200px',maxWidth:'100px','overflow-x':'hidden',' overflo-y': 'auto' }"
|
||||||
:treeData="treeDepartData"
|
:treeData="treeDepartData"
|
||||||
@@ -47,7 +61,7 @@
|
|||||||
<a-col :md="6" :sm="8">
|
<a-col :md="6" :sm="8">
|
||||||
<span style="float: left;overflow: hidden;" class="table-page-search-submitButtons">
|
<span style="float: left;overflow: hidden;" class="table-page-search-submitButtons">
|
||||||
<a-button type="primary" @click="searchQuery" icon="search" v-has="'user:search'">查询</a-button>
|
<a-button type="primary" @click="searchQuery" icon="search" v-has="'user:search'">查询</a-button>
|
||||||
<a-button type="primary" @click="searchReset" icon="reload" style="margin-left: 8px">重置</a-button>
|
<a-button class="reset-button" @click="searchReset" icon="reload" style="margin-left: 8px">重置</a-button>
|
||||||
</span>
|
</span>
|
||||||
</a-col>
|
</a-col>
|
||||||
</a-row>
|
</a-row>
|
||||||
@@ -174,7 +188,7 @@ export default {
|
|||||||
scopedSlots: { customRender: 'text' }
|
scopedSlots: { customRender: 'text' }
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: '角色',
|
title: '角色类型',
|
||||||
align: 'center',
|
align: 'center',
|
||||||
width: 100,
|
width: 100,
|
||||||
dataIndex: 'roleName',
|
dataIndex: 'roleName',
|
||||||
|
|||||||
@@ -106,6 +106,9 @@
|
|||||||
:wrapperCol="wrapperCol">
|
:wrapperCol="wrapperCol">
|
||||||
<a-tree-select
|
<a-tree-select
|
||||||
multiple
|
multiple
|
||||||
|
show-search
|
||||||
|
tree-default-expand-all
|
||||||
|
tree-node-filter-prop="title"
|
||||||
style="width:100%"
|
style="width:100%"
|
||||||
:dropdownStyle="{ maxHeight: '200px', overflow: 'auto' }"
|
:dropdownStyle="{ maxHeight: '200px', overflow: 'auto' }"
|
||||||
:treeData="treeRoleData"
|
:treeData="treeRoleData"
|
||||||
@@ -245,8 +248,8 @@ export default {
|
|||||||
},],
|
},],
|
||||||
validateTrigger: 'blur'
|
validateTrigger: 'blur'
|
||||||
},
|
},
|
||||||
selectedroles:{rules: [{required: true, message:'请选择角色类型'}], validateTrigger: ['blur','change']},
|
selectedroles:{rules: [{required: true, message:'请选择角色类型'}], validateTrigger: ['change']},
|
||||||
selecteddeparts:{rules: [{required: true, message:'请选择组织机构'}], validateTrigger: ['blur','change']}
|
selecteddeparts:{rules: [{required: true, message:'请选择组织机构'}], validateTrigger: ['change']}
|
||||||
// sex:{initialValue:((!this.model.sex)?"": (this.model.sex+""))}
|
// sex:{initialValue:((!this.model.sex)?"": (this.model.sex+""))}
|
||||||
},
|
},
|
||||||
departIdShow: false,
|
departIdShow: false,
|
||||||
@@ -499,10 +502,10 @@ export default {
|
|||||||
handleSubmit() {
|
handleSubmit() {
|
||||||
console.log('username',this.form.getFieldValue('username'))
|
console.log('username',this.form.getFieldValue('username'))
|
||||||
const that = this
|
const that = this
|
||||||
that.confirmLoading = true
|
|
||||||
// 触发表单验证
|
// 触发表单验证
|
||||||
this.form.validateFields((err, values) => {
|
this.form.validateFields((err, values) => {
|
||||||
if (!err) {
|
if (!err) {
|
||||||
|
that.confirmLoading = true
|
||||||
console.log('values=======', values)
|
console.log('values=======', values)
|
||||||
let formData = Object.assign(this.model, values)
|
let formData = Object.assign(this.model, values)
|
||||||
if (that.fileList !== '') {
|
if (that.fileList !== '') {
|
||||||
|
|||||||
Reference in New Issue
Block a user