Commit a18ee02b by xinla

--no commit message

1 parent e03b0b91
...@@ -6,7 +6,7 @@ ...@@ -6,7 +6,7 @@
<!-- <keep-alive :include="cachedViews"> <!-- <keep-alive :include="cachedViews">
</keep-alive> --> </keep-alive> -->
</transition> </transition>
<div v-loading="loading" class="height100 micro-app-wrap container"> <div v-loading="loading" class="micro-app-wrap container">
<div id="micro-app" class="height100" v-show="isActiveMicroApp"> <div id="micro-app" class="height100" v-show="isActiveMicroApp">
<!-- <div id="app" class="mask" style="position: absolute"> <!-- <div id="app" class="mask" style="position: absolute">
<i class="el-icon-loading cc"></i> <i class="el-icon-loading cc"></i>
...@@ -85,7 +85,7 @@ export default { ...@@ -85,7 +85,7 @@ export default {
} }
.container { .container {
position: relative; position: relative;
max-height: 100%; height: 100%;
overflow-y: auto; overflow-y: auto;
overflow-x: hidden; overflow-x: hidden;
...@@ -97,7 +97,7 @@ export default { ...@@ -97,7 +97,7 @@ export default {
} }
} }
.page { .page {
padding: 0 20px; padding: 0 15px 0 20px;
// background: #fff; // background: #fff;
// border-radius: var(--border-radius-big); // border-radius: var(--border-radius-big);
} }
......
...@@ -228,6 +228,111 @@ div:focus { ...@@ -228,6 +228,111 @@ div:focus {
border-radius: var(--border-radius-big); border-radius: var(--border-radius-big);
margin-top: var(--card-margin); margin-top: var(--card-margin);
} }
// 左右分类列表
&left-right {
display: flex;
justify-content: space-between;
height: 100%;
.left {
flex: auto;
display: flex;
flex-direction: column;
margin-right: var(--border-radius-big);
.title {
display: flex;
justify-content: space-between;
align-items: center;
.title-name {
color: rgba(0, 0, 0, 0.9);
font-size: 14px;
font-weight: 600;
// color: #333333;
display: flex;
align-items: center;
}
.title-btn {
cursor: pointer;
display: flex;
align-items: center;
font-size: 14px;
font-weight: normal;
color: var(--color);
&:hover {
opacity: 0.8;
}
}
}
.item-list {
margin-top: 15px;
display: flex;
flex-direction: column;
overflow-x: hidden;
overflow-y: auto;
.item {
cursor: pointer;
display: flex;
justify-content: space-between;
align-items: center;
font-size: 14px;
color: rgba(0, 0, 0, 0.6);
height: 40px;
line-height: 40px;
width: 100%;
padding-left: 20px;
.name {
overflow: hidden;
white-space: nowrap;
text-overflow: ellipsis;
}
.dropdown {
// display: none;
.dot {
cursor: pointer;
width: 15px;
height: 15px;
line-height: 15px;
font-size: 14px;
font-family: JMT-Font, JMT;
font-weight: normal;
color: rgba(0, 0, 0, 0.6);
margin-right: 10px;
margin-left: 5px;
font-weight: 500;
.content-icon {
color: rgba(0, 0, 0, 0.6);
font-size: 12px;
transform: rotate(90deg);
}
}
}
&:hover {
color: rgba(0, 0, 0, 0.9);
background: #f5f8fe;
opacity: 0.8;
border-radius: 2px;
.dropdown {
// display: block;
}
}
}
.active {
// border-left: 2px solid #3c88f0;
color: rgba(0, 0, 0, 0.9);
background: #f5f8fe;
border-radius: 2px;
}
}
}
.right {
width: 78%;
display: flex;
flex-direction: column;
flex: none;
}
}
} }
.card-group-index + .g-card { .card-group-index + .g-card {
......
...@@ -390,95 +390,93 @@ export default { ...@@ -390,95 +390,93 @@ export default {
<template> <template>
<div class="page"> <div class="page">
<div style="margin-top: 16px"> <div class="g-left-right">
<el-row type="flex" justify="space-between"> <div class="left g-card">
<el-col :span="5" class="left pad20" style="border-radius: 4px; background: #fff"> <div class="title">
<div class="title"> <div class="title-name">{{ typeTitle[type] }}分组</div>
<div class="title-name">{{ typeTitle[type] }}分组</div> <div class="title-btn" @click="addGroup">添加</div>
<div class="title-btn" @click="addGroup">添加</div> </div>
<div class="item-list">
<div
class="item"
:class="{ active: groupIndex == key }"
v-for="(group, key) in groupList"
:key="group.id"
@click="switchGroup(key, group)">
<div class="name">{{ group.name + ' (' + group.number + ')' }}</div>
<el-dropdown v-if="group.flag === 0" class="dropdown" @command="onGroupCommand($event, group)">
<span class="dot">
<!-- <img style="height: 15px;width: 15px;" :src="require('@/assets/drainageCode/more.png')" alt=""> -->
<i class="el-icon-more content-icon"></i>
</span>
<el-dropdown-menu slot="dropdown">
<el-dropdown-item command="groupEdit">修改分组</el-dropdown-item>
<el-dropdown-item command="groupRemove">删除分组</el-dropdown-item>
</el-dropdown-menu>
</el-dropdown>
</div> </div>
<div class="item-list"> </div>
<div </div>
class="item"
:class="{ active: groupIndex == key }"
v-for="(group, key) in groupList"
:key="group.id"
@click="switchGroup(key, group)">
<div class="name">{{ group.name + ' (' + group.number + ')' }}</div>
<el-dropdown v-if="group.flag === 0" class="dropdown" @command="onGroupCommand($event, group)">
<span class="dot">
<!-- <img style="height: 15px;width: 15px;" :src="require('@/assets/drainageCode/more.png')" alt=""> -->
<i class="el-icon-more content-icon"></i>
</span>
<el-dropdown-menu slot="dropdown">
<el-dropdown-item command="groupEdit">修改分组</el-dropdown-item>
<el-dropdown-item command="groupRemove">删除分组</el-dropdown-item>
</el-dropdown-menu>
</el-dropdown>
</div>
</div>
</el-col>
<el-col :span="19" style="margin-top: 0px"> <div class="right">
<div class="g-card"> <div class="g-card fxnone">
<el-input <el-input
v-model="query.talkTitle" v-model="query.talkTitle"
:placeholder="'请输入' + typeTitle[type] + '标题'" :placeholder="'请输入' + typeTitle[type] + '标题'"
clearable clearable
prefix-icon="el-icon-search" prefix-icon="el-icon-search"
style="width: 300px" style="width: 300px"
@keyup.enter.native="search()" @keyup.enter.native="search()"
v-if="['13', '14'].includes(type)" /> v-if="['13', '14'].includes(type)" />
<el-input <el-input
v-model="query.templateInfo" v-model="query.templateInfo"
:placeholder="'请输入' + typeTitle[type] + '标题'" :placeholder="'请输入' + typeTitle[type] + '标题'"
clearable clearable
prefix-icon="el-icon-search" prefix-icon="el-icon-search"
style="width: 300px" style="width: 300px"
@keyup.enter.native="search()" @keyup.enter.native="search()"
v-else /> v-else />
<el-button class="ml10" type="primary" @click="getList(1)">查询</el-button> <el-button class="ml10" type="primary" @click="getList(1)">查询</el-button>
<!-- v-hasPermi="['wecom:material:list']" --> <!-- v-hasPermi="['wecom:material:list']" -->
<el-button @click="resetQuery">重置</el-button> <el-button @click="resetQuery">重置</el-button>
</div> </div>
<div class="mt20 g-card pad20"> <div class="mt20 g-card pad20">
<div v-loading="loading"> <div v-loading="loading">
<div style="height: 80px"> <div style="height: 80px">
<div class="fl pad20"> <div class="fl pad20">
<!-- v-hasPermi="['wechat:material:add']" --> <!-- v-hasPermi="['wechat:material:add']" -->
<el-button type="primary" @click="edit(1, ~~type)">新建{{ typeTitle[type] }}</el-button> <el-button type="primary" @click="edit(1, ~~type)">新建{{ typeTitle[type] }}</el-button>
</div> </div>
<div class="fr pad20"> <div class="fr pad20">
<el-popover placement="top" width="260" v-model="groupDialogVisible"> <el-popover placement="top" width="260" v-model="groupDialogVisible">
<div>选择分组</div> <div>选择分组</div>
<div style="position: relative; margin: 10px 0"> <div style="position: relative; margin: 10px 0">
<el-cascader v-model="group" :options="treeData[0].children" :props="groupProps"></el-cascader> <el-cascader v-model="group" :options="treeData[0].children" :props="groupProps"></el-cascader>
</div> </div>
<div style="text-align: right"> <div style="text-align: right">
<el-button size="mini" @click="groupDialogVisible = false">取消</el-button> <el-button size="mini" @click="groupDialogVisible = false">取消</el-button>
<el-button type="primary" size="mini" @click="moveGroup">确定</el-button> <el-button type="primary" size="mini" @click="moveGroup">确定</el-button>
</div> </div>
<!-- v-hasPermi="['wechat:material:resetCategory']" --> <!-- v-hasPermi="['wechat:material:resetCategory']" -->
<el-button slot="reference" class="mr10" :disabled="selected.length === 0" type="primary"> <el-button slot="reference" class="mr10" :disabled="selected.length === 0" type="primary">
批量分组 批量分组
</el-button> </el-button>
</el-popover> </el-popover>
<el-button @click="remove()" :disabled="selected.length === 0">批量删除</el-button> <el-button @click="remove()" :disabled="selected.length === 0">批量删除</el-button>
<!-- v-hasPermi="['wechat:material:remove']" --> <!-- v-hasPermi="['wechat:material:remove']" -->
</div>
</div> </div>
<slot v-bind:list="list"></slot>
</div> </div>
<pagination <slot v-bind:list="list"></slot>
v-show="total > 0"
:total="total"
:page.sync="query.pageNum"
:limit.sync="query.pageSize"
@pagination="getList()" />
</div> </div>
</el-col> <pagination
</el-row> v-show="total > 0"
:total="total"
:page.sync="query.pageNum"
:limit.sync="query.pageSize"
@pagination="getList()" />
</div>
</div>
</div> </div>
<!-- 分组弹框 --> <!-- 分组弹框 -->
<el-dialog <el-dialog
...@@ -509,99 +507,6 @@ export default { ...@@ -509,99 +507,6 @@ export default {
</template> </template>
<style lang="scss" scoped> <style lang="scss" scoped>
.left {
margin-right: 16px;
.title {
color: var(--color);
display: flex;
justify-content: space-between;
align-items: center;
.title-name {
color: rgba(0, 0, 0, 0.9);
font-size: 16px;
font-weight: 600;
// color: #333333;
display: flex;
align-items: center;
}
.title-btn {
cursor: pointer;
display: flex;
align-items: center;
font-size: 14px;
font-weight: normal;
color: var(--color);
&:hover {
opacity: 0.8;
}
}
}
.item-list {
max-height: 700px;
padding-top: 15px;
display: flex;
flex-direction: column;
height: 100%;
overflow-x: hidden;
overflow-y: auto;
.item {
cursor: pointer;
display: flex;
justify-content: space-between;
align-items: center;
font-size: 14px;
color: rgba(0, 0, 0, 0.6);
height: 40px;
line-height: 40px;
width: 100%;
padding-left: 20px;
.name {
overflow: hidden;
white-space: nowrap;
text-overflow: ellipsis;
}
.dropdown {
// display: none;
.dot {
cursor: pointer;
width: 15px;
height: 15px;
line-height: 15px;
font-size: 14px;
font-family: JMT-Font, JMT;
font-weight: normal;
color: rgba(0, 0, 0, 0.6);
margin-right: 10px;
margin-left: 5px;
font-weight: 500;
.content-icon {
color: rgba(0, 0, 0, 0.6);
font-size: 12px;
transform: rotate(90deg);
}
}
}
&:hover {
color: rgba(0, 0, 0, 0.9);
background: #f5f8fe;
opacity: 0.8;
border-radius: 2px;
.dropdown {
// display: block;
}
}
}
.active {
// border-left: 2px solid var(--color);
color: rgba(0, 0, 0, 0.9);
background: #f5f8fe;
border-radius: 2px;
}
}
}
.custom-tree-node { .custom-tree-node {
overflow: hidden; overflow: hidden;
flex-shrink: 1; flex-shrink: 1;
......
<template> <template>
<div> <div>
<el-form class="top-search" :model="query" ref="queryForm" label-position="left" :inline="true" label-width="80px"> <div class="g-left-right">
<el-form-item label="员工姓名" prop="title">
<el-input v-model="query.userName" placeholder="请输入" clearable />
</el-form-item>
<el-form-item label="角色">
<el-select v-model="query.roleId">
<el-option label="全部" value=""></el-option>
<el-option
v-for="(data, key) in roleList"
:key="data.roleId"
:label="data.roleName"
:value="data.roleId"></el-option>
</el-select>
</el-form-item>
<el-form-item label>
<el-button type="primary" @click="getList(1)">查询</el-button>
<el-button @click="resetFn()">重置</el-button>
</el-form-item>
</el-form>
<el-row type="flex" justify="space-between" class="g-card">
<!--部门数据--> <!--部门数据-->
<el-col :span="4"> <div class="left g-card head-container">
<div class="head-container"> <!-- <div>部门架构</div> -->
<!-- <div>部门架构</div> --> <!-- :filter-node-method="filterNode" -->
<!-- :filter-node-method="filterNode" --> <!-- default-expand-all -->
<!-- default-expand-all --> <div class="title mb20">
<div class="title mb20"> <div class="title-name">组织列表</div>
<div class="title-name">组织列表</div> <span @click="syncOrganization" class="g-color cp">
<span @click="syncOrganization" class="g-color cp"> 同步
同步 <i class="el-icon-refresh"></i>
<i class="el-icon-refresh"></i> </span>
</div>
<el-tree
node-key="deptId"
:default-expanded-keys="defaultShowNodes"
highlight-current
accordion
class="left-tree"
:data="treeData"
:props="defaultProps"
:expand-on-click-node="false"
ref="tree"
@node-click="handleNodeClick">
<div class="custom-tree-node" slot-scope="{ node, data }">
<span>
<i class="el-icon-folder-opened" style="color: var(--color)" />
{{ node.label }}
</span> </span>
</div> </div>
<el-tree </el-tree>
node-key="deptId" </div>
:default-expanded-keys="defaultShowNodes"
highlight-current
accordion
class="left-tree"
:data="treeData"
:props="defaultProps"
:expand-on-click-node="false"
ref="tree"
@node-click="handleNodeClick">
<div class="custom-tree-node" slot-scope="{ node, data }">
<span>
<i class="el-icon-folder-opened" style="color: var(--color)" />
{{ node.label }}
</span>
</div>
</el-tree>
</div>
</el-col>
<!--用户数据--> <!--用户数据-->
<el-col :span="19"> <div class="right">
<el-table v-loading="loading" :data="userList" @selection-change="handleSelectionChange"> <el-form class="top-search" :model="query" ref="queryForm" label-position="left" :inline="true" label-width="">
<el-table-column type="selection" width="50" align="center" /> <el-form-item label="员工姓名" prop="title">
<el-table-column label="员工姓名" align="center" prop="userName" :show-overflow-tooltip="true" /> <el-input v-model="query.userName" placeholder="请输入" clearable />
<el-table-column label="所属部门" align="center" prop="userDepts" width="150"> </el-form-item>
<template slot-scope="{ row }" v-if="row.userDepts"> <el-form-item label="角色">
<show-tag :list="row.userDepts" keyStr="deptName" /> <el-select v-model="query.roleId">
</template> <el-option label="全部" value=""></el-option>
</el-table-column> <el-option
<el-table-column label="职务" align="center" prop="position" /> v-for="(data, key) in roleList"
<el-table-column label="手机" align="center" prop="phoneNumber" /> :key="data.roleId"
<el-table-column label="所属角色" align="center" prop="role" width="250"> :label="data.roleName"
<template slot-scope="{ row }" v-if="row.roles"> :value="data.roleId"></el-option>
<show-tag :list="row.roles" keyStr="roleName" /> </el-select>
</template> </el-form-item>
</el-table-column> <el-form-item label>
<el-table-column label="管理范围" align="center" prop="roleDepts" width="150"> <el-button type="primary" @click="getList(1)">查询</el-button>
<template slot-scope="{ row }" v-if="row.rolesDepts"> <el-button @click="resetFn()">重置</el-button>
<show-tag :list="row.rolesDepts" keyStr="roleName" /> </el-form-item>
</template> </el-form>
</el-table-column> <div class="g-card">
<el-table-column label="操作" align="center" fixed="right" width="100" class-name="small-padding fixed-width"> <el-table v-loading="loading" :data="userList" @selection-change="handleSelectionChange">
<template slot-scope="{ row }"> <el-table-column type="selection" width="50" align="center" />
<!-- v-hasPermi="['contacts:organization:view']" --> <el-table-column label="员工姓名" align="center" prop="userName" :show-overflow-tooltip="true" />
<el-button type="text" @click="editRoles(row)" :disabled="setDisabled(row)">修改角色</el-button> <el-table-column label="所属部门" align="center" prop="userDepts" width="150">
</template> <template slot-scope="{ row }" v-if="row.userDepts">
</el-table-column> <show-tag :list="row.userDepts" keyStr="deptName" />
</el-table> </template>
<pagination </el-table-column>
v-show="total > 0" <el-table-column label="职务" align="center" prop="position" />
:total="total" <el-table-column label="手机" align="center" prop="phoneNumber" />
:page.sync="query.pageNum" <el-table-column label="所属角色" align="center" prop="role" width="250">
:limit.sync="query.pageSize" <template slot-scope="{ row }" v-if="row.roles">
@pagination="getList()" /> <show-tag :list="row.roles" keyStr="roleName" />
</el-col> </template>
</el-row> </el-table-column>
<el-table-column label="管理范围" align="center" prop="roleDepts" width="150">
<template slot-scope="{ row }" v-if="row.rolesDepts">
<show-tag :list="row.rolesDepts" keyStr="roleName" />
</template>
</el-table-column>
<el-table-column
label="操作"
align="center"
fixed="right"
width="100"
class-name="small-padding fixed-width">
<template slot-scope="{ row }">
<!-- v-hasPermi="['contacts:organization:view']" -->
<el-button type="text" @click="editRoles(row)" :disabled="setDisabled(row)">修改角色</el-button>
</template>
</el-table-column>
</el-table>
<pagination
v-show="total > 0"
:total="total"
:page.sync="query.pageNum"
:limit.sync="query.pageSize"
@pagination="getList()" />
</div>
</div>
</div>
<el-dialog title="设置角色" :visible.sync="modalStatus" append-to-body width="400px"> <el-dialog title="设置角色" :visible.sync="modalStatus" append-to-body width="400px">
<el-form class="" inline="" label-position="" label-width=""> <el-form class="" inline="" label-position="" label-width="">
......
<template> <template>
<div> <div class="g-left-right">
<div class="g-card"> <div class="left g-card">
<el-row type="flex" justify="space-between"> <div class="title">
<el-col :span="5" class="left pad20"> <div class="title-name">角色列表</div>
<div class="title"> <div class="title-btn" @click="addFn">新建</div>
<div class="title-name">角色列表</div> </div>
<div class="title-btn" @click="addFn">新建</div> <div class="item-list">
<div
class="item"
:class="{ active: activeIndex == key }"
v-for="(role, key) in roles"
:key="role.id"
@click="switchRole(key, role)">
<div class="name">
{{ role.roleName }}
<span style="margin-left: 10px">({{ role.userCount }})</span>
</div> </div>
<div class="item-list"> </div>
<div </div>
class="item" </div>
:class="{ active: activeIndex == key }" <div class="right g-card mt0">
v-for="(role, key) in roles" <div class="title-name">
:key="role.id" {{ currentStatus === 'detail' ? '角色详情' : currentStatus === 'add' ? '新建角色' : '编辑角色' }}
@click="switchRole(key, role)"> </div>
<div class="name"> <div v-if="currentStatus === 'detail'">
{{ role.roleName }} <div style="margin-top: 20px">
<span style="margin-left: 10px">({{ role.userCount }})</span> <el-form ref="codeForm" label-position="right" label-width="80px">
</div> <el-form-item label="角色员工">
</div> <template v-for="(item, index) in roleObj.users">
</div> <el-tag v-if="item.userName" size="medium" :key="index">{{ item.userName }}</el-tag>
</el-col> </template>
<el-col :span="19" class="pad20"> </el-form-item>
<div class="title-name"> <el-form-item label="管理范围">
{{ currentStatus === 'detail' ? '角色详情' : currentStatus === 'add' ? '新建角色' : '编辑角色' }} <template v-if="roleObj.dataScope != 2">
</div> {{ setName() }}
<div v-if="currentStatus === 'detail'"> </template>
<div style="margin-top: 20px">
<el-form ref="codeForm" label-position="right" label-width="80px">
<el-form-item label="角色员工">
<template v-for="(item, index) in roleObj.users">
<el-tag v-if="item.userName" size="medium" :key="index">{{ item.userName }}</el-tag>
</template>
</el-form-item>
<el-form-item label="管理范围">
<template v-if="roleObj.dataScope != 2">
{{ setName() }}
</template>
<template v-for="(item, index) in roleObj.depts"> <template v-for="(item, index) in roleObj.depts">
<el-tag v-if="item.deptName" size="medium" :key="index">{{ item.deptName }}</el-tag> <el-tag v-if="item.deptName" size="medium" :key="index">{{ item.deptName }}</el-tag>
</template> </template>
</el-form-item> </el-form-item>
<el-form-item label="功能权限"> <el-form-item label="功能权限">
<el-tree <el-tree
:data="menuOptions" :data="menuOptions"
show-checkbox show-checkbox
ref="menu" ref="menu"
node-key="id" node-key="id"
disabled disabled
empty-text="加载中,请稍后" empty-text="加载中,请稍后"
:props="defaultProps"></el-tree> :props="defaultProps"></el-tree>
</el-form-item> </el-form-item>
</el-form> </el-form>
</div> </div>
<div class="bottom" v-if="roles[activeIndex]"> <div class="g-footer-sticky bottom" v-if="roles[activeIndex]">
<el-button plain type="danger">删除</el-button> <el-button plain type="danger">删除</el-button>
<el-button type="primary" @click="edtiFn">编辑</el-button> <el-button type="primary" @click="edtiFn">编辑</el-button>
</div> </div>
</div> </div>
<div v-else-if="currentStatus === 'add'"> <div v-else-if="currentStatus === 'add'">
<add-or-edit key="1" :status="currentStatus" @update="updateFn" @cancel="cancel" :list="menuOptions" /> <add-or-edit key="1" :status="currentStatus" @update="updateFn" @cancel="cancel" :list="menuOptions" />
</div> </div>
<div v-else> <div v-else>
<add-or-edit <add-or-edit
key="2" key="2"
:status="currentStatus" :status="currentStatus"
:data="roleObj" :data="roleObj"
@update="updateFn" @update="updateFn"
@cancel="cancel" @cancel="cancel"
:list="menuOptions" /> :list="menuOptions" />
</div> </div>
</el-col>
</el-row>
</div> </div>
</div> </div>
</template> </template>
...@@ -251,11 +247,8 @@ export default { ...@@ -251,11 +247,8 @@ export default {
align-items: center; align-items: center;
} }
.bottom { .bottom {
display: flex;
justify-content: flex-end; justify-content: flex-end;
border-radius: 5px;
padding: 20px; padding: 20px;
background-color: #f5f5f5;
} }
.left { .left {
border-right: 1px solid #f1f1f1; border-right: 1px solid #f1f1f1;
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!