用户管理修改
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">
|
||||||
@@ -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