合并分支 'ProjectThird' 到 'master'

Project third

查看合并请求 JeroBoot/jero-boot!4
This commit is contained in:
李雪涛
2022-04-10 22:02:54 +08:00
5 changed files with 409 additions and 409 deletions
@@ -53,19 +53,19 @@
) )
) )
and p.del_flag = 0 and p.del_flag = 0
<!--update begin Author:lvdandan Date:20200213 for:加入部门权限 --> <!--update begin Author:lxt Date:20220410 for:加入部门权限 -->
UNION UNION
SELECT p.* SELECT p.*
FROM sys_permission p FROM sys_permission p
WHERE exists( WHERE exists(
select a.id from sys_depart_role_permission a select a.id from sys_depart_permission a
join sys_depart_role b on a.role_id = b.id join sys_depart b on a.depart_id = b.id
join sys_depart_role_user c on c.drole_id = b.id join sys_user_depart c on c.dep_id = b.id
join sys_user d on d.id = c.user_id join sys_user d on d.id = c.user_id
where p.id = a.permission_id AND d.username = #{username,jdbcType=VARCHAR} where p.id = a.permission_id AND d.username = #{username,jdbcType=VARCHAR}
) )
and p.del_flag = 0 and p.del_flag = 0
<!--update end Author:lvdandan Date:20200213 for:加入部门权限 --> <!--update end Author:lxt Date:20220410 for:加入部门权限 -->
) h order by h.sort_no ASC ) h order by h.sort_no ASC
</select> </select>
+10 -10
View File
@@ -38,9 +38,9 @@
<a-tab-pane tab="用户信息" key="2"> <a-tab-pane tab="用户信息" key="2">
<Dept-User-Info ref="DeptUserInfo" @clearSelectedDepartKeys="clearSelectedDepartKeys"></Dept-User-Info> <Dept-User-Info ref="DeptUserInfo" @clearSelectedDepartKeys="clearSelectedDepartKeys"></Dept-User-Info>
</a-tab-pane> </a-tab-pane>
<a-tab-pane tab="部门角色" key="3" forceRender> <!-- <a-tab-pane tab="部门角色" key="3" forceRender>-->
<dept-role-info ref="DeptRoleInfo" @clearSelectedDepartKeys="clearSelectedDepartKeys"/> <!-- <dept-role-info ref="DeptRoleInfo" @clearSelectedDepartKeys="clearSelectedDepartKeys"/>-->
</a-tab-pane> <!-- </a-tab-pane>-->
</a-tabs> </a-tabs>
</a-card> </a-card>
</a-col> </a-col>
@@ -106,13 +106,13 @@
loadData() { loadData() {
this.refresh(); this.refresh();
}, },
clearSelectedDepartKeys() { // clearSelectedDepartKeys() {
this.checkedKeys = []; // this.checkedKeys = [];
this.selectedKeys = []; // this.selectedKeys = [];
this.currentDeptId = ''; // this.currentDeptId = '';
this.$refs.DeptUserInfo.currentDeptId=''; // this.$refs.DeptUserInfo.currentDeptId='';
this.$refs.DeptRoleInfo.currentDeptId=''; // this.$refs.DeptRoleInfo.currentDeptId='';
}, // },
loadTree() { loadTree() {
var that = this var that = this
that.treeData = [] that.treeData = []
+187 -187
View File
@@ -1,191 +1,191 @@
<template> <!--<template>-->
<a-card :bordered="false"> <!-- <a-card :bordered="false">-->
<!-- 查询区域 --> <!-- &lt;!&ndash; 查询区域 &ndash;&gt;-->
<div class="table-page-search-wrapper"> <!-- <div class="table-page-search-wrapper">-->
<!-- 搜索区域 --> <!-- &lt;!&ndash; 搜索区域 &ndash;&gt;-->
<a-form layout="inline"> <!-- <a-form layout="inline">-->
<a-row :gutter="10"> <!-- <a-row :gutter="10">-->
<a-col :md="10" :sm="12"> <!-- <a-col :md="10" :sm="12">-->
<a-form-item label="部门角色名称" style="margin-left:8px"> <!-- <a-form-item label="部门角色名称" style="margin-left:8px">-->
<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="6" :sm="24"> <!-- <a-col :md="6" :sm="24">-->
<a-button type="primary" @click="searchQuery" icon="search" style="margin-left: 18px">查询</a-button> <!-- <a-button type="primary" @click="searchQuery" icon="search" style="margin-left: 18px">查询</a-button>-->
<a-button type="primary" @click="searchReset" icon="reload" style="margin-left: 8px">重置</a-button> <!-- <a-button type="primary" @click="searchReset" icon="reload" style="margin-left: 8px">重置</a-button>-->
</a-col> <!-- </a-col>-->
</span> <!-- </span>-->
</a-row> <!-- </a-row>-->
</a-form> <!-- </a-form>-->
</div> <!-- </div>-->
<!-- 操作按钮区域 --> <!-- &lt;!&ndash; 操作按钮区域 &ndash;&gt;-->
<div class="table-operator" :md="24" :sm="24"> <!-- <div class="table-operator" :md="24" :sm="24">-->
<a-button @click="handleAdd" type="primary" icon="plus">新建部门角色</a-button> <!-- <a-button @click="handleAdd" type="primary" icon="plus">新建部门角色</a-button>-->
<a-dropdown v-if="selectedRowKeys.length > 0"> <!-- <a-dropdown v-if="selectedRowKeys.length > 0">-->
<a-menu slot="overlay"> <!-- <a-menu slot="overlay">-->
<a-menu-item key="1" @click="batchDel"><a-icon type="delete"/>删除</a-menu-item> <!-- <a-menu-item key="1" @click="batchDel"><a-icon type="delete"/>删除</a-menu-item>-->
</a-menu> <!-- </a-menu>-->
<a-button style="margin-left: 8px"> 批量操作 <a-icon type="down" /></a-button> <!-- <a-button style="margin-left: 8px"> 批量操作 <a-icon type="down" /></a-button>-->
</a-dropdown> <!-- </a-dropdown>-->
</div> <!-- </div>-->
<!-- table区域-begin --> <!-- &lt;!&ndash; table区域-begin &ndash;&gt;-->
<div> <!-- <div>-->
<div class="ant-alert ant-alert-info" style="margin-bottom: 16px;"> <!-- <div class="ant-alert ant-alert-info" style="margin-bottom: 16px;">-->
<i class="anticon anticon-info-circle ant-alert-icon"></i> 已选择 <a style="font-weight: 600"> <!-- <i class="anticon anticon-info-circle ant-alert-icon"></i> 已选择 <a style="font-weight: 600">-->
{{selectedRowKeys.length }}</a>项 <!-- {{selectedRowKeys.length }}</a>项-->
<a style="margin-left: 24px" @click="onClearSelected">清空</a> <!-- <a style="margin-left: 24px" @click="onClearSelected">清空</a>-->
</div> <!-- </div>-->
<a-table <!-- <a-table-->
ref="table" <!-- ref="table"-->
size="middle" <!-- size="middle"-->
bordered <!-- bordered-->
rowKey="id" <!-- rowKey="id"-->
:columns="columns" <!-- :columns="columns"-->
:dataSource="dataSource" <!-- :dataSource="dataSource"-->
:pagination="ipagination" <!-- :pagination="ipagination"-->
:loading="loading" <!-- :loading="loading"-->
:rowSelection="{selectedRowKeys: selectedRowKeys, onChange: onSelectChange}" <!-- :rowSelection="{selectedRowKeys: selectedRowKeys, onChange: onSelectChange}"-->
@change="handleTableChange"> <!-- @change="handleTableChange">-->
<span slot="action" slot-scope="text, record"> <!-- <span slot="action" slot-scope="text, record">-->
<a @click="handleEdit(record)">编辑</a> <!-- <a @click="handleEdit(record)">编辑</a>-->
<a-divider type="vertical"/> <!-- <a-divider type="vertical"/>-->
<a-dropdown> <!-- <a-dropdown>-->
<a class="ant-dropdown-link"> <!-- <a class="ant-dropdown-link">-->
更多 <a-icon type="down"/> <!-- 更多 <a-icon type="down"/>-->
</a> <!-- </a>-->
<a-menu slot="overlay"> <!-- <a-menu slot="overlay">-->
<a-menu-item> <!-- <a-menu-item>-->
<a @click="handlePerssion(record)">授权</a> <!-- <a @click="handlePerssion(record)">授权</a>-->
</a-menu-item> <!-- </a-menu-item>-->
<a-menu-item> <!-- <a-menu-item>-->
<a-popconfirm title="确定删除吗?" @confirm="() => handleDelete(record.id)"> <!-- <a-popconfirm title="确定删除吗?" @confirm="() => handleDelete(record.id)">-->
<a>删除</a> <!-- <a>删除</a>-->
</a-popconfirm> <!-- </a-popconfirm>-->
</a-menu-item> <!-- </a-menu-item>-->
</a-menu> <!-- </a-menu>-->
</a-dropdown> <!-- </a-dropdown>-->
</span> <!-- </span>-->
</a-table> <!-- </a-table>-->
</div> <!-- </div>-->
<!-- table区域-end --> <!-- &lt;!&ndash; table区域-end &ndash;&gt;-->
<!-- 表单区域 --> <!-- &lt;!&ndash; 表单区域 &ndash;&gt;-->
<sys-depart-role-modal ref="sysDepartRoleModalForm" @ok="modalFormOk"/> <!-- <sys-depart-role-modal ref="sysDepartRoleModalForm" @ok="modalFormOk"/>-->
<dept-role-auth-modal ref="modalDeptRole" /> <!-- <dept-role-auth-modal ref="modalDeptRole" />-->
</a-card> <!-- </a-card>-->
</template> <!--</template>-->
<script> <!--<script>-->
import {JeroListMixin} from '@/mixins/JeroListMixin' <!-- import {JeroListMixin} from '@/mixins/JeroListMixin'-->
import {getAction} from '@/api/manage' <!-- import {getAction} from '@/api/manage'-->
import SysDepartRoleModal from './SysDepartRoleModal' <!-- import SysDepartRoleModal from './SysDepartRoleModal'-->
import DeptRoleAuthModal from './DeptRoleAuthModal' <!-- import DeptRoleAuthModal from './DeptRoleAuthModal'-->
export default { <!-- export default {-->
name: 'DeptRoleInfo', <!-- name: 'DeptRoleInfo',-->
components: { DeptRoleAuthModal, SysDepartRoleModal }, <!-- components: { DeptRoleAuthModal, SysDepartRoleModal },-->
mixins: [JeroListMixin], <!-- mixins: [JeroListMixin],-->
data() { <!-- data() {-->
return { <!-- return {-->
description: '部门角色信息', <!-- description: '部门角色信息',-->
currentDeptId: '', <!-- currentDeptId: '',-->
// 表头 <!-- // 表头-->
columns: [{ <!-- columns: [{-->
title: '部门角色名称', <!-- title: '部门角色名称',-->
align: "center", <!-- align: "center",-->
dataIndex: 'roleName' <!-- dataIndex: 'roleName'-->
}, <!-- },-->
{ <!-- {-->
title: '部门角色编码', <!-- title: '部门角色编码',-->
align: "center", <!-- align: "center",-->
dataIndex: 'roleCode' <!-- dataIndex: 'roleCode'-->
}, <!-- },-->
{ <!-- {-->
title: '部门', <!-- title: '部门',-->
align: "center", <!-- align: "center",-->
dataIndex: 'departId_dictText' <!-- dataIndex: 'departId_dictText'-->
}, <!-- },-->
{ <!-- {-->
title: '备注', <!-- title: '备注',-->
align: "center", <!-- align: "center",-->
dataIndex: 'description' <!-- dataIndex: 'description'-->
}, <!-- },-->
{ <!-- {-->
title: '操作', <!-- title: '操作',-->
dataIndex: 'action', <!-- dataIndex: 'action',-->
scopedSlots: {customRender: 'action'}, <!-- scopedSlots: {customRender: 'action'},-->
align: "center", <!-- align: "center",-->
width: 170 <!-- width: 170-->
}], <!-- }],-->
url: { <!-- url: {-->
list: "/sys/sysDepartRole/page", <!-- list: "/sys/sysDepartRole/page",-->
delete: "/sys/sysDepartRole/delete", <!-- delete: "/sys/sysDepartRole/delete",-->
deleteBatch: "/sys/sysDepartRole/deleteBatch", <!-- deleteBatch: "/sys/sysDepartRole/deleteBatch",-->
} <!-- }-->
} <!-- }-->
}, <!-- },-->
created() { <!-- created() {-->
}, <!-- },-->
methods: { <!-- methods: {-->
searchReset() { <!-- searchReset() {-->
this.queryParam = {} <!-- this.queryParam = {}-->
this.loadData(1); <!-- this.loadData(1);-->
}, <!-- },-->
loadData(arg) { <!-- loadData(arg) {-->
if (!this.url.list) { <!-- if (!this.url.list) {-->
this.$message.error("请设置url.list属性!") <!-- this.$message.error("请设置url.list属性!")-->
return <!-- return-->
} <!-- }-->
//加载数据 若传入参数1则加载第一页的内容 <!-- //加载数据 若传入参数1则加载第一页的内容-->
if (arg === 1) { <!-- if (arg === 1) {-->
this.ipagination.current = 1; <!-- this.ipagination.current = 1;-->
} <!-- }-->
let params = this.getQueryParams();//查询条件 <!-- let params = this.getQueryParams();//查询条件-->
params.deptId = this.currentDeptId; <!-- params.deptId = this.currentDeptId;-->
getAction(this.url.list, params).then((res) => { <!-- getAction(this.url.list, params).then((res) => {-->
if (res.success && res.result) { <!-- if (res.success && res.result) {-->
this.dataSource = res.result.records; <!-- this.dataSource = res.result.records;-->
this.ipagination.total = res.result.total; <!-- this.ipagination.total = res.result.total;-->
} <!-- }-->
}) <!-- })-->
}, <!-- },-->
open(record) { <!-- open(record) {-->
this.currentDeptId = record.id; <!-- this.currentDeptId = record.id;-->
this.loadData(1); <!-- this.loadData(1);-->
}, <!-- },-->
clearList() { <!-- clearList() {-->
this.currentDeptId = ''; <!-- this.currentDeptId = '';-->
this.dataSource = []; <!-- this.dataSource = [];-->
}, <!-- },-->
hasSelectDept() { <!-- hasSelectDept() {-->
if (this.currentDeptId == '') { <!-- if (this.currentDeptId == '') {-->
this.$message.error("请选择一个部门!") <!-- this.$message.error("请选择一个部门!")-->
return false; <!-- return false;-->
} <!-- }-->
return true; <!-- return true;-->
}, <!-- },-->
handleEdit: function (record) { <!-- handleEdit: function (record) {-->
this.$refs.sysDepartRoleModalForm.title = "编辑"; <!-- this.$refs.sysDepartRoleModalForm.title = "编辑";-->
this.$refs.sysDepartRoleModalForm.departDisabled = true; <!-- this.$refs.sysDepartRoleModalForm.departDisabled = true;-->
this.$refs.sysDepartRoleModalForm.disableSubmit = false; <!-- this.$refs.sysDepartRoleModalForm.disableSubmit = false;-->
this.$refs.sysDepartRoleModalForm.edit(record,record.departId); <!-- this.$refs.sysDepartRoleModalForm.edit(record,record.departId);-->
}, <!-- },-->
handleAdd: function () { <!-- handleAdd: function () {-->
if (this.currentDeptId == '') { <!-- if (this.currentDeptId == '') {-->
this.$message.error("请选择一个部门!") <!-- this.$message.error("请选择一个部门!")-->
} else { <!-- } else {-->
this.$refs.sysDepartRoleModalForm.departDisabled = true; <!-- this.$refs.sysDepartRoleModalForm.departDisabled = true;-->
this.$refs.sysDepartRoleModalForm.add(this.currentDeptId); <!-- this.$refs.sysDepartRoleModalForm.add(this.currentDeptId);-->
this.$refs.sysDepartRoleModalForm.title = "新增"; <!-- this.$refs.sysDepartRoleModalForm.title = "新增";-->
} <!-- }-->
}, <!-- },-->
handlePerssion: function(record){ <!-- handlePerssion: function(record){-->
this.$refs.modalDeptRole.show(record.id,record.departId); <!-- this.$refs.modalDeptRole.show(record.id,record.departId);-->
}, <!-- },-->
} <!-- }-->
} <!-- }-->
</script> <!--</script>-->
<style scoped> <!--<style scoped>-->
</style> <!--</style>-->
@@ -1,200 +1,200 @@
<template> <!--<template>-->
<a-drawer <!-- <a-drawer-->
:title="title" <!-- :title="title"-->
:maskClosable="true" <!-- :maskClosable="true"-->
width=600 <!-- width=600-->
placement="right" <!-- placement="right"-->
:closable="true" <!-- :closable="true"-->
@close="close" <!-- @close="close"-->
:visible="visible" <!-- :visible="visible"-->
style="overflow: auto;padding-bottom: 53px;"> <!-- style="overflow: auto;padding-bottom: 53px;">-->
<a-spin :spinning="confirmLoading"> <!-- <a-spin :spinning="confirmLoading">-->
<a-form :form="form" v-if="designNameOption.length>0"> <!-- <a-form :form="form" v-if="designNameOption.length>0">-->
<a-form-item label=''> <!-- <a-form-item label=''>-->
<a-col :xl="24" :lg="24" :md="24" :sm="24" :xs="24"> <!-- <a-col :xl="24" :lg="24" :md="24" :sm="24" :xs="24">-->
<a-card :style="{ marginTop: '12px',height:'auto' }"> <!-- <a-card :style="{ marginTop: '12px',height:'auto' }">-->
<a-checkbox-group @change="designNameChange" v-model="designNameValue" style="width: 100%"> <!-- <a-checkbox-group @change="designNameChange" v-model="designNameValue" style="width: 100%">-->
<a-row> <!-- <a-row>-->
<template v-for="(des) in designNameOption"> <!-- <template v-for="(des) in designNameOption">-->
<a-col :span="6"> <!-- <a-col :span="6">-->
<a-checkbox :value="des.value">{{ des.text }}</a-checkbox> <!-- <a-checkbox :value="des.value">{{ des.text }}</a-checkbox>-->
</a-col> <!-- </a-col>-->
</template> <!-- </template>-->
</a-row> <!-- </a-row>-->
</a-checkbox-group> <!-- </a-checkbox-group>-->
</a-card> <!-- </a-card>-->
</a-col> <!-- </a-col>-->
</a-form-item> <!-- </a-form-item>-->
</a-form> <!-- </a-form>-->
<div v-else><h3>无可配置角色!</h3></div> <!-- <div v-else><h3>无可配置角色!</h3></div>-->
</a-spin> <!-- </a-spin>-->
<div class="drawer-bootom-button"> <!-- <div class="drawer-bootom-button">-->
<a-dropdown style="float: left" :trigger="['click']" placement="topCenter"> <!-- <a-dropdown style="float: left" :trigger="['click']" placement="topCenter">-->
<a-menu slot="overlay"> <!-- <a-menu slot="overlay">-->
<a-menu-item key="1" @click="checkALL">全部勾选</a-menu-item> <!-- <a-menu-item key="1" @click="checkALL">全部勾选</a-menu-item>-->
<a-menu-item key="2" @click="cancelCheckALL">取消全选</a-menu-item> <!-- <a-menu-item key="2" @click="cancelCheckALL">取消全选</a-menu-item>-->
</a-menu> <!-- </a-menu>-->
<a-button> <!-- <a-button>-->
操作 <a-icon type="up" /> <!-- 操作 <a-icon type="up" />-->
</a-button> <!-- </a-button>-->
</a-dropdown> <!-- </a-dropdown>-->
<a-popconfirm title="确定放弃编辑" @confirm="close" okText="确定" cancelText="取消"> <!-- <a-popconfirm title="确定放弃编辑" @confirm="close" okText="确定" cancelText="取消">-->
<a-button style="margin-right: .8rem">取消</a-button> <!-- <a-button style="margin-right: .8rem">取消</a-button>-->
</a-popconfirm> <!-- </a-popconfirm>-->
<a-button @click="handleSubmit(true)" type="primary">保存</a-button> <!-- <a-button @click="handleSubmit(true)" type="primary">保存</a-button>-->
</div> <!-- </div>-->
</a-drawer> <!-- </a-drawer>-->
</template> <!--</template>-->
<script> <!--<script>-->
import {httpAction, getAction} from '@/api/manage' <!-- import {httpAction, getAction} from '@/api/manage'-->
import JEllipsis from '@/components/jero/JEllipsis' <!-- import JEllipsis from '@/components/jero/JEllipsis'-->
import {initDictOptions} from '@/components/dict/JDictSelectUtil' <!-- import {initDictOptions} from '@/components/dict/JDictSelectUtil'-->
export default { <!-- export default {-->
name: 'DeptRoleUserModal', <!-- name: 'DeptRoleUserModal',-->
components: { <!-- components: {-->
JEllipsis <!-- JEllipsis-->
}, <!-- },-->
data() { <!-- data() {-->
return { <!-- return {-->
currentDeptId:"", <!-- currentDeptId:"",-->
title: "部门角色分配", <!-- title: "部门角色分配",-->
visible: false, <!-- visible: false,-->
model: {}, <!-- model: {},-->
labelCol: { <!-- labelCol: {-->
xs: {span: 24}, <!-- xs: {span: 24},-->
sm: {span: 5}, <!-- sm: {span: 5},-->
}, <!-- },-->
wrapperCol: { <!-- wrapperCol: {-->
xs: {span: 24}, <!-- xs: {span: 24},-->
sm: {span: 16}, <!-- sm: {span: 16},-->
}, <!-- },-->
confirmLoading: false, <!-- confirmLoading: false,-->
form: this.$form.createForm(this), <!-- form: this.$form.createForm(this),-->
validatorRules: {}, <!-- validatorRules: {},-->
url: { <!-- url: {-->
add: "/sys/sysDepartRole/deptRoleUserAdd", <!-- add: "/sys/sysDepartRole/deptRoleUserAdd",-->
getDeptRoleList:"/sys/sysDepartRole/getDeptRoleList", <!-- getDeptRoleList:"/sys/sysDepartRole/getDeptRoleList",-->
getDeptRoleByUserId:"/sys/sysDepartRole/getDeptRoleByUserId" <!-- getDeptRoleByUserId:"/sys/sysDepartRole/getDeptRoleByUserId"-->
}, <!-- },-->
designNameOption: [], <!-- designNameOption: [],-->
userId: "", <!-- userId: "",-->
newRoleId:"", <!-- newRoleId:"",-->
oldRoleId:"", <!-- oldRoleId:"",-->
designNameValue:[], <!-- designNameValue:[],-->
desformList: [], <!-- desformList: [],-->
} <!-- }-->
}, <!-- },-->
created() { <!-- created() {-->
}, <!-- },-->
methods: { <!-- methods: {-->
add(record,departId) { <!-- add(record,departId) {-->
this.userId = record.id; <!-- this.userId = record.id;-->
this.currentDeptId = departId; <!-- this.currentDeptId = departId;-->
this.loadDesformList(); <!-- this.loadDesformList();-->
this.edit({}); <!-- this.edit({});-->
}, <!-- },-->
edit(record) { <!-- edit(record) {-->
this.form.resetFields(); <!-- this.form.resetFields();-->
this.model = Object.assign({}, record); <!-- this.model = Object.assign({}, record);-->
this.visible = true; <!-- this.visible = true;-->
getAction(this.url.getDeptRoleByUserId,{userId:this.userId,departId:this.currentDeptId}).then((res) => { <!-- getAction(this.url.getDeptRoleByUserId,{userId:this.userId,departId:this.currentDeptId}).then((res) => {-->
if (res.success) { <!-- if (res.success) {-->
var designName = []; <!-- var designName = [];-->
for (let value of res.result) { <!-- for (let value of res.result) {-->
designName.push(value.droleId) <!-- designName.push(value.droleId)-->
} <!-- }-->
this.oldRoleId=designName.join(","); <!-- this.oldRoleId=designName.join(",");-->
this.designNameValue = designName; <!-- this.designNameValue = designName;-->
this.newRoleId = designName.join(","); <!-- this.newRoleId = designName.join(",");-->
} <!-- }-->
}); <!-- });-->
}, <!-- },-->
close() { <!-- close() {-->
this.$emit('close'); <!-- this.$emit('close');-->
this.visible = false; <!-- this.visible = false;-->
}, <!-- },-->
handleSubmit() { <!-- handleSubmit() {-->
const that = this; <!-- const that = this;-->
// 触发表单验证 <!-- // 触发表单验证-->
that.confirmLoading = true; <!-- that.confirmLoading = true;-->
let httpurl = this.url.add; <!-- let httpurl = this.url.add;-->
let method = 'post'; <!-- let method = 'post';-->
let formData = Object.assign(this.model, {}); <!-- let formData = Object.assign(this.model, {});-->
//时间格式化 <!-- //时间格式化-->
formData.userId = this.userId; <!-- formData.userId = this.userId;-->
formData.newRoleId=this.newRoleId; <!-- formData.newRoleId=this.newRoleId;-->
formData.oldRoleId=this.oldRoleId; <!-- formData.oldRoleId=this.oldRoleId;-->
httpAction(httpurl, formData, method).then((res) => { <!-- httpAction(httpurl, formData, method).then((res) => {-->
if (res.success) { <!-- if (res.success) {-->
that.$message.success(res.message); <!-- that.$message.success(res.message);-->
that.$emit('reload'); <!-- that.$emit('reload');-->
that.$emit('ok'); <!-- that.$emit('ok');-->
} else { <!-- } else {-->
that.$message.warning(res.message); <!-- that.$message.warning(res.message);-->
} <!-- }-->
}).finally(() => { <!-- }).finally(() => {-->
that.confirmLoading = false; <!-- that.confirmLoading = false;-->
that.close(); <!-- that.close();-->
}) <!-- })-->
}, <!-- },-->
handleCancel() { <!-- handleCancel() {-->
this.designNameOption=[]; <!-- this.designNameOption=[];-->
this.designNameValue=[]; <!-- this.designNameValue=[];-->
this.close() <!-- this.close()-->
}, <!-- },-->
designNameChange(selectedValue) { <!-- designNameChange(selectedValue) {-->
this.newRoleId=selectedValue.join(","); <!-- this.newRoleId=selectedValue.join(",");-->
}, <!-- },-->
checkALL(){ <!-- checkALL(){-->
var designName = []; <!-- var designName = [];-->
for (let value of this.desformList) { <!-- for (let value of this.desformList) {-->
designName.push( <!-- designName.push(-->
value.id <!-- value.id-->
) <!-- )-->
} <!-- }-->
this.designNameValue = designName; <!-- this.designNameValue = designName;-->
this.newRoleId=designName.join(","); <!-- this.newRoleId=designName.join(",");-->
}, <!-- },-->
cancelCheckALL(){ <!-- cancelCheckALL(){-->
this.designNameValue=[]; <!-- this.designNameValue=[];-->
this.newRoleId=""; <!-- this.newRoleId="";-->
}, <!-- },-->
/** 加载desform */ <!-- /** 加载desform */-->
loadDesformList() { <!-- loadDesformList() {-->
getAction(this.url.getDeptRoleList, { departId: this.currentDeptId, userId:this.userId }).then((res) => { <!-- getAction(this.url.getDeptRoleList, { departId: this.currentDeptId, userId:this.userId }).then((res) => {-->
if (res.success) { <!-- if (res.success) {-->
this.desformList = res.result <!-- this.desformList = res.result-->
var designName = []; <!-- var designName = [];-->
for (let value of this.desformList) { <!-- for (let value of this.desformList) {-->
designName.push({ <!-- designName.push({-->
value: value.id, <!-- value: value.id,-->
text: value.roleName, <!-- text: value.roleName,-->
}) <!-- })-->
} <!-- }-->
this.designNameOption = designName; <!-- this.designNameOption = designName;-->
} <!-- }-->
}); <!-- });-->
}, <!-- },-->
} <!-- }-->
} <!-- }-->
</script> <!--</script>-->
<style scoped> <!--<style scoped>-->
.drawer-bootom-button { <!-- .drawer-bootom-button {-->
position: absolute; <!-- position: absolute;-->
bottom: 0; <!-- bottom: 0;-->
width: 100%; <!-- width: 100%;-->
border-top: 1px solid #e8e8e8; <!-- border-top: 1px solid #e8e8e8;-->
padding: 10px 16px; <!-- padding: 10px 16px;-->
text-align: right; <!-- text-align: right;-->
left: 0; <!-- left: 0;-->
background: #fff; <!-- background: #fff;-->
border-radius: 0 0 2px 2px; <!-- border-radius: 0 0 2px 2px;-->
} <!-- }-->
</style> <!--</style>-->
@@ -70,9 +70,9 @@
更多 <a-icon type="down"/> 更多 <a-icon type="down"/>
</a> </a>
<a-menu slot="overlay"> <a-menu slot="overlay">
<a-menu-item> <!-- <a-menu-item>-->
<a href="javascript:;" @click="handleDeptRole(record)">部门角色</a> <!-- <a href="javascript:;" @click="handleDeptRole(record)">部门角色</a>-->
</a-menu-item> <!-- </a-menu-item>-->
<a-menu-item> <a-menu-item>
<a href="javascript:;" @click="handleDetail(record)">用户详情</a> <a href="javascript:;" @click="handleDetail(record)">用户详情</a>
@@ -95,7 +95,7 @@
<!-- 表单区域 --> <!-- 表单区域 -->
<user-modal ref="modalForm" @ok="modalFormOk"></user-modal> <user-modal ref="modalForm" @ok="modalFormOk"></user-modal>
<Select-User-Modal ref="selectUserModal" @selectFinished="selectOK"></Select-User-Modal> <Select-User-Modal ref="selectUserModal" @selectFinished="selectOK"></Select-User-Modal>
<dept-role-user-modal ref="deptRoleUser"></dept-role-user-modal> <!-- <dept-role-user-modal ref="deptRoleUser"></dept-role-user-modal>-->
</a-card> </a-card>
</template> </template>
@@ -104,13 +104,13 @@
import {getAction, postAction, deleteAction} from '@/api/manage' import {getAction, postAction, deleteAction} from '@/api/manage'
import SelectUserModal from './SelectUserModal' import SelectUserModal from './SelectUserModal'
import UserModal from './UserModal' import UserModal from './UserModal'
import DeptRoleUserModal from './DeptRoleUserModal' // import DeptRoleUserModal from './DeptRoleUserModal'
export default { export default {
name: "DeptUserInfo", name: "DeptUserInfo",
mixins: [JeroListMixin], mixins: [JeroListMixin],
components: { components: {
DeptRoleUserModal, // DeptRoleUserModal,
SelectUserModal, SelectUserModal,
UserModal UserModal
}, },
@@ -311,14 +311,14 @@
} }
}) })
}, },
handleDeptRole(record){ // handleDeptRole(record){
if(this.currentDeptId != ''){ // if(this.currentDeptId != ''){
this.$refs.deptRoleUser.add(record,this.currentDeptId); // this.$refs.deptRoleUser.add(record,this.currentDeptId);
this.$refs.deptRoleUser.title = "部门角色分配"; // this.$refs.deptRoleUser.title = "部门角色分配";
}else{ // }else{
this.$message.warning("请先选择一个部门!"); // this.$message.warning("请先选择一个部门!");
} // }
} // }
} }
} }
</script> </script>