修改用户管理角色管理

This commit is contained in:
qq787203167
2022-03-04 11:51:59 +08:00
parent 3996804acf
commit e07ce9b643
4 changed files with 99 additions and 81 deletions
+50 -46
View File
@@ -23,30 +23,30 @@
<a-input-search @search="onSearch" style="width:100%;margin-top: 6px" <a-input-search @search="onSearch" style="width:100%;margin-top: 6px"
:placeholder="$t('enterDepartmentName')"/> :placeholder="$t('enterDepartmentName')"/>
<!-- 树--> <!-- 树-->
<template> <template>
<!-- <a-dropdown :trigger="[this.dropTrigger]" @visibleChange="dropStatus">--> <!-- <a-dropdown :trigger="[this.dropTrigger]" @visibleChange="dropStatus">-->
<!-- checkable--> <!-- checkable-->
<a-tree <!-- :expandedKeys="iExpandedKeys" -->
multiple <a-tree
style="height:600px;overflow: auto;width: 100%" multiple
@select="onSelect" style="height:600px;overflow: auto;width: 100%"
@check="onCheck" @select="onSelect"
@rightClick="rightHandle" @check="onCheck"
:selectedKeys="selectedKeys" @rightClick="rightHandle"
:checkedKeys="checkedKeys" :selectedKeys="selectedKeys"
:treeData="departTree" :checkedKeys="checkedKeys"
:checkStrictly="checkStrictly" :treeData="departTree"
:autoExpandParent="false" :checkStrictly="checkStrictly"
:expandedKeys="iExpandedKeys" :autoExpandParent="false"
@expand="onExpand"/> @expand="onExpand"/>
<!--新增右键点击事件,和增加添加和删除功能--> <!--新增右键点击事件,和增加添加和删除功能-->
<!-- <a-menu slot="overlay">--> <!-- <a-menu slot="overlay">-->
<!-- <a-menu-item @click="handleAdd(3)" key="1">{{$t('addTo')}}</a-menu-item>--> <!-- <a-menu-item @click="handleAdd(3)" key="1">{{$t('addTo')}}</a-menu-item>-->
<!-- <a-menu-item @click="handleDelete" key="2">{{$t('delete')}}</a-menu-item>--> <!-- <a-menu-item @click="handleDelete" key="2">{{$t('delete')}}</a-menu-item>-->
<!-- <a-menu-item @click="closeDrop" key="3">{{$t('cancel')}}</a-menu-item>--> <!-- <a-menu-item @click="closeDrop" key="3">{{$t('cancel')}}</a-menu-item>-->
<!-- </a-menu>--> <!-- </a-menu>-->
<!-- </a-dropdown>--> <!-- </a-dropdown>-->
</template> </template>
</div> </div>
</a-card> </a-card>
<!---- author:os_chengtgen -- date:20190827 -- for:切换父子勾选模式 =======------> <!---- author:os_chengtgen -- date:20190827 -- for:切换父子勾选模式 =======------>
@@ -94,8 +94,8 @@
:labelCol="labelCol" :labelCol="labelCol"
:wrapperCol="wrapperCol" :wrapperCol="wrapperCol"
:label="$t('OrganizationCode')"> :label="$t('OrganizationCode')">
<a-input :disabled="disable" <a-input :disabled="disable"
:placeholder="$t('enterOrganizationCode')" :placeholder="$t('enterOrganizationCode')"
v-decorator="['orgCode', validatorRules.orgCode ]"/> v-decorator="['orgCode', validatorRules.orgCode ]"/>
</a-form-item> </a-form-item>
<a-form-item <a-form-item
@@ -128,32 +128,35 @@
:labelCol="labelCol" :labelCol="labelCol"
:wrapperCol="wrapperCol" :wrapperCol="wrapperCol"
:label="$t('sort')"> :label="$t('sort')">
<a-input-number :disabled="disable" v-decorator="[ 'departOrder',{'initialValue':0}]"/> <a-input-number :disabled="disable" v-decorator="[ 'departOrder',{'initialValue':0}]"/>
</a-form-item> </a-form-item>
<a-form-item <a-form-item
:labelCol="labelCol" :labelCol="labelCol"
:wrapperCol="wrapperCol" :wrapperCol="wrapperCol"
:label="$t('phoneNumber')"> :label="$t('phoneNumber')">
<a-input :disabled="disable" :placeholder="$t('enterMobileNumber')" v-decorator="['mobile', {'initialValue':''}]"/> <a-input :disabled="disable" :placeholder="$t('enterMobileNumber')"
v-decorator="['mobile', {'initialValue':''}]"/>
</a-form-item> </a-form-item>
<a-form-item <a-form-item
:labelCol="labelCol" :labelCol="labelCol"
:wrapperCol="wrapperCol" :wrapperCol="wrapperCol"
:label="$t('address')"> :label="$t('address')">
<a-input :disabled="disable" :placeholder="$t('enterAddress')" v-decorator="['address', {'initialValue':''}]"/> <a-input :disabled="disable" :placeholder="$t('enterAddress')"
v-decorator="['address', {'initialValue':''}]"/>
</a-form-item> </a-form-item>
<a-form-item <a-form-item
:labelCol="labelCol" :labelCol="labelCol"
:wrapperCol="wrapperCol" :wrapperCol="wrapperCol"
:label="$t('remarks')"> :label="$t('remarks')">
<a-textarea :disabled="disable" :placeholder="$t('enterComments')" v-decorator="['memo', {'initialValue':''}]"/> <a-textarea :disabled="disable" :placeholder="$t('enterComments')"
v-decorator="['memo', {'initialValue':''}]"/>
</a-form-item> </a-form-item>
</a-form> </a-form>
<!-- <div class="anty-form-btn">--> <!-- <div class="anty-form-btn">-->
<!-- <a-button @click="emptyCurrForm" type="default" htmlType="button" icon="sync">{{$t('reset')}}</a-button>--> <!-- <a-button @click="emptyCurrForm" type="default" htmlType="button" icon="sync">{{$t('reset')}}</a-button>-->
<!-- <a-button @click="submitCurrForm" type="primary" htmlType="button" icon="form">{{$t('preservation')}}--> <!-- <a-button @click="submitCurrForm" type="primary" htmlType="button" icon="form">{{$t('preservation')}}-->
<!-- </a-button>--> <!-- </a-button>-->
<!-- </div>--> <!-- </div>-->
</a-card> </a-card>
<a-card v-else :bordered="false" style="height:248px !important;"> <a-card v-else :bordered="false" style="height:248px !important;">
<a-empty> <a-empty>
@@ -267,10 +270,10 @@
edges: [] edges: []
}, },
validatorRules: { validatorRules: {
// departName: { rules: [{ required: true, message: this.$t('EnterOrganizationDepartment') }] }, // departName: { rules: [{ required: true, message: this.$t('EnterOrganizationDepartment') }] },
// orgCode: { rules: [{ required: true, message: this.$t('enterOrganizationCode') }] }, // orgCode: { rules: [{ required: true, message: this.$t('enterOrganizationCode') }] },
// orgCategory: { rules: [{ required: true, message: this.$t('enterOrganizationType') }] }, // orgCategory: { rules: [{ required: true, message: this.$t('enterOrganizationType') }] },
// mobile: { rules: [{ validator: this.validateMobile }] } // mobile: { rules: [{ validator: this.validateMobile }] }
}, },
url: { url: {
delete: '/sys/sysDepart/delete', delete: '/sys/sysDepart/delete',
@@ -280,7 +283,7 @@
importExcelUrl: 'sys/sysDepart/importExcel' importExcelUrl: 'sys/sysDepart/importExcel'
}, },
orgCategoryDisabled: false, orgCategoryDisabled: false,
recordTab:{}, recordTab: {}
} }
}, },
computed: { computed: {
@@ -423,13 +426,13 @@
this.recordTab = record this.recordTab = record
// this.$refs.departAuth.show(record.id) // this.$refs.departAuth.show(record.id)
// 传用户信息参数 // 传用户信息参数
if (this.$refs.DeptUserInfo){ if (this.$refs.DeptUserInfo) {
this.$refs.DeptUserInfo.open(record) this.$refs.DeptUserInfo.open(record)
} }
}, },
tabChange(event){ tabChange(event) {
if(event == 3){ if (event == 3) {
this.$nextTick(()=>{ this.$nextTick(() => {
this.$refs.DeptUserInfo.open(this.recordTab) this.$refs.DeptUserInfo.open(this.recordTab)
}) })
} }
@@ -657,7 +660,8 @@
background: #fff; background: #fff;
border-radius: 0 0 2px 2px; border-radius: 0 0 2px 2px;
} }
.box-ant{
margin-right: 0!important; .box-ant {
margin-right: 0 !important;
} }
</style> </style>
+40 -27
View File
@@ -40,6 +40,7 @@
<div style="margin-top: 15px"> <div style="margin-top: 15px">
<a-table <a-table
ref="table" ref="table"
rowKey="id"
:columns="columns" :columns="columns"
:dataSource="dataSource" :dataSource="dataSource"
:pagination="ipagination" :pagination="ipagination"
@@ -106,34 +107,46 @@
selectionRows2: [], selectionRows2: [],
test: {}, test: {},
rightcolval: 0, rightcolval: 0,
columns: columns: [
[ {
{ title: this.$t('serialNumber'),
title: this.$t('RoleCode'), dataIndex: '',
align: 'center', key: 'rowIndex',
dataIndex: 'roleCode' width: 20,
}, align: 'center',
{ customRender: function(t, r, index) {
title: this.$t('roleName'), return parseInt(index) + 1
align: 'center',
dataIndex: 'roleName'
},
{
title: this.$t('createTime'),
dataIndex: 'createTime',
align: 'center',
sorter: true,
customRender: (text) => {
return moment(text).format('YYYY-MM-DD')
}
} }
// { },
// title: this.$t('operation'), {
// dataIndex: 'action', title: this.$t('RoleCode'),
// align: 'center', align: 'center',
// scopedSlots: { customRender: 'action' } dataIndex: 'roleCode',
// } width: 180
], },
{
title: this.$t('roleName'),
align: 'center',
dataIndex: 'roleName',
width: 180
},
{
title: this.$t('createTime'),
dataIndex: 'createTime',
align: 'center',
width: 180,
sorter: true,
customRender: (text) => {
return moment(text).format('YYYY-MM-DD')
}
}
// {
// title: this.$t('operation'),
// dataIndex: 'action',
// align: 'center',
// scopedSlots: { customRender: 'action' }
// }
],
// 高级查询拼接条件 // 高级查询拼接条件
superQueryMatchType2: 'and', superQueryMatchType2: 'and',
url: { url: {
+1 -1
View File
@@ -74,6 +74,7 @@
<!-- table区域-begin --> <!-- table区域-begin -->
<div> <div>
<!-- :rowSelection="{selectedRowKeys: selectedRowKeys, onChange: onSelectChange}"-->
<a-table <a-table
ref="table" ref="table"
rowKey="id" rowKey="id"
@@ -81,7 +82,6 @@
:dataSource="dataSource" :dataSource="dataSource"
:pagination="ipagination" :pagination="ipagination"
:loading="loading" :loading="loading"
:rowSelection="{selectedRowKeys: selectedRowKeys, onChange: onSelectChange}"
@change="handleTableChange"> @change="handleTableChange">
<template slot="avatarslot" slot-scope="text, record, index"> <template slot="avatarslot" slot-scope="text, record, index">
@@ -139,13 +139,14 @@
align: "center", align: "center",
dataIndex: 'phone' dataIndex: 'phone'
}, },
{ // {
title: this.$t('operation'), // title: this.$t('operation'),
dataIndex: 'action', // dataIndex: 'action',
scopedSlots: {customRender: 'action'}, // scopedSlots: {customRender: 'action'},
align: "center", // align: "center",
width: 150 // width: 150
}], // }
],
url: { url: {
list: "/sys/user/departUserList", list: "/sys/user/departUserList",
edit: "/sys/user/editSysDepartWithUser", edit: "/sys/user/editSysDepartWithUser",