用户权限功能编写
This commit is contained in:
parent
48987f9324
commit
6594e53ec5
|
@ -6,7 +6,7 @@
|
||||||
>
|
>
|
||||||
<template v-for="(item, index) in topMenus">
|
<template v-for="(item, index) in topMenus">
|
||||||
<el-menu-item :style="{'--theme': theme}" :index="item.path" :key="index" v-if="index < visibleNumber"
|
<el-menu-item :style="{'--theme': theme}" :index="item.path" :key="index" v-if="index < visibleNumber"
|
||||||
><svg-icon :icon-class="item.meta.icon" />
|
><svg-icon :icon-class="item.meta.menuIcon" />
|
||||||
{{ item.meta.title }}</el-menu-item
|
{{ item.meta.title }}</el-menu-item
|
||||||
>
|
>
|
||||||
</template>
|
</template>
|
||||||
|
@ -19,9 +19,8 @@
|
||||||
:index="item.path"
|
:index="item.path"
|
||||||
:key="index"
|
:key="index"
|
||||||
v-if="index >= visibleNumber"
|
v-if="index >= visibleNumber"
|
||||||
><svg-icon :icon-class="item.meta.icon" />
|
><svg-icon :icon-class="item.meta.menuIcon" />
|
||||||
{{ item.meta.title }}</el-menu-item
|
{{ item.meta.title }}</el-menu-item>
|
||||||
>
|
|
||||||
</template>
|
</template>
|
||||||
</el-submenu>
|
</el-submenu>
|
||||||
</el-menu>
|
</el-menu>
|
||||||
|
|
|
@ -14,7 +14,7 @@
|
||||||
<!-- <router-link :to="item.path" class="indexRouter" :style="{-->
|
<!-- <router-link :to="item.path" class="indexRouter" :style="{-->
|
||||||
<!-- color: activePage == index ? '#1478f6' : ''}" v-for="(item,index) in lagerScreenMenuData" :key="index">-->
|
<!-- color: activePage == index ? '#1478f6' : ''}" v-for="(item,index) in lagerScreenMenuData" :key="index">-->
|
||||||
<!-- <div @click="handlerClick(item,index)" flex>-->
|
<!-- <div @click="handlerClick(item,index)" flex>-->
|
||||||
<!-- <i :class="item.meta.icon"></i>-->
|
<!-- <i :class="item.meta.menuIcon"></i>-->
|
||||||
<!-- <p>{{item.meta.title}}</p>-->
|
<!-- <p>{{item.meta.title}}</p>-->
|
||||||
<!-- </div>-->
|
<!-- </div>-->
|
||||||
<!-- </router-link>-->
|
<!-- </router-link>-->
|
||||||
|
|
|
@ -5,25 +5,25 @@
|
||||||
<app-link v-if="onlyOneChild.meta" :to="resolvePath(onlyOneChild.path, onlyOneChild.query)">
|
<app-link v-if="onlyOneChild.meta" :to="resolvePath(onlyOneChild.path, onlyOneChild.query)">
|
||||||
<el-menu-item :index="resolvePath(onlyOneChild.path)" :class="{'submenu-title-noDropdown':!isNest}">
|
<el-menu-item :index="resolvePath(onlyOneChild.path)" :class="{'submenu-title-noDropdown':!isNest}">
|
||||||
<!-- <template slot="title"> -->
|
<!-- <template slot="title"> -->
|
||||||
<!-- <i class="iconfont" :class="item.meta.icon" > </i> -->
|
<!-- <i class="iconfont" :class="item.meta.menuIcon" > </i> -->
|
||||||
<!-- <span v-show="sidebarOpened && !isNest">{{onlyOneChild.meta.title}}</span> -->
|
<!-- <span v-show="sidebarOpened && !isNest">{{onlyOneChild.meta.title}}</span> -->
|
||||||
<!-- <span v-show="isNest">{{onlyOneChild.meta.title}}</span> -->
|
<!-- <span v-show="isNest">{{onlyOneChild.meta.title}}</span> -->
|
||||||
<!-- <div v-if="sidebarOpened">
|
<!-- <div v-if="sidebarOpened">
|
||||||
<i class="iconfont" :class="item.meta.icon" > </i>
|
<i class="iconfont" :class="item.meta.menuIcon" > </i>
|
||||||
<span>{{isNest}}</span>
|
<span>{{isNest}}</span>
|
||||||
</div> -->
|
</div> -->
|
||||||
|
|
||||||
<div v-if="isNest === false" :style="{'text-align':sidebarOpened?'left':'center'}">
|
<div v-if="isNest === false" :style="{'text-align':sidebarOpened?'left':'center'}">
|
||||||
<i class="iconfont" :class="item.meta.icon"> </i>
|
<i class="iconfont" :class="item.meta.menuIcon"> </i>
|
||||||
<span v-show="sidebarOpened" style="margin-left: 16px;">{{onlyOneChild.meta.title}}</span>
|
<span v-show="sidebarOpened" style="margin-left: 16px;">{{onlyOneChild.meta.title}}</span>
|
||||||
</div>
|
</div>
|
||||||
<div v-else>
|
<div v-else>
|
||||||
<i class="iconfont" :class="item.meta.icon"> </i>
|
<i class="iconfont" :class="item.meta.menuIcon"> </i>
|
||||||
<span>{{onlyOneChild.meta.title}}</span>
|
<span>{{onlyOneChild.meta.title}}</span>
|
||||||
</div>
|
</div>
|
||||||
<template slot="title">
|
<template slot="title">
|
||||||
<div v-if="isNest === false">
|
<div v-if="isNest === false">
|
||||||
<i class="iconfont" :class="item.meta.icon"> </i>
|
<i class="iconfont" :class="item.meta.menuIcon"> </i>
|
||||||
<span style="margin-left: 16px;">{{item.meta.title}}</span>
|
<span style="margin-left: 16px;">{{item.meta.title}}</span>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
@ -32,7 +32,7 @@
|
||||||
</template>
|
</template>
|
||||||
<el-submenu v-else ref="subMenu" :index="resolvePath(item.path)" popper-append-to-body>
|
<el-submenu v-else ref="subMenu" :index="resolvePath(item.path)" popper-append-to-body>
|
||||||
<template slot="title">
|
<template slot="title">
|
||||||
<i class="iconfont" :class="item.meta.icon" v-if="item.meta.icon"> </i>
|
<i class="iconfont" :class="item.meta.menuIcon" v-if="item.meta.menuIcon"> </i>
|
||||||
<span v-show="sidebarOpened" :style="{'margin-left':(sidebarOpened && isNest == false) ?'16px':''}"
|
<span v-show="sidebarOpened" :style="{'margin-left':(sidebarOpened && isNest == false) ?'16px':''}"
|
||||||
class="itemSidebar">{{item.meta.title}}</span>
|
class="itemSidebar">{{item.meta.title}}</span>
|
||||||
</template>
|
</template>
|
||||||
|
|
|
@ -3,7 +3,7 @@
|
||||||
<div class="newsSider bitTitle lastList" v-if="!isNest && hasOneShowingChild(item.children, item)"
|
<div class="newsSider bitTitle lastList" v-if="!isNest && hasOneShowingChild(item.children, item)"
|
||||||
style="width:100px;" @click="goRoute(item)">
|
style="width:100px;" @click="goRoute(item)">
|
||||||
<div class="concise">
|
<div class="concise">
|
||||||
<i class=" concise-icon-item iconfont" :class="item.meta.icon"></i>
|
<i class=" concise-icon-item iconfont" :class="item.meta.menuIcon"></i>
|
||||||
<i :class="item.collect == true ? 'el-icon-star-on' : 'el-icon-star-off'" class="star concise-icon"
|
<i :class="item.collect == true ? 'el-icon-star-on' : 'el-icon-star-off'" class="star concise-icon"
|
||||||
@click.stop="handleClickWithDelay(item)"></i>
|
@click.stop="handleClickWithDelay(item)"></i>
|
||||||
</div>
|
</div>
|
||||||
|
@ -20,7 +20,7 @@
|
||||||
<div v-for="(route, index) in getPriceList(item.children)" class="lastList" :key="index"
|
<div v-for="(route, index) in getPriceList(item.children)" class="lastList" :key="index"
|
||||||
@click="goRoute(item, route)" style="width:100px">
|
@click="goRoute(item, route)" style="width:100px">
|
||||||
<div class="concise">
|
<div class="concise">
|
||||||
<i class=" concise-icon-item iconfont" :class="route.meta.icon">
|
<i class=" concise-icon-item iconfont" :class="route.meta.menuIcon">
|
||||||
</i>
|
</i>
|
||||||
<i :class="route.collect == true ? 'el-icon-star-on' : 'el-icon-star-off'" class="star concise-icon"
|
<i :class="route.collect == true ? 'el-icon-star-on' : 'el-icon-star-off'" class="star concise-icon"
|
||||||
@click.stop="handleClickWithDelay(route)"></i>
|
@click.stop="handleClickWithDelay(route)"></i>
|
||||||
|
@ -93,7 +93,7 @@ export default {
|
||||||
this.$emit("openChildren", item);
|
this.$emit("openChildren", item);
|
||||||
},
|
},
|
||||||
async collectClick(val) {
|
async collectClick(val) {
|
||||||
// console.log(val.meta.icon);
|
// console.log(val.meta.menuIcon);
|
||||||
let params = {
|
let params = {
|
||||||
mcId: val.id,
|
mcId: val.id,
|
||||||
type: "",
|
type: "",
|
||||||
|
|
|
@ -30,7 +30,7 @@
|
||||||
@mouseenter="openChildren(item, index)"
|
@mouseenter="openChildren(item, index)"
|
||||||
@click="goRouter(item, index)"
|
@click="goRouter(item, index)"
|
||||||
>
|
>
|
||||||
<i class="newsSider-icon iconfont" :class="item.meta.icon"> </i>
|
<i class="newsSider-icon iconfont" :class="item.meta.menuIcon"> </i>
|
||||||
<p class="newsSider-title" :class="{ active: index === activeIndex }">
|
<p class="newsSider-title" :class="{ active: index === activeIndex }">
|
||||||
{{ item.meta.title }}
|
{{ item.meta.title }}
|
||||||
</p>
|
</p>
|
||||||
|
|
|
@ -29,8 +29,8 @@
|
||||||
class="newsSider"
|
class="newsSider"
|
||||||
@mouseenter="openChildren(item, index)"
|
@mouseenter="openChildren(item, index)"
|
||||||
>
|
>
|
||||||
<i class="newsSider-icon iconfont" :class="item.meta.icon ? item.meta.icon :'el-icon-office-building'"> </i>
|
<i class="newsSider-icon iconfont" :class="item.meta.menuIcon ? item.meta.menuIcon :'el-icon-office-building'"> </i>
|
||||||
<!-- <i class="newsSider-icon iconfont" :class="item.meta.icon"> </i> -->
|
<!-- <i class="newsSider-icon iconfont" :class="item.meta.menuIcon"> </i> -->
|
||||||
<p class="newsSider-title" :class="{ active: index === activeIndex }">
|
<p class="newsSider-title" :class="{ active: index === activeIndex }">
|
||||||
{{ item.meta.title }}
|
{{ item.meta.title }}
|
||||||
</p>
|
</p>
|
||||||
|
|
|
@ -5,25 +5,25 @@
|
||||||
<app-link v-if="onlyOneChild.meta" :to="resolvePath(onlyOneChild.path, onlyOneChild.query)">
|
<app-link v-if="onlyOneChild.meta" :to="resolvePath(onlyOneChild.path, onlyOneChild.query)">
|
||||||
<el-menu-item :index="resolvePath(onlyOneChild.path)" :class="{'submenu-title-noDropdown':!isNest}">
|
<el-menu-item :index="resolvePath(onlyOneChild.path)" :class="{'submenu-title-noDropdown':!isNest}">
|
||||||
<!-- <template slot="title"> -->
|
<!-- <template slot="title"> -->
|
||||||
<!-- <i class="iconfont" :class="item.meta.icon" > </i> -->
|
<!-- <i class="iconfont" :class="item.meta.menuIcon" > </i> -->
|
||||||
<!-- <span v-show="sidebarOpened && !isNest">{{onlyOneChild.meta.title}}</span> -->
|
<!-- <span v-show="sidebarOpened && !isNest">{{onlyOneChild.meta.title}}</span> -->
|
||||||
<!-- <span v-show="isNest">{{onlyOneChild.meta.title}}</span> -->
|
<!-- <span v-show="isNest">{{onlyOneChild.meta.title}}</span> -->
|
||||||
<!-- <div v-if="sidebarOpened">
|
<!-- <div v-if="sidebarOpened">
|
||||||
<i class="iconfont" :class="item.meta.icon" > </i>
|
<i class="iconfont" :class="item.meta.menuIcon" > </i>
|
||||||
<span>{{isNest}}</span>
|
<span>{{isNest}}</span>
|
||||||
</div> -->
|
</div> -->
|
||||||
|
|
||||||
<div v-if="isNest === false" :style="{'text-align':sidebarOpened?'left':'center'}">
|
<div v-if="isNest === false" :style="{'text-align':sidebarOpened?'left':'center'}">
|
||||||
<i class="iconfont" :class="item.meta.icon"> </i>
|
<i class="iconfont" :class="item.meta.menuIcon"> </i>
|
||||||
<span v-show="sidebarOpened" style="margin-left: 16px;">{{onlyOneChild.meta.title}}</span>
|
<span v-show="sidebarOpened" style="margin-left: 16px;">{{onlyOneChild.meta.title}}</span>
|
||||||
</div>
|
</div>
|
||||||
<div v-else>
|
<div v-else>
|
||||||
<i class="iconfont" :class="item.meta.icon"> </i>
|
<i class="iconfont" :class="item.meta.menuIcon"> </i>
|
||||||
<span>{{onlyOneChild.meta.title}}</span>
|
<span>{{onlyOneChild.meta.title}}</span>
|
||||||
</div>
|
</div>
|
||||||
<template slot="title">
|
<template slot="title">
|
||||||
<div v-if="isNest === false">
|
<div v-if="isNest === false">
|
||||||
<i class="iconfont" :class="item.meta.icon"> </i>
|
<i class="iconfont" :class="item.meta.menuIcon"> </i>
|
||||||
<span style="margin-left: 16px;">{{item.meta.title}}</span>
|
<span style="margin-left: 16px;">{{item.meta.title}}</span>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
@ -32,7 +32,7 @@
|
||||||
</template>
|
</template>
|
||||||
<el-submenu v-else ref="subMenu" :index="resolvePath(item.path)" popper-append-to-body>
|
<el-submenu v-else ref="subMenu" :index="resolvePath(item.path)" popper-append-to-body>
|
||||||
<template slot="title">
|
<template slot="title">
|
||||||
<i class="iconfont" :class="item.meta.icon" v-if="item.meta.icon"> </i>
|
<i class="iconfont" :class="item.meta.menuIcon" v-if="item.meta.menuIcon"> </i>
|
||||||
<span v-show="sidebarOpened" :style="{'margin-left':(sidebarOpened && isNest == false) ?'16px':''}"
|
<span v-show="sidebarOpened" :style="{'margin-left':(sidebarOpened && isNest == false) ?'16px':''}"
|
||||||
class="itemSidebar">{{item.meta.title}}</span>
|
class="itemSidebar">{{item.meta.title}}</span>
|
||||||
</template>
|
</template>
|
||||||
|
|
|
@ -3,7 +3,7 @@
|
||||||
<div class="newsSider bitTitle lastList" v-if="!isNest && hasOneShowingChild(item.children, item)"
|
<div class="newsSider bitTitle lastList" v-if="!isNest && hasOneShowingChild(item.children, item)"
|
||||||
style="width:100px;" @click="goRoute(item)">
|
style="width:100px;" @click="goRoute(item)">
|
||||||
<div class="concise">
|
<div class="concise">
|
||||||
<i class=" concise-icon-item iconfont" :class="item.meta.icon"></i>
|
<i class=" concise-icon-item iconfont" :class="item.meta.menuIcon"></i>
|
||||||
<i :class="item.collect == true ? 'el-icon-star-on' : 'el-icon-star-off'" class="star concise-icon"
|
<i :class="item.collect == true ? 'el-icon-star-on' : 'el-icon-star-off'" class="star concise-icon"
|
||||||
@click.stop="handleClickWithDelay(item)"></i>
|
@click.stop="handleClickWithDelay(item)"></i>
|
||||||
</div>
|
</div>
|
||||||
|
@ -20,7 +20,7 @@
|
||||||
<div v-for="(route, index) in getPriceList(item.children)" class="lastList" :key="index"
|
<div v-for="(route, index) in getPriceList(item.children)" class="lastList" :key="index"
|
||||||
@click="goRoute(item, route)" style="width:100px">
|
@click="goRoute(item, route)" style="width:100px">
|
||||||
<div class="concise">
|
<div class="concise">
|
||||||
<i class=" concise-icon-item iconfont" :class="route.meta.icon">
|
<i class=" concise-icon-item iconfont" :class="route.meta.menuIcon">
|
||||||
</i>
|
</i>
|
||||||
<i :class="route.collect == true ? 'el-icon-star-on' : 'el-icon-star-off'" class="star concise-icon"
|
<i :class="route.collect == true ? 'el-icon-star-on' : 'el-icon-star-off'" class="star concise-icon"
|
||||||
@click.stop="handleClickWithDelay(route)"></i>
|
@click.stop="handleClickWithDelay(route)"></i>
|
||||||
|
@ -93,7 +93,7 @@ export default {
|
||||||
this.$emit("openChildren", item);
|
this.$emit("openChildren", item);
|
||||||
},
|
},
|
||||||
async collectClick(val) {
|
async collectClick(val) {
|
||||||
// console.log(val.meta.icon);
|
// console.log(val.meta.menuIcon);
|
||||||
let params = {
|
let params = {
|
||||||
mcId: val.id,
|
mcId: val.id,
|
||||||
type: "",
|
type: "",
|
||||||
|
|
|
@ -14,7 +14,7 @@
|
||||||
<div v-if="!item.hidden && item.meta" flex="cross:center" :class="{ active: index === activeIndex }" :style="{
|
<div v-if="!item.hidden && item.meta" flex="cross:center" :class="{ active: index === activeIndex }" :style="{
|
||||||
color: settings.sideTheme === 'theme-dark' ? '#fff' : '#4c4c4c',
|
color: settings.sideTheme === 'theme-dark' ? '#fff' : '#4c4c4c',
|
||||||
}" class="newsSider" @mouseenter="openChildren(item, index)">
|
}" class="newsSider" @mouseenter="openChildren(item, index)">
|
||||||
<i class="newsSider-icon iconfont" :class="item.meta.icon"> </i>
|
<i class="newsSider-icon iconfont" :class="item.meta.menuIcon"> </i>
|
||||||
<p class="newsSider-title" :class="{ active: index === activeIndex }">
|
<p class="newsSider-title" :class="{ active: index === activeIndex }">
|
||||||
{{ item.meta.title }}
|
{{ item.meta.title }}
|
||||||
</p>
|
</p>
|
||||||
|
|
|
@ -14,7 +14,7 @@
|
||||||
<div v-if="!item.hidden && item.meta" flex="cross:center" :class="{ active: index === activeIndex }" :style="{
|
<div v-if="!item.hidden && item.meta" flex="cross:center" :class="{ active: index === activeIndex }" :style="{
|
||||||
color: settings.sideTheme === 'theme-dark' ? '#fff' : '#4c4c4c',
|
color: settings.sideTheme === 'theme-dark' ? '#fff' : '#4c4c4c',
|
||||||
}" class="newsSider" @mouseenter="openChildren(item, index)">
|
}" class="newsSider" @mouseenter="openChildren(item, index)">
|
||||||
<i class="newsSider-icon iconfont" :class="item.meta.icon"> </i>
|
<i class="newsSider-icon iconfont" :class="item.meta.menuIcon"> </i>
|
||||||
<p class="newsSider-title" :class="{ active: index === activeIndex }">
|
<p class="newsSider-title" :class="{ active: index === activeIndex }">
|
||||||
{{ item.meta.title }}
|
{{ item.meta.title }}
|
||||||
</p>
|
</p>
|
||||||
|
|
|
@ -1,157 +1,174 @@
|
||||||
// 表头配置
|
// 表头配置
|
||||||
const tableColumnJson = [
|
const tableColumnJson = [
|
||||||
{
|
{
|
||||||
label: '按钮编号',
|
label: '按钮编号',
|
||||||
prop: 'code',
|
prop: 'code',
|
||||||
tooltip: true,
|
tooltip: true,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
label: '按钮中文编码',
|
label: '按钮中文编码',
|
||||||
prop: 'nameEN',
|
prop: 'nameCh',
|
||||||
tooltip: true,
|
tooltip: true,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
label: '按钮英文编码',
|
label: '按钮英文编码',
|
||||||
prop: 'nameEN',
|
prop: 'nameEn',
|
||||||
tooltip: true,
|
tooltip: true,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
label: '按钮格式',
|
label: '按钮格式',
|
||||||
prop: 'style',
|
prop: 'styles',
|
||||||
tooltip: true,
|
tooltip: true,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
label: '按钮图标',
|
label: '按钮图标',
|
||||||
prop: 'icoName',
|
prop: 'iconName',
|
||||||
tooltip: true
|
tooltip: true
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
label: '按钮方法',
|
label: '按钮方法',
|
||||||
prop: 'btnFunction',
|
prop: 'btnFunction',
|
||||||
tooltip: true
|
tooltip: true
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
label: '按钮顺序',
|
label: '按钮顺序',
|
||||||
prop: 'sort',
|
prop: 'sorts',
|
||||||
tooltip: true,
|
tooltip: true,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
label: '备注',
|
label: '备注',
|
||||||
prop: 'remark',
|
prop: 'remark',
|
||||||
tooltip: true
|
tooltip: true
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
label: '创建时间',
|
label: '创建时间',
|
||||||
prop: 'createTime',
|
prop: 'createTime',
|
||||||
tooltip: true
|
tooltip: true
|
||||||
},
|
},
|
||||||
// {
|
// {
|
||||||
// label: '删除标识',
|
// label: '删除标识',
|
||||||
// prop: 'IsDelete',
|
// prop: 'IsDelete',
|
||||||
// tooltip: true
|
// tooltip: true
|
||||||
// },
|
// },
|
||||||
|
|
||||||
]
|
]
|
||||||
// 详情页面结构JSON
|
// 详情页面结构JSON
|
||||||
const formRow = [{
|
const formRow = [
|
||||||
elCol: [{
|
{
|
||||||
label: '按钮编号',
|
elCol: [
|
||||||
prop: 'Code',
|
{
|
||||||
tag: 'elInput',
|
label: "按钮编号",
|
||||||
},
|
prop: "code",
|
||||||
{
|
tag: "elInput",
|
||||||
label: '中文名称',
|
},
|
||||||
prop: 'nameCN',
|
{
|
||||||
tag: 'elInput',
|
label: "中文名称",
|
||||||
},
|
prop: "nameCh",
|
||||||
]
|
tag: "elInput",
|
||||||
},
|
},
|
||||||
{
|
],
|
||||||
elCol: [{
|
},
|
||||||
label: '英文名称',
|
{
|
||||||
prop: 'nameEN',
|
elCol: [
|
||||||
tag: 'elInput'
|
{
|
||||||
},
|
label: "英文名称",
|
||||||
{
|
prop: "nameEn",
|
||||||
label: '调用方法',
|
tag: "elInput",
|
||||||
prop: 'btnFunction',
|
},
|
||||||
tag: 'elInput',
|
{
|
||||||
},
|
label: "调用方法",
|
||||||
]
|
prop: "btnFunction",
|
||||||
},
|
tag: "elInput",
|
||||||
{
|
},
|
||||||
elCol: [{
|
],
|
||||||
label: '样式',
|
},
|
||||||
prop: 'style',
|
{
|
||||||
tag: 'elInput',
|
elCol: [
|
||||||
},
|
{
|
||||||
{
|
label: "样式",
|
||||||
label: '图标',
|
prop: "styles",
|
||||||
prop: 'icoName',
|
tag: "elInput",
|
||||||
tag: 'elInput',
|
},
|
||||||
},
|
{
|
||||||
]
|
label: "图标",
|
||||||
},
|
prop: "iconName",
|
||||||
{
|
tag: "elInput",
|
||||||
elCol: [{
|
},
|
||||||
label: '顺序',
|
],
|
||||||
prop: 'sort',
|
},
|
||||||
tag: 'elInput',
|
{
|
||||||
}
|
elCol: [
|
||||||
]
|
{
|
||||||
},
|
label: "顺序",
|
||||||
{
|
prop: "sorts",
|
||||||
elCol: [{
|
tag: "elInput",
|
||||||
label: '备注',
|
},
|
||||||
prop: 'remark',
|
],
|
||||||
tag: 'elInput',
|
},
|
||||||
span:24,
|
// {
|
||||||
type:'textarea'
|
// elCol: [
|
||||||
}
|
// {
|
||||||
]
|
// label: "接口名称",
|
||||||
},
|
// prop: "actionName",
|
||||||
]
|
// tag: "elInput",
|
||||||
const roleOptions = [{
|
// span: 24,
|
||||||
label: '超级管理员',
|
// type: "textarea",
|
||||||
value: 1
|
// },
|
||||||
},
|
// ],
|
||||||
{
|
// },
|
||||||
label: '业务员',
|
{
|
||||||
value: 2
|
elCol: [
|
||||||
},
|
{
|
||||||
{
|
label: "备注",
|
||||||
label: '管理员',
|
prop: "remark",
|
||||||
value: 3
|
tag: "elInput",
|
||||||
},
|
span: 24,
|
||||||
{
|
type: "textarea",
|
||||||
label: '开发成员',
|
},
|
||||||
value: 4
|
],
|
||||||
},
|
},
|
||||||
{
|
];
|
||||||
label: '项目经理',
|
const roleOptions = [
|
||||||
value: 5
|
{
|
||||||
},
|
label: "超级管理员",
|
||||||
{
|
value: 1,
|
||||||
label: '实施人员',
|
},
|
||||||
value: 6
|
{
|
||||||
},
|
label: "业务员",
|
||||||
{
|
value: 2,
|
||||||
label: '财务',
|
},
|
||||||
value: 7
|
{
|
||||||
},
|
label: "管理员",
|
||||||
{
|
value: 3,
|
||||||
label: '总经理',
|
},
|
||||||
value: 8
|
{
|
||||||
},
|
label: "开发成员",
|
||||||
{
|
value: 4,
|
||||||
label: '副总',
|
},
|
||||||
value: 9
|
{
|
||||||
}
|
label: "项目经理",
|
||||||
]
|
value: 5,
|
||||||
const rules = {
|
},
|
||||||
};
|
{
|
||||||
|
label: "实施人员",
|
||||||
|
value: 6,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
label: "财务",
|
||||||
|
value: 7,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
label: "总经理",
|
||||||
|
value: 8,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
label: "副总",
|
||||||
|
value: 9,
|
||||||
|
},
|
||||||
|
];
|
||||||
|
const rules = {};
|
||||||
export default {
|
export default {
|
||||||
formRow,
|
formRow,
|
||||||
rules,
|
rules,
|
||||||
tableColumnJson
|
tableColumnJson,
|
||||||
}
|
};
|
||||||
|
|
|
@ -1,263 +1,277 @@
|
||||||
<template>
|
<template>
|
||||||
<div>
|
<div>
|
||||||
<div flex style="height: 100%;">
|
<div flex style="height: 100%;">
|
||||||
<base-layout title="菜单树" style="width:260px;" :bottonShow="false" :isPage="false" :mainColor="mainColor"
|
<base-layout title="菜单树" style="width:260px;" :bottonShow="false" :isPage="false" :mainColor="mainColor"
|
||||||
ref="treeLayout" :operateButtonSwitch="false">
|
ref="treeLayout" :operateButtonSwitch="false"
|
||||||
<div slot="main">
|
>
|
||||||
<base-tree ref="baseTree" @handleNodeClick="handleNodeClick" :menuData="menuData"></base-tree>
|
<div slot="main">
|
||||||
</div>
|
<base-tree ref="baseTree" @handleNodeClick="handleNodeClick" :menuData="menuData"></base-tree>
|
||||||
</base-layout>
|
</div>
|
||||||
<div style="flex:1;">
|
</base-layout>
|
||||||
<!-- <div style="">
|
<div style="flex:1;">
|
||||||
<p>标准按钮</p>
|
<!-- <div style="">
|
||||||
<div flex-wrap="cross:centet;height: 100px;overflow: auto;">
|
<p>标准按钮</p>
|
||||||
<el-button v-for="(item,index) in standardList" :type="item.type?item.type:'primary'"
|
<div flex-wrap="cross:centet;height: 100px;overflow: auto;">
|
||||||
size="small" style="margin-left: 5px;margin-bottom: 10px;" @click="funNewClick(item)"
|
<el-button v-for="(item,index) in standardList" :type="item.type?item.type:'primary'"
|
||||||
:key="index">
|
size="small" style="margin-left: 5px;margin-bottom: 10px;" @click="funNewClick(item)"
|
||||||
{{item.menuName}}
|
:key="index">
|
||||||
</el-button>
|
{{item.menuName}}
|
||||||
</div>
|
</el-button>
|
||||||
</div> -->
|
</div>
|
||||||
<base-layout title="按钮权限" ref="buttonLayout" :isPage="true" @onFuncBtn="getFuncBtn"
|
</div> -->
|
||||||
@pageChange="pageChange">
|
<base-layout title="按钮权限" ref="buttonLayout" :isPage="true" @onFuncBtn="getFuncBtn"
|
||||||
<div slot="main" slot-scope="{ tableHeight }" style="height: 100%;">
|
@pageChange="pageChange"
|
||||||
<base-table ref="customtable" :border="true" :showIndex="false" :tabLoading.sync="tabLoading"
|
>
|
||||||
:tableHeight="tableHeight" :tableData="tableData" @radioChange="radioChange" :slotrow="true"
|
<div slot="main" slot-scope="{ tableHeight }" style="height: 100%;">
|
||||||
:tableColumn="tableColumn">
|
<base-table ref="customtable" :border="true" :showIndex="false" :tabLoading.sync="tabLoading"
|
||||||
</base-table>
|
:tableHeight="tableHeight" :tableData="tableData" @radioChange="radioChange" :slotrow="true"
|
||||||
</div>
|
:tableColumn="tableColumn"
|
||||||
</base-layout>
|
>
|
||||||
</div>
|
</base-table>
|
||||||
</div>
|
</div>
|
||||||
|
</base-layout>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
<!-- 按钮权限弹窗 -->
|
<!-- 按钮权限弹窗 -->
|
||||||
<base-dialog :closeEscape="true" :showClose="true" :closeModal="false" :dialogVisible.sync="settingsDialog"
|
<base-dialog :closeEscape="true" :showClose="true" :closeModal="false" :dialogVisible.sync="settingsDialog"
|
||||||
class="userDialog" title="按钮权限" width="700px" top="10vh">
|
class="userDialog" title="按钮权限" width="700px" top="10vh"
|
||||||
<base-form ref="customForm" :formRow="formRow" :isFunBtn="isFunBtn" :formdata="formdata" @onSubmit="getSubmit">
|
>
|
||||||
</base-form>
|
<base-form ref="customForm" :formRow="formRow" :isFunBtn="isFunBtn" :formdata="formdata" @onSubmit="getSubmit">
|
||||||
</base-dialog>
|
</base-form>
|
||||||
</div>
|
</base-dialog>
|
||||||
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import baseTable from "@/components/base/baseTable";
|
import baseTable from '@/components/base/baseTable'
|
||||||
import baseLayout from "@/components/base/baseLayout";
|
import baseLayout from '@/components/base/baseLayout'
|
||||||
import baseDialog from "@/components/base/BaseNewDialog/index.vue";
|
import baseDialog from '@/components/base/BaseNewDialog/index.vue'
|
||||||
import baseTree from "@/components/base/BaseMenuTree/index.vue";
|
import baseTree from '@/components/base/BaseMenuTree/index.vue'
|
||||||
import baseForm from "@/components/base/baseNewForm/index.vue";
|
import baseForm from '@/components/base/baseNewForm/index.vue'
|
||||||
import configData from "./configData";
|
import configData from './configData'
|
||||||
import {
|
import {
|
||||||
GetMenuTree,
|
GetMenuTree
|
||||||
} from '@/api/apis/menuManage'
|
} from '@/api/apis/menuManage'
|
||||||
import {
|
import {
|
||||||
buttonGetMenBillList,
|
buttonGetMenBillList,
|
||||||
buttonGetBillList,
|
buttonGetBillList,
|
||||||
buttonSaveData,
|
buttonSaveData,
|
||||||
buttonDelData
|
buttonDelData, buttonGetBillData
|
||||||
} from '@/api/apis/buttonList'
|
} from '@/api/apis/buttonList'
|
||||||
|
import { authApi } from '@/api/apis/auth'
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: "review",
|
name: 'review',
|
||||||
components: {
|
components: {
|
||||||
baseLayout,
|
baseLayout,
|
||||||
baseTable,
|
baseTable,
|
||||||
baseDialog,
|
baseDialog,
|
||||||
baseTree,
|
baseTree,
|
||||||
baseForm
|
baseForm
|
||||||
},
|
},
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
radioIndex: false,
|
radioIndex: false,
|
||||||
radioID: false,
|
radioID: false,
|
||||||
mainColor: '#f8f8f8',
|
mainColor: '#f8f8f8',
|
||||||
tabLoading: false,
|
tabLoading: false,
|
||||||
standardList: [{
|
standardList: [{
|
||||||
icon: 'el-icon-search',
|
icon: 'el-icon-search',
|
||||||
menuName: '新增'
|
menuName: '新增'
|
||||||
},],
|
}],
|
||||||
tableData: [],
|
tableData: [],
|
||||||
settingsDialog: false,
|
settingsDialog: false,
|
||||||
settingCenter: "left",
|
settingCenter: 'left',
|
||||||
isFunBtn: true,
|
isFunBtn: true,
|
||||||
formRow: configData.formRow,
|
formRow: configData.formRow,
|
||||||
// buttonList: [{
|
// buttonList: [{
|
||||||
// 'menuName': '新增',
|
// 'menuName': '新增',
|
||||||
// icon: 'el-icon-plus'
|
// icon: 'el-icon-plus'
|
||||||
// },
|
// },
|
||||||
// {
|
// {
|
||||||
// 'menuName': '编辑',
|
// 'menuName': '编辑',
|
||||||
// icon: 'el-icon-edit'
|
// icon: 'el-icon-edit'
|
||||||
// },
|
// },
|
||||||
// {
|
// {
|
||||||
// 'menuName': '删除',
|
// 'menuName': '删除',
|
||||||
// icon: 'el-icon-delete',
|
// icon: 'el-icon-delete',
|
||||||
// type: 'danger'
|
// type: 'danger'
|
||||||
// },
|
// },
|
||||||
// ],
|
// ],
|
||||||
btnEvenName: '',
|
btnEvenName: '',
|
||||||
menuData: [],
|
menuData: [],
|
||||||
formdata: {},
|
formdata: {},
|
||||||
pageModel: {
|
pageModel: {
|
||||||
limit: 20,
|
pageSize: 20,
|
||||||
menuId: '',
|
menuId: '',
|
||||||
page: 1,
|
pageNum: 1
|
||||||
Sequence: "",
|
}
|
||||||
SequenceName: ""
|
}
|
||||||
}
|
},
|
||||||
}
|
computed: {
|
||||||
},
|
// 表头配置
|
||||||
computed: {
|
tableColumn() {
|
||||||
// 表头配置
|
return configData.tableColumnJson
|
||||||
tableColumn() {
|
}
|
||||||
return configData.tableColumnJson
|
},
|
||||||
},
|
mounted() {
|
||||||
},
|
this.initPage()
|
||||||
mounted() {
|
},
|
||||||
this.initPage()
|
methods: {
|
||||||
},
|
initPage() {
|
||||||
methods: {
|
this.getMenuData()
|
||||||
initPage() {
|
this.getTableData()
|
||||||
this.getMenuData()
|
},
|
||||||
this.getTableData()
|
async getMenuData() {
|
||||||
},
|
let res = await authApi('sysMenuConfigService', '', 'queryEntityTree', '', { state: 0 })
|
||||||
async getMenuData() {
|
if (res.status == 200) {
|
||||||
let res = await GetMenuTree({})
|
let arr = res.attribute[0]
|
||||||
if (res.code == 1) {
|
this.menuData = res.attribute
|
||||||
let arr = JSON.parse(res.data[0])
|
}
|
||||||
this.menuData = JSON.parse(res.data[0])
|
},
|
||||||
}
|
// 树状图点击事件
|
||||||
},
|
handleNodeClick(data) {
|
||||||
// 树状图点击事件
|
this.pageModel.menuId = data.id
|
||||||
handleNodeClick(data) {
|
this.pageModel.pageNum = 1
|
||||||
this.pageModel.menuId = data.id
|
this.RefreshTable()
|
||||||
this.pageModel.page = 1
|
},
|
||||||
this.RefreshTable()
|
// 刷新table
|
||||||
},
|
RefreshTable() {
|
||||||
// 刷新table
|
this.radioID = false
|
||||||
RefreshTable() {
|
this.radioIndex = false
|
||||||
this.radioID = false
|
this.$nextTick(() => {
|
||||||
this.radioIndex = false
|
this.$refs.buttonLayout.pageClear()
|
||||||
this.$nextTick(() => {
|
this.$refs.customtable.clearRadioIndex()
|
||||||
this.$refs.buttonLayout.pageClear()
|
})
|
||||||
this.$refs.customtable.clearRadioIndex()
|
this.getTableData()
|
||||||
})
|
},
|
||||||
this.getTableData()
|
pageChange(model) {
|
||||||
},
|
this.pageModel.pageNum = model.page
|
||||||
pageChange(model) {
|
this.pageModel.pageSize = model.limit
|
||||||
this.pageModel.page = model.page
|
this.getTableData()
|
||||||
this.pageModel.limit = model.limit
|
},
|
||||||
this.getTableData()
|
// 单选
|
||||||
},
|
radioChange(val) {
|
||||||
// 单选
|
this.radioIndex = val.index
|
||||||
radioChange(val) {
|
this.radioID = val.id
|
||||||
this.radioIndex = val.index
|
},
|
||||||
this.radioID = val.id
|
async getTableData() {
|
||||||
},
|
this.tabLoading = true
|
||||||
getTableData() {
|
let params = {
|
||||||
this.tabLoading = true
|
...this.pageModel
|
||||||
let params = {
|
}
|
||||||
...this.pageModel
|
this.tabLoading = true
|
||||||
}
|
this.tableData = []
|
||||||
this.tabLoading = true
|
const res = await authApi('sysButtonConfigService', '', 'queryEntityPage', '', params)
|
||||||
this.tableData = []
|
if (res.status == 200) {
|
||||||
buttonGetBillList(params).then(res => {
|
this.tableData = res.attribute.list
|
||||||
if (res.code == 1) {
|
this.$nextTick(() => {
|
||||||
this.tableData = res.data[1]
|
this.$refs.buttonLayout.setPageTotal(res.attribute.total)
|
||||||
this.$nextTick(() => {
|
})
|
||||||
this.$refs.buttonLayout.setPageTotal(res.data[0])
|
this.tabLoading = false
|
||||||
})
|
}
|
||||||
}
|
},
|
||||||
this.tabLoading = false
|
//详情
|
||||||
})
|
async buttonGetBillData(id) {
|
||||||
this.tabLoading = false
|
const res = await authApi('sysButtonConfigService', '', 'getEntity', '', { id })
|
||||||
},
|
if (res.status == 200) {
|
||||||
btnadd() {
|
this.$nextTick(() => {
|
||||||
console.log("添加")
|
this.$refs.customForm.choiceAssignment(res.attribute)
|
||||||
},
|
})
|
||||||
test() {
|
}
|
||||||
console.log("测试")
|
this.tabLoading = false
|
||||||
},
|
}
|
||||||
|
,
|
||||||
|
btnadd() {
|
||||||
|
console.log('添加')
|
||||||
|
}
|
||||||
|
,
|
||||||
|
test() {
|
||||||
|
console.log('测试')
|
||||||
|
}
|
||||||
|
,
|
||||||
|
|
||||||
// 按钮点击事件
|
// 按钮点击事件
|
||||||
getFuncBtn(btnEven) {
|
getFuncBtn(btnEven) {
|
||||||
this.btnEvenName = btnEven.menuName
|
this.btnEvenName = btnEven.menuName
|
||||||
// let ftnFunction = 'test'
|
// let ftnFunction = 'test'
|
||||||
// this[ftnFunction]()
|
// this[ftnFunction]()
|
||||||
if (btnEven.menuName == '新增') {
|
if (btnEven.menuName == '新增') {
|
||||||
if (!this.pageModel.menuId) {
|
if (!this.pageModel.menuId) {
|
||||||
this.$vmNews('请选择菜单')
|
this.$vmNews('请选择菜单')
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
// this.$refs.customForm.resetForm()
|
// this.$refs.customForm.resetForm()
|
||||||
this.settingsDialog = true
|
this.settingsDialog = true
|
||||||
this.$nextTick(() => {
|
this.$nextTick(() => {
|
||||||
this.$refs.customForm.choiceAssignment({})
|
this.$refs.customForm.choiceAssignment({})
|
||||||
})
|
})
|
||||||
|
|
||||||
}
|
}
|
||||||
if (btnEven.menuName == "编辑") {
|
if (btnEven.menuName == '编辑') {
|
||||||
if (this.radioID === false) {
|
if (this.radioID === false) {
|
||||||
this.$vmNews('请选择一条数据')
|
this.$vmNews('请选择一条数据')
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
this.settingsDialog = true
|
this.settingsDialog = true
|
||||||
this.formdata = this.tableData[this.radioIndex]
|
this.buttonGetBillData(this.radioID)
|
||||||
this.$nextTick(() => {
|
}
|
||||||
this.$refs.customForm.choiceAssignment(this.tableData[this.radioIndex])
|
if (btnEven.menuName == '删除') {
|
||||||
})
|
if (this.radioID === false) {
|
||||||
}
|
this.$vmNews('请选择一条数据')
|
||||||
if (btnEven.menuName == '删除') {
|
return
|
||||||
if (this.radioID === false) {
|
}
|
||||||
this.$vmNews('请选择一条数据')
|
this.$confirm('确定删除吗?', '提示', {
|
||||||
return
|
confirmButtonText: '确定',
|
||||||
}
|
cancelButtonText: '取消',
|
||||||
this.$confirm('确定删除吗?', '提示', {
|
type: 'warning'
|
||||||
confirmButtonText: '确定',
|
}).then(async() => {
|
||||||
cancelButtonText: '取消',
|
let params = {
|
||||||
type: 'warning'
|
id: this.radioID
|
||||||
}).then(() => {
|
}
|
||||||
let params = {
|
const res = await authApi('sysButtonConfigService', '', 'deleteEntity', '', params)
|
||||||
id: this.radioID
|
|
||||||
}
|
|
||||||
buttonDelData(params).then(res => {
|
|
||||||
if (res.code == 1) {
|
|
||||||
this.$vmNews("删除成功", 'success')
|
|
||||||
this.pageModel.page = 1
|
|
||||||
this.RefreshTable()
|
|
||||||
}
|
|
||||||
})
|
|
||||||
}).catch(() => { });
|
|
||||||
|
|
||||||
}
|
if (res.status == 200) {
|
||||||
|
this.$vmNews('删除成功', 'success')
|
||||||
|
this.pageModel.pageNum = 1
|
||||||
|
this.RefreshTable()
|
||||||
|
}
|
||||||
|
}).catch(() => {
|
||||||
|
})
|
||||||
|
|
||||||
},
|
}
|
||||||
|
|
||||||
//表单提交
|
}
|
||||||
getSubmit(data) {
|
,
|
||||||
let params = {
|
|
||||||
...data
|
//表单提交
|
||||||
}
|
async getSubmit(data) {
|
||||||
if (this.btnEvenName == '编辑') {
|
let params = {
|
||||||
delete params.createTime
|
...data
|
||||||
delete params.index
|
}
|
||||||
} else {
|
let res
|
||||||
params.id = 0
|
if (this.btnEvenName == '编辑') {
|
||||||
params.MenuID = this.pageModel.menuId
|
delete params.createTime
|
||||||
}
|
delete params.index
|
||||||
buttonSaveData({
|
res = await authApi('sysButtonConfigService', '', 'updateEntity', '', params)
|
||||||
dataMain: params
|
} else {
|
||||||
}).then(res => {
|
params.menuId = this.pageModel.menuId
|
||||||
if (res.code == 1) {
|
res = await authApi('sysButtonConfigService', '', 'saveEntity', '', params)
|
||||||
this.$vmNews("保存成功", 'success')
|
}
|
||||||
this.pageModel.page = 1
|
|
||||||
this.RefreshTable()
|
if (res.status == 200) {
|
||||||
this.settingsDialog = false
|
this.$vmNews('保存成功', 'success')
|
||||||
}
|
this.pageModel.pageNum = 1
|
||||||
})
|
this.RefreshTable()
|
||||||
},
|
this.settingsDialog = false
|
||||||
funNewClick(item) {
|
}
|
||||||
// this.$emit('onFuncBtn', item);
|
}
|
||||||
},
|
,
|
||||||
},
|
funNewClick(item) {
|
||||||
|
// this.$emit('onFuncBtn', item);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
|
@ -1,156 +1,173 @@
|
||||||
|
|
||||||
// 详情页面结构JSON
|
// 详情页面结构JSON
|
||||||
const formRow = [{
|
const formRow = [{
|
||||||
elCol: [{
|
elCol: [{
|
||||||
label: '父节点',
|
label: '父节点',
|
||||||
prop: 'upIds',
|
prop: 'parentMenuName',
|
||||||
tag: 'elTreeSelect',
|
tag: 'elDialog',
|
||||||
options:[],
|
span:24,
|
||||||
},
|
},
|
||||||
{
|
// {
|
||||||
label: '等级',
|
// label: '菜单顺序',
|
||||||
prop: 'lvl',
|
// prop: 'mc_Sort',
|
||||||
disabled:true,
|
// tag: 'elInput',
|
||||||
tag: 'elInputNumber',
|
// rules:true
|
||||||
},
|
// // type:'number'
|
||||||
]
|
// },
|
||||||
},
|
]
|
||||||
{
|
},
|
||||||
elCol: [{
|
{
|
||||||
label: '菜单名称',
|
elCol: [{
|
||||||
prop: 'title',
|
label: '菜单名称',
|
||||||
tag: 'elInput',
|
prop: 'menuName',
|
||||||
},
|
tag: 'elInput',
|
||||||
{
|
},
|
||||||
label: '菜单英文名称',
|
{
|
||||||
prop: 'name',
|
label: '菜单英文名称',
|
||||||
tag: 'elInput',
|
prop: 'menuEnglishName',
|
||||||
},
|
tag: 'elInput',
|
||||||
]
|
},
|
||||||
},
|
]
|
||||||
{
|
},
|
||||||
elCol: [{
|
{
|
||||||
label: '文件路径',
|
elCol: [{
|
||||||
prop: 'component',
|
label: '菜单路径',
|
||||||
tag: 'elInput',
|
prop: 'route',
|
||||||
},
|
tag: 'elInput',
|
||||||
{
|
},
|
||||||
label: '菜单图标',
|
{
|
||||||
prop: 'icon',
|
label: '菜单图标',
|
||||||
tag: 'elInput',
|
prop: 'menuIcon',
|
||||||
},
|
tag: 'elInput',
|
||||||
]
|
},
|
||||||
},
|
]
|
||||||
{
|
},
|
||||||
elCol: [{
|
{
|
||||||
label: '页面路径',
|
elCol: [{
|
||||||
prop: 'path',
|
label: '页面路径',
|
||||||
tag: 'elInput',
|
prop: 'menuPage',
|
||||||
},
|
tag: 'elInput',
|
||||||
{label: '菜单编码',
|
},
|
||||||
prop: 'code',
|
]
|
||||||
tag: 'elInput',
|
},
|
||||||
},
|
{
|
||||||
]
|
elCol: [
|
||||||
},
|
{
|
||||||
{
|
label: '打开方式',
|
||||||
elCol: [
|
prop: 'showType',
|
||||||
{
|
tag: 'elRadio',
|
||||||
label: '打开方式',
|
options: [{
|
||||||
prop: 'openType',
|
label: '菜单',
|
||||||
tag: 'elRadio',
|
value: "1"
|
||||||
options: [{
|
},{
|
||||||
label: '菜单',
|
label: '弹窗',
|
||||||
value: '1'
|
value: "2"
|
||||||
},{
|
}
|
||||||
label: '弹窗',
|
]
|
||||||
value: '2'
|
},
|
||||||
}
|
{
|
||||||
]
|
label: '显示',
|
||||||
},
|
prop: 'visibles',
|
||||||
{
|
tag: 'elRadio',
|
||||||
label: '菜单顺序',
|
options: [{
|
||||||
prop: 'sorts',
|
label: '是',
|
||||||
tag: 'elInputNumber',
|
value: "1"
|
||||||
},
|
},{
|
||||||
]
|
label: '否',
|
||||||
},
|
value: "0",
|
||||||
{
|
}
|
||||||
elCol: [{
|
]
|
||||||
label: '操作级别',
|
},
|
||||||
prop: 'level',
|
]
|
||||||
tag: 'elRadio',
|
},
|
||||||
options: [{
|
// {
|
||||||
label: 'SuperAdmin',
|
// elCol: [{
|
||||||
value: '1'
|
// label: '功能权限',
|
||||||
},{
|
// prop: 'birthday',
|
||||||
label: 'admin',
|
// tag: 'elRadio',
|
||||||
value: '2'
|
// options: [{
|
||||||
},{
|
// label: '是',
|
||||||
label: 'user',
|
// value: '1'
|
||||||
value: '3'
|
// },{
|
||||||
}
|
// label: '否',
|
||||||
]
|
// value: '2'
|
||||||
},
|
// }
|
||||||
{
|
// ]
|
||||||
label: '显示',
|
// },
|
||||||
prop: 'hidden',
|
// {
|
||||||
tag: 'elRadio',
|
// label: '操作权限',
|
||||||
options: [{
|
// prop: 'telphone',
|
||||||
label: '是',
|
// tag: 'elRadio',
|
||||||
value: 'false'
|
// options: [{
|
||||||
},{
|
// label: '是',
|
||||||
label: '否',
|
// value: '1'
|
||||||
value: 'true'
|
// },{
|
||||||
}
|
// label: '否',
|
||||||
]
|
// value: '2'
|
||||||
},
|
// }
|
||||||
|
// ]
|
||||||
// {
|
// },
|
||||||
// label: '操作权限',
|
// ]
|
||||||
// prop: 'telphone',
|
// },
|
||||||
// tag: 'elRadio',
|
]
|
||||||
// options: [{
|
const roleOptions = [{
|
||||||
// label: '是',
|
label: '超级管理员',
|
||||||
// value: '1'
|
value: 1
|
||||||
// },{
|
},
|
||||||
// label: '否',
|
{
|
||||||
// value: '2'
|
label: '业务员',
|
||||||
// }
|
value: 2
|
||||||
// ]
|
},
|
||||||
// },
|
{
|
||||||
]
|
label: '管理员',
|
||||||
},
|
value: 3
|
||||||
|
},
|
||||||
|
{
|
||||||
|
label: '开发成员',
|
||||||
|
value: 4
|
||||||
|
},
|
||||||
|
{
|
||||||
|
label: '项目经理',
|
||||||
|
value: 5
|
||||||
|
},
|
||||||
|
{
|
||||||
|
label: '实施人员',
|
||||||
|
value: 6
|
||||||
|
},
|
||||||
|
{
|
||||||
|
label: '财务',
|
||||||
|
value: 7
|
||||||
|
},
|
||||||
|
{
|
||||||
|
label: '总经理',
|
||||||
|
value: 8
|
||||||
|
},
|
||||||
|
{
|
||||||
|
label: '副总',
|
||||||
|
value: 9
|
||||||
|
}
|
||||||
]
|
]
|
||||||
const rules = {
|
const rules = {
|
||||||
title: [{
|
villageId: [{
|
||||||
required: true,
|
required: true,
|
||||||
message: '请输入名称',
|
message: '请选择村/社区名称',
|
||||||
trigger: 'change'
|
trigger: 'change'
|
||||||
}],
|
}],
|
||||||
component: [{
|
registerTime: [{
|
||||||
required: true,
|
required: true,
|
||||||
message: '请输入文件路径',
|
message: '请选择登记时间',
|
||||||
trigger: 'change'
|
trigger: 'change'
|
||||||
}],
|
}],
|
||||||
path: [{
|
|
||||||
required: true,
|
|
||||||
message: '请输入路由路径',
|
|
||||||
trigger: 'change'
|
|
||||||
}],
|
|
||||||
code: [{
|
|
||||||
required: true,
|
|
||||||
message: '请输入编码',
|
|
||||||
trigger: 'change'
|
|
||||||
}],
|
|
||||||
openType: [{
|
|
||||||
required: true,
|
|
||||||
message: '请选择打开方式',
|
|
||||||
trigger: 'change'
|
|
||||||
}],
|
|
||||||
};
|
};
|
||||||
|
// 详情显示图片配置
|
||||||
|
const showImgJson = {
|
||||||
|
span: 24,
|
||||||
|
text: '现场照片',
|
||||||
|
field: 'photoUrls',
|
||||||
|
|
||||||
|
};
|
||||||
export default {
|
export default {
|
||||||
formRow,
|
showImgJson,
|
||||||
rules
|
formRow,
|
||||||
|
rules
|
||||||
}
|
}
|
||||||
|
|
|
@ -3,81 +3,49 @@
|
||||||
* @date: 2022-09-09
|
* @date: 2022-09-09
|
||||||
-->
|
-->
|
||||||
<template>
|
<template>
|
||||||
<div style="display: flex; height: 100%">
|
<div style="display: flex;height: 100%;">
|
||||||
<base-layout
|
<base-layout title="菜单管理" :operateButtonSwitch="false" style="width: 260px;">
|
||||||
:showTitle="true"
|
<div slot="main" flex style="height:100%">
|
||||||
:title="'菜单管理'"
|
<div style="width: 100%;border-right:1px solid #dfe6ec;height:100%;overflow: auto;">
|
||||||
style="width: 260px"
|
<base-tree ref="baseTree" :isCenter="false" :isSaveBtn="false" :Allshow="false" :expandAll="true"
|
||||||
:queryShow="false"
|
:showCheckbox="false" :menuData="menuData" @handleNodeClick="formClick">
|
||||||
:searchShow="false"
|
</base-tree>
|
||||||
:mainHight="`calc(100% - 58px)`"
|
</div>
|
||||||
|
|
||||||
>
|
|
||||||
<div
|
|
||||||
slot="main"
|
|
||||||
style="
|
|
||||||
width: 100%;
|
|
||||||
border-right: 1px solid #dfe6ec;
|
|
||||||
height: 100%;
|
|
||||||
overflow-y: auto;
|
|
||||||
"
|
|
||||||
>
|
|
||||||
<base-tree
|
|
||||||
ref="baseTree"
|
|
||||||
:isCenter="false"
|
|
||||||
:isSaveBtn="false"
|
|
||||||
:Allshow="false"
|
|
||||||
:expandAll="true"
|
|
||||||
:showCheckbox="false"
|
|
||||||
:menuData="menuData"
|
|
||||||
@handleNodeClick="formClick"
|
|
||||||
:treeProps="treeProps"
|
|
||||||
:treeBodyHeight="'100%'"
|
|
||||||
>
|
|
||||||
</base-tree>
|
|
||||||
</div>
|
</div>
|
||||||
</base-layout>
|
</base-layout>
|
||||||
<base-layout
|
<base-layout title="菜单树编辑区" :defaultButtonSwitch="false" :buttonList="buttonList" @onFuncBtn="getFuncBtn"
|
||||||
title="菜单树编辑区"
|
style="flex:1;">
|
||||||
:buttonList="buttonList"
|
<div slot="main" style="padding:0 12px;height:300px">
|
||||||
@onFuncBtn="getFuncBtn"
|
<base-form ref="customForm" :formRow="formRow" :isFunBtn="isFunBtn" @elDialogClick="elDialogClick"
|
||||||
style="flex: 1; width: calc(100% - 260px)"
|
:formdata="ruleForm" @onSubmit="getSubmit">
|
||||||
:queryShow="false"
|
|
||||||
:searchShow="false"
|
|
||||||
:mainHight="`calc(100% - 58px)`"
|
|
||||||
>
|
|
||||||
<div slot="main" style="padding: 20px 12px; height: 300px">
|
|
||||||
<base-form
|
|
||||||
ref="customForm"
|
|
||||||
:formRow="formRow"
|
|
||||||
:isFunBtn="isFunBtn"
|
|
||||||
:rules="rules"
|
|
||||||
@selectTree="selectTree"
|
|
||||||
@onSubmit="getSubmit"
|
|
||||||
>
|
|
||||||
</base-form>
|
</base-form>
|
||||||
</div>
|
</div>
|
||||||
</base-layout>
|
</base-layout>
|
||||||
|
<base-organization ref="baseOrganization" :menuData="menuData" @handleConfirmClick="handleConfirmClick">
|
||||||
|
</base-organization>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import router from "@/router";
|
import router from '@/router'
|
||||||
import baseLayout from "@/components/base/baseLayout";
|
import baseLayout from "@/components/base/baseLayout"
|
||||||
import baseForm from "@/components/base/baseNewForm/index.vue";
|
import baseForm from "@/components/base/baseNewForm/index.vue"
|
||||||
import baseTree from "@/components/base/BaseMenuTree/index.vue";
|
import baseTree from "@/components/base/BaseMenuTree/index.vue"
|
||||||
import baseTreeclick from "@/components/base/baseTreeClick/index.vue";
|
import baseTreeclick from "@/components/base/baseTreeClick/index.vue"
|
||||||
import baseDialog from "@/components/base/BaseNewDialog";
|
import baseDialog from "@/components/base/BaseNewDialog"
|
||||||
import baseOrganization from "@/components/base/baseOrganization";
|
import baseOrganization from "@/components/base/baseOrganization"
|
||||||
import configData from "./configData";
|
import configData from "./configData";
|
||||||
import { GetOrganTree } from "@/api/apis/organization";
|
import {
|
||||||
|
GetOrganTree,
|
||||||
|
} from '@/api/apis/organization'
|
||||||
import {
|
import {
|
||||||
GetMenuTree,
|
GetMenuTree,
|
||||||
GetBillData,
|
GetBillData,
|
||||||
MenuSaveData,
|
MenuSaveData,
|
||||||
MenuDelData,
|
MenuDelData
|
||||||
} from "@/api/apis/menuManage";
|
} from '@/api/apis/menuManage'
|
||||||
import { authApi } from "@/api/apis/auth";
|
import { authApi } from '@/api/apis/auth'
|
||||||
export default {
|
export default {
|
||||||
components: {
|
components: {
|
||||||
baseLayout,
|
baseLayout,
|
||||||
|
@ -85,200 +53,168 @@ export default {
|
||||||
baseForm,
|
baseForm,
|
||||||
baseTreeclick,
|
baseTreeclick,
|
||||||
baseDialog,
|
baseDialog,
|
||||||
baseOrganization,
|
baseOrganization
|
||||||
},
|
},
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
buttonList: [
|
// treeHight: '350',
|
||||||
|
dialogVisible: false,
|
||||||
|
dialogTitle: '选择上级菜单',
|
||||||
|
leftTitle: '菜单树',
|
||||||
|
rightTitle: '菜单及上级菜单',
|
||||||
|
mainColor: '#f8f8f8 ',
|
||||||
|
buttonList: [{
|
||||||
|
menuName: '新增根节点',
|
||||||
|
icon: 'el-icon-plus'
|
||||||
|
},
|
||||||
{
|
{
|
||||||
menuName: "新增根节点",
|
menuName: '新增子节点',
|
||||||
icon: "el-icon-plus",
|
icon: 'el-icon-plus'
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
menuName: "新增子节点",
|
menuName: '删除节点',
|
||||||
icon: "el-icon-plus",
|
icon: 'el-icon-delete',
|
||||||
},
|
type: 'danger'
|
||||||
{
|
|
||||||
menuName: "删除节点",
|
|
||||||
icon: "el-icon-delete",
|
|
||||||
type: "danger",
|
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
delId: null,
|
delId: '',
|
||||||
menuData: [],
|
menuData: [],
|
||||||
menuForm: {},
|
ruleForm: {},
|
||||||
rules: configData.rules,
|
rules: {},
|
||||||
formRow: configData.formRow,
|
formRow: configData.formRow,
|
||||||
isFunBtn: true,
|
isFunBtn: true,
|
||||||
treeProps: {
|
|
||||||
children: "children",
|
}
|
||||||
label: "label",
|
|
||||||
},
|
|
||||||
menuForm: {},
|
|
||||||
};
|
|
||||||
},
|
},
|
||||||
mounted() {
|
mounted() {
|
||||||
// this.$refs.baseTree.getMenuList()
|
// this.$refs.baseTree.getMenuList()
|
||||||
this.initPage();
|
this.initPage()
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
//页面初始化
|
//页面初始化
|
||||||
initPage() {
|
initPage() {
|
||||||
this.getMenuData();
|
// this.delId = ""
|
||||||
this.$nextTick(() => {
|
this.getMenuData()
|
||||||
this.resetForm();
|
|
||||||
});
|
|
||||||
},
|
|
||||||
resetForm() {
|
|
||||||
this.$refs.customForm.getField("lvl", 0);
|
|
||||||
this.$refs.customForm.getField("sorts", 0);
|
|
||||||
this.$refs.customForm.getField("hidden", "false");
|
|
||||||
this.$refs.customForm.getField("upIds", null);
|
|
||||||
},
|
},
|
||||||
// 获得树状图
|
// 获得树状图
|
||||||
async getMenuData() {
|
async getMenuData() {
|
||||||
let res = await authApi("moduleService", "module", "queryTree");
|
let res = await authApi('sysMenuConfigService','','queryEntityTree','',{})
|
||||||
this.menuData = res.attribute;
|
if (res.status == 200) {
|
||||||
this.formRow[0].elCol[0].options = res.attribute;
|
let arr = res.attribute[0]
|
||||||
|
this.menuData = res.attribute
|
||||||
|
}
|
||||||
},
|
},
|
||||||
// 操作按钮事件
|
// 操作按钮事件
|
||||||
getFuncBtn(btnEven) {
|
getFuncBtn(btnEven) {
|
||||||
if (btnEven.menuName == "新增根节点") {
|
if (!this.delId) {
|
||||||
|
this.$vmNews('请选择处理的信息')
|
||||||
|
return
|
||||||
|
}
|
||||||
|
if (btnEven.menuName == '新增根节点') {
|
||||||
|
let newRuleForm = {
|
||||||
|
parentMenuName: "",
|
||||||
|
parentMenuId: 0,
|
||||||
|
}
|
||||||
this.$nextTick(() => {
|
this.$nextTick(() => {
|
||||||
this.$refs.customForm.resetFields();
|
this.$refs.customForm.resetForm('ruleForm')
|
||||||
this.resetForm();
|
this.$refs.customForm.choiceAssignment(newRuleForm)
|
||||||
this.delId = null;
|
})
|
||||||
this.$refs.baseTree.setCurrentKey(null);
|
|
||||||
});
|
|
||||||
}
|
}
|
||||||
if (btnEven.menuName == "新增子节点") {
|
if (btnEven.menuName == '新增子节点') {
|
||||||
if (!this.delId) {
|
let newRuleForm = {
|
||||||
this.$tipConfirm("请选择左侧要操作的菜单节点");
|
parentMenuName: this.ruleForm.menuName,
|
||||||
return;
|
parentMenuId: this.ruleForm.id
|
||||||
}
|
}
|
||||||
if (this.menuForm.lvl == "2") {
|
console.log(newRuleForm,'newRuleForm')
|
||||||
this.$tipConfirm("最多允许添加三级菜单");
|
this.$nextTick(() => {
|
||||||
} else {
|
this.$refs.customForm.resetForm('ruleForm')
|
||||||
this.$nextTick(() => {
|
this.$refs.customForm.choiceAssignment(newRuleForm)
|
||||||
this.$refs.customForm.resetFields();
|
})
|
||||||
this.resetForm();
|
}
|
||||||
this.$refs.customForm.getField("upIds", this.delId);
|
if (btnEven.menuName == '删除节点') {
|
||||||
this.$refs.customForm.getField(
|
|
||||||
"lvl",
|
this.$confirm('确认删除该菜单吗?', '提示', {
|
||||||
JSON.parse(this.menuForm.lvl) + 1
|
confirmButtonText: '确定',
|
||||||
);
|
cancelButtonText: '取消',
|
||||||
this.delId = null;
|
type: 'warning'
|
||||||
|
}).then(() => {
|
||||||
|
this.menuDel()
|
||||||
|
}).catch(() => {
|
||||||
|
this.$message({
|
||||||
|
type: 'info',
|
||||||
|
message: '已取消删除'
|
||||||
});
|
});
|
||||||
}
|
|
||||||
}
|
|
||||||
if (btnEven.menuName == "删除节点") {
|
|
||||||
if (!this.delId) {
|
|
||||||
this.$tipConfirm("请选择左侧要操作的菜单节点");
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
this.$delConfirm().then(() => {
|
|
||||||
this.menuDel();
|
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
async menuDel() {
|
async menuDel() {
|
||||||
let params = {
|
let params = {
|
||||||
id: this.delId,
|
id: this.delId
|
||||||
};
|
}
|
||||||
let res = await authApi(
|
let res = await authApi('sysMenuConfigService','','deleteEntity','',params)
|
||||||
"moduleService",
|
if (res.status == 200) {
|
||||||
"module",
|
this.$vmNews('删除成功', 'success')
|
||||||
"delectModuleTree",
|
this.ruleForm = {}
|
||||||
"",
|
this.getMenuData()
|
||||||
params
|
this.$refs.customForm.choiceAssignment({})
|
||||||
);
|
|
||||||
if (res.status == "200") {
|
|
||||||
this.$vmNews("删除成功", "success");
|
|
||||||
this.menuForm = {};
|
|
||||||
this.getMenuData();
|
|
||||||
this.$refs.customForm.resetFields();
|
|
||||||
this.changeMenu();
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
// 获取详情
|
// 获取详情
|
||||||
async getDetail(id) {
|
async getDetail(id) {
|
||||||
let params = {
|
let params = {
|
||||||
id: id,
|
id: id
|
||||||
};
|
}
|
||||||
let res = await authApi(
|
let res = await authApi('sysMenuConfigService','','getEntity','',params)
|
||||||
"moduleService",
|
if (res.status == 200) {
|
||||||
"module",
|
console.log(res,'res')
|
||||||
"queryModule",
|
this.ruleForm = res.attribute
|
||||||
"",
|
this.$nextTick(() => {
|
||||||
params
|
this.$refs.customForm.choiceAssignment(res.attribute)
|
||||||
);
|
})
|
||||||
this.$nextTick(() => {
|
|
||||||
this.$refs.customForm.choiceAssignment(res.attribute);
|
|
||||||
this.menuForm = res.attribute;
|
|
||||||
});
|
|
||||||
},
|
|
||||||
getSubmit(data) {
|
|
||||||
async function submitForm(delId) {
|
|
||||||
let params = {
|
|
||||||
...data,
|
|
||||||
label: data.title,
|
|
||||||
};
|
|
||||||
|
|
||||||
let res = await authApi(
|
|
||||||
"moduleService",
|
|
||||||
"module",
|
|
||||||
delId ? "updateModule" : "addModule",
|
|
||||||
"",
|
|
||||||
params
|
|
||||||
);
|
|
||||||
return res;
|
|
||||||
}
|
}
|
||||||
this.$refs.customForm.$refs["ruleForm"].validate((valid) => {
|
|
||||||
if (!valid) {
|
|
||||||
return;
|
|
||||||
} else {
|
|
||||||
submitForm(this.delId).then((res) => {
|
|
||||||
if (res.status == "200") {
|
|
||||||
this.$vmNews("保存成功", "success");
|
|
||||||
this.menuForm = {};
|
|
||||||
this.getMenuData();
|
|
||||||
this.$refs.customForm.resetFields();
|
|
||||||
this.changeMenu();
|
|
||||||
}
|
|
||||||
});
|
|
||||||
}
|
|
||||||
});
|
|
||||||
},
|
},
|
||||||
changeMenu() {
|
async getSubmit(data) {
|
||||||
|
let params = {
|
||||||
this.$store.dispatch("GenerateRoutes").then((accessRoutes) => {
|
...data
|
||||||
// 根据roles权限生成可访问的路由表
|
}
|
||||||
for (let i = 0, length = accessRoutes.length; i < length; i += 1) {
|
let res
|
||||||
const element = accessRoutes[i];
|
if(params.id){
|
||||||
router.addRoutes(accessRoutes); // 动态添加可访问路由表
|
res = await authApi("sysMenuConfigService","","updateEntity","",params)
|
||||||
}
|
}else{
|
||||||
localStorage.setItem("routeList", JSON.stringify(accessRoutes));
|
res = await authApi("sysMenuConfigService","","saveEntity","",params)
|
||||||
});
|
}
|
||||||
|
if (res.status == 200) {
|
||||||
|
this.$vmNews('保存成功', 'success')
|
||||||
|
this.ruleForm = {}
|
||||||
|
this.getMenuData()
|
||||||
|
this.$refs.customForm.choiceAssignment({})
|
||||||
|
this.$store.dispatch('GenerateRoutes').then(accessRoutes => {
|
||||||
|
// 根据roles权限生成可访问的路由表
|
||||||
|
for (let i = 0, length = accessRoutes.length; i < length; i += 1) {
|
||||||
|
const element = accessRoutes[i]
|
||||||
|
router.addRoutes(accessRoutes) // 动态添加可访问路由表
|
||||||
|
}
|
||||||
|
localStorage.setItem('routeList', JSON.stringify(accessRoutes))
|
||||||
|
})
|
||||||
|
}
|
||||||
|
},
|
||||||
|
//父节点点击事件
|
||||||
|
elDialogClick(row, index, indexRow) {
|
||||||
|
this.$refs.baseOrganization.dialogVisible = true
|
||||||
|
},
|
||||||
|
handleConfirmClick(val) {
|
||||||
|
console.log(val, "val");
|
||||||
|
this.ruleForm.parentMenuName = val.label
|
||||||
|
this.ruleForm.parentMenuId = val.id
|
||||||
|
this.$refs.customForm.incomingParameters(this.ruleForm)
|
||||||
|
this.$refs.baseOrganization.dialogVisible = false
|
||||||
},
|
},
|
||||||
formClick(data) {
|
formClick(data) {
|
||||||
this.delId = data.id;
|
this.delId = data.id
|
||||||
this.getDetail(data.id);
|
this.getDetail(data.id)
|
||||||
},
|
|
||||||
selectTree(row) {
|
|
||||||
if (row.lvl == "2") {
|
|
||||||
// this.$refs.customForm.treeSelectClear()
|
|
||||||
this.$tipConfirm("最多允许添加三级菜单").then(() => {
|
|
||||||
this.$refs.customForm.getField("upIds", this.delId);
|
|
||||||
});
|
|
||||||
} else {
|
|
||||||
this.$refs.customForm.resetFields();
|
|
||||||
this.resetForm();
|
|
||||||
this.$refs.customForm.getField("lvl", JSON.parse(row.lvl) + 1);
|
|
||||||
this.menuForm = {};
|
|
||||||
}
|
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
};
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style scoped>
|
<style scoped>
|
||||||
|
|
|
@ -1,104 +1,34 @@
|
||||||
<template>
|
|
||||||
<div v-loading="buttonLoading" style="height:500px;overflow: auto;">
|
|
||||||
<div flex="cross:center cross:baseline" flex-wrap v-for="(el,elIndex) in classifyButtonList"
|
|
||||||
class="buttonSetting">
|
|
||||||
<p style="width:100px;text-align: right;">{{el.label}}</p>
|
|
||||||
<div flex="cross:center" flex-wrap style="width: calc(100% - 200px);">
|
|
||||||
<p class="recordText" v-for="(item,index) in el.buttonList" @click="typeChange(item)" :key="index"
|
|
||||||
:class="{'active':item.type}">{{item.NameCN}}</p>
|
|
||||||
<p v-if="el.buttonList.length == 0" class="recordText">暂无按钮</p>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</template>
|
|
||||||
|
|
||||||
<script>
|
// 表头配置
|
||||||
import {
|
const tableColumnJson = [
|
||||||
GetAllButton,
|
{
|
||||||
} from '@/api/apis/jurisdiction'
|
label: '用户账号',
|
||||||
export default {
|
prop: 'u_LoginCode',
|
||||||
// props:{
|
tooltip: true,
|
||||||
// ButtonList: {
|
},
|
||||||
// type: Array,
|
{
|
||||||
// default: () => {
|
label: '用户姓名',
|
||||||
// return []
|
prop: 'p_PersonName',
|
||||||
// }
|
tooltip: true,
|
||||||
// },
|
},
|
||||||
// }
|
{
|
||||||
data(){
|
label: '所属部门',
|
||||||
return{
|
prop: 'o_OrganName',
|
||||||
// ButtonList:[],
|
tooltip: true,
|
||||||
classifyButtonList: [],
|
},
|
||||||
buttonPopedom:[],
|
{
|
||||||
buttonLoading:false
|
label: '手机号',
|
||||||
|
prop: 'p_Telphone',
|
||||||
|
tooltip: true
|
||||||
|
},
|
||||||
|
{
|
||||||
|
label: '状态',
|
||||||
|
prop: 'stateNote',
|
||||||
|
tooltip: true
|
||||||
|
},
|
||||||
|
|
||||||
}
|
]
|
||||||
},
|
|
||||||
methods:{
|
|
||||||
async GetAllButtonList(ids, checkdata) {
|
|
||||||
this.buttonLoading = true
|
|
||||||
setTimeout(()=>{
|
|
||||||
this.buttonLoading = false
|
|
||||||
},3000)
|
|
||||||
this.classifyButtonList = []
|
|
||||||
let params = {
|
|
||||||
menuIDs: ids.join(",")
|
|
||||||
}
|
|
||||||
let res = await GetAllButton(params)
|
|
||||||
if (res.success === 'true') {
|
|
||||||
let allButtonList = res.data[0]
|
|
||||||
checkdata.forEach(el => {
|
|
||||||
el.buttonList = []
|
|
||||||
allButtonList.forEach(item => {
|
|
||||||
if (el.id == item.MenuID) {
|
|
||||||
el.buttonList.push(item)
|
|
||||||
}
|
|
||||||
})
|
|
||||||
})
|
|
||||||
this.classifyButtonList = checkdata
|
|
||||||
}
|
|
||||||
if(this.buttonPopedom.length > 0){
|
|
||||||
this.classifyButtonList.forEach(item=>{
|
|
||||||
item.buttonList.forEach(bItem=>{
|
|
||||||
this.buttonPopedom.forEach(el=>{
|
|
||||||
if(el == bItem.id){
|
|
||||||
bItem.type = true
|
|
||||||
}
|
|
||||||
})
|
|
||||||
})
|
|
||||||
})
|
|
||||||
}
|
|
||||||
this.buttonLoading = false
|
|
||||||
},
|
|
||||||
typeChange(item) {
|
|
||||||
item.type = !item.type
|
|
||||||
this.$forceUpdate()
|
|
||||||
},
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
</script>
|
export default {
|
||||||
|
tableColumnJson,
|
||||||
<style lang="scss">
|
}
|
||||||
$activeColor: var(--bg-color, "#00aaff");
|
|
||||||
.buttonSetting{
|
|
||||||
margin-bottom: 5px;
|
|
||||||
.recordText {
|
|
||||||
border: 1px solid #fff;
|
|
||||||
width: 80px;
|
|
||||||
padding: 8px 0;
|
|
||||||
text-align: center;
|
|
||||||
font-size: 12px;
|
|
||||||
cursor: pointer;
|
|
||||||
background: #f2f2f2;
|
|
||||||
color: #e0e0e0;
|
|
||||||
margin:3px;
|
|
||||||
}
|
|
||||||
|
|
||||||
.recordText.active {
|
|
||||||
background: $activeColor;
|
|
||||||
color: #fff;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
</style>
|
|
||||||
|
|
|
@ -1,34 +1,34 @@
|
||||||
|
|
||||||
// 表头配置
|
// 表头配置
|
||||||
const tableColumnJson = [
|
const tableColumnJson = [
|
||||||
{
|
{
|
||||||
label: '用户账号',
|
label: '用户账号',
|
||||||
prop: 'u_LoginCode',
|
prop: 'loginCode',
|
||||||
tooltip: true,
|
tooltip: true,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
label: '用户姓名',
|
label: '用户姓名',
|
||||||
prop: 'p_PersonName',
|
prop: 'personName',
|
||||||
tooltip: true,
|
tooltip: true,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
label: '所属部门',
|
label: '所属部门',
|
||||||
prop: 'o_OrganName',
|
prop: 'organName',
|
||||||
tooltip: true,
|
tooltip: true,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
label: '手机号',
|
label: '手机号',
|
||||||
prop: 'p_Telphone',
|
prop: 'mobilePhone',
|
||||||
tooltip: true
|
tooltip: true
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
label: '状态',
|
label: '状态',
|
||||||
prop: 'stateNote',
|
prop: 'state',
|
||||||
tooltip: true
|
tooltip: true
|
||||||
},
|
},
|
||||||
|
|
||||||
]
|
]
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
tableColumnJson,
|
tableColumnJson,
|
||||||
}
|
}
|
||||||
|
|
|
@ -0,0 +1,126 @@
|
||||||
|
<template>
|
||||||
|
<div>
|
||||||
|
<el-table
|
||||||
|
ref="multipleTable"
|
||||||
|
:data="tableData"
|
||||||
|
style="width: 100%"
|
||||||
|
:show-header="false"
|
||||||
|
>
|
||||||
|
<el-table-column prop="billName" label="单据" width="120">
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column prop="dataList" label="字段">
|
||||||
|
<template slot-scope="scope">
|
||||||
|
<i
|
||||||
|
class="el-icon-star-on"
|
||||||
|
style="
|
||||||
|
height: 30px;
|
||||||
|
line-height: 30px;
|
||||||
|
font-size: 25px;
|
||||||
|
margin-right: 7px;
|
||||||
|
"
|
||||||
|
v-show="
|
||||||
|
scope.row.dataList.length != 0 &&
|
||||||
|
scope.row.dataList.length == scope.row.buttonList.length
|
||||||
|
"
|
||||||
|
@click="cancellation(scope.row)"
|
||||||
|
></i>
|
||||||
|
<i
|
||||||
|
class="el-icon-star-on"
|
||||||
|
style="
|
||||||
|
height: 30px;
|
||||||
|
line-height: 30px;
|
||||||
|
font-size: 25px;
|
||||||
|
margin-right: 7px;
|
||||||
|
color: #808080;
|
||||||
|
"
|
||||||
|
v-show="
|
||||||
|
scope.row.dataList.length != 0 &&
|
||||||
|
scope.row.dataList.length != scope.row.buttonList.length
|
||||||
|
"
|
||||||
|
@click="selectAllButton(scope.row)"
|
||||||
|
></i>
|
||||||
|
<el-checkbox-group v-model="scope.row.buttonList" size="small">
|
||||||
|
<el-checkbox
|
||||||
|
v-for="item in scope.row.dataList"
|
||||||
|
:label="item.id"
|
||||||
|
:key="item.id"
|
||||||
|
>{{ item.name }}</el-checkbox
|
||||||
|
>
|
||||||
|
</el-checkbox-group>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
</el-table>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
import { GetAllBilldata, GetAllBillDataPepedom } from "@/api/apis/jurisdiction";
|
||||||
|
export default {
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
tableData: [],
|
||||||
|
selectedList: [],
|
||||||
|
};
|
||||||
|
},
|
||||||
|
|
||||||
|
created() {
|
||||||
|
this.init();
|
||||||
|
},
|
||||||
|
|
||||||
|
components: {},
|
||||||
|
|
||||||
|
computed: {},
|
||||||
|
|
||||||
|
mounted() {},
|
||||||
|
|
||||||
|
beforeUpdate() {
|
||||||
|
this.handleTabClick();
|
||||||
|
},
|
||||||
|
|
||||||
|
methods: {
|
||||||
|
selectAllButton(item) {
|
||||||
|
let data = [];
|
||||||
|
item.dataList.forEach((el) => {
|
||||||
|
data.push(el.id);
|
||||||
|
});
|
||||||
|
item.buttonList = data;
|
||||||
|
},
|
||||||
|
cancellation(item) {
|
||||||
|
item.buttonList = [];
|
||||||
|
},
|
||||||
|
handleTabClick() {
|
||||||
|
this.$nextTick(() => {
|
||||||
|
this.$refs.multipleTable && this.$refs.multipleTable.doLayout();
|
||||||
|
});
|
||||||
|
},
|
||||||
|
async init() {
|
||||||
|
let data = [];
|
||||||
|
const res = await GetAllBilldata({});
|
||||||
|
if (res.code == 1) {
|
||||||
|
data = res.data[0];
|
||||||
|
data.forEach((el) => {
|
||||||
|
el.dataList = [];
|
||||||
|
el.buttonList = [];
|
||||||
|
});
|
||||||
|
}
|
||||||
|
const item = await GetAllBillDataPepedom({});
|
||||||
|
if (item.code == 1) {
|
||||||
|
data.forEach((el) => {
|
||||||
|
item.data[0].forEach((e) => {
|
||||||
|
if (el.billKindID == e.billKindID) {
|
||||||
|
el.dataList.push(e);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
this.selectedList.forEach((add) => {
|
||||||
|
if (el.billKindID == add.dp_billKindID) {
|
||||||
|
el.buttonList = add.dp_popeList.split(",");
|
||||||
|
}
|
||||||
|
});
|
||||||
|
});
|
||||||
|
}
|
||||||
|
this.tableData = data;
|
||||||
|
},
|
||||||
|
},
|
||||||
|
};
|
||||||
|
</script>
|
||||||
|
<style scoped lang="scss"></style>
|
|
@ -1,114 +1,114 @@
|
||||||
<template>
|
<template>
|
||||||
<div >
|
<div >
|
||||||
<div v-for="(item, index) in dataList" :key="index" class="dataSetting" flex>
|
<div v-for="(item, index) in dataList" :key="index" class="dataSetting" flex>
|
||||||
<p style="width: 100px;text-align: right;">{{item.billName}}</p>
|
<p style="width: 100px;text-align: right;">{{item.billName}}</p>
|
||||||
<div flex flex-wrap style="margin-left: 10px;width: calc(100% - 150px);">
|
<div flex flex-wrap style="margin-left: 10px;width: calc(100% - 150px);">
|
||||||
<p class="recordText" v-for="el in item.buttonList" :class="{'active':el.type}" @click="typeChange(el)">{{el.name}}</p>
|
<p class="recordText" v-for="(el,index) in item.buttonList" :key="index" :class="{'active':el.type}" @click="typeChange(el)">{{el.name}}</p>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import {
|
import {
|
||||||
GetAllBillDataPepedom,
|
GetAllBillDataPepedom,
|
||||||
GetAllBilldata
|
GetAllBilldata
|
||||||
} from '@/api/apis/jurisdiction.js'
|
} from '@/api/apis/jurisdiction.js'
|
||||||
export default {
|
export default {
|
||||||
name: "dataSetting",
|
name: "dataSetting",
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
dataList: [],
|
dataList: [],
|
||||||
dataPepedom: [],
|
dataPepedom: [],
|
||||||
dataSet: [],
|
dataSet: [],
|
||||||
activeList:[],
|
activeList:[],
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
created() {
|
created() {
|
||||||
// this.inPage()
|
// this.inPage()
|
||||||
},
|
},
|
||||||
|
|
||||||
methods: {
|
methods: {
|
||||||
inPage() {
|
inPage() {
|
||||||
let dataPepedom = this.getDataPepedom()
|
let dataPepedom = this.getDataPepedom()
|
||||||
let dataSet = this.getDataSet()
|
let dataSet = this.getDataSet()
|
||||||
Promise.all([dataSet, dataPepedom]).then((value) => {
|
Promise.all([dataSet, dataPepedom]).then((value) => {
|
||||||
this.getDataList(value[0], value[1])
|
this.getDataList(value[0], value[1])
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
|
|
||||||
async getDataPepedom() {
|
async getDataPepedom() {
|
||||||
let res = await GetAllBillDataPepedom()
|
let res = await GetAllBillDataPepedom()
|
||||||
if (res.code == 1) {
|
if (res.code == 1) {
|
||||||
return res.data[0]
|
return res.data[0]
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
async getDataSet() {
|
async getDataSet() {
|
||||||
let res = await GetAllBilldata()
|
let res = await GetAllBilldata()
|
||||||
if (res.code == 1) {
|
if (res.code == 1) {
|
||||||
res.data[0].forEach(el=>{
|
res.data[0].forEach(el=>{
|
||||||
el.buttonList = []
|
el.buttonList = []
|
||||||
})
|
})
|
||||||
return res.data[0]
|
return res.data[0]
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
getDataList(dataSet, dataPepedom) {
|
getDataList(dataSet, dataPepedom) {
|
||||||
this.dataList = []
|
this.dataList = []
|
||||||
let arr = []
|
let arr = []
|
||||||
dataSet.forEach((el, index) => {
|
dataSet.forEach((el, index) => {
|
||||||
dataPepedom.forEach((item) => {
|
dataPepedom.forEach((item) => {
|
||||||
if (el.billKindID == item.billKindID) {
|
if (el.billKindID == item.billKindID) {
|
||||||
el.buttonList.push(item)
|
el.buttonList.push(item)
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
this.dataList = dataSet
|
this.dataList = dataSet
|
||||||
if(this.activeList.length > 0){
|
if(this.activeList.length > 0){
|
||||||
this.dataList.forEach(item=>{
|
this.dataList.forEach(item=>{
|
||||||
item.buttonList.forEach(bItem=>{
|
item.buttonList.forEach(bItem=>{
|
||||||
this.activeList.forEach(el=>{
|
this.activeList.forEach(el=>{
|
||||||
if(el == bItem.id){
|
if(el == bItem.id){
|
||||||
bItem.type = true
|
bItem.type = true
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
typeChange(item) {
|
typeChange(item) {
|
||||||
item.type = !item.type
|
item.type = !item.type
|
||||||
this.$forceUpdate()
|
this.$forceUpdate()
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
</script>
|
</script>
|
||||||
<style lang="scss">
|
<style lang="scss">
|
||||||
$activeColor: var(--bg-color, "#00aaff");
|
$activeColor: var(--bg-color, "#00aaff");
|
||||||
|
|
||||||
.el-icon-star-on {
|
.el-icon-star-on {
|
||||||
/* color: #00aa00; */
|
/* color: #00aa00; */
|
||||||
color: $activeColor;
|
color: $activeColor;
|
||||||
}
|
}
|
||||||
|
|
||||||
.dataSetting {
|
.dataSetting {
|
||||||
color: #000;
|
color: #000;
|
||||||
.recordText {
|
.recordText {
|
||||||
border: 1px solid #fff;
|
border: 1px solid #fff;
|
||||||
width: 80px;
|
width: 80px;
|
||||||
padding: 8px 0;
|
padding: 8px 0;
|
||||||
text-align: center;
|
text-align: center;
|
||||||
font-size: 12px;
|
font-size: 12px;
|
||||||
cursor: pointer;
|
cursor: pointer;
|
||||||
background: #f2f2f2;
|
background: #f2f2f2;
|
||||||
color: #e0e0e0;
|
color: #e0e0e0;
|
||||||
margin:3px;
|
margin:3px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.recordText.active {
|
.recordText.active {
|
||||||
background: $activeColor;
|
background: $activeColor;
|
||||||
color: #fff;
|
color: #fff;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
|
|
|
@ -1,460 +1,525 @@
|
||||||
<template>
|
<template>
|
||||||
<div>
|
<div>
|
||||||
<div style="display: flex;height: 100%;">
|
<div style="display: flex; height: 100%">
|
||||||
<base-layout title="组织机构" ref="organLayout" style="width: 20%;" :bottonShow="false" :isPage="false"
|
<base-layout title="组织机构" ref="organLayout" style="width: 20%" :bottonShow="false" :isPage="false"
|
||||||
:operateButtonSwitch="false" :mainColor="mainColor">
|
:operateButtonSwitch="false" :mainColor="mainColor"
|
||||||
<div slot="main" style="height: 100%;">
|
>
|
||||||
<base-tree ref="baseTree" :isCenter="false" :isSaveBtn="false" :Allshow="false" :showCheckbox="false"
|
<div slot="main" style="height: 100%">
|
||||||
:menuData="orangData" @handleNodeClick="orangClick"></base-tree>
|
<base-tree ref="baseTree" :isCenter="false" :isSaveBtn="false" :Allshow="false" :showCheckbox="false"
|
||||||
</div>
|
:menuData="orangData" @handleNodeClick="orangClick"
|
||||||
</base-layout>
|
></base-tree>
|
||||||
<base-layout title="用户信息" ref="userLayout" @pageChange="pageChange" style="width: 80%;" :buttonList="buttonList"
|
</div>
|
||||||
:defaultButtonSwitch="false" @onFuncBtn="getFuncBtn" :isPage="true">
|
</base-layout>
|
||||||
<div slot="main" slot-scope="{ tableHeight }" style="height: 100%;">
|
<base-layout title="用户信息" ref="userLayout" @pageChange="pageChange" style="width: 80%"
|
||||||
<base-table ref="userCustomtable" :border="true" :showIndex="false" :tabLoading.sync="tabLoading"
|
:buttonList="buttonList" :defaultButtonSwitch="false" @onFuncBtn="getFuncBtn" :isPage="true"
|
||||||
@radioChange="userRadioChange" :slotrow="true" :tableHeight="tableHeight" :tableData="tableData"
|
>
|
||||||
:tableColumn="tableColumn">
|
<div slot="main" slot-scope="{ tableHeight }" style="height: 100%">
|
||||||
|
<base-table ref="userCustomtable" :border="true" :showIndex="false" :tabLoading.sync="tabLoading"
|
||||||
|
@radioChange="userRadioChange" :slotrow="true" :tableHeight="tableHeight" :tableData="tableData"
|
||||||
|
:tableColumn="tableColumn"
|
||||||
|
>
|
||||||
|
</base-table>
|
||||||
|
</div>
|
||||||
|
</base-layout>
|
||||||
|
</div>
|
||||||
|
<right-dialog ref="rightDialog" :menuData="menuData" v-if="permissionPopup"></right-dialog>
|
||||||
|
|
||||||
</base-table>
|
<base-dialog :closeEscape="true" :showClose="true" :closeModal="false" :dialogVisible.sync="settingDialog"
|
||||||
</div>
|
class="userDialog" title="权限设置" width="50vw" top="5vh" :footerShow="true"
|
||||||
</base-layout>
|
@handleConfirmClick="settingConfirmClick"
|
||||||
</div>
|
>
|
||||||
<base-dialog :closeEscape="true" :showClose="true" :closeModal="false" :dialogVisible.sync="settingDialog"
|
<base-layout :showTitle="false" :defaultButtonSwitch="false">
|
||||||
class="userDialog" title="权限设置" width="50vw" top="5vh" :footerShow="true"
|
<div slot="main">
|
||||||
@handleConfirmClick="settingConfirmClick">
|
<el-tabs v-model="activeName" type="card" @tab-click="handleClick" :before-leave="beforeLeave">
|
||||||
<base-layout :showTitle="false" :defaultButtonSwitch="false" >
|
<el-tab-pane label="菜单权限" name="jurisdictionSetting">
|
||||||
<div slot="main">
|
<jurisdiction-Setting ref="jurisdictionSetting" :menuData="menuData"></jurisdiction-Setting>
|
||||||
<el-tabs v-model="activeName" type="card" @tab-click="handleClick" :before-leave="beforeLeave">
|
</el-tab-pane>
|
||||||
<el-tab-pane label="菜单权限" name="jurisdictionSetting">
|
<el-tab-pane label="按钮权限" name="buttonSetting">
|
||||||
<jurisdiction-Setting ref="jurisdictionSetting" :menuData="menuData"></jurisdiction-Setting>
|
<button-setting ref="buttonSetting"></button-setting>
|
||||||
</el-tab-pane>
|
</el-tab-pane>
|
||||||
<el-tab-pane label="按钮权限" name="buttonSetting">
|
<el-tab-pane label="数据权限" name="dataSetting">
|
||||||
<button-setting ref="buttonSetting"></button-setting>
|
<data-setting ref="dataSetting"></data-setting>
|
||||||
</el-tab-pane>
|
</el-tab-pane>
|
||||||
<el-tab-pane label="数据权限" name="dataSetting">
|
</el-tabs>
|
||||||
<data-setting ref="dataSetting"></data-setting>
|
</div>
|
||||||
</el-tab-pane>
|
</base-layout>
|
||||||
</el-tabs>
|
</base-dialog>
|
||||||
</div>
|
</div>
|
||||||
</base-layout>
|
|
||||||
</base-dialog>
|
|
||||||
</div>
|
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import router from '@/router'
|
import router from '@/router'
|
||||||
import baseLayout from "@/components/base/baseLayout";
|
import baseLayout from '@/components/base/baseLayout'
|
||||||
import baseTable from "@/components/base/baseTable";
|
import baseTable from '@/components/base/baseTable'
|
||||||
import baseDialog from "@/components/base/BaseNewDialog/index.vue";
|
import baseDialog from '@/components/base/BaseNewDialog/index.vue'
|
||||||
import baseForm from "@/components/base/baseNewForm/index.vue";
|
import baseForm from '@/components/base/baseNewForm/index.vue'
|
||||||
import baseTree from "@/components/base/BaseMenuTree/index.vue";
|
import baseTree from '@/components/base/BaseMenuTree/index.vue'
|
||||||
import jurisdictionSetting from "./jurisdictionSetting.vue";
|
import rightDialog from './rightDialog'
|
||||||
import buttonSetting from "./buttonSetting.vue";
|
import jurisdictionSetting from './jurisdictionSetting.vue'
|
||||||
import dataSetting from "./dataSetting.vue"
|
import buttonSetting from './buttonSetting.vue'
|
||||||
import configData from "./configData";
|
import dataSetting from './dataSetting.vue'
|
||||||
|
import configData from './configData'
|
||||||
import { getCompanyId } from '@/utils/auth'
|
import { getCompanyId } from '@/utils/auth'
|
||||||
|
import { GetMenuTree } from '@/api/apis/menuManage'
|
||||||
|
import { userGetBillList } from '@/api/apis/userInformation'
|
||||||
|
import { GetOrganTree } from '@/api/apis/organization'
|
||||||
import {
|
import {
|
||||||
GetMenuTree,
|
GetPppedomSet,
|
||||||
} from '@/api/apis/menuManage'
|
GetMenuButton,
|
||||||
import {
|
GetAllButton,
|
||||||
userGetBillList,
|
GetAllBillDataPepedom,
|
||||||
|
GetAllBilldata,
|
||||||
} from '@/api/apis/userInformation'
|
PopedomSaveData
|
||||||
import {
|
|
||||||
GetOrganTree,
|
|
||||||
} from '@/api/apis/organization'
|
|
||||||
import {
|
|
||||||
GetPppedomSet,
|
|
||||||
GetAllButton,
|
|
||||||
GetAllBillDataPepedom,
|
|
||||||
GetAllBilldata,
|
|
||||||
PopedomSaveData
|
|
||||||
} from '@/api/apis/jurisdiction'
|
} from '@/api/apis/jurisdiction'
|
||||||
|
import { authApi } from '@/api/apis/auth'
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: "review",
|
name: 'review',
|
||||||
components: {
|
components: {
|
||||||
buttonSetting,
|
buttonSetting,
|
||||||
dataSetting,
|
dataSetting,
|
||||||
baseLayout,
|
baseLayout,
|
||||||
baseTable,
|
baseTable,
|
||||||
baseDialog,
|
baseDialog,
|
||||||
baseForm,
|
baseForm,
|
||||||
baseTree,
|
baseTree,
|
||||||
jurisdictionSetting
|
jurisdictionSetting,
|
||||||
},
|
rightDialog
|
||||||
data() {
|
},
|
||||||
return {
|
data() {
|
||||||
activeName: 'jurisdictionSetting',
|
return {
|
||||||
radioIndex: false,
|
activeName: 'jurisdictionSetting',
|
||||||
userRadioId: false,
|
radioIndex: false,
|
||||||
settingDialog: false,
|
userRadioId: false,
|
||||||
// tableHeight: 'calc(100vh - 227px)',
|
settingDialog: false,
|
||||||
mainColor: '#f8f8f8',
|
// tableHeight: 'calc(100vh - 227px)',
|
||||||
tabLoading: false,
|
mainColor: '#f8f8f8',
|
||||||
tableData: [],
|
tabLoading: false,
|
||||||
// 搜索配置
|
tableData: [],
|
||||||
menuData: [],
|
// 搜索配置
|
||||||
orangData: [],
|
menuData: [],
|
||||||
buttonList: [{
|
orangData: [],
|
||||||
'icon': 'el-icon-plus',
|
buttonList: [
|
||||||
'menuName': '权限设置',
|
{
|
||||||
btnFunciton: 'setting'
|
icon: 'el-icon-plus',
|
||||||
},],
|
menuName: '权限设置',
|
||||||
pageModel: {
|
btnFunciton: 'setting'
|
||||||
page: 1,
|
}
|
||||||
limit: 20,
|
],
|
||||||
departmentID: '',
|
pageModel: {
|
||||||
},
|
pageNum: 1,
|
||||||
defaultProps: {
|
pageSize: 20,
|
||||||
children: 'children',
|
organId: ''
|
||||||
label: 'label'
|
},
|
||||||
},
|
defaultProps: {
|
||||||
buttonArray: [],
|
children: 'children',
|
||||||
allButtonList: [],
|
label: 'label'
|
||||||
menuIDs: [],
|
},
|
||||||
menuList: [],
|
buttonArray: [],
|
||||||
menuPopedom: []
|
allButtonList: [],
|
||||||
}
|
menuIDs: [],
|
||||||
},
|
menuList: [],
|
||||||
computed: {
|
menuPopedom: [],
|
||||||
// 表头配置
|
permissionPopup: false
|
||||||
tableColumn() {
|
}
|
||||||
return configData.tableColumnJson
|
},
|
||||||
},
|
computed: {
|
||||||
},
|
// 表头配置
|
||||||
watch: {
|
tableColumn() {
|
||||||
settingDialog: {
|
return configData.tableColumnJson
|
||||||
deep: true,
|
}
|
||||||
handler(newValue, oldValue) {
|
},
|
||||||
if (newValue == false) {
|
watch: {
|
||||||
this.$refs.dataSetting.dataList = []
|
settingDialog: {
|
||||||
this.$refs.jurisdictionSetting.$refs.menuTree.$refs.elTree.setCheckedKeys([])
|
deep: true,
|
||||||
this.$refs.buttonSetting.classifyButtonList = []
|
handler(newValue, oldValue) {
|
||||||
}
|
if (newValue == false) {
|
||||||
}
|
this.$refs.dataSetting.dataList = []
|
||||||
}
|
this.$refs.jurisdictionSetting.$refs.menuTree.$refs.elTree.setCheckedKeys(
|
||||||
},
|
[]
|
||||||
created() { },
|
)
|
||||||
onShow() { },
|
this.$refs.buttonSetting.classifyButtonList = []
|
||||||
mounted() {
|
}
|
||||||
this.initPage()
|
}
|
||||||
},
|
}
|
||||||
filters: {
|
},
|
||||||
|
created() {
|
||||||
},
|
},
|
||||||
methods: {
|
onShow() {
|
||||||
beforeLeave(activeName, oldActiveName) {
|
},
|
||||||
if(oldActiveName == 'jurisdictionSetting'){
|
mounted() {
|
||||||
this.menuPopedom = this.$refs.jurisdictionSetting.menuPopedom
|
this.initPage()
|
||||||
this.checkdata = this.$refs.jurisdictionSetting.checkdata
|
this.getMenuData()
|
||||||
}
|
},
|
||||||
if (oldActiveName == 'jurisdictionSetting' && activeName == "buttonSetting") {
|
filters: {},
|
||||||
if (this.menuPopedom.length == 0) {
|
methods: {
|
||||||
this.$vmNews("当前用户未分配菜单权限")
|
beforeLeave(activeName, oldActiveName) {
|
||||||
return false
|
if (oldActiveName == 'jurisdictionSetting') {
|
||||||
}
|
this.menuPopedom = this.$refs.jurisdictionSetting.menuPopedom
|
||||||
}
|
this.checkdata = this.$refs.jurisdictionSetting.checkdata
|
||||||
if (oldActiveName == 'dataSetting' && activeName == "buttonSetting") {
|
}
|
||||||
// return false
|
if (
|
||||||
}
|
oldActiveName == 'jurisdictionSetting' &&
|
||||||
},
|
activeName == 'buttonSetting'
|
||||||
// 切换tab
|
) {
|
||||||
handleClick(tab, event) {
|
if (this.menuPopedom.length == 0) {
|
||||||
if (this.activeName == 'buttonSetting') {
|
this.$vmNews('当前用户未分配菜单权限')
|
||||||
this.checkdata = this.$refs.jurisdictionSetting.checkdata
|
return false
|
||||||
this.$refs.buttonSetting.GetAllButtonList(this.menuPopedom, this.checkdata)
|
}
|
||||||
}
|
}
|
||||||
if (this.activeName == 'dataSetting') {
|
if (oldActiveName == 'dataSetting' && activeName == 'buttonSetting') {
|
||||||
this.$refs.dataSetting.inPage()
|
// return false
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
// 获取菜单选中
|
// 切换tab
|
||||||
getMenuIDs(menuData) {
|
handleClick(tab, event) {
|
||||||
menuData.forEach(el => {
|
if (this.activeName == 'buttonSetting') {
|
||||||
if (el.type) {
|
this.checkdata = this.$refs.jurisdictionSetting.checkdata
|
||||||
this.menuList.push(el)
|
this.$refs.buttonSetting.GetAllButtonList(
|
||||||
this.menuIDs.push(el.id)
|
this.menuPopedom,
|
||||||
}
|
this.checkdata
|
||||||
if (el.children != null && el.children && el.children.length) {
|
)
|
||||||
this.getMenuIDs(el.children)
|
}
|
||||||
}
|
if (this.activeName == 'dataSetting') {
|
||||||
})
|
this.$refs.dataSetting.inPage()
|
||||||
},
|
}
|
||||||
// 初始化页面
|
},
|
||||||
initPage() {
|
// 获取菜单选中
|
||||||
this.getTableList()
|
getMenuIDs(menuData) {
|
||||||
this.getOrganList()
|
menuData.forEach((el) => {
|
||||||
},
|
if (el.type) {
|
||||||
//获取菜单树
|
this.menuList.push(el)
|
||||||
async getMenuData() {
|
this.menuIDs.push(el.id)
|
||||||
let res = await GetMenuTree({})
|
}
|
||||||
if (res.code == 1) {
|
if (el.children != null && el.children && el.children.length) {
|
||||||
let arr = JSON.parse(res.data[0])
|
this.getMenuIDs(el.children)
|
||||||
this.menuData = JSON.parse(res.data[0])
|
}
|
||||||
this.changeMenu(this.menuData, 0)
|
})
|
||||||
// this.getButtonArray(this.menuData)
|
},
|
||||||
}
|
// 初始化页面
|
||||||
},
|
initPage() {
|
||||||
// 菜单树添加参数
|
this.getTableList()
|
||||||
changeMenu(data, num) {
|
this.getOrganList()
|
||||||
let level = num
|
},
|
||||||
level = level + 1
|
//获取菜单树
|
||||||
data.forEach(el => {
|
async getMenuData() {
|
||||||
el.buttonList = []
|
// let res = await GetMenuButton({});
|
||||||
el.type = false
|
let res = await authApi('sysMenuConfigService', '', 'queryEntityTree', '', { state: 0 })
|
||||||
// el.level = level
|
if (res.status == 200) {
|
||||||
if (el.children != null && el.children && el.children.length) {
|
let arr = res.attribute
|
||||||
this.changeMenu(el.children, level)
|
this.menuData = res.attribute
|
||||||
}
|
this.changeMenu(this.menuData, 0)
|
||||||
})
|
// this.getButtonArray(this.menuData)
|
||||||
},
|
}
|
||||||
// 获取用户信息列表
|
},
|
||||||
async getTableList() {
|
// 菜单树添加参数
|
||||||
this.tabLoading = true
|
changeMenu(data, num) {
|
||||||
this.tableData = []
|
let level = num
|
||||||
let params = {
|
level = level + 1
|
||||||
...this.pageModel
|
data.forEach((el) => {
|
||||||
}
|
el.buttonList = []
|
||||||
let res = await userGetBillList(params)
|
el.type = false
|
||||||
if (res.code === 1) {
|
if (el.children != null && el.children && el.children.length) {
|
||||||
this.tableData = res.data[1]
|
this.changeMenu(el.children, level)
|
||||||
this.$nextTick(() => {
|
}
|
||||||
this.$refs.userCustomtable.clearRadioIndex()
|
})
|
||||||
|
},
|
||||||
this.$refs.userLayout.setPageTotal(res.data[0])
|
addToButtonList(arr, newArr) {
|
||||||
})
|
newArr.forEach((newItem) => {
|
||||||
this.tabLoading = false
|
this.addToButtonListRecursive(
|
||||||
}
|
arr,
|
||||||
},
|
newItem.op_MenuID,
|
||||||
|
newItem.op_OperateKindList
|
||||||
getButtonArray(menuData) {
|
)
|
||||||
menuData.forEach((el, index) => {
|
})
|
||||||
this.allButtonList.forEach(item => {
|
return arr
|
||||||
if (el.id == item.MenuID) {
|
},
|
||||||
item.active = false
|
addToButtonListRecursive(arr, targetId, operateKindList) {
|
||||||
el.buttonList.push(item)
|
for (let i = 0; i < arr.length; i++) {
|
||||||
}
|
const item = arr[i]
|
||||||
})
|
if (item.id == targetId) {
|
||||||
if (el.children != null && el.children && el.children.length) {
|
item.buttonList = operateKindList.split(',')
|
||||||
this.getButtonArray(el.children)
|
return item
|
||||||
}
|
}
|
||||||
})
|
if (item.children && item.children.length > 0) {
|
||||||
},
|
this.addToButtonListRecursive(
|
||||||
// 单选
|
item.children,
|
||||||
userRadioChange(val) {
|
targetId,
|
||||||
this.radioIndex = val.index
|
operateKindList
|
||||||
this.userRadioId = val.u_UserID
|
)
|
||||||
},
|
}
|
||||||
// 获取组织列表
|
}
|
||||||
async getOrganList() {
|
},
|
||||||
this.$refs.baseTree.treeLoading = true
|
// 获取用户信息列表
|
||||||
setTimeout(() => {
|
async getTableList() {
|
||||||
this.$refs.baseTree.treeLoading = false
|
this.tabLoading = true
|
||||||
}, 3000)
|
this.tableData = []
|
||||||
let params = {
|
let params = {
|
||||||
// CompanyID: "46"
|
...this.pageModel
|
||||||
CompanyID: this.$store.state.user.companyID ? this.$store.state.user.companyID : getCompanyId()
|
}
|
||||||
}
|
let res = await authApi('sysUserService', '', 'queryEntityPage', '', params)
|
||||||
let res = await GetOrganTree(params)
|
if (res.status == 200) {
|
||||||
if (res.success === 'true') {
|
this.tableData = res.attribute.list
|
||||||
this.orangData = JSON.parse(res.data[0])
|
this.$nextTick(() => {
|
||||||
this.$refs.baseTree.treeLoading = false
|
this.$refs.userCustomtable.clearRadioIndex()
|
||||||
}
|
this.$refs.userLayout.setPageTotal(res.attribute.total)
|
||||||
},
|
})
|
||||||
|
this.tabLoading = false
|
||||||
// 树状图点击
|
}
|
||||||
orangClick(data) {
|
},
|
||||||
this.pageModel.departmentID = data.id
|
getButtonArray(menuData) {
|
||||||
this.resetTable()
|
menuData.forEach((el, index) => {
|
||||||
// this.result()
|
this.allButtonList.forEach((item) => {
|
||||||
},
|
if (el.id == item.MenuID) {
|
||||||
|
item.active = false
|
||||||
resetTable() {
|
el.buttonList.push(item)
|
||||||
this.pageModel.page = 1
|
}
|
||||||
this.userRadioId = false
|
})
|
||||||
this.radioIndex = false
|
if (el.children != null && el.children && el.children.length) {
|
||||||
this.$nextTick(() => {
|
this.getButtonArray(el.children)
|
||||||
this.$refs.userCustomtable.clearRadioIndex()
|
}
|
||||||
this.$refs.userLayout.pageClear()
|
})
|
||||||
})
|
},
|
||||||
this.getTableList()
|
// 单选
|
||||||
},
|
userRadioChange(val) {
|
||||||
// 操作按钮事件
|
this.radioIndex = val.index
|
||||||
getFuncBtn(btnEven) {
|
this.userRadioId = val.id
|
||||||
if (this.radioIndex === false) {
|
},
|
||||||
this.$vmNews("请选择一条数据")
|
// 获取组织列表
|
||||||
return
|
async getOrganList() {
|
||||||
}
|
this.$refs.baseTree.treeLoading = true
|
||||||
this[btnEven.btnFunciton]()
|
setTimeout(() => {
|
||||||
},
|
this.$refs.baseTree.treeLoading = false
|
||||||
setting() {
|
}, 3000)
|
||||||
|
const res = await authApi('sysOrganService', '', 'queryEntityTree', '', { state: 0 })
|
||||||
|
// let res = await GetOrganTree(params);
|
||||||
|
if (res.status == 200) {
|
||||||
|
this.orangData = res.attribute
|
||||||
|
this.$refs.baseTree.treeLoading = false
|
||||||
|
}
|
||||||
|
},
|
||||||
|
// 树状图点击
|
||||||
|
orangClick(data) {
|
||||||
|
this.pageModel.organId = data.id
|
||||||
|
this.resetTable()
|
||||||
|
// this.result()
|
||||||
|
},
|
||||||
|
resetTable() {
|
||||||
|
this.pageModel.pageNum = 1
|
||||||
|
this.userRadioId = false
|
||||||
|
this.radioIndex = false
|
||||||
|
this.$nextTick(() => {
|
||||||
|
this.$refs.userCustomtable.clearRadioIndex()
|
||||||
|
this.$refs.userLayout.pageClear()
|
||||||
|
})
|
||||||
|
this.getTableList()
|
||||||
|
},
|
||||||
|
// 操作按钮事件
|
||||||
|
getFuncBtn(btnEven) {
|
||||||
|
if (this.radioIndex === false) {
|
||||||
|
this.$vmNews('请选择一条数据')
|
||||||
|
return
|
||||||
|
}
|
||||||
|
this[btnEven.btnFunciton]()
|
||||||
|
},
|
||||||
|
//点击权限设置
|
||||||
|
async setting() {
|
||||||
this.getMenuData()
|
this.getMenuData()
|
||||||
this.settingDialog = true
|
this.permissionPopup = true
|
||||||
this.activeName = "jurisdictionSetting"
|
this.$nextTick(async() => {
|
||||||
this.GetPppedomData()
|
this.$refs.rightDialog.drawer = true
|
||||||
|
this.$refs.rightDialog.buttonLoading = true
|
||||||
|
let params = {
|
||||||
|
id: this.userRadioId,
|
||||||
|
kindId: 1
|
||||||
|
}
|
||||||
|
const res = await authApi('sysUserService', '', 'jurisdiction', '',params)
|
||||||
|
if (res.status == 200) {
|
||||||
|
console.log(res,'进来了')
|
||||||
|
const data = res.attribute
|
||||||
|
// let menuIDs =
|
||||||
|
// data[0].length > 0 ? data[0][0].fp_MenuIdList.split(',') : []
|
||||||
|
// let echo = data[1].length > 0 ? data[1] : []
|
||||||
|
// let dataPermissions = data[2].length > 0 ? data[2] : []
|
||||||
|
// this.$refs.rightDialog.$refs.dataPermissions.selectedList =
|
||||||
|
// dataPermissions
|
||||||
|
// this.$refs.rightDialog.$refs.layOutPermissions.selectedList = res
|
||||||
|
// .data[3][0]
|
||||||
|
// ? res.data[3][0].widgetList
|
||||||
|
// : ''
|
||||||
|
// this.$refs.rightDialog.exhibitList(menuIDs, echo, this.userRadioId)
|
||||||
|
this.$refs.rightDialog.exhibitList(res.attribute.menvVoList,res.attribute.homeList,this.userRadioId)
|
||||||
|
}
|
||||||
|
})
|
||||||
|
},
|
||||||
|
// setting() {
|
||||||
|
// this.settingDialog = true
|
||||||
|
// this.activeName = "jurisdictionSetting"
|
||||||
|
// this.GetPppedomData()
|
||||||
|
// },
|
||||||
|
async GetPppedomData() {
|
||||||
|
let params = {
|
||||||
|
objectID: this.userRadioId,
|
||||||
|
kindid: 1
|
||||||
|
}
|
||||||
|
|
||||||
},
|
let res = await GetPppedomSet(params)
|
||||||
async GetPppedomData() {
|
this.$refs.jurisdictionSetting.menuLoading = true
|
||||||
let params = {
|
setTimeout(() => {
|
||||||
objectID: this.userRadioId,
|
this.$refs.jurisdictionSetting.menuLoading = false
|
||||||
kindid: 1
|
}, 3000)
|
||||||
}
|
if (res.code == 1) {
|
||||||
|
const data = res.data
|
||||||
let res = await GetPppedomSet(params)
|
let menuIDs =
|
||||||
this.$refs.jurisdictionSetting.menuLoading = true
|
data[0].length > 0 ? data[0][0].fp_MenuIdList.split(',') : []
|
||||||
setTimeout(() => {
|
this.$refs.jurisdictionSetting.$refs.menuTree.selectData = menuIDs
|
||||||
this.$refs.jurisdictionSetting.menuLoading = false
|
this.$refs.jurisdictionSetting.$refs.menuTree.checkChange(menuIDs)
|
||||||
}, 3000)
|
let buttonPopedom = this.getbuttonPopedomList(res.data[1])
|
||||||
if (res.code == 1) {
|
this.$refs.buttonSetting.buttonPopedom = buttonPopedom
|
||||||
const data = res.data
|
let activeList = this.getActiveList(res.data[2])
|
||||||
let menuIDs = data[0].length > 0 ? data[0][0].fp_MenuIdList.split(',') : []
|
this.$refs.dataSetting.activeList = activeList
|
||||||
this.$refs.jurisdictionSetting.$refs.menuTree.selectData = menuIDs
|
this.$refs.jurisdictionSetting.menuLoading = false
|
||||||
this.$refs.jurisdictionSetting.$refs.menuTree.checkChange(menuIDs)
|
// selectData
|
||||||
let buttonPopedom = this.getbuttonPopedomList(res.data[1])
|
}
|
||||||
this.$refs.buttonSetting.buttonPopedom = buttonPopedom
|
},
|
||||||
let activeList = this.getActiveList(res.data[2])
|
getActiveList(data) {
|
||||||
this.$refs.dataSetting.activeList = activeList
|
let array = []
|
||||||
this.$refs.jurisdictionSetting.menuLoading = false
|
data.forEach((el) => {
|
||||||
// selectData
|
el.dp_popeList.split(',').forEach((item) => {
|
||||||
}
|
array.push(item)
|
||||||
},
|
})
|
||||||
getActiveList(data) {
|
})
|
||||||
let array = []
|
return array
|
||||||
data.forEach(el => {
|
},
|
||||||
el.dp_popeList.split(',').forEach(item => {
|
getbuttonPopedomList(data) {
|
||||||
array.push(item)
|
let array = []
|
||||||
})
|
data.forEach((el) => {
|
||||||
})
|
el.op_OperateKindList.split(',').forEach((item) => {
|
||||||
return array
|
array.push(item)
|
||||||
},
|
})
|
||||||
getbuttonPopedomList(data) {
|
})
|
||||||
let array = []
|
return array
|
||||||
data.forEach(el => {
|
},
|
||||||
el.op_OperateKindList.split(',').forEach(item => {
|
pageChange(model) {
|
||||||
array.push(item)
|
this.pageModel.pageNum = model.page
|
||||||
})
|
this.pageModel.pageSize = model.limit
|
||||||
})
|
this.getTableList()
|
||||||
return array
|
},
|
||||||
},
|
settingConfirmClick() {
|
||||||
pageChange(model) {
|
let menuPopedom = this.$refs.jurisdictionSetting.menuPopedom.join(',')
|
||||||
this.pageModel.page = model.page
|
let buttonPopedom = this.getButtonPopedom(
|
||||||
this.pageModel.limit = model.limit
|
this.$refs.buttonSetting.classifyButtonList
|
||||||
this.getTableList()
|
)
|
||||||
},
|
let dataPopedom = this.getDataPopedom(this.$refs.dataSetting.dataList)
|
||||||
settingConfirmClick() {
|
let params = {
|
||||||
let menuPopedom = this.$refs.jurisdictionSetting.menuPopedom.join(",")
|
kindid: 1,
|
||||||
let buttonPopedom = this.getButtonPopedom(this.$refs.buttonSetting.classifyButtonList)
|
objectID: this.userRadioId,
|
||||||
let dataPopedom = this.getDataPopedom(this.$refs.dataSetting.dataList)
|
menuPopedom: menuPopedom,
|
||||||
let params = {
|
buttonPopedom: buttonPopedom,
|
||||||
kindid: 1,
|
dataPopedom: dataPopedom
|
||||||
objectID: this.userRadioId,
|
}
|
||||||
menuPopedom: menuPopedom,
|
this.saveData(params)
|
||||||
buttonPopedom: buttonPopedom,
|
},
|
||||||
dataPopedom: dataPopedom,
|
async saveData(params) {
|
||||||
}
|
let res = await PopedomSaveData(params)
|
||||||
this.saveData(params)
|
if (res.code == 1) {
|
||||||
},
|
this.$vmNews('保存成功', 'success')
|
||||||
async saveData(params) {
|
this.activeName = 'jurisdictionSetting'
|
||||||
let res = await PopedomSaveData(params)
|
this.settingDialog = false
|
||||||
if (res.code == 1) {
|
this.$store.dispatch('GenerateRoutes').then((accessRoutes) => {
|
||||||
this.$vmNews("保存成功", 'success')
|
// 根据roles权限生成可访问的路由表
|
||||||
this.activeName = "jurisdictionSetting"
|
for (let i = 0, length = accessRoutes.length; i < length; i += 1) {
|
||||||
this.settingDialog = false
|
const element = accessRoutes[i]
|
||||||
|
router.addRoutes(accessRoutes) // 动态添加可访问路由表
|
||||||
this.$store.dispatch('GenerateRoutes').then(accessRoutes => {
|
}
|
||||||
// 根据roles权限生成可访问的路由表
|
localStorage.setItem('routeList', JSON.stringify(accessRoutes))
|
||||||
for (let i = 0, length = accessRoutes.length; i < length; i += 1) {
|
})
|
||||||
const element = accessRoutes[i]
|
}
|
||||||
router.addRoutes(accessRoutes) // 动态添加可访问路由表
|
},
|
||||||
}
|
getDataPopedom(dataPopedom) {
|
||||||
localStorage.setItem('routeList', JSON.stringify(accessRoutes))
|
let array = []
|
||||||
})
|
dataPopedom.forEach((el) => {
|
||||||
}
|
el.dp_popeList = []
|
||||||
},
|
el.buttonList.forEach((item) => {
|
||||||
getDataPopedom(dataPopedom) {
|
if (item.type) {
|
||||||
let array = []
|
el.dp_popeList.push(item.id)
|
||||||
dataPopedom.forEach(el => {
|
}
|
||||||
el.dp_popeList = []
|
})
|
||||||
el.buttonList.forEach(item => {
|
})
|
||||||
if (item.type) {
|
dataPopedom.forEach((el) => {
|
||||||
el.dp_popeList.push(item.id)
|
if (el.dp_popeList.length > 0) {
|
||||||
}
|
let params = {
|
||||||
})
|
dp_billKindID: el.billKindID,
|
||||||
})
|
dp_popeList: el.dp_popeList.join(',')
|
||||||
dataPopedom.forEach(el => {
|
}
|
||||||
if (el.dp_popeList.length > 0) {
|
array.push(params)
|
||||||
let params = {
|
}
|
||||||
dp_billKindID: el.billKindID,
|
})
|
||||||
dp_popeList: el.dp_popeList.join(',')
|
return array
|
||||||
}
|
},
|
||||||
array.push(params)
|
getButtonPopedom(buttonPopedom) {
|
||||||
}
|
let array = []
|
||||||
})
|
// let op_OperateKindList = []
|
||||||
return array
|
buttonPopedom.forEach((el) => {
|
||||||
},
|
el.op_MenuID = el.id
|
||||||
getButtonPopedom(buttonPopedom) {
|
el.op_OperateKindList = []
|
||||||
let array = []
|
el.buttonList.forEach((item) => {
|
||||||
// let op_OperateKindList = []
|
if (item.type) {
|
||||||
buttonPopedom.forEach(el => {
|
el.op_OperateKindList.push(item.id)
|
||||||
el.op_MenuID = el.id
|
}
|
||||||
el.op_OperateKindList = []
|
})
|
||||||
el.buttonList.forEach(item => {
|
})
|
||||||
if (item.type) {
|
buttonPopedom.forEach((el) => {
|
||||||
el.op_OperateKindList.push(item.id)
|
if (el.op_OperateKindList.length > 0) {
|
||||||
}
|
let params = {
|
||||||
})
|
op_MenuID: el.op_MenuID,
|
||||||
})
|
op_OperateKindList: el.op_OperateKindList.join(',')
|
||||||
buttonPopedom.forEach(el => {
|
}
|
||||||
if (el.op_OperateKindList.length > 0) {
|
array.push(params)
|
||||||
let params = {
|
}
|
||||||
op_MenuID: el.op_MenuID,
|
})
|
||||||
op_OperateKindList: el.op_OperateKindList.join(',')
|
return array
|
||||||
}
|
}
|
||||||
array.push(params)
|
}
|
||||||
}
|
|
||||||
})
|
|
||||||
return array
|
|
||||||
},
|
|
||||||
},
|
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
<style scoped>
|
<style scoped lang="scss">
|
||||||
>>>.el-dialog__body {
|
> > > .el-dialog__body {
|
||||||
padding: 0 25px;
|
padding: 0 25px;
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
<style scoped lang='scss'>
|
<style scoped lang="scss">
|
||||||
.roleName {
|
.roleName {
|
||||||
padding: 10px 0;
|
padding: 10px 0;
|
||||||
width: 90px;
|
width: 90px;
|
||||||
border: 2px solid #f2f2f2;
|
border: 2px solid #f2f2f2;
|
||||||
background-color: #f2f2f2;
|
background-color: #f2f2f2;
|
||||||
margin: 0px 10px 10px 0px;
|
margin: 0px 10px 10px 0px;
|
||||||
text-align: center;
|
text-align: center;
|
||||||
cursor: pointer;
|
cursor: pointer;
|
||||||
box-shadow: 0 0 0 2px #f2f2f2;
|
box-shadow: 0 0 0 2px #f2f2f2;
|
||||||
border-radius: 5px;
|
border-radius: 5px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.active {
|
.active {
|
||||||
background-color: #00a490;
|
background-color: #00a490;
|
||||||
border: 2px solid #ffffff;
|
border: 2px solid #ffffff;
|
||||||
color: white;
|
color: white;
|
||||||
box-shadow: 0 0 0 2px #00a490;
|
box-shadow: 0 0 0 2px #00a490;
|
||||||
}
|
}
|
||||||
|
|
||||||
.bigTitle {
|
.bigTitle {
|
||||||
padding-bottom: 10px;
|
padding-bottom: 10px;
|
||||||
margin: 10px 0;
|
margin: 10px 0;
|
||||||
font-size: 16px;
|
font-size: 16px;
|
||||||
font-weight: bold;
|
font-weight: bold;
|
||||||
border-bottom: 1px solid #ccc;
|
border-bottom: 1px solid #ccc;
|
||||||
}
|
}
|
||||||
|
|
||||||
.organizationBody {
|
.organizationBody {
|
||||||
display: flex;
|
display: flex;
|
||||||
justify-content: space-evenly;
|
justify-content: space-evenly;
|
||||||
background-color: #f2f3f4;
|
background-color: #f2f3f4;
|
||||||
padding: 10px
|
padding: 10px;
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
|
|
|
@ -1,13 +1,13 @@
|
||||||
<template>
|
<template>
|
||||||
<div flex v-loading="menuLoading">
|
<div flex v-loading="menuLoading">
|
||||||
<base-layout ref="layout" :bodyHight="treeHight" :operateButtonSwitch="false">
|
<base-layout ref="layout" :bodyHight="treeHight" :operateButtonSwitch="false">
|
||||||
<div slot="main">
|
<div slot="main">
|
||||||
<base-tree ref="menuTree" :isCenter="false" :showCheckbox="true" :menuData="menuData" :setting="true"
|
<base-tree ref="menuTree" :isCenter="false" :showCheckbox="true" :menuData="menuData" :setting="true"
|
||||||
@checkChange="checkChange">
|
@checkChange="checkChange">
|
||||||
</base-tree>
|
</base-tree>
|
||||||
</div>
|
</div>
|
||||||
</base-layout>
|
</base-layout>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
|
@ -16,102 +16,102 @@ import baseTable from "@/components/base/baseTable";
|
||||||
import baseTree from "@/components/base/BaseMenuTree/index.vue";
|
import baseTree from "@/components/base/BaseMenuTree/index.vue";
|
||||||
import configData from "./configData";
|
import configData from "./configData";
|
||||||
import {
|
import {
|
||||||
GetPppedomSet,
|
GetPppedomSet,
|
||||||
GetAllButton,
|
GetAllButton,
|
||||||
} from '@/api/apis/jurisdiction'
|
} from '@/api/apis/jurisdiction'
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: "jurisdictionSetting",
|
name: "jurisdictionSetting",
|
||||||
components: {
|
components: {
|
||||||
baseLayout,
|
baseLayout,
|
||||||
baseTable,
|
baseTable,
|
||||||
baseTree
|
baseTree
|
||||||
},
|
},
|
||||||
props: {
|
props: {
|
||||||
objectID: {
|
objectID: {
|
||||||
type: [Number, String, Boolean],
|
type: [Number, String, Boolean],
|
||||||
default: false
|
default: false
|
||||||
},
|
},
|
||||||
menuData: {
|
menuData: {
|
||||||
type: Array,
|
type: Array,
|
||||||
default: []
|
default: []
|
||||||
},
|
},
|
||||||
|
|
||||||
},
|
},
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
treeHight: '500px',
|
treeHight: '500px',
|
||||||
mainHight: 'calc(100% - 80px)',
|
mainHight: 'calc(100% - 80px)',
|
||||||
classifyButtonList: [],
|
classifyButtonList: [],
|
||||||
buttonArray: [],
|
buttonArray: [],
|
||||||
colorsKey: false,
|
colorsKey: false,
|
||||||
menuLoading: false,
|
menuLoading: false,
|
||||||
menuPopedom: [],
|
menuPopedom: [],
|
||||||
buttonPopedom: []
|
buttonPopedom: []
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
computed: {
|
computed: {
|
||||||
|
|
||||||
},
|
},
|
||||||
watch: {
|
watch: {
|
||||||
|
|
||||||
},
|
},
|
||||||
created() {
|
created() {
|
||||||
|
|
||||||
},
|
},
|
||||||
onShow() { },
|
onShow() { },
|
||||||
mounted() {
|
mounted() {
|
||||||
this.initPage()
|
this.initPage()
|
||||||
},
|
},
|
||||||
filters: {
|
filters: {
|
||||||
|
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
// 初始化页面
|
// 初始化页面
|
||||||
initPage() {
|
initPage() {
|
||||||
},
|
},
|
||||||
checkChange(ids, checkdata) {
|
checkChange(ids, checkdata) {
|
||||||
this.menuPopedom = ids
|
this.menuPopedom = ids
|
||||||
this.checkdata = checkdata
|
this.checkdata = checkdata
|
||||||
},
|
},
|
||||||
|
|
||||||
typeChange(item) {
|
typeChange(item) {
|
||||||
item.type = !item.type
|
item.type = !item.type
|
||||||
this.$forceUpdate()
|
this.$forceUpdate()
|
||||||
},
|
},
|
||||||
|
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
<style scoped lang='scss'>
|
<style scoped lang='scss'>
|
||||||
.buttonSetting {
|
.buttonSetting {
|
||||||
margin: 10px 0;
|
margin: 10px 0;
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
<style lang="scss">
|
<style lang="scss">
|
||||||
$activeColor: var(--bg-color, "#00aaff");
|
// $activeColor: var(--bg-color, "#00aaff");
|
||||||
|
|
||||||
.el-icon-star-on {
|
// .el-icon-star-on {
|
||||||
/* color: #00aa00; */
|
// /* color: #00aa00; */
|
||||||
color: $activeColor;
|
// color: $activeColor;
|
||||||
}
|
// }
|
||||||
|
|
||||||
.buttonSetting {
|
.buttonSetting {
|
||||||
.recordText {
|
.recordText {
|
||||||
border: 1px solid #fff;
|
border: 1px solid #fff;
|
||||||
width: 100px;
|
width: 100px;
|
||||||
padding: 10px 0;
|
padding: 10px 0;
|
||||||
text-align: center;
|
text-align: center;
|
||||||
font-size: 12px;
|
font-size: 12px;
|
||||||
cursor: pointer;
|
cursor: pointer;
|
||||||
background: #f2f2f2;
|
background: #f2f2f2;
|
||||||
color: #e0e0e0;
|
color: #e0e0e0;
|
||||||
margin: 0px 3px;
|
margin: 0px 3px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.recordText.active {
|
// .recordText.active {
|
||||||
background: $activeColor;
|
// background: $activeColor;
|
||||||
color: #fff;
|
// color: #fff;
|
||||||
}
|
// }
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
|
|
|
@ -0,0 +1,121 @@
|
||||||
|
<template>
|
||||||
|
<div>
|
||||||
|
<el-table
|
||||||
|
ref="multipleTable"
|
||||||
|
:data="tableData"
|
||||||
|
style="width: 100%"
|
||||||
|
:show-header="false"
|
||||||
|
>
|
||||||
|
<el-table-column prop="billName" label="模块" width="120">
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column prop="dataList" label="字段">
|
||||||
|
<template slot-scope="scope">
|
||||||
|
<i
|
||||||
|
class="el-icon-star-on"
|
||||||
|
style="
|
||||||
|
height: 30px;
|
||||||
|
line-height: 30px;
|
||||||
|
font-size: 25px;
|
||||||
|
margin-right: 7px;
|
||||||
|
"
|
||||||
|
v-show="btnShowHandle(homeList,true)"
|
||||||
|
@click="cancellation(homeList)"
|
||||||
|
></i>
|
||||||
|
<i
|
||||||
|
class="el-icon-star-on"
|
||||||
|
style="
|
||||||
|
height: 30px;
|
||||||
|
line-height: 30px;
|
||||||
|
font-size: 25px;
|
||||||
|
margin-right: 7px;
|
||||||
|
color: #808080;
|
||||||
|
"
|
||||||
|
v-show="btnShowHandle(homeList,false)"
|
||||||
|
@click="selectAllButton(homeList)"
|
||||||
|
></i>
|
||||||
|
<el-checkbox v-model="item.check" v-for="item in homeList">{{ item.name }}</el-checkbox>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
</el-table>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
import config from '@/views/doraChunk/config/indexChunkConfig.js'
|
||||||
|
import { mapMutations } from 'vuex'
|
||||||
|
|
||||||
|
export default {
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
tableData: [
|
||||||
|
{
|
||||||
|
billName: '首页拖拽模块',
|
||||||
|
dataList: config.config.map((item) => {
|
||||||
|
let obj = {
|
||||||
|
id: item.componentName,
|
||||||
|
name: item.name
|
||||||
|
}
|
||||||
|
return obj
|
||||||
|
}),
|
||||||
|
buttonList: []
|
||||||
|
|
||||||
|
}
|
||||||
|
],
|
||||||
|
selectedList: '',
|
||||||
|
homeList: []
|
||||||
|
}
|
||||||
|
},
|
||||||
|
|
||||||
|
created() {
|
||||||
|
},
|
||||||
|
|
||||||
|
components: {},
|
||||||
|
|
||||||
|
computed: {},
|
||||||
|
|
||||||
|
mounted() {
|
||||||
|
},
|
||||||
|
|
||||||
|
beforeUpdate() {
|
||||||
|
this.handleTabClick()
|
||||||
|
},
|
||||||
|
|
||||||
|
methods: {
|
||||||
|
//判断全选是否显示
|
||||||
|
btnShowHandle(list, flag = false) {
|
||||||
|
if (!list.length) return false
|
||||||
|
let flagResult = list.every(item => {
|
||||||
|
return item.check
|
||||||
|
})
|
||||||
|
if (flag) {
|
||||||
|
return flagResult
|
||||||
|
} else {
|
||||||
|
return !flagResult
|
||||||
|
}
|
||||||
|
},
|
||||||
|
selectAllButton(item) {
|
||||||
|
console.log(item)
|
||||||
|
item.forEach(item => {
|
||||||
|
item.check = true
|
||||||
|
})
|
||||||
|
},
|
||||||
|
cancellation(item) {
|
||||||
|
item.forEach(item => {
|
||||||
|
item.check = false
|
||||||
|
})
|
||||||
|
},
|
||||||
|
handleTabClick() {
|
||||||
|
this.$nextTick(() => {
|
||||||
|
this.$refs.multipleTable && this.$refs.multipleTable.doLayout()
|
||||||
|
})
|
||||||
|
}
|
||||||
|
},
|
||||||
|
watch: {
|
||||||
|
selectedList(newV, oldV) {
|
||||||
|
let tempArr = newV.split(',')
|
||||||
|
this.tableData[0].buttonList = tempArr
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
<style scoped lang="scss"></style>
|
|
@ -1,131 +1,131 @@
|
||||||
<template>
|
<template>
|
||||||
<div v-if="useMenuList">
|
<div v-if="useMenuList">
|
||||||
<div v-for="(item, index) in menuList" :key="index" class="classifyButtonList">
|
<div v-for="(item, index) in menuList" :key="index" class="classifyButtonList">
|
||||||
<div flex="cross:center" flex-wrap>
|
<div flex="cross:center" flex-wrap>
|
||||||
<div class="title" @click="menuclick(item)">
|
<div class="title" @click="menuclick(item)">
|
||||||
<i :class="item.type?'el-icon-star-on':'el-icon-star-off'"></i>
|
<i :class="item.type?'el-icon-star-on':'el-icon-star-off'"></i>
|
||||||
<span :class="{'active':item.type}">{{item.label}}</span>
|
<span :class="{'active':item.type}">{{item.label}}</span>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
<menu-tree v-if="item.children" :use-menu-list="true" :parent-tree-data="item.children" ></menu-tree>
|
<menu-tree v-if="item.children" :use-menu-list="true" :parent-tree-data="item.children" ></menu-tree>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
export default {
|
export default {
|
||||||
name: "menuTree",
|
name: "menuTree",
|
||||||
props: {
|
props: {
|
||||||
useMenuList: {
|
useMenuList: {
|
||||||
type: Boolean,
|
type: Boolean,
|
||||||
default: false,
|
default: false,
|
||||||
},
|
},
|
||||||
parentTreeData: {
|
parentTreeData: {
|
||||||
type: Array,
|
type: Array,
|
||||||
default: () => {
|
default: () => {
|
||||||
return []
|
return []
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
menuList: [],
|
menuList: [],
|
||||||
menuPopedom: []
|
menuPopedom: []
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
created() {
|
created() {
|
||||||
this.menuList = Object.assign([], this.parentTreeData)
|
this.menuList = Object.assign([], this.parentTreeData)
|
||||||
},
|
},
|
||||||
|
|
||||||
methods: {
|
methods: {
|
||||||
menuclick(item) {
|
menuclick(item) {
|
||||||
item.type = !item.type
|
item.type = !item.type
|
||||||
// if (item.children != null && item.children && item.children.length) {
|
// if (item.children != null && item.children && item.children.length) {
|
||||||
// this.allClick(item.children,item.type )
|
// this.allClick(item.children,item.type )
|
||||||
// }
|
// }
|
||||||
this.menuPopedom.push(item.id)
|
this.menuPopedom.push(item.id)
|
||||||
this.setMenuPopedom(this.menuPopedom)
|
this.setMenuPopedom(this.menuPopedom)
|
||||||
this.$forceUpdate()
|
this.$forceUpdate()
|
||||||
},
|
},
|
||||||
setMenuPopedom(arr) {
|
setMenuPopedom(arr) {
|
||||||
let newArr = []
|
let newArr = []
|
||||||
arr.forEach((val)=>{
|
arr.forEach((val)=>{
|
||||||
if(newArr.indexOf(val) == -1){
|
if(newArr.indexOf(val) == -1){
|
||||||
newArr.push(val)
|
newArr.push(val)
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
this.menuPopedom = newArr
|
this.menuPopedom = newArr
|
||||||
},
|
},
|
||||||
allClick(data, type) {
|
allClick(data, type) {
|
||||||
data.forEach(el => {
|
data.forEach(el => {
|
||||||
el.type = type
|
el.type = type
|
||||||
if (el.children != null && el.children && el.children.length) {
|
if (el.children != null && el.children && el.children.length) {
|
||||||
this.allClick(el.children, type)
|
this.allClick(el.children, type)
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
changeMenu(data, num) {
|
changeMenu(data, num) {
|
||||||
let level = num
|
let level = num
|
||||||
level = level + 1
|
level = level + 1
|
||||||
data.forEach(el => {
|
data.forEach(el => {
|
||||||
el.buttonList = []
|
el.buttonList = []
|
||||||
// el.isShow = true
|
// el.isShow = true
|
||||||
el.level = level
|
el.level = level
|
||||||
if (el.children != null && el.children && el.children.length) {
|
if (el.children != null && el.children && el.children.length) {
|
||||||
this.changeMenu(el.children, level)
|
this.changeMenu(el.children, level)
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
<style lang="scss">
|
<style lang="scss">
|
||||||
$activeColor: var(--bg-color, "#00aaff");
|
$activeColor: var(--bg-color, "#00aaff");
|
||||||
|
|
||||||
.el-icon-star-on {
|
.el-icon-star-on {
|
||||||
/* color: #00aa00; */
|
/* color: #00aa00; */
|
||||||
color: $activeColor;
|
color: $activeColor;
|
||||||
}
|
}
|
||||||
|
|
||||||
.classifyButtonList {
|
.classifyButtonList {
|
||||||
s .active {
|
s .active {
|
||||||
color: $activeColor;
|
color: $activeColor;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// .recordText {
|
// .recordText {
|
||||||
// border: 1px solid #fff;
|
// border: 1px solid #fff;
|
||||||
// padding: 3px 10px;
|
// padding: 3px 10px;
|
||||||
// text-align: center;
|
// text-align: center;
|
||||||
// font-size: 14px;
|
// font-size: 14px;
|
||||||
// cursor: pointer;
|
// cursor: pointer;
|
||||||
// background: #f2f2f2;
|
// background: #f2f2f2;
|
||||||
// color: #4e4e4e;
|
// color: #4e4e4e;
|
||||||
// margin:5px;
|
// margin:5px;
|
||||||
// border-radius: 5px;
|
// border-radius: 5px;
|
||||||
// }
|
// }
|
||||||
|
|
||||||
// .recordText.active {
|
// .recordText.active {
|
||||||
// background-color: $activeColor;
|
// background-color: $activeColor;
|
||||||
// color: white;
|
// color: white;
|
||||||
// }
|
// }
|
||||||
</style>
|
</style>
|
||||||
<style scoped lang="scss">
|
<style scoped lang="scss">
|
||||||
.tree-div {}
|
.tree-div {}
|
||||||
|
|
||||||
.classifyButtonList {
|
.classifyButtonList {
|
||||||
// margin-bottom: 10px;
|
// margin-bottom: 10px;
|
||||||
padding: 0 0 0 10px;
|
padding: 0 0 0 10px;
|
||||||
// cursor: pointer;
|
// cursor: pointer;
|
||||||
line-height: 25px;
|
line-height: 25px;
|
||||||
|
|
||||||
.title {
|
.title {
|
||||||
// text-align: right;
|
// text-align: right;
|
||||||
cursor: pointer;
|
cursor: pointer;
|
||||||
width: 100%;
|
width: 100%;
|
||||||
border-bottom: 1px solid #ccc;
|
border-bottom: 1px solid #ccc;
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
|
|
|
@ -1,410 +1,410 @@
|
||||||
<template>
|
<template>
|
||||||
<div>
|
<div>
|
||||||
<el-tabs v-model="activeName" type="card" @tab-click="handleClick">
|
<el-tabs v-model="activeName" type="card" @tab-click="handleClick">
|
||||||
<el-tab-pane label="菜单权限" name="first">
|
<el-tab-pane label="菜单权限" name="first">
|
||||||
<!-- 最外围 -->
|
<!-- 最外围 -->
|
||||||
<div v-for="item in dataList">
|
<div v-for="item in dataList">
|
||||||
<div class="listBox">
|
<div class="listBox">
|
||||||
<div class="list p-10" @click="muenclick(1,item)">
|
<div class="list p-10" @click="muenclick(1,item)">
|
||||||
<i :class="item.type?'el-icon-star-on':'el-icon-star-off'"></i>
|
<i :class="item.type?'el-icon-star-on':'el-icon-star-off'"></i>
|
||||||
<p>{{item.title}}</p>
|
<p>{{item.title}}</p>
|
||||||
</div>
|
</div>
|
||||||
<div class="list" v-for="itemA in item.children">
|
<div class="list" v-for="itemA in item.children">
|
||||||
<div class="list p-10" @click="muenclick(2,itemA)">
|
<div class="list p-10" @click="muenclick(2,itemA)">
|
||||||
<i :class="itemA.type ?'el-icon-star-on':'el-icon-star-off'"></i>
|
<i :class="itemA.type ?'el-icon-star-on':'el-icon-star-off'"></i>
|
||||||
<p>{{itemA.title}}</p>
|
<p>{{itemA.title}}</p>
|
||||||
</div>
|
</div>
|
||||||
<div class="list p-10 ml-10" v-for="itemB in itemA.children" @click="muenclick(3,itemB)">
|
<div class="list p-10 ml-10" v-for="itemB in itemA.children" @click="muenclick(3,itemB)">
|
||||||
<i :class="itemB.type?'el-icon-star-on':'el-icon-star-off'"></i>
|
<i :class="itemB.type?'el-icon-star-on':'el-icon-star-off'"></i>
|
||||||
<p>{{itemB.title}}</p>
|
<p>{{itemB.title}}</p>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
</el-tab-pane>
|
</el-tab-pane>
|
||||||
<el-tab-pane label="按钮权限" name="second">
|
<el-tab-pane label="按钮权限" name="second">
|
||||||
<div class="p-10 list listBox" v-for="item in ButtonList">
|
<div class="p-10 list listBox" v-for="item in ButtonList">
|
||||||
<div style="display: flex;align-items: center;" @click="recordAll(item)">
|
<div style="display: flex;align-items: center;" @click="recordAll(item)">
|
||||||
<p>{{item.billid}}</p>
|
<p>{{item.billid}}</p>
|
||||||
<i :class="item.type?'el-icon-star-on':'el-icon-star-off'"></i>
|
<i :class="item.type?'el-icon-star-on':'el-icon-star-off'"></i>
|
||||||
</div>
|
</div>
|
||||||
<div style="display: flex;margin-left: 10px;">
|
<div style="display: flex;margin-left: 10px;">
|
||||||
<p class="recordText" v-for="el in item.dataDetail" :class="{'active':el.type}"
|
<p class="recordText" v-for="el in item.dataDetail" :class="{'active':el.type}"
|
||||||
@click="typeChange(el)">{{el.name}}</p>
|
@click="typeChange(el)">{{el.name}}</p>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</el-tab-pane>
|
</el-tab-pane>
|
||||||
<el-tab-pane label="数据权限" name="third">
|
<el-tab-pane label="数据权限" name="third">
|
||||||
<div class="p-10 list listBox" v-for="item in recordList">
|
<div class="p-10 list listBox" v-for="item in recordList">
|
||||||
<div style="display: flex;align-items: center;" @click="recordAll(item)">
|
<div style="display: flex;align-items: center;" @click="recordAll(item)">
|
||||||
<p>{{item.billid}}</p>
|
<p>{{item.billid}}</p>
|
||||||
<i :class="item.type?'el-icon-star-on':'el-icon-star-off'"></i>
|
<i :class="item.type?'el-icon-star-on':'el-icon-star-off'"></i>
|
||||||
</div>
|
</div>
|
||||||
<div style="display: flex;margin-left: 10px;">
|
<div style="display: flex;margin-left: 10px;">
|
||||||
<p class="recordText" v-for="el in item.dataDetail" :class="{'active':el.type}"
|
<p class="recordText" v-for="el in item.dataDetail" :class="{'active':el.type}"
|
||||||
@click="typeChange(el)">{{el.name}}</p>
|
@click="typeChange(el)">{{el.name}}</p>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</el-tab-pane>
|
</el-tab-pane>
|
||||||
</el-tabs>
|
</el-tabs>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import baseDialog from "@/components/base/BaseNewDialog/index.vue";
|
import baseDialog from "@/components/base/BaseNewDialog/index.vue";
|
||||||
export default {
|
export default {
|
||||||
name: "review",
|
name: "review",
|
||||||
components: {
|
components: {
|
||||||
baseDialog
|
baseDialog
|
||||||
},
|
},
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
activeName: 'first',
|
activeName: 'first',
|
||||||
// 数据权限
|
// 数据权限
|
||||||
ButtonList:[],
|
ButtonList:[],
|
||||||
recordList: [{
|
recordList: [{
|
||||||
billid: '合同管理',
|
billid: '合同管理',
|
||||||
type: false,
|
type: false,
|
||||||
ids:[],
|
ids:[],
|
||||||
dataDetail: [
|
dataDetail: [
|
||||||
{name: '浙江用安',
|
{name: '浙江用安',
|
||||||
id: 60,
|
id: 60,
|
||||||
type: false,
|
type: false,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
name: '销售部',
|
name: '销售部',
|
||||||
id: 58,
|
id: 58,
|
||||||
type: false,
|
type: false,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
name: '实施服务',
|
name: '实施服务',
|
||||||
id: 61,
|
id: 61,
|
||||||
type: false,
|
type: false,
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
billid: '项目管理',
|
billid: '项目管理',
|
||||||
type: true,
|
type: true,
|
||||||
dataDetail: [
|
dataDetail: [
|
||||||
{
|
{
|
||||||
name: '浙江用安',
|
name: '浙江用安',
|
||||||
id: 60,
|
id: 60,
|
||||||
type: false,
|
type: false,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
name: '销售部',
|
name: '销售部',
|
||||||
id: 58,
|
id: 58,
|
||||||
type: false,
|
type: false,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
name: '实施服务',
|
name: '实施服务',
|
||||||
id: 61,
|
id: 61,
|
||||||
type: false,
|
type: false,
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
dataList: [{
|
dataList: [{
|
||||||
title: '系统管理',
|
title: '系统管理',
|
||||||
type: 1,
|
type: 1,
|
||||||
id:1,
|
id:1,
|
||||||
children: [{
|
children: [{
|
||||||
title: '数据字典',
|
title: '数据字典',
|
||||||
type: false,
|
type: false,
|
||||||
id:2
|
id:2
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: '用户管理',
|
title: '用户管理',
|
||||||
type: 1,
|
type: 1,
|
||||||
id:3,
|
id:3,
|
||||||
children: [{
|
children: [{
|
||||||
title: '角色管理',
|
title: '角色管理',
|
||||||
type: true,
|
type: true,
|
||||||
id:4
|
id:4
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: '人员管理',
|
title: '人员管理',
|
||||||
type: false,
|
type: false,
|
||||||
id:5
|
id:5
|
||||||
},
|
},
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: '系统维护',
|
title: '系统维护',
|
||||||
type: false,
|
type: false,
|
||||||
id:6,
|
id:6,
|
||||||
children: [{
|
children: [{
|
||||||
title: 'LayUI图标库',
|
title: 'LayUI图标库',
|
||||||
type: false,
|
type: false,
|
||||||
id:7
|
id:7
|
||||||
}]
|
}]
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
watch: {
|
watch: {
|
||||||
dataList: {
|
dataList: {
|
||||||
deep: true, //深度监听设置为 true
|
deep: true, //深度监听设置为 true
|
||||||
handler: function(newV, oldV) {
|
handler: function(newV, oldV) {
|
||||||
newV.forEach(el => {
|
newV.forEach(el => {
|
||||||
el.children.forEach(item => {
|
el.children.forEach(item => {
|
||||||
if (item.type == true) {
|
if (item.type == true) {
|
||||||
el.type = true
|
el.type = true
|
||||||
}
|
}
|
||||||
if (item.children && item.children.length > 0) {
|
if (item.children && item.children.length > 0) {
|
||||||
item.children.forEach(last => {
|
item.children.forEach(last => {
|
||||||
if (last.type == true) {
|
if (last.type == true) {
|
||||||
el.type = true
|
el.type = true
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
recordList: {
|
recordList: {
|
||||||
deep: true, //深度监听设置为 true
|
deep: true, //深度监听设置为 true
|
||||||
handler: function(newV, oldV) {
|
handler: function(newV, oldV) {
|
||||||
let num = 0
|
let num = 0
|
||||||
newV.forEach(el => {
|
newV.forEach(el => {
|
||||||
el.dataDetail.forEach(item => {
|
el.dataDetail.forEach(item => {
|
||||||
if (item.type == true) {
|
if (item.type == true) {
|
||||||
el.type = true
|
el.type = true
|
||||||
num = num +1
|
num = num +1
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
if(num == 0){
|
if(num == 0){
|
||||||
el.type = false
|
el.type = false
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
|
||||||
methods: {
|
methods: {
|
||||||
|
|
||||||
getMenuTreeselect() {
|
getMenuTreeselect() {
|
||||||
menuTreeselect().then((response) => {
|
menuTreeselect().then((response) => {
|
||||||
const parseTree = (arr) => {
|
const parseTree = (arr) => {
|
||||||
if (arr.length > 0) {
|
if (arr.length > 0) {
|
||||||
arr.forEach(item => {
|
arr.forEach(item => {
|
||||||
if (item.id) {
|
if (item.id) {
|
||||||
item['label'] = this.$t(allPermis.filter(p => p.id === item.id)[0]?.localKey)
|
item['label'] = this.$t(allPermis.filter(p => p.id === item.id)[0]?.localKey)
|
||||||
}
|
}
|
||||||
if (item.children && item.children.length > 0) {
|
if (item.children && item.children.length > 0) {
|
||||||
parseTree(item.children)
|
parseTree(item.children)
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
return arr
|
return arr
|
||||||
}
|
}
|
||||||
this.menuOptions = parseTree(response.data)
|
this.menuOptions = parseTree(response.data)
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
handleClick(tab, event) {
|
handleClick(tab, event) {
|
||||||
let ids = []
|
let ids = []
|
||||||
const parseTree = (arr) =>{
|
const parseTree = (arr) =>{
|
||||||
arr.forEach(item =>{
|
arr.forEach(item =>{
|
||||||
if(item.type){
|
if(item.type){
|
||||||
ids.push(item.id)
|
ids.push(item.id)
|
||||||
}
|
}
|
||||||
if (item.children && item.children.length > 0) {
|
if (item.children && item.children.length > 0) {
|
||||||
parseTree(item.children)
|
parseTree(item.children)
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
return ids
|
return ids
|
||||||
}
|
}
|
||||||
let vrr = parseTree(this.dataList)
|
let vrr = parseTree(this.dataList)
|
||||||
this.getButtonList(vrr)
|
this.getButtonList(vrr)
|
||||||
},
|
},
|
||||||
async getButtonList(vrr){
|
async getButtonList(vrr){
|
||||||
this.ButtonList = []
|
this.ButtonList = []
|
||||||
let arr = {
|
let arr = {
|
||||||
billid: '用户管理',
|
billid: '用户管理',
|
||||||
type: false,
|
type: false,
|
||||||
ids:[],
|
ids:[],
|
||||||
dataDetail: [
|
dataDetail: [
|
||||||
{ name: '新增',
|
{ name: '新增',
|
||||||
id: 60,
|
id: 60,
|
||||||
type: false,
|
type: false,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
name: '编辑',
|
name: '编辑',
|
||||||
id: 58,
|
id: 58,
|
||||||
type: false,
|
type: false,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
name: '删除',
|
name: '删除',
|
||||||
id: 61,
|
id: 61,
|
||||||
type: true,
|
type: true,
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
}
|
}
|
||||||
if(vrr.length > 0){
|
if(vrr.length > 0){
|
||||||
vrr.forEach(el=>{
|
vrr.forEach(el=>{
|
||||||
if(el == 3){
|
if(el == 3){
|
||||||
this.ButtonList.push(arr)
|
this.ButtonList.push(arr)
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
// 数据权限全选
|
// 数据权限全选
|
||||||
recordAll(item) {
|
recordAll(item) {
|
||||||
item.dataDetail.forEach(el => {
|
item.dataDetail.forEach(el => {
|
||||||
if (item.type ==false) {
|
if (item.type ==false) {
|
||||||
this.AllType(el, true)
|
this.AllType(el, true)
|
||||||
} else {
|
} else {
|
||||||
this.AllType(el, false)
|
this.AllType(el, false)
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
this.typeChange(item)
|
this.typeChange(item)
|
||||||
},
|
},
|
||||||
// 改变选中
|
// 改变选中
|
||||||
typeChange(item) {
|
typeChange(item) {
|
||||||
if (item.type == true) {
|
if (item.type == true) {
|
||||||
item.type = false
|
item.type = false
|
||||||
} else {
|
} else {
|
||||||
item.type = true
|
item.type = true
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
AllType(item, type) {
|
AllType(item, type) {
|
||||||
item.type = type
|
item.type = type
|
||||||
},
|
},
|
||||||
muenclick(index, item) {
|
muenclick(index, item) {
|
||||||
let ids = []
|
let ids = []
|
||||||
// index代表多少级菜单
|
// index代表多少级菜单
|
||||||
if (index == 1) {
|
if (index == 1) {
|
||||||
if (item.type == false) {
|
if (item.type == false) {
|
||||||
ids.push(item.id)
|
ids.push(item.id)
|
||||||
this.AllType(item, true)
|
this.AllType(item, true)
|
||||||
item.children.forEach(el => {
|
item.children.forEach(el => {
|
||||||
this.AllType(el, true)
|
this.AllType(el, true)
|
||||||
if (el.children && el.children.length > 0) {
|
if (el.children && el.children.length > 0) {
|
||||||
el.children.forEach(small => {
|
el.children.forEach(small => {
|
||||||
ids.push(item.id)
|
ids.push(item.id)
|
||||||
this.AllType(small, true)
|
this.AllType(small, true)
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
} else {
|
} else {
|
||||||
this.AllType(item, false)
|
this.AllType(item, false)
|
||||||
item.children.forEach(el => {
|
item.children.forEach(el => {
|
||||||
this.AllType(el, false)
|
this.AllType(el, false)
|
||||||
if (el.children && el.children.length > 0) {
|
if (el.children && el.children.length > 0) {
|
||||||
el.children.forEach(small => {
|
el.children.forEach(small => {
|
||||||
this.AllType(small, false)
|
this.AllType(small, false)
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
this.typeChange(item)
|
this.typeChange(item)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
mounted() {
|
mounted() {
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style scoped lang="scss">
|
<style scoped lang="scss">
|
||||||
.recordText {
|
.recordText {
|
||||||
border: 1px solid #fff;
|
border: 1px solid #fff;
|
||||||
width: 60px;
|
width: 60px;
|
||||||
padding: 5px 0;
|
padding: 5px 0;
|
||||||
text-align: center;
|
text-align: center;
|
||||||
font-size: 12px;
|
font-size: 12px;
|
||||||
cursor: pointer;
|
cursor: pointer;
|
||||||
background: #f2f2f2;
|
background: #f2f2f2;
|
||||||
color: #e0e0e0;
|
color: #e0e0e0;
|
||||||
margin: 0px 3px;
|
margin: 0px 3px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.recordText.active {
|
.recordText.active {
|
||||||
background: #00a490;
|
background: #00a490;
|
||||||
color: #fff;
|
color: #fff;
|
||||||
}
|
}
|
||||||
|
|
||||||
.listBox {
|
.listBox {
|
||||||
border-top: 1px solid #ccc;
|
border-top: 1px solid #ccc;
|
||||||
}
|
}
|
||||||
|
|
||||||
.list {
|
.list {
|
||||||
display: flex;
|
display: flex;
|
||||||
align-content: center;
|
align-content: center;
|
||||||
cursor: pointer;
|
cursor: pointer;
|
||||||
}
|
}
|
||||||
|
|
||||||
.ml-10 {
|
.ml-10 {
|
||||||
margin-left: 10px;
|
margin-left: 10px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.p-10 {
|
.p-10 {
|
||||||
padding: 10px 0;
|
padding: 10px 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
.small.active {
|
.small.active {
|
||||||
border-color: crimson transparent transparent transparent;
|
border-color: crimson transparent transparent transparent;
|
||||||
}
|
}
|
||||||
|
|
||||||
.small.active:before,
|
.small.active:before,
|
||||||
.small.active:after {
|
.small.active:after {
|
||||||
border-color: crimson transparent transparent transparent;
|
border-color: crimson transparent transparent transparent;
|
||||||
}
|
}
|
||||||
|
|
||||||
.small {
|
.small {
|
||||||
border-color: #7d7d7d transparent transparent transparent;
|
border-color: #7d7d7d transparent transparent transparent;
|
||||||
border-style: solid;
|
border-style: solid;
|
||||||
border-top-width: 9.375px;
|
border-top-width: 9.375px;
|
||||||
border-right-width: 15px;
|
border-right-width: 15px;
|
||||||
border-left-width: 15px;
|
border-left-width: 15px;
|
||||||
height: 0;
|
height: 0;
|
||||||
margin-top: 9.375px;
|
margin-top: 9.375px;
|
||||||
margin-bottom: 6.02679px;
|
margin-bottom: 6.02679px;
|
||||||
position: relative;
|
position: relative;
|
||||||
width: 0;
|
width: 0;
|
||||||
margin: 2rem 0.8rem;
|
margin: 2rem 0.8rem;
|
||||||
}
|
}
|
||||||
|
|
||||||
.small:before,
|
.small:before,
|
||||||
.small:after {
|
.small:after {
|
||||||
border-color: #7d7d7d transparent transparent transparent;
|
border-color: #7d7d7d transparent transparent transparent;
|
||||||
border-style: solid;
|
border-style: solid;
|
||||||
border-top-width: 9.375px;
|
border-top-width: 9.375px;
|
||||||
border-right-width: 15px;
|
border-right-width: 15px;
|
||||||
border-left-width: 15px;
|
border-left-width: 15px;
|
||||||
content: '';
|
content: '';
|
||||||
display: block;
|
display: block;
|
||||||
height: 0;
|
height: 0;
|
||||||
left: -15px;
|
left: -15px;
|
||||||
position: absolute;
|
position: absolute;
|
||||||
top: -9.375px;
|
top: -9.375px;
|
||||||
width: 0;
|
width: 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
.small:before {
|
.small:before {
|
||||||
transform: rotate(70deg);
|
transform: rotate(70deg);
|
||||||
}
|
}
|
||||||
|
|
||||||
.small:after {
|
.small:after {
|
||||||
transform: rotate(-70deg);
|
transform: rotate(-70deg);
|
||||||
}
|
}
|
||||||
|
|
||||||
</style>
|
</style>
|
||||||
<style lang="scss">
|
<style lang="scss">
|
||||||
$activeColor: var(--bg-color, "#00aaff");
|
$activeColor: var(--bg-color, "#00aaff");
|
||||||
.el-icon-star-on{
|
.el-icon-star-on{
|
||||||
/* color: #00aa00; */
|
/* color: #00aa00; */
|
||||||
color: $activeColor;
|
color: $activeColor;
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
|
@ -0,0 +1,392 @@
|
||||||
|
<template>
|
||||||
|
<div>
|
||||||
|
<base-right-dialog
|
||||||
|
ref="baseRightDialog"
|
||||||
|
:footerShow="true"
|
||||||
|
:appendBody="true"
|
||||||
|
:dialogVisible.sync="drawer"
|
||||||
|
:withHeader="false"
|
||||||
|
title="权限分配"
|
||||||
|
@handleClose="handleDialogClose"
|
||||||
|
@handleConfirmClick="handleConfirmClick"
|
||||||
|
:size="'60%'"
|
||||||
|
>
|
||||||
|
<el-tabs v-model="activeName">
|
||||||
|
<el-tab-pane label="功能权限" name="first">
|
||||||
|
<el-table
|
||||||
|
border
|
||||||
|
ref="multipleTable"
|
||||||
|
:data="menuDatas"
|
||||||
|
row-key="id"
|
||||||
|
tooltip-effect="dark"
|
||||||
|
style="width: 100%"
|
||||||
|
:default-expand-all="true"
|
||||||
|
:default-checked-keys="keys"
|
||||||
|
@select-all="selectAll"
|
||||||
|
@select="handleSelectionChange"
|
||||||
|
v-loading="buttonLoading"
|
||||||
|
>
|
||||||
|
<el-table-column
|
||||||
|
type="selection"
|
||||||
|
width="45"
|
||||||
|
:reserve-selection="true"
|
||||||
|
></el-table-column>
|
||||||
|
<el-table-column
|
||||||
|
prop="name"
|
||||||
|
label="菜单名称"
|
||||||
|
width="200"
|
||||||
|
></el-table-column>
|
||||||
|
<el-table-column prop="buttonSelection" label="按钮">
|
||||||
|
<template slot-scope="scope">
|
||||||
|
<div style="display: flex;align-items: center">
|
||||||
|
<i
|
||||||
|
class="el-icon-star-on"
|
||||||
|
style="
|
||||||
|
height: 30px;
|
||||||
|
line-height: 30px;
|
||||||
|
font-size: 25px;
|
||||||
|
margin-right: 7px;
|
||||||
|
cursor: pointer;
|
||||||
|
"
|
||||||
|
v-show="btnShowHandle(scope.row.buttonList,true)"
|
||||||
|
@click="cancellation(scope.row.buttonList)"
|
||||||
|
></i>
|
||||||
|
<i
|
||||||
|
class="el-icon-star-on"
|
||||||
|
style="
|
||||||
|
height: 30px;
|
||||||
|
line-height: 30px;
|
||||||
|
font-size: 25px;
|
||||||
|
margin-right: 7px;
|
||||||
|
color: #808080;
|
||||||
|
cursor: pointer;
|
||||||
|
"
|
||||||
|
@click="selectAllButton(scope.row.buttonList)"
|
||||||
|
v-show="btnShowHandle(scope.row.buttonList,false)"
|
||||||
|
></i>
|
||||||
|
<el-checkbox v-model="item.check" v-for="item in scope.row.buttonList">{{ item.nameCh }}</el-checkbox>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
</el-table>
|
||||||
|
</el-tab-pane
|
||||||
|
>
|
||||||
|
<el-tab-pane label="数据权限" name="second">
|
||||||
|
<data-permissions ref="dataPermissions"></data-permissions>
|
||||||
|
</el-tab-pane>
|
||||||
|
<el-tab-pane label="首页拖拽权限" name="layOutAuth">
|
||||||
|
<layOutPermissions ref="layOutPermissions"></layOutPermissions>
|
||||||
|
</el-tab-pane>
|
||||||
|
</el-tabs>
|
||||||
|
</base-right-dialog>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
import baseRightDialog from '@/components/base/baseRightDialog'
|
||||||
|
import { PopedomSaveData, GetAllBilldata } from '@/api/apis/jurisdiction'
|
||||||
|
import dataPermissions from './dataPermissions.vue'
|
||||||
|
import layOutPermissions from './layOutPermissions.vue'
|
||||||
|
import loginVue from '../../../login.vue'
|
||||||
|
import { authApi } from '@/api/apis/auth'
|
||||||
|
|
||||||
|
export default {
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
drawer: false,
|
||||||
|
multipleSelection: [],
|
||||||
|
keys: [],
|
||||||
|
isAllSelect: false,
|
||||||
|
selected: false,
|
||||||
|
childNode: false,
|
||||||
|
build: '',
|
||||||
|
activeName: 'first',
|
||||||
|
dataPermissions: [],
|
||||||
|
buttonLoading: false,
|
||||||
|
menuDatas: []
|
||||||
|
}
|
||||||
|
},
|
||||||
|
|
||||||
|
props: {
|
||||||
|
menuData: {
|
||||||
|
type: Array,
|
||||||
|
default: () => {
|
||||||
|
return []
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
|
||||||
|
components: {
|
||||||
|
baseRightDialog,
|
||||||
|
dataPermissions,
|
||||||
|
layOutPermissions
|
||||||
|
},
|
||||||
|
|
||||||
|
beforeUpdate() {
|
||||||
|
this.handleTabClick()
|
||||||
|
},
|
||||||
|
|
||||||
|
computed: {
|
||||||
|
// menuDatas: {
|
||||||
|
// // return JSON.parse(JSON.stringify(this.menuData));
|
||||||
|
// get: function () {
|
||||||
|
// return JSON.parse(JSON.stringify(this.menuData));
|
||||||
|
// },
|
||||||
|
// set: function (item) {
|
||||||
|
// return JSON.parse(JSON.stringify(item));
|
||||||
|
// },
|
||||||
|
// },
|
||||||
|
},
|
||||||
|
|
||||||
|
methods: {
|
||||||
|
//判断全选是否显示
|
||||||
|
btnShowHandle(list, flag = false) {
|
||||||
|
if (!list.length) return false
|
||||||
|
let flagResult = list.every(item => {
|
||||||
|
return item.check
|
||||||
|
})
|
||||||
|
if (flag) {
|
||||||
|
return flagResult
|
||||||
|
} else {
|
||||||
|
return !flagResult
|
||||||
|
}
|
||||||
|
},
|
||||||
|
// tab切换
|
||||||
|
handleTabClick() {
|
||||||
|
this.$nextTick(() => {
|
||||||
|
this.$refs.multipleTable && this.$refs.multipleTable.doLayout()
|
||||||
|
})
|
||||||
|
},
|
||||||
|
selectAllButton(item) {
|
||||||
|
item.forEach(item => {
|
||||||
|
item.check = true
|
||||||
|
})
|
||||||
|
},
|
||||||
|
cancellation(item) {
|
||||||
|
|
||||||
|
item.forEach(item => {
|
||||||
|
item.check = false
|
||||||
|
})
|
||||||
|
},
|
||||||
|
// 全选/取消全选
|
||||||
|
selectAll() {
|
||||||
|
let data = this.treeToArray(this.menuDatas)
|
||||||
|
this.selected = !this.selected
|
||||||
|
data.forEach((el, index) => {
|
||||||
|
el.check = this.selected
|
||||||
|
this.$refs.multipleTable.toggleRowSelection(el, this.selected)
|
||||||
|
})
|
||||||
|
},
|
||||||
|
handleSelectionChange(val, row) {
|
||||||
|
row.check = !row.check
|
||||||
|
},
|
||||||
|
// 默认选中
|
||||||
|
exhibitList(menu, homeList, id) {
|
||||||
|
this.$refs.layOutPermissions.homeList = homeList
|
||||||
|
console.log(menu, 'menu')
|
||||||
|
// let data = this.treeToArray(this.menuDatas);
|
||||||
|
this.build = id
|
||||||
|
// data.forEach((el, index) => {
|
||||||
|
// if (id.includes(el.id)) {
|
||||||
|
// this.$refs.multipleTable.toggleRowSelection(el, true);
|
||||||
|
// }
|
||||||
|
// });
|
||||||
|
this.menuCheckHandle(menu)
|
||||||
|
this.menuDatas = menu
|
||||||
|
console.log(this.menuDatas, 'this.menuDatas')
|
||||||
|
this.buttonLoading = false
|
||||||
|
},
|
||||||
|
//数据处理
|
||||||
|
menuCheckHandle(arr) {
|
||||||
|
arr.forEach(item => {
|
||||||
|
if (item.check) {
|
||||||
|
this.$refs.multipleTable.toggleRowSelection(item, true)
|
||||||
|
}
|
||||||
|
if (item.children.length) {
|
||||||
|
this.menuCheckHandle(item.children)
|
||||||
|
}
|
||||||
|
})
|
||||||
|
},
|
||||||
|
// 数据扁平
|
||||||
|
treeToArray(items) {
|
||||||
|
let children = []
|
||||||
|
items.forEach((item) => {
|
||||||
|
children.push(item)
|
||||||
|
if (item.children) {
|
||||||
|
children = children.concat(this.treeToArray(item.children))
|
||||||
|
}
|
||||||
|
})
|
||||||
|
return children
|
||||||
|
},
|
||||||
|
handleDialogClose() {
|
||||||
|
let data = this.treeToArray(this.menuDatas)
|
||||||
|
data.forEach((el, index) => {
|
||||||
|
this.$refs.multipleTable.toggleRowSelection(el, false)
|
||||||
|
})
|
||||||
|
this.changeMenu(this.menuDatas, 0)
|
||||||
|
this.drawer = false
|
||||||
|
this.$parent.permissionPopup = false
|
||||||
|
},
|
||||||
|
async handleConfirmClick() {
|
||||||
|
let params = {
|
||||||
|
id: this.build,
|
||||||
|
kindId: 1,
|
||||||
|
sysPopedomHomeEntities: [],
|
||||||
|
sysPopedomMenuEntities: [],
|
||||||
|
sysPopedomOperateEntities: []
|
||||||
|
}
|
||||||
|
this.homeListHandle(params.sysPopedomHomeEntities)
|
||||||
|
this.menuListHandle(this.menuDatas, params.sysPopedomMenuEntities, params.sysPopedomOperateEntities)
|
||||||
|
const res = await authApi("sysUserService","","saveJurisdiction","",params)
|
||||||
|
if(res.status == '200'){
|
||||||
|
this.handleDialogClose();
|
||||||
|
this.$message({
|
||||||
|
message: "保存成功",
|
||||||
|
type: "success",
|
||||||
|
});
|
||||||
|
}
|
||||||
|
},
|
||||||
|
//处理首页拖拽
|
||||||
|
homeListHandle(arr) {
|
||||||
|
this.$refs.layOutPermissions.homeList.forEach(item => {
|
||||||
|
if (item.check) {
|
||||||
|
arr.push({ homeId: item.id })
|
||||||
|
}
|
||||||
|
})
|
||||||
|
},
|
||||||
|
//菜单数据处理
|
||||||
|
menuListHandle(list, result, btnResult) {
|
||||||
|
list.forEach(item => {
|
||||||
|
if (item.check) {
|
||||||
|
result.push({
|
||||||
|
menuId: item.id
|
||||||
|
})
|
||||||
|
}
|
||||||
|
if (item.children.length) {
|
||||||
|
this.menuListHandle(item.children, result,btnResult)
|
||||||
|
}
|
||||||
|
if (item.buttonList.length) {
|
||||||
|
this.btnListHandle(item.buttonList, btnResult, item.id)
|
||||||
|
}
|
||||||
|
})
|
||||||
|
},
|
||||||
|
//按钮选中处理
|
||||||
|
btnListHandle(list, btnResult, menuId) {
|
||||||
|
list.forEach(item => {
|
||||||
|
if (item.check) {
|
||||||
|
console.log(btnResult,'btnResult')
|
||||||
|
btnResult.push({
|
||||||
|
menuId,
|
||||||
|
operate: item.id
|
||||||
|
})
|
||||||
|
}
|
||||||
|
})
|
||||||
|
},
|
||||||
|
// 递归,添加选中按钮
|
||||||
|
addToButtonList(arr, newArr) {
|
||||||
|
newArr.forEach((newItem) => {
|
||||||
|
this.addToButtonListRecursive(
|
||||||
|
arr,
|
||||||
|
newItem.op_MenuID,
|
||||||
|
newItem.op_OperateKindList
|
||||||
|
)
|
||||||
|
})
|
||||||
|
return arr
|
||||||
|
},
|
||||||
|
addToButtonListRecursive(arr, targetId, operateKindList) {
|
||||||
|
for (let i = 0; i < arr.length; i++) {
|
||||||
|
const item = arr[i]
|
||||||
|
if (item.id == targetId) {
|
||||||
|
let lists = operateKindList.split(',')
|
||||||
|
lists.forEach((el) => {
|
||||||
|
item.buttonList.push(parseInt(el))
|
||||||
|
})
|
||||||
|
return item
|
||||||
|
}
|
||||||
|
if (item.children && item.children.length > 0) {
|
||||||
|
this.addToButtonListRecursive(
|
||||||
|
item.children,
|
||||||
|
targetId,
|
||||||
|
operateKindList
|
||||||
|
)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
changeMenu(data, num) {
|
||||||
|
let level = num
|
||||||
|
level = level + 1
|
||||||
|
data.forEach((el) => {
|
||||||
|
el.buttonList = []
|
||||||
|
el.type = false
|
||||||
|
if (el.children != null && el.children && el.children.length) {
|
||||||
|
this.changeMenu(el.children, level)
|
||||||
|
}
|
||||||
|
})
|
||||||
|
},
|
||||||
|
toFlatArray(tree, parentId) {
|
||||||
|
return tree.reduce((t, _) => {
|
||||||
|
const child = _[children]
|
||||||
|
return [
|
||||||
|
...t,
|
||||||
|
parentId ? { ..._, parentId } : _,
|
||||||
|
...(child && child.length ? toFlatArray(child, _[id]) : [])
|
||||||
|
]
|
||||||
|
}, [])
|
||||||
|
},
|
||||||
|
getIds(flatArray) {
|
||||||
|
let ids = [nodeId]
|
||||||
|
let child = flatArray.find((_) => _[id] === nodeId)
|
||||||
|
while (child && child.parentId) {
|
||||||
|
ids = [child.parentId, ...ids]
|
||||||
|
child = flatArray.find((_) => _[id] === child.parentId)
|
||||||
|
}
|
||||||
|
return ids
|
||||||
|
},
|
||||||
|
|
||||||
|
treeFindPath(tree, func, field = '', path = []) {
|
||||||
|
if (!tree) return []
|
||||||
|
for (const data of tree) {
|
||||||
|
field === '' ? path.push(data) : path.push(data[field])
|
||||||
|
if (func(data)) return path
|
||||||
|
if (data.children) {
|
||||||
|
const findChildren = this.treeFindPath(
|
||||||
|
data.children,
|
||||||
|
func,
|
||||||
|
field,
|
||||||
|
path
|
||||||
|
)
|
||||||
|
if (findChildren.length) return findChildren
|
||||||
|
}
|
||||||
|
path.pop()
|
||||||
|
}
|
||||||
|
return []
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
<style scoped lang="scss">
|
||||||
|
.rightDialog {
|
||||||
|
height: 100%;
|
||||||
|
padding: 0 16px;
|
||||||
|
}
|
||||||
|
|
||||||
|
::v-deep .cell {
|
||||||
|
display: flex;
|
||||||
|
}
|
||||||
|
|
||||||
|
::v-deep .el-checkbox-group {
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
flex-wrap: wrap;
|
||||||
|
}
|
||||||
|
|
||||||
|
::v-deep .el-checkbox {
|
||||||
|
margin-right: 15px;
|
||||||
|
}
|
||||||
|
|
||||||
|
::v-deep .el-tabs__nav {
|
||||||
|
transform: translateX(22px) !important;
|
||||||
|
}
|
||||||
|
</style>
|
|
@ -227,8 +227,8 @@ export default {
|
||||||
let params = {
|
let params = {
|
||||||
id: id
|
id: id
|
||||||
}
|
}
|
||||||
let res = await PersonDelData(params)
|
let res = await authApi('sysPersonService','','deleteEntity','',params)
|
||||||
if (res.code == 1) {
|
if (res.status == 200) {
|
||||||
this.$vmNews('删除成功', 'success')
|
this.$vmNews('删除成功', 'success')
|
||||||
this.resetTable()
|
this.resetTable()
|
||||||
// this.pageModel.page = 1
|
// this.pageModel.page = 1
|
||||||
|
@ -456,7 +456,14 @@ export default {
|
||||||
let params = {
|
let params = {
|
||||||
...data,
|
...data,
|
||||||
}
|
}
|
||||||
let res = await authApi("sysPersonService","","saveEntity","",params)
|
let res
|
||||||
|
console.log(params,'params')
|
||||||
|
if(params.id){
|
||||||
|
res = await authApi("sysPersonService","","updateEntity","",params)
|
||||||
|
}else{
|
||||||
|
res = await authApi("sysPersonService","","saveEntity","",params)
|
||||||
|
|
||||||
|
}
|
||||||
if (res.status == 200) {
|
if (res.status == 200) {
|
||||||
this.$vmNews('保存成功', 'success')
|
this.$vmNews('保存成功', 'success')
|
||||||
this.addDialog = false
|
this.addDialog = false
|
||||||
|
|
|
@ -1,527 +1,243 @@
|
||||||
|
|
||||||
// 页面操作按钮配置
|
// 页面操作按钮配置
|
||||||
const fucDataJson = [{
|
const fucDataJson = [{
|
||||||
name: '导出',
|
name: '导出',
|
||||||
type: 'danger',
|
type: 'danger',
|
||||||
icon: 'el-icon-position'
|
icon: 'el-icon-position'
|
||||||
},
|
},
|
||||||
|
|
||||||
]
|
]
|
||||||
// 表头配置
|
// 表头配置
|
||||||
const tableColumnJson = [{
|
const personColumn = [
|
||||||
label: '显示名称',
|
{
|
||||||
prop: 'viewName',
|
label: '所属部门',
|
||||||
tooltip: true,
|
prop: 'organName',
|
||||||
},
|
tooltip: true,
|
||||||
{
|
},
|
||||||
label: '登录名',
|
{
|
||||||
prop: 'loginName',
|
label: '工号',
|
||||||
tooltip: true,
|
prop: 'personCode',
|
||||||
// other: {
|
tooltip: true,
|
||||||
// color: '#4C9CFF',
|
// other: {
|
||||||
// isClick: true
|
// color: '#4C9CFF',
|
||||||
// }
|
// isClick: true
|
||||||
},
|
// }
|
||||||
{
|
},
|
||||||
label: '密码超期时间',
|
{
|
||||||
prop: 'expirationDate',
|
label: '姓名',
|
||||||
tooltip: true,
|
prop: 'personName',
|
||||||
},
|
tooltip: true,
|
||||||
{
|
},
|
||||||
label: '入职时间',
|
{
|
||||||
prop: 'entryTime',
|
label: '入职时间',
|
||||||
tooltip: true,
|
prop: 'entryTime',
|
||||||
},
|
tooltip: true,
|
||||||
{
|
},
|
||||||
label: '是否启用',
|
// {
|
||||||
prop: 'state',
|
// label: '离职时间',
|
||||||
tooltip: true
|
// prop: 'number',
|
||||||
},
|
// tooltip: true
|
||||||
{
|
// },
|
||||||
label: '电子邮箱',
|
// {
|
||||||
prop: 'email',
|
// label: '性别',
|
||||||
tooltip: true
|
// prop: 'sex',
|
||||||
},
|
// tooltip: true
|
||||||
{
|
// },
|
||||||
label: '在职状态',
|
// {
|
||||||
prop: 'useState',
|
// label: '学历',
|
||||||
tooltip: true,
|
// prop: 'Degree',
|
||||||
},
|
// tooltip: true,
|
||||||
|
// },
|
||||||
|
// {
|
||||||
|
// label: '职务',
|
||||||
|
// prop: 'Post',
|
||||||
|
// tooltip: true,
|
||||||
|
// },
|
||||||
|
// {
|
||||||
|
// label: '级别 ',
|
||||||
|
// prop: 'illegalType',
|
||||||
|
// tooltip: true,
|
||||||
|
// },
|
||||||
|
// {
|
||||||
|
// label: '生日',
|
||||||
|
// prop: 'BirthDay',
|
||||||
|
// tooltip: true,
|
||||||
|
// },
|
||||||
|
{
|
||||||
|
label: '固定电话 ',
|
||||||
|
prop: 'mobilePhone',
|
||||||
|
tooltip: true,
|
||||||
|
},
|
||||||
|
// {
|
||||||
|
// label: '籍贯 ',
|
||||||
|
// prop: 'areaCovered',
|
||||||
|
// tooltip: true,
|
||||||
|
// },
|
||||||
|
// {
|
||||||
|
// label: '身份证',
|
||||||
|
// prop: 'areaBuilding',
|
||||||
|
// tooltip: true,
|
||||||
|
// },
|
||||||
|
{
|
||||||
|
label: '电子邮箱',
|
||||||
|
prop: 'email',
|
||||||
|
tooltip: true,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
label: '出生年月',
|
||||||
|
prop: 'birthDay',
|
||||||
|
tooltip: true,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
label: '是否用户分配',
|
||||||
|
prop: 'state',
|
||||||
|
tooltip: true,
|
||||||
|
},
|
||||||
]
|
]
|
||||||
// 表头配置
|
// 表头配置
|
||||||
const personColumn = [{
|
const tableColumnJson = [
|
||||||
label: '用户账号',
|
{
|
||||||
prop: 'u_LoginCode',
|
label: '用户账号',
|
||||||
tooltip: true,
|
prop: 'loginCode',
|
||||||
},
|
tooltip: true,
|
||||||
{
|
},
|
||||||
label: '用户姓名',
|
{
|
||||||
prop: 'p_PersonName',
|
label: '用户姓名',
|
||||||
tooltip: true,
|
prop: 'personName',
|
||||||
},
|
tooltip: true,
|
||||||
{
|
},
|
||||||
label: '所属部门',
|
{
|
||||||
prop: 'o_OrganName',
|
label: '所属部门',
|
||||||
tooltip: true,
|
prop: 'organName',
|
||||||
},
|
tooltip: true,
|
||||||
{
|
},
|
||||||
label: '手机号',
|
{
|
||||||
prop: 'p_Telphone',
|
label: '手机号',
|
||||||
tooltip: true
|
prop: 'mobilePhone',
|
||||||
},
|
tooltip: true
|
||||||
{
|
},
|
||||||
label: '状态',
|
{
|
||||||
prop: 'stateNote',
|
label: '状态',
|
||||||
tooltip: true
|
prop: 'state',
|
||||||
},
|
tooltip: true
|
||||||
|
},
|
||||||
|
|
||||||
]
|
]
|
||||||
// 详情页面结构JSON
|
// 详情页面结构JSON
|
||||||
const formRow1 = [{
|
const formRow1 = [{
|
||||||
elCol: [{
|
elCol: [{
|
||||||
label: '选择人员',
|
label: '选择人员',
|
||||||
prop: 'p_PersonName',
|
prop: 'personName',
|
||||||
tag: 'elDialog',
|
tag: 'elDialog',
|
||||||
// disabled:false
|
// disabled:false
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
label: '登录账号',
|
label: '登录账号',
|
||||||
prop: 'u_LoginCode',
|
prop: 'loginCode',
|
||||||
tag: 'elInput',
|
tag: 'elInput',
|
||||||
// placeholder:'自动带入',
|
// placeholder:'自动带入',
|
||||||
// disabled:true
|
// disabled:true
|
||||||
},
|
},
|
||||||
]
|
]
|
||||||
}, {
|
},{
|
||||||
elCol: [{
|
elCol: [{
|
||||||
label: '描述',
|
label: '描述',
|
||||||
prop: 'u_Remark',
|
prop: 'remark',
|
||||||
tag: 'elInput',
|
tag: 'elInput',
|
||||||
type: 'textarea',
|
type:'textarea',
|
||||||
span: 24
|
span:24
|
||||||
}, ]
|
},
|
||||||
}]
|
]
|
||||||
|
}
|
||||||
|
]
|
||||||
const formRow2 = [{
|
const formRow2 = [{
|
||||||
elCol: [{
|
elCol: [{
|
||||||
label: '用户名',
|
label: '用户名',
|
||||||
prop: 'p_PersonName',
|
prop: 'p_PersonName',
|
||||||
tag: 'elDialog',
|
tag: 'elDialog',
|
||||||
// disabled:false
|
// disabled:false
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
label: '登录账号',
|
label: '登录账号',
|
||||||
prop: 'u_LoginCode',
|
prop: 'u_LoginCode',
|
||||||
tag: 'elInput',
|
tag: 'elInput',
|
||||||
// placeholder:'自动带入',
|
// placeholder:'自动带入',
|
||||||
// disabled:true
|
// disabled:true
|
||||||
},
|
},
|
||||||
]
|
]
|
||||||
}, {
|
},{
|
||||||
elCol: [{
|
elCol: [{
|
||||||
label: '描述',
|
label: '描述',
|
||||||
prop: 'u_Remark',
|
prop: 'u_Remark',
|
||||||
tag: 'elInput',
|
tag: 'elInput',
|
||||||
type: 'textarea',
|
type:'textarea',
|
||||||
span: 24
|
span:24
|
||||||
}, ]
|
},
|
||||||
}]
|
]
|
||||||
|
}
|
||||||
|
]
|
||||||
|
const roleOptions = [{
|
||||||
|
label: '超级管理员',
|
||||||
|
value: 1
|
||||||
|
},
|
||||||
|
{
|
||||||
|
label: '业务员',
|
||||||
|
value: 2
|
||||||
|
},
|
||||||
|
{
|
||||||
|
label: '管理员',
|
||||||
|
value: 3
|
||||||
|
},
|
||||||
|
{
|
||||||
|
label: '开发成员',
|
||||||
|
value: 4
|
||||||
|
},
|
||||||
|
{
|
||||||
|
label: '项目经理',
|
||||||
|
value: 5
|
||||||
|
},
|
||||||
|
{
|
||||||
|
label: '实施人员',
|
||||||
|
value: 6
|
||||||
|
},
|
||||||
|
{
|
||||||
|
label: '财务',
|
||||||
|
value: 7
|
||||||
|
},
|
||||||
|
{
|
||||||
|
label: '总经理',
|
||||||
|
value: 8
|
||||||
|
},
|
||||||
|
{
|
||||||
|
label: '副总',
|
||||||
|
value: 9
|
||||||
|
}
|
||||||
|
]
|
||||||
const rules = {
|
const rules = {
|
||||||
villageId: [{
|
villageId: [{
|
||||||
required: true,
|
required: true,
|
||||||
message: '请选择村/社区名称',
|
message: '请选择村/社区名称',
|
||||||
trigger: 'change'
|
trigger: 'change'
|
||||||
}],
|
}],
|
||||||
registerTime: [{
|
registerTime: [{
|
||||||
required: true,
|
required: true,
|
||||||
message: '请选择登记时间',
|
message: '请选择登记时间',
|
||||||
trigger: 'change'
|
trigger: 'change'
|
||||||
}],
|
}],
|
||||||
};
|
};
|
||||||
// 详情显示图片配置
|
// 详情显示图片配置
|
||||||
const showImgJson = {
|
const showImgJson = {
|
||||||
span: 24,
|
span: 24,
|
||||||
text: '现场照片',
|
text: '现场照片',
|
||||||
field: 'photoUrls',
|
field: 'photoUrls',
|
||||||
|
|
||||||
};
|
};
|
||||||
const formRow = [
|
|
||||||
{
|
|
||||||
elCol: [{
|
|
||||||
label: '显示名称',
|
|
||||||
prop: 'viewName',
|
|
||||||
tag: 'elInput',
|
|
||||||
}, {
|
|
||||||
label: '登录名',
|
|
||||||
prop: 'loginName',
|
|
||||||
tag: 'elInput',
|
|
||||||
disabled: false
|
|
||||||
}]
|
|
||||||
},
|
|
||||||
{
|
|
||||||
elCol: [{
|
|
||||||
label: '密码',
|
|
||||||
prop: 'password',
|
|
||||||
tag: 'elInput',
|
|
||||||
type: 'password'
|
|
||||||
}, {
|
|
||||||
label: '加密策略',
|
|
||||||
prop: 'encryptionPolicy',
|
|
||||||
tag: 'elInput',
|
|
||||||
}]
|
|
||||||
},
|
|
||||||
{
|
|
||||||
elCol: [{
|
|
||||||
label: '密码超时时间',
|
|
||||||
prop: 'expirationDate',
|
|
||||||
tag: 'elDatePicker',
|
|
||||||
type: 'datetime'
|
|
||||||
}, {
|
|
||||||
label: '密码次数',
|
|
||||||
prop: 'pawFrequency',
|
|
||||||
tag: 'elInputNumber',
|
|
||||||
}]
|
|
||||||
}, {
|
|
||||||
elCol: [{
|
|
||||||
label: '人员编号 ',
|
|
||||||
prop: 'staffId',
|
|
||||||
tag: 'elInput',
|
|
||||||
},
|
|
||||||
{
|
|
||||||
label: '头像路径',
|
|
||||||
prop: 'iconUrl',
|
|
||||||
tag: 'elInput',
|
|
||||||
disabled: false
|
|
||||||
}
|
|
||||||
]
|
|
||||||
},
|
|
||||||
{
|
|
||||||
elCol: [{
|
|
||||||
label: '是否是内部',
|
|
||||||
prop: 'builtIn',
|
|
||||||
tag: 'elRadio',
|
|
||||||
options: [{
|
|
||||||
label: '是',
|
|
||||||
value: '1'
|
|
||||||
},
|
|
||||||
{
|
|
||||||
label: '否',
|
|
||||||
value: '0'
|
|
||||||
},
|
|
||||||
]
|
|
||||||
}, {
|
|
||||||
label: '是否启用',
|
|
||||||
prop: 'state',
|
|
||||||
tag: 'elRadio',
|
|
||||||
options: [{
|
|
||||||
label: '启用',
|
|
||||||
value: '1'
|
|
||||||
},
|
|
||||||
{
|
|
||||||
label: '停用',
|
|
||||||
value: '0'
|
|
||||||
},
|
|
||||||
]
|
|
||||||
}]
|
|
||||||
},
|
|
||||||
{
|
|
||||||
elCol: [{
|
|
||||||
label: '模块操作级别',
|
|
||||||
prop: 'level',
|
|
||||||
tag: 'elSelect',
|
|
||||||
options: [{
|
|
||||||
label: 'SuperAdmin',
|
|
||||||
value: '1'
|
|
||||||
},{
|
|
||||||
label: 'admin',
|
|
||||||
value: '2'
|
|
||||||
},{
|
|
||||||
label: 'user',
|
|
||||||
value: '3'
|
|
||||||
}
|
|
||||||
]
|
|
||||||
|
|
||||||
}, {
|
|
||||||
label: '电子邮件',
|
|
||||||
prop: 'email',
|
|
||||||
tag: 'elInput',
|
|
||||||
}]
|
|
||||||
},
|
|
||||||
{
|
|
||||||
elCol: [{
|
|
||||||
label: '手机号码',
|
|
||||||
prop: 'phone',
|
|
||||||
tag: 'elInput',
|
|
||||||
}, {
|
|
||||||
label: '职务级别',
|
|
||||||
prop: 'userLvl',
|
|
||||||
tag: 'elSelect',
|
|
||||||
options: [
|
|
||||||
{
|
|
||||||
label: '管理员',
|
|
||||||
value: '0'
|
|
||||||
},
|
|
||||||
{
|
|
||||||
label: '访客',
|
|
||||||
value: '1'
|
|
||||||
},
|
|
||||||
{
|
|
||||||
label: '员工',
|
|
||||||
value: '2'
|
|
||||||
},
|
|
||||||
]
|
|
||||||
}]
|
|
||||||
},
|
|
||||||
{
|
|
||||||
elCol: [{
|
|
||||||
label: '性别',
|
|
||||||
prop: 'sex',
|
|
||||||
tag: 'elRadio',
|
|
||||||
options: [{
|
|
||||||
label: '男',
|
|
||||||
value: '0'
|
|
||||||
},
|
|
||||||
{
|
|
||||||
label: '女',
|
|
||||||
value: '1'
|
|
||||||
},
|
|
||||||
]
|
|
||||||
}, {
|
|
||||||
label: '锁定状态',
|
|
||||||
prop: 'lockState',
|
|
||||||
tag: 'elRadio',
|
|
||||||
options: [{
|
|
||||||
label: '锁定',
|
|
||||||
value: '0'
|
|
||||||
},
|
|
||||||
{
|
|
||||||
label: '未锁定',
|
|
||||||
value: '1'
|
|
||||||
},
|
|
||||||
]
|
|
||||||
}]
|
|
||||||
},
|
|
||||||
{
|
|
||||||
elCol: [{
|
|
||||||
label: '在职状态',
|
|
||||||
prop: 'useState',
|
|
||||||
tag: 'elRadio',
|
|
||||||
options: [{
|
|
||||||
label: '在职',
|
|
||||||
value: '1'
|
|
||||||
},
|
|
||||||
{
|
|
||||||
label: '离职',
|
|
||||||
value: '2'
|
|
||||||
},
|
|
||||||
]
|
|
||||||
}, {
|
|
||||||
label: '微信token',
|
|
||||||
prop: 'wechatToken',
|
|
||||||
tag: 'elInput',
|
|
||||||
disabled: true
|
|
||||||
}]
|
|
||||||
},
|
|
||||||
{
|
|
||||||
elCol: [{
|
|
||||||
label: '是否可以登录',
|
|
||||||
prop: 'isLoginable',
|
|
||||||
tag: 'elRadio',
|
|
||||||
options: [{
|
|
||||||
label: '是',
|
|
||||||
value: '1'
|
|
||||||
},
|
|
||||||
{
|
|
||||||
label: '否',
|
|
||||||
value: '0'
|
|
||||||
},
|
|
||||||
]
|
|
||||||
}, {
|
|
||||||
label: '是否虚拟账号',
|
|
||||||
prop: 'isVirtual',
|
|
||||||
tag: 'elRadio',
|
|
||||||
options: [{
|
|
||||||
label: '是',
|
|
||||||
value: '1'
|
|
||||||
},
|
|
||||||
{
|
|
||||||
label: '否',
|
|
||||||
value: '0'
|
|
||||||
},
|
|
||||||
]
|
|
||||||
}]
|
|
||||||
},
|
|
||||||
{
|
|
||||||
elCol: [{
|
|
||||||
label: '是否被分配',
|
|
||||||
prop: 'isAssigned',
|
|
||||||
tag: 'elRadio',
|
|
||||||
options: [{
|
|
||||||
label: '是',
|
|
||||||
value: '1'
|
|
||||||
},
|
|
||||||
{
|
|
||||||
label: '否',
|
|
||||||
value: '0'
|
|
||||||
},
|
|
||||||
]
|
|
||||||
}, {
|
|
||||||
label: '是否管理员',
|
|
||||||
prop: 'isAdmin',
|
|
||||||
tag: 'elRadio',
|
|
||||||
options: [{
|
|
||||||
label: '是',
|
|
||||||
value: '1'
|
|
||||||
},
|
|
||||||
{
|
|
||||||
label: '否',
|
|
||||||
value: '0'
|
|
||||||
},
|
|
||||||
]
|
|
||||||
}]
|
|
||||||
},
|
|
||||||
{
|
|
||||||
elCol: [{
|
|
||||||
label: '枚举',
|
|
||||||
prop: 'memberType',
|
|
||||||
tag: 'elInput',
|
|
||||||
tag: 'elRadio',
|
|
||||||
options: [{
|
|
||||||
label: '正式',
|
|
||||||
value: '1'
|
|
||||||
},
|
|
||||||
{
|
|
||||||
label: '非正式',
|
|
||||||
value: '0'
|
|
||||||
},
|
|
||||||
]
|
|
||||||
}, {
|
|
||||||
label: '是否被删除',
|
|
||||||
prop: 'isDeleted',
|
|
||||||
tag: 'elRadio',
|
|
||||||
options: [{
|
|
||||||
label: '删除',
|
|
||||||
value: '1'
|
|
||||||
},
|
|
||||||
{
|
|
||||||
label: '未删除',
|
|
||||||
value: '0'
|
|
||||||
},
|
|
||||||
]
|
|
||||||
}]
|
|
||||||
},
|
|
||||||
{
|
|
||||||
elCol: [{
|
|
||||||
label: '内外标识',
|
|
||||||
prop: 'externalType',
|
|
||||||
tag: 'elRadio',
|
|
||||||
options: [{
|
|
||||||
label: '外部人',
|
|
||||||
value: '1'
|
|
||||||
},
|
|
||||||
{
|
|
||||||
label: '内部人',
|
|
||||||
value: '0'
|
|
||||||
},
|
|
||||||
]
|
|
||||||
}, {
|
|
||||||
label: '编号',
|
|
||||||
prop: 'memberCode',
|
|
||||||
tag: 'elInput',
|
|
||||||
}]
|
|
||||||
},
|
|
||||||
{
|
|
||||||
elCol: [{
|
|
||||||
label: '出生日期',
|
|
||||||
prop: 'birthDate',
|
|
||||||
tag: 'elDatePicker',
|
|
||||||
type: 'datetime'
|
|
||||||
}, {
|
|
||||||
label: '办公电话',
|
|
||||||
prop: 'officeTel',
|
|
||||||
tag: 'elInput',
|
|
||||||
}]
|
|
||||||
},
|
|
||||||
|
|
||||||
{
|
|
||||||
elCol: [{
|
|
||||||
label: '人员照片地址',
|
|
||||||
prop: 'photoAddress',
|
|
||||||
tag: 'elInput',
|
|
||||||
disabled: true
|
|
||||||
}, {
|
|
||||||
label: '所属部门',
|
|
||||||
prop: 'department',
|
|
||||||
tag: 'elTreeSelect',
|
|
||||||
options:[],
|
|
||||||
}]
|
|
||||||
},
|
|
||||||
{
|
|
||||||
elCol: [{
|
|
||||||
label: '排序编号',
|
|
||||||
prop: 'sorts',
|
|
||||||
tag: 'elInputNumber',
|
|
||||||
}, {
|
|
||||||
label: '工作地',
|
|
||||||
prop: 'workplace',
|
|
||||||
tag: 'elInput',
|
|
||||||
}]
|
|
||||||
},
|
|
||||||
{
|
|
||||||
elCol: [{
|
|
||||||
label: '主岗',
|
|
||||||
prop: 'majorPosition',
|
|
||||||
tag: 'elInput',
|
|
||||||
}, {
|
|
||||||
label: '副岗',
|
|
||||||
prop: 'deputyPost',
|
|
||||||
tag: 'elInput',
|
|
||||||
}]
|
|
||||||
},
|
|
||||||
{
|
|
||||||
elCol: [{
|
|
||||||
label: '人员类型',
|
|
||||||
prop: 'userType',
|
|
||||||
tag: 'elSelect',
|
|
||||||
options:[
|
|
||||||
{label:'超级管理员',value:'1'},
|
|
||||||
{label:'管理员',value:'2'},
|
|
||||||
{label:'业务员',value:'3'},
|
|
||||||
]
|
|
||||||
}, {
|
|
||||||
label: '人员状态',
|
|
||||||
prop: 'personnelStatus',
|
|
||||||
tag: 'elInput',
|
|
||||||
tag: 'elRadio',
|
|
||||||
options: [{
|
|
||||||
label: '启用',
|
|
||||||
value: '1'
|
|
||||||
},
|
|
||||||
{
|
|
||||||
label: '停用',
|
|
||||||
value: '0'
|
|
||||||
},
|
|
||||||
]
|
|
||||||
}]
|
|
||||||
},
|
|
||||||
{
|
|
||||||
elCol: [{
|
|
||||||
label: '入职时间',
|
|
||||||
prop: 'entryTime',
|
|
||||||
tag: 'elDatePicker',
|
|
||||||
type: 'datetime'
|
|
||||||
}, {
|
|
||||||
label: '汇报人',
|
|
||||||
prop: 'reporter',
|
|
||||||
tag: 'elInput',
|
|
||||||
}]
|
|
||||||
},
|
|
||||||
]
|
|
||||||
export default {
|
export default {
|
||||||
fucDataJson,
|
fucDataJson,
|
||||||
tableColumnJson,
|
tableColumnJson,
|
||||||
showImgJson,
|
showImgJson,
|
||||||
formRow1,
|
formRow1,
|
||||||
formRow2,
|
formRow2,
|
||||||
rules,
|
rules,
|
||||||
personColumn,
|
personColumn
|
||||||
formRow
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,273 +1,588 @@
|
||||||
<template>
|
<template>
|
||||||
<div>
|
<div>
|
||||||
<div style="display: flex;height: 100%;">
|
<div style="display: flex;height: 100%;">
|
||||||
<base-layout title="组织机构" ref="organLayout" style="width: 240px;" :bottonShow="false" :isPage="false"
|
<base-layout title="组织机构" ref="organLayout" style="width: 240px;" :bottonShow="false" :isPage="false"
|
||||||
:operateButtonSwitch="false" >
|
:operateButtonSwitch="false" :mainColor="mainColor"
|
||||||
<div slot="main" style="height: 100%;border-right: 1px solid #dfe6ec;overflow-y: auto;">
|
>
|
||||||
<base-tree ref="baseTree" :isCenter="false" :isSaveBtn="false" :Allshow="false" :showCheckbox="false"
|
<div slot="main" style="height: 100%;border-right: 1px solid #dfe6ec;overflow-y: auto;">
|
||||||
:menuData="menuData" @handleNodeClick="orangClick"></base-tree>
|
<base-tree ref="baseTree" :isCenter="false" :isSaveBtn="false" :Allshow="false" :showCheckbox="false"
|
||||||
</div>
|
:menuData="menuData" @handleNodeClick="orangClick"
|
||||||
</base-layout>
|
></base-tree>
|
||||||
<base-layout title="用户信息" ref="userLayout" @pageChange="pageChange" style="flex:1"
|
</div>
|
||||||
:buttonList="buttonList" @onFuncBtn="getFuncBtn" :isPage="true">
|
</base-layout>
|
||||||
<div slot="main" slot-scope="{ tableHeight }" style="height: 100%;">
|
<base-layout title="用户信息" ref="userLayout" :selectTable="selectTable" @pageChange="pageChange" style="flex:1"
|
||||||
<base-table ref="userCustomtable" :border="true" :showIndex="false" :tabLoading.sync="tabLoading"
|
:buttonList="buttonList" @onElSelect="getElSelect" @onFuncBtn="getFuncBtn" :isPage="true"
|
||||||
@radioChange="userRadioChange" :slotrow="true" :tableHeight="tableHeight" :tableData="tableData"
|
>
|
||||||
:tableColumn="tableColumn">
|
<div slot="main" slot-scope="{ tableHeight }" style="height: 100%;">
|
||||||
</base-table>
|
<base-table ref="userCustomtable" :border="true" :showIndex="false" :tabLoading.sync="tabLoading"
|
||||||
</div>
|
@radioChange="userRadioChange" :slotrow="true" :tableHeight="tableHeight" :tableData="tableData"
|
||||||
</base-layout>
|
:tableColumn="tableColumn"
|
||||||
</div>
|
>
|
||||||
<right-dialog ref="rightDialog" :orgData="menuData" @handleDialogClose="resetTable"></right-dialog>
|
<template #state="{row}">
|
||||||
<table-dialog ref="tableDialog" :orgData="menuData" @handleDialogClose="resetTable"></table-dialog>
|
<div>{{ row.row.state == 0 ? '启动' : '停用' }}</div>
|
||||||
</div>
|
</template>
|
||||||
|
</base-table>
|
||||||
|
</div>
|
||||||
|
</base-layout>
|
||||||
|
</div>
|
||||||
|
<base-dialog :closeEscape="true" :showClose="true" :closeModal="false" :dialogVisible.sync="addDialog"
|
||||||
|
:footerShow="true" @handleConfirmClick="handleConfirmClick" class="userDialog"
|
||||||
|
:title="dialogType == 'add' ? '新增用户信息' : '编辑用户信息'" width="900px" top="8vh"
|
||||||
|
>
|
||||||
|
<base-form ref="customForm" :formRow="formRow" :isFunBtn="false" @elDialogClick="elDialogClick">
|
||||||
|
</base-form>
|
||||||
|
<div>
|
||||||
|
<p class="bigTitle">选择公司</p>
|
||||||
|
<div flex="cross:center" flex-wrap>
|
||||||
|
<p v-for="(item, index) in companyList" :class="{ 'active': item.isActive }" :key="index"
|
||||||
|
@click="item.isActive = !item.isActive" class="roleName"
|
||||||
|
>{{ item.organName }}</p>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div>
|
||||||
|
<p class="bigTitle">选择角色</p>
|
||||||
|
<div flex="cross:center" flex-wrap>
|
||||||
|
<p v-for="(item, index) in roleList" :class="{ 'active': item.isActive }" :key="index"
|
||||||
|
@click="item.isActive = !item.isActive" class="roleName"
|
||||||
|
>{{ item.roleName }}</p>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</base-dialog>
|
||||||
|
<!--选择人员 -->
|
||||||
|
<base-person ref="basePerson" :menuData="menuData" :tableColumn="personColumn"
|
||||||
|
@personConfirmClick="personConfirmClick"
|
||||||
|
></base-person>
|
||||||
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import baseLayout from "@/components/base/baseLayout";
|
import baseLayout from '@/components/base/baseLayout'
|
||||||
import baseTable from "@/components/base/baseTable";
|
import baseTable from '@/components/base/baseTable'
|
||||||
// import baseDialog from "@/components/base/BaseNewDialog";
|
// import baseDialog from "@/components/base/BaseNewDialog";
|
||||||
import baseDialog from "@/components/base/BaseNewDialog/index.vue";
|
import baseDialog from '@/components/base/BaseNewDialog/index.vue'
|
||||||
import baseForm from "@/components/base/baseNewForm/index.vue";
|
import baseForm from '@/components/base/baseNewForm/index.vue'
|
||||||
import baseTree from "@/components/base/BaseMenuTree/index.vue";
|
import baseTree from '@/components/base/BaseMenuTree/index.vue'
|
||||||
import basePerson from "@/components/base/basePerson/index.vue";
|
import basePerson from '@/components/base/basePerson/index.vue'
|
||||||
import configData from "./configData";
|
import configData from './configData'
|
||||||
import rightDialog from "./rightDialog";
|
import { getCompanyId } from '@/utils/auth'
|
||||||
import tableDialog from "./tableDialog";
|
|
||||||
import {
|
import {
|
||||||
authApi
|
PersonDetail,
|
||||||
} from '@/api/apis/auth'
|
PersonSaveData
|
||||||
|
} from '@/api/apis/personnelSettings'
|
||||||
|
import {
|
||||||
|
RoleGetBillList
|
||||||
|
} from '@/api/apis/roleManagement'
|
||||||
|
import {
|
||||||
|
userGetBillList,
|
||||||
|
userGetBillData,
|
||||||
|
userSaveData,
|
||||||
|
userOpen,
|
||||||
|
userClose,
|
||||||
|
userResetPwd,
|
||||||
|
userChangePwd
|
||||||
|
} from '@/api/apis/userInformation'
|
||||||
|
import {
|
||||||
|
GetOrganTree,
|
||||||
|
OrganGetCompany
|
||||||
|
} from '@/api/apis/organization'
|
||||||
|
import {
|
||||||
|
PersonList
|
||||||
|
} from '@/api/apis/personnelSettings'
|
||||||
|
import { authApi } from '@/api/apis/auth'
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: "UserInformation",
|
name: 'UserInformation',
|
||||||
components: {
|
components: {
|
||||||
baseLayout,
|
baseLayout,
|
||||||
baseTable,
|
baseTable,
|
||||||
baseDialog,
|
baseDialog,
|
||||||
baseForm,
|
baseForm,
|
||||||
baseTree,
|
baseTree,
|
||||||
basePerson,
|
basePerson
|
||||||
rightDialog,
|
},
|
||||||
tableDialog
|
data() {
|
||||||
},
|
return {
|
||||||
data() {
|
userRadioIndex: false,
|
||||||
return {
|
userRadioId: false,
|
||||||
userRadioIndex: false,
|
personHight: '350px', //人员选择高度
|
||||||
userRadioId: false,
|
personMainHight: 'calc(100% - 39px)', //人员弹框高度
|
||||||
tabLoading: false,
|
personLoading: false, //人员加载
|
||||||
tableData: [],
|
personDialog: false,
|
||||||
// 搜索配置
|
personTableData: [],
|
||||||
menuData: [],
|
personTableHeight: '280px', //人员表格高度
|
||||||
buttonList: [
|
roleList: [],
|
||||||
|
companyList: [],
|
||||||
|
// tableHeight: 'calc(100vh - 227px)',
|
||||||
|
mainColor: '#f8f8f8',
|
||||||
|
tabLoading: false,
|
||||||
|
tableData: [],
|
||||||
|
selectTable: [],
|
||||||
|
selectPerson: [],
|
||||||
|
dialogType: '',
|
||||||
|
// 搜索配置
|
||||||
|
addDialog: false,
|
||||||
|
roleOptions: configData.roleOptions,
|
||||||
|
formRow: configData.formRow1,
|
||||||
|
formRow2: configData.formRow2,
|
||||||
|
isFunBtn: true,
|
||||||
|
menuData: [],
|
||||||
|
infoData: '',
|
||||||
|
buttonList: [
|
||||||
|
|
||||||
{
|
{
|
||||||
'icon': 'el-icon-refresh',
|
'icon': 'el-icon-refresh',
|
||||||
'menuName': '设置角色'
|
'menuName': '重置密码'
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
'icon': 'el-icon-open',
|
'icon': 'el-icon-open',
|
||||||
'menuName': '设置组织'
|
'menuName': '启用'
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
'icon': 'el-icon-turn-off',
|
'icon': 'el-icon-turn-off',
|
||||||
'menuName': '停用',
|
'menuName': '停用',
|
||||||
type: 'danger'
|
type: 'danger'
|
||||||
},
|
}
|
||||||
],
|
],
|
||||||
pageModel: {
|
pageModel: {
|
||||||
pageNum: 1,
|
pageNum: 1,
|
||||||
pageSize: 20,
|
pageSize: 20,
|
||||||
},
|
organId: ''
|
||||||
orgId:null,
|
// SequenceName:'',
|
||||||
}
|
// Sequence:''
|
||||||
},
|
},
|
||||||
computed: {
|
personModel: {
|
||||||
// 表头配置
|
page: 1,
|
||||||
tableColumn() {
|
limit: 20,
|
||||||
return configData.tableColumnJson
|
organId: ''
|
||||||
},
|
}
|
||||||
// 表头配置
|
}
|
||||||
personColumn() {
|
},
|
||||||
return configData.personColumn
|
computed: {
|
||||||
},
|
// 表头配置
|
||||||
},
|
tableColumn() {
|
||||||
created() { },
|
return configData.tableColumnJson
|
||||||
onShow() { },
|
},
|
||||||
mounted() {
|
// 表头配置
|
||||||
this.initPage()
|
personColumn() {
|
||||||
// this.$refs.baseTree.getMenuList()
|
return configData.personColumn
|
||||||
},
|
}
|
||||||
filters: {
|
},
|
||||||
|
watch: {
|
||||||
|
// pageModel: {
|
||||||
|
// deep: true, //深度监听设置为 true
|
||||||
|
// handler: function(newV, oldV) {
|
||||||
|
// this.getTableList()
|
||||||
|
// }
|
||||||
|
// },
|
||||||
|
addDialog: {
|
||||||
|
deep: true, //深度监听设置为 true
|
||||||
|
handler: function(newV, oldV) {
|
||||||
|
if (newV == false) {
|
||||||
|
this.formRow[0].elCol[0].disabled = false
|
||||||
|
this.$nextTick(() => {
|
||||||
|
this.$refs.customForm.resetForm('ruleForm')
|
||||||
|
|
||||||
},
|
})
|
||||||
methods: {
|
if (this.roleList.length > 0) {
|
||||||
// 初始化页面
|
this.roleList.forEach(el => {
|
||||||
initPage() {
|
el.isActive = false
|
||||||
this.getMenuData()
|
})
|
||||||
},
|
}
|
||||||
// 获得树状图
|
if (this.companyList.length > 0) {
|
||||||
async getMenuData() {
|
this.companyList.forEach(el => {
|
||||||
let res = await authApi('orgService', 'org', 'queryTree')
|
el.isActive = false
|
||||||
if(res.status == '200'){
|
})
|
||||||
this.menuData = res.attribute
|
}
|
||||||
}
|
|
||||||
},
|
|
||||||
// 获取用户信息列表
|
|
||||||
async getTableList() {
|
|
||||||
this.tabLoading = true
|
|
||||||
setTimeout(()=>{
|
|
||||||
this.tabLoading = false
|
|
||||||
},100000)
|
|
||||||
this.tableData = []
|
|
||||||
let params = {
|
|
||||||
...this.pageModel,
|
|
||||||
department:this.orgId
|
|
||||||
}
|
|
||||||
let res =await authApi('userService', 'user', 'queryList','',params)
|
|
||||||
if (res.status == '200') {
|
|
||||||
this.tableData = res.attribute.list
|
|
||||||
this.$nextTick(() => {
|
|
||||||
this.$refs.userCustomtable.clearRadioIndex()
|
|
||||||
this.$refs.userLayout.setPageTotal(res.attribute.total)
|
|
||||||
})
|
|
||||||
this.tabLoading = false
|
|
||||||
}
|
|
||||||
},
|
|
||||||
// 单选
|
|
||||||
userRadioChange(val) {
|
|
||||||
this.userRadioIndex = val.index
|
|
||||||
this.userRadioId = val.id
|
|
||||||
},
|
|
||||||
// 树状图点击
|
|
||||||
orangClick(data) {
|
|
||||||
this.orgId = data.id
|
|
||||||
this.resetTable()
|
|
||||||
},
|
|
||||||
resetTable() {
|
|
||||||
this.pageModel.page = 1
|
|
||||||
this.userRadioId = false
|
|
||||||
this.userRadioIndex = false
|
|
||||||
this.$nextTick(() => {
|
|
||||||
this.$refs.userCustomtable.clearSelect()
|
|
||||||
this.$refs.userCustomtable.clearRadioIndex()
|
|
||||||
this.$refs.userLayout.pageClear()
|
|
||||||
})
|
|
||||||
this.getTableList()
|
|
||||||
},
|
|
||||||
// 操作按钮事件
|
|
||||||
getFuncBtn(btnEven) {
|
|
||||||
if (btnEven.menuName === '新增') { // 新增
|
|
||||||
this.$refs.rightDialog.openDialog('新增',this.orgId)
|
|
||||||
}
|
|
||||||
if (btnEven.menuName != '新增') {
|
|
||||||
if (this.userRadioIndex === false) {
|
|
||||||
this.$tipConfirm('请勾选需要处理的信息')
|
|
||||||
return
|
|
||||||
}
|
|
||||||
}
|
|
||||||
if (btnEven.menuName === '编辑') { // 编辑
|
|
||||||
this.$refs.rightDialog.openDialog('编辑',this.orgId,this.userRadioId)
|
|
||||||
}
|
|
||||||
if (btnEven.menuName === '设置角色') { // 编辑
|
|
||||||
this.$refs.tableDialog.openDialog(this.userRadioId)
|
|
||||||
}
|
|
||||||
if(btnEven.menuName === '删除'){
|
|
||||||
this.$delConfirm().then(()=>{
|
|
||||||
this.delData(this.userRadioId)
|
|
||||||
})
|
|
||||||
}
|
|
||||||
if (btnEven.menuName === '重置密码') { // 重置密码
|
|
||||||
this.$confirm('确认重置密码吗?', '提示', {
|
|
||||||
confirmButtonText: '确定',
|
|
||||||
cancelButtonText: '取消',
|
|
||||||
type: 'warning'
|
|
||||||
}).then(() => {
|
|
||||||
this.ResetPwd(this.userRadioId)
|
|
||||||
}).catch(() => {
|
|
||||||
this.$message({
|
|
||||||
type: 'info',
|
|
||||||
message: '已取消操作'
|
|
||||||
});
|
|
||||||
});
|
|
||||||
}
|
|
||||||
if (btnEven.menuName === '启用') { // 导入
|
|
||||||
this.$confirm('确认启用吗?', '提示', {
|
|
||||||
confirmButtonText: '确定',
|
|
||||||
cancelButtonText: '取消',
|
|
||||||
type: 'warning'
|
|
||||||
}).then(() => {
|
|
||||||
this.openDelData(this.userRadioId)
|
|
||||||
}).catch(() => {
|
|
||||||
this.$message({
|
|
||||||
type: 'info',
|
|
||||||
message: '已取消操作'
|
|
||||||
});
|
|
||||||
});
|
|
||||||
}
|
|
||||||
if (btnEven.menuName === '停用') { //
|
|
||||||
this.$confirm('确认停用吗?', '提示', {
|
|
||||||
confirmButtonText: '确定',
|
|
||||||
cancelButtonText: '取消',
|
|
||||||
type: 'warning'
|
|
||||||
}).then(() => {
|
|
||||||
this.closeDelData(this.userRadioId)
|
|
||||||
}).catch(() => {
|
|
||||||
this.$message({
|
|
||||||
type: 'info',
|
|
||||||
message: '已取消操作'
|
|
||||||
});
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
},
|
}
|
||||||
async delData(id) {
|
}
|
||||||
let params = {
|
},
|
||||||
id: id
|
personModel: {
|
||||||
}
|
deep: true, //深度监听设置为 true
|
||||||
let res = await authApi('userService','user','delectEntity','',params)
|
handler: function(newV, oldV) {
|
||||||
if(res.status == '200'){
|
this.getPersonList()
|
||||||
this.$vmNews("删除成功",'success')
|
}
|
||||||
this.resetTable()
|
}
|
||||||
}
|
},
|
||||||
},
|
created() {
|
||||||
pageChange(model) {
|
},
|
||||||
this.pageModel= model
|
onShow() {
|
||||||
this.getTableList()
|
},
|
||||||
}
|
mounted() {
|
||||||
},
|
this.initPage()
|
||||||
|
// this.$refs.baseTree.getMenuList()
|
||||||
|
},
|
||||||
|
filters: {},
|
||||||
|
methods: {
|
||||||
|
// 初始化页面
|
||||||
|
initPage() {
|
||||||
|
this.getTableList()
|
||||||
|
this.getOrganList()
|
||||||
|
},
|
||||||
|
|
||||||
|
// 获取用户信息列表
|
||||||
|
async getTableList() {
|
||||||
|
this.tabLoading = true
|
||||||
|
this.tableData = []
|
||||||
|
let params = {
|
||||||
|
...this.pageModel
|
||||||
|
}
|
||||||
|
let res = await authApi('sysUserService', '', 'queryEntityPage', '', params)
|
||||||
|
if (res.status == 200) {
|
||||||
|
this.tableData = res.attribute.list
|
||||||
|
// this.$nextTick(() => {
|
||||||
|
this.$refs.userCustomtable.clearRadioIndex()
|
||||||
|
this.$refs.userLayout.setPageTotal(res.attribute.total)
|
||||||
|
// })
|
||||||
|
this.tabLoading = false
|
||||||
|
}
|
||||||
|
},
|
||||||
|
// 单选
|
||||||
|
userRadioChange(val) {
|
||||||
|
this.userRadioIndex = val.index
|
||||||
|
this.userRadioId = val.id
|
||||||
|
},
|
||||||
|
// 获取组织列表
|
||||||
|
async getOrganList() {
|
||||||
|
let res = await authApi('sysOrganService', '', 'queryEntityTree', '', {
|
||||||
|
state: 0
|
||||||
|
})
|
||||||
|
this.menuData = res.attribute
|
||||||
|
},
|
||||||
|
// 获取角色列表
|
||||||
|
async getRoleList(dataList) {
|
||||||
|
let params = {
|
||||||
|
page: 1,
|
||||||
|
limit: 50,
|
||||||
|
Sequence: '',
|
||||||
|
SequenceName: ''
|
||||||
|
}
|
||||||
|
let res = await authApi('sysRoleService', '', 'queryEntity', '', { enableState: '0' })
|
||||||
|
if (res.status == 200) {
|
||||||
|
console.log(res, 'res')
|
||||||
|
res.attribute.forEach(el => {
|
||||||
|
el.isActive = false
|
||||||
|
if (dataList && dataList.length > 0) {
|
||||||
|
dataList.forEach(item => {
|
||||||
|
console.log(item.id,el.id,'id对比')
|
||||||
|
if (item.roleId == el.id) {
|
||||||
|
el.isActive = true
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}
|
||||||
|
})
|
||||||
|
this.roleList = res.attribute
|
||||||
|
}
|
||||||
|
},
|
||||||
|
// 获取公司列表
|
||||||
|
async getCompanyList(dataList) {
|
||||||
|
let res = await authApi('sysOrganService', '', 'queryEntityTree', '', { state: 0 })
|
||||||
|
if (res.status == 200) {
|
||||||
|
console.log(res, '组织')
|
||||||
|
res.attribute.forEach(el => {
|
||||||
|
el.isActive = false
|
||||||
|
if (dataList && dataList.length > 0) {
|
||||||
|
dataList.forEach(item => {
|
||||||
|
if (el.id == item.userCompanyId) {
|
||||||
|
el.isActive = true
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}
|
||||||
|
})
|
||||||
|
this.companyList = res.attribute
|
||||||
|
}
|
||||||
|
},
|
||||||
|
// 获得人员列表
|
||||||
|
async getPersonList() {
|
||||||
|
this.personLoading = true
|
||||||
|
let params = {
|
||||||
|
...this.personModel
|
||||||
|
}
|
||||||
|
let res = await PersonList(params)
|
||||||
|
if (res.code === 1) {
|
||||||
|
this.personTableData = res.data[1]
|
||||||
|
this.personLoading = false
|
||||||
|
}
|
||||||
|
},
|
||||||
|
async userSave(params) {
|
||||||
|
let res
|
||||||
|
if(params.id){
|
||||||
|
res = await authApi('sysUserService','','updateEntity','',params)
|
||||||
|
|
||||||
|
}else{
|
||||||
|
res = await authApi('sysUserService','','saveEntity','',params)
|
||||||
|
}
|
||||||
|
if (res.status == 200) {
|
||||||
|
this.$vmNews('保存成功', 'success')
|
||||||
|
this.resetTable()
|
||||||
|
this.addDialog = false
|
||||||
|
}
|
||||||
|
},
|
||||||
|
// 获得人员详情
|
||||||
|
async getInfoData(id) {
|
||||||
|
let params = {
|
||||||
|
id: id
|
||||||
|
}
|
||||||
|
console.log(id)
|
||||||
|
let res = await authApi('sysUserService','','getEntity','',params)
|
||||||
|
this.infoData = res.attribute
|
||||||
|
// this.infoData.p_PersonName = this.infoData.personName
|
||||||
|
|
||||||
|
this.getRoleList(res.attribute.userRoles)
|
||||||
|
this.getCompanyList(res.attribute.userCompanys)
|
||||||
|
this.formRow[0].elCol[0].disabled = true
|
||||||
|
this.addDialog = true
|
||||||
|
this.$nextTick(() => {
|
||||||
|
this.$refs.customForm.choiceAssignment(this.infoData)
|
||||||
|
})
|
||||||
|
|
||||||
|
},
|
||||||
|
|
||||||
|
// 树状图点击
|
||||||
|
personClick(data) {
|
||||||
|
this.personModel.organId = data.id
|
||||||
|
},
|
||||||
|
elDialogClick() {
|
||||||
|
this.$refs.basePerson.personDialog = true
|
||||||
|
// this.personDialog = true
|
||||||
|
this.getPersonList()
|
||||||
|
},
|
||||||
|
|
||||||
|
// 重置
|
||||||
|
// result() {
|
||||||
|
// this.selectTable = []
|
||||||
|
// this.$refs.personCustomtable.clearSelect();
|
||||||
|
// },
|
||||||
|
// 树状图点击
|
||||||
|
orangClick(data) {
|
||||||
|
this.pageModel.organId = data.id
|
||||||
|
this.resetTable()
|
||||||
|
// this.result()
|
||||||
|
},
|
||||||
|
// 表格多选
|
||||||
|
getPersonSelect(selectTable) {
|
||||||
|
this.selectPerson = selectTable
|
||||||
|
},
|
||||||
|
async ResetPwd(id) {
|
||||||
|
let params = {
|
||||||
|
id: id
|
||||||
|
}
|
||||||
|
let res = await authApi('sysUserService','','resetPassword','',params)
|
||||||
|
if (res.status == 200) {
|
||||||
|
this.$vmNews('重置成功', 'success')
|
||||||
|
this.resetTable()
|
||||||
|
this.initPage()
|
||||||
|
}
|
||||||
|
},
|
||||||
|
async openDelData(id) {
|
||||||
|
let params = {
|
||||||
|
id: id,
|
||||||
|
state:0
|
||||||
|
}
|
||||||
|
let res = await authApi('sysUserService','','enableDisableEntity','',params)
|
||||||
|
if (res.status == 200) {
|
||||||
|
this.$vmNews('已成功启用', 'success')
|
||||||
|
this.resetTable()
|
||||||
|
this.initPage()
|
||||||
|
}
|
||||||
|
},
|
||||||
|
async closeDelData(id) {
|
||||||
|
let params = {
|
||||||
|
id: id,
|
||||||
|
state:1
|
||||||
|
}
|
||||||
|
let res = await authApi('sysUserService','','enableDisableEntity','',params)
|
||||||
|
if (res.status == 200) {
|
||||||
|
this.$vmNews('已成功停用', 'success')
|
||||||
|
this.resetTable()
|
||||||
|
this.initPage()
|
||||||
|
}
|
||||||
|
},
|
||||||
|
resetTable() {
|
||||||
|
this.pageModel.pageNum = 1
|
||||||
|
this.userRadioId = false
|
||||||
|
this.userRadioIndex = false
|
||||||
|
this.selectTable = []
|
||||||
|
this.$nextTick(() => {
|
||||||
|
this.$refs.userCustomtable.clearSelect()
|
||||||
|
this.$refs.userCustomtable.clearRadioIndex()
|
||||||
|
this.$refs.userLayout.pageClear()
|
||||||
|
})
|
||||||
|
this.getTableList()
|
||||||
|
},
|
||||||
|
// 操作按钮事件
|
||||||
|
getFuncBtn(btnEven) {
|
||||||
|
if (btnEven.menuName === '新增') { // 新增
|
||||||
|
this.dialogType = 'add'
|
||||||
|
this.getRoleList()
|
||||||
|
this.getCompanyList()
|
||||||
|
this.addDialog = true
|
||||||
|
}
|
||||||
|
if (btnEven.menuName != '新增') {
|
||||||
|
if (this.userRadioIndex === false) {
|
||||||
|
this.$tipConfirm('请勾选需要处理的信息')
|
||||||
|
return
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if (btnEven.menuName === '编辑') { // 编辑
|
||||||
|
this.dialogType = 'edit'
|
||||||
|
this.getInfoData(this.userRadioId)
|
||||||
|
// this.$refs.customtable.clearSelect()
|
||||||
|
}
|
||||||
|
if (btnEven.menuName === '重置密码') { // 重置密码
|
||||||
|
this.$confirm('确认重置密码吗?', '提示', {
|
||||||
|
confirmButtonText: '确定',
|
||||||
|
cancelButtonText: '取消',
|
||||||
|
type: 'warning'
|
||||||
|
}).then(() => {
|
||||||
|
this.ResetPwd(this.userRadioId)
|
||||||
|
}).catch(() => {
|
||||||
|
this.$message({
|
||||||
|
type: 'info',
|
||||||
|
message: '已取消操作'
|
||||||
|
})
|
||||||
|
})
|
||||||
|
}
|
||||||
|
if (btnEven.menuName === '启用') { // 导入
|
||||||
|
this.$confirm('确认启用吗?', '提示', {
|
||||||
|
confirmButtonText: '确定',
|
||||||
|
cancelButtonText: '取消',
|
||||||
|
type: 'warning'
|
||||||
|
}).then(() => {
|
||||||
|
this.openDelData(this.userRadioId)
|
||||||
|
}).catch(() => {
|
||||||
|
this.$message({
|
||||||
|
type: 'info',
|
||||||
|
message: '已取消操作'
|
||||||
|
})
|
||||||
|
})
|
||||||
|
}
|
||||||
|
if (btnEven.menuName === '停用') { //
|
||||||
|
this.$confirm('确认停用吗?', '提示', {
|
||||||
|
confirmButtonText: '确定',
|
||||||
|
cancelButtonText: '取消',
|
||||||
|
type: 'warning'
|
||||||
|
}).then(() => {
|
||||||
|
this.closeDelData(this.userRadioId)
|
||||||
|
}).catch(() => {
|
||||||
|
this.$message({
|
||||||
|
type: 'info',
|
||||||
|
message: '已取消操作'
|
||||||
|
})
|
||||||
|
})
|
||||||
|
}
|
||||||
|
console.log(btnEven)
|
||||||
|
if (btnEven.menuName === '删除') { // 删除
|
||||||
|
// if (!this.judgeCheckbox()) {
|
||||||
|
// return
|
||||||
|
// }
|
||||||
|
this.$confirm('确认删除吗?', '提示', {
|
||||||
|
confirmButtonText: '确定',
|
||||||
|
cancelButtonText: '取消',
|
||||||
|
type: 'warning'
|
||||||
|
}).then(() => {
|
||||||
|
this.tableDelData(this.userRadioId)
|
||||||
|
}).catch(() => {
|
||||||
|
this.$message({
|
||||||
|
type: 'info',
|
||||||
|
message: '已取消删除'
|
||||||
|
});
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
},
|
||||||
|
// 删除功能
|
||||||
|
async tableDelData(id) {
|
||||||
|
let params = {
|
||||||
|
id: id
|
||||||
|
}
|
||||||
|
let res = await authApi('sysUserService','','deleteEntity','',params)
|
||||||
|
if (res.status == 200) {
|
||||||
|
this.$vmNews('删除成功', 'success')
|
||||||
|
this.resetTable()
|
||||||
|
// this.pageModel.page = 1
|
||||||
|
// this.$refs.personLayout.setPageNum(1)
|
||||||
|
}
|
||||||
|
},
|
||||||
|
getElSelect(event, index, indexItem, param) {
|
||||||
|
},
|
||||||
|
handleConfirmClick() {
|
||||||
|
let ruleForm = this.$refs.customForm.ruleForm
|
||||||
|
let userCompanys = []
|
||||||
|
let userRoles = []
|
||||||
|
this.companyList.forEach(el => {
|
||||||
|
if (el.isActive === true) {
|
||||||
|
userCompanys.push({
|
||||||
|
userCompanyId: el.id
|
||||||
|
})
|
||||||
|
}
|
||||||
|
})
|
||||||
|
this.roleList.forEach(el => {
|
||||||
|
if (el.isActive == true) {
|
||||||
|
userRoles.push({
|
||||||
|
roleId: el.id
|
||||||
|
})
|
||||||
|
}
|
||||||
|
})
|
||||||
|
let params = {
|
||||||
|
// U_UserID: this.dialogType == 'add' ? '00000000-0000-0000-0000-000000000000' : this.infoData.U_UserID,
|
||||||
|
...ruleForm,
|
||||||
|
userCompanys: userCompanys,
|
||||||
|
userRoles: userRoles
|
||||||
|
}
|
||||||
|
this.userSave(params)
|
||||||
|
},
|
||||||
|
personConfirmClick(val) {
|
||||||
|
console.log(val)
|
||||||
|
// P_PersonName 人员姓名 P_PersonCode工号 P_PersonID所属人员id u_UserID用户id
|
||||||
|
// u_UserID人员id U_LoginCode账号=人员工号
|
||||||
|
// this.$refs.customForm.ruleForm.U_PersonID = val.p_PersonID
|
||||||
|
this.$refs.customForm.getField('personID', val.id)
|
||||||
|
this.$refs.customForm.getField('loginCode', val.personCode)
|
||||||
|
this.$refs.customForm.getField('personName', val.personName)
|
||||||
|
this.$refs.basePerson.personDialog = false
|
||||||
|
},
|
||||||
|
pageChange(model) {
|
||||||
|
this.pageModel.pageNum = model.page
|
||||||
|
this.pageModel.pageSize = model.limit
|
||||||
|
this.getTableList()
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
<style scoped lang='scss'>
|
<style scoped lang="scss">
|
||||||
.roleName {
|
.roleName {
|
||||||
padding: 10px 0;
|
padding: 10px 0;
|
||||||
width: 90px;
|
width: 90px;
|
||||||
border: 2px solid #f2f2f2;
|
border: 2px solid #f2f2f2;
|
||||||
background-color: #f2f2f2;
|
background-color: #f2f2f2;
|
||||||
margin: 0px 10px 10px 0px;
|
margin: 0px 10px 10px 0px;
|
||||||
text-align: center;
|
text-align: center;
|
||||||
cursor: pointer;
|
cursor: pointer;
|
||||||
box-shadow: 0 0 0 2px #f2f2f2;
|
box-shadow: 0 0 0 2px #f2f2f2;
|
||||||
border-radius: 5px;
|
border-radius: 5px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.active {
|
.active {
|
||||||
background-color: #00a490;
|
background-color: #00a490;
|
||||||
border: 2px solid #ffffff;
|
border: 2px solid #ffffff;
|
||||||
color: white;
|
color: white;
|
||||||
box-shadow: 0 0 0 2px #00a490;
|
box-shadow: 0 0 0 2px #00a490;
|
||||||
}
|
}
|
||||||
|
|
||||||
.bigTitle {
|
.bigTitle {
|
||||||
padding-bottom: 10px;
|
padding-bottom: 10px;
|
||||||
margin: 10px 0;
|
margin: 10px 0;
|
||||||
font-size: 16px;
|
font-size: 16px;
|
||||||
font-weight: bold;
|
font-weight: bold;
|
||||||
border-bottom: 1px solid #ccc;
|
border-bottom: 1px solid #ccc;
|
||||||
}
|
}
|
||||||
|
|
||||||
.organizationBody {
|
.organizationBody {
|
||||||
display: flex;
|
display: flex;
|
||||||
justify-content: space-evenly;
|
justify-content: space-evenly;
|
||||||
background-color: #f2f3f4;
|
background-color: #f2f3f4;
|
||||||
padding: 10px
|
padding: 10px
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
|
|
Loading…
Reference in New Issue