Commit ffd1dc76 by 匡雅琴

Merge branch 'kuangyq_dev_v2.5.0' into 'v2.5.0'

Kuangyq dev v2.5.0

See merge request !67
2 parents bf8d4f20 f9075db6
<template> <template>
<div class="account-body scrm-box-f" v-loading="loading"> <div class="account-body scrm-box-f" v-loading="loading">
<div class="account-title">{{ title }}</div> <div class="account-title">{{ title }}</div>
<el-tabs v-if="tabMenu.length != 0" v-model="tabName" type="card" @tab-click="handleClik"> <el-tabs v-if="tabMenu.length != 0" v-model="tabName" @tab-click="handleClik">
<el-tab-pane :label="item.accounttypeName" :name="item.accounttypeId" v-for="(item, index) in tabMenu" :key="index"></el-tab-pane> <el-tab-pane :label="item.accounttypeName" :name="item.accounttypeId + ''" v-for="(item, index) in tabMenu" :key="index"></el-tab-pane>
</el-tabs> </el-tabs>
<div class="account-select-pro" v-for="(item, index) in tabMenu" :key="index" v-show="tabName == item.accounttypeId"> <div class="role-border">
<label>选择产品</label> <div class="account-select-pro" v-for="(item, index) in tabMenu" :key="index" v-show="tabName == item.accounttypeId">
<el-checkbox-group v-model="item.productsArr" @change="selectPro"> <label>选择产品</label>
<el-checkbox v-for="(itm, idx) in item.products" :label="itm" :key="idx">{{ itm.productName }}</el-checkbox> <el-checkbox-group v-model="item.productsArr" @change="selectPro">
</el-checkbox-group> <el-checkbox v-for="(itm, idx) in item.products" :label="itm" :key="idx">{{ itm.productName }}</el-checkbox>
</div> </el-checkbox-group>
<div class="account-select-menu">请选择产品权限</div> </div>
<div class="menu-box"> <div class="account-select-menu">选择产品权限</div>
<div class="menu-box-panel"> <div class="menu-box">
<div :key="index" v-for="(item, index) in tabMenu"> <div class="menu-box-panel">
<div class="menu-box-tab" v-show="tabName == item.accounttypeId"> <div :key="index" v-for="(item, index) in tabMenu">
<div v-show="item.productsArr.indexOf(itm) != -1" class="tab-item text-hide" :class="{ 'select-checked': productTab == itm.productId }" @click="productClick(itm.productId)" v-for="(itm, idx) in item.products" :key="idx"> <div class="menu-box-tab" v-show="tabName == item.accounttypeId">
{{ itm.productName }} <div v-show="item.productsArr.indexOf(itm) != -1" class="tab-item role-border" :class="{ 'select-checked': productTab == itm.productId }" @click="productClick(itm.productId)" v-for="(itm, idx) in item.products" :key="idx">
{{ itm.productName }}
</div>
</div> </div>
</div> <div v-show="tabName == item.accounttypeId" class="menu-box-tree role-border" v-if="item.products" :style="{ 'min-height': treeHeight + 'px' }">
<div v-show="tabName == item.accounttypeId" class="menu-box-tree" v-if="item.products" :style="{ 'min-height': treeHeight + 'px' }"> <div v-for="(itm, idx) in item.products" :key="idx">
<div v-for="(itm, idx) in item.products" :key="idx"> <div class="nodata" v-if="item.productsArr.length == 0 || itm.merchantProTreeResponses.length == 0">
<div class="nodata" v-if="item.productsArr.length == 0 || itm.merchantProTreeResponses.length == 0"> <img src="../../../assets/img/empty.png" alt="" />
<img src="../../../assets/img/empty.png" alt="" /> <div>
<div> {{ item.productsArr.length == 0 ? '请先选择产品' : '暂无菜单权限' }}
{{ item.productsArr.length == 0 ? '请先选择产品' : '暂无菜单权限' }} </div>
</div>
<div v-else>
<el-tree v-show="productTab == itm.productId" :data="itm.merchantProTreeResponses" show-checkbox check-strictly check-on-click-node :expand-on-click-node="false" default-expand-all node-key="id" :class="'tree_' + item.accounttypeId + '_' + itm.productId" :ref="`tree_${item.accounttypeId}_${itm.productId}`" highlight-current :render-content="renderContent" :props="defaultProps" @check="clickDeal"></el-tree>
</div> </div>
</div>
<div v-else>
<el-tree v-show="productTab == itm.productId" :data="itm.merchantProTreeResponses" show-checkbox check-strictly check-on-click-node :expand-on-click-node="false" default-expand-all node-key="id" :class="'tree_' + item.accounttypeId + '_' + itm.productId" :ref="`tree_${item.accounttypeId}_${itm.productId}`" highlight-current :render-content="renderContent" :props="defaultProps" @check="clickDeal"></el-tree>
</div> </div>
</div> </div>
</div> </div>
...@@ -172,7 +174,7 @@ export default { ...@@ -172,7 +174,7 @@ export default {
}) })
}) })
this.loading = false this.loading = false
this.tabName = this.tabMenu[0].accounttypeId this.tabName = this.tabMenu[0].accounttypeId + ''
this.productTab = this.tabMenu[0].productsArr[0] ? this.tabMenu[0].productsArr[0].productId : '' this.productTab = this.tabMenu[0].productsArr[0] ? this.tabMenu[0].productsArr[0].productId : ''
// const arr = res.map(i => i.accounttypeId) // const arr = res.map(i => i.accounttypeId)
// this.tabMenu.map(i => arr.includes(i.accounttypeId)) // this.tabMenu.map(i => arr.includes(i.accounttypeId))
...@@ -393,21 +395,20 @@ export default { ...@@ -393,21 +395,20 @@ export default {
.el-checkbox:last-of-type { .el-checkbox:last-of-type {
margin-right: 8px; margin-right: 8px;
} }
.el-tabs--card > .el-tabs__header .el-tabs__nav { .el-tabs {
border: 0; height: 48px;
border: 1px solid #e5e5e5;
border-bottom: none;
} }
.el-tabs--card > .el-tabs__header { .el-tabs__header {
border: 0; line-height: 48px;
background-color: #f4f6fc; padding: 0 30px;
} }
.el-tabs--card > .el-tabs__header .el-tabs__item { .el-tabs__nav-wrap::after {
border: none; content: none;
width: 180px;
margin: 2px;
text-align: center;
} }
.el-tabs__item.is-active { .el-form-item {
background-color: #fff; margin-bottom: 0 !important;
} }
} }
.account-title { .account-title {
...@@ -419,54 +420,55 @@ export default { ...@@ -419,54 +420,55 @@ export default {
margin-bottom: 30px; margin-bottom: 30px;
} }
.account-select-pro { .account-select-pro {
padding-left: 30px; padding-left: 20px;
font-size: 14px; font-size: 14px;
font-weight: 500; font-weight: 500;
color: #333333; color: #333333;
line-height: 20px; line-height: 20px;
display: flex; display: flex;
flex-wrap: wrap; flex-wrap: wrap;
margin-top: 12px; margin-top: 20px;
label { label {
margin-right: 20px; margin-right: 20px;
} }
} }
.account-select-menu { .account-select-menu {
padding-left: 20px;
font-size: 14px; font-size: 14px;
font-weight: 500; font-weight: 500;
color: #333333; color: #333333;
line-height: 20px; line-height: 20px;
margin-top: 20px; margin-top: 10px;
} }
.menu-box { .menu-box {
position: relative; position: relative;
margin-top: 10px; margin: 10px;
background: #f4f6fc;
border-radius: 4px; border-radius: 4px;
padding: 10px;
.tab-item { .tab-item {
width: 180px; height: 40px;
background: #ffffff; background: #fafafa;
border-radius: 4px 0px 0px 0px; border-bottom: none;
border: 1px solid #f4f6fc; border-radius: 4px 4px 0px 0px;
font-size: 14px; font-size: 14px;
line-height: 14px; line-height: 40px;
font-weight: 400; font-weight: 400;
color: #37383a; color: #37383a;
text-align: center; text-align: center;
padding: 12px 0px; padding: 0 20px;
margin-right: 2px;
cursor: pointer; cursor: pointer;
&.select-checked { &.select-checked {
background: #ffffff;
color: #322ad9; color: #322ad9;
// font-weight: 700;
border-bottom: none;
} }
} }
.menu-box-tab { .menu-box-tab {
display: flex; display: flex;
} }
.menu-box-tree { .menu-box-tree {
background: #ffffff; border-radius: 0px 4px 4px 4px;
height: 640px;
overflow: auto;
} }
} }
} }
......
...@@ -53,19 +53,20 @@ ...@@ -53,19 +53,20 @@
<div class="MsgWrap powerlimt"> <div class="MsgWrap powerlimt">
<span class="content-title">功能权限</span> <span class="content-title">功能权限</span>
<div class="powerTreeWrap"> <div class="powerTreeWrap role-border">
<div class="mainTitleWrap"> <div class="mainTitleWrap role-border-b">
<div class="mainTitle" :class="{ activeMainTitle: currentIndex == index }" v-for="(item, index) in powerDataArray" :key="index" @click="powerTabClick(index)"> <div class="mainTitle" :class="{ activeMainTitle: currentIndex == index }" v-for="(item, index) in powerDataArray" :key="index" @click="powerTabClick(index)">
{{ item.accounttypeName || 'null' }} {{ item.accounttypeName || 'null' }}
<div class="tab_line" v-show="currentIndex == index"></div>
</div> </div>
</div> </div>
<div class="content"> <div class="content">
<div class="subTitleWrap" v-if="products.length > 0"> <div class="subTitleWrap" v-if="products.length > 0">
<div class="subTitle text-hide" :class="{ acitveSubTitle: subCurrentIndex == sindex }" v-for="(ele, sindex) in products" :key="sindex" @click="powerSubTabClick(sindex)"> <div class="subTitle role-border" :class="{ acitveSubTitle: subCurrentIndex == sindex }" v-for="(ele, sindex) in products" :key="sindex" @click="powerSubTabClick(sindex)">
{{ ele.productName }} {{ ele.productName }}
</div> </div>
</div> </div>
<div class="contentTree"> <div class="contentTree role-border">
<!-- powerDataArray.length > 0 && powerDataArray[currentIndex].products[subCurrentIndex]. --> <!-- powerDataArray.length > 0 && powerDataArray[currentIndex].products[subCurrentIndex]. -->
<!-- powerDataArray[currentIndex].products[subCurrentIndex].merchantProTreeResponses这是树的数据 --> <!-- powerDataArray[currentIndex].products[subCurrentIndex].merchantProTreeResponses这是树的数据 -->
<template v-if="merchantProTreeResponses.length > 0"> <template v-if="merchantProTreeResponses.length > 0">
...@@ -557,6 +558,16 @@ export default { ...@@ -557,6 +558,16 @@ export default {
</script> </script>
<style lang="scss" scoped> <style lang="scss" scoped>
.tab_line {
width: 100%;
height: 2px;
background: #5850ff;
border-radius: 4px;
position: absolute;
left: 50%;
top: 48px;
transform: translate(-50%, 0);
}
.merchantDetail { .merchantDetail {
padding-bottom: 60px; padding-bottom: 60px;
.titles { .titles {
...@@ -656,46 +667,41 @@ export default { ...@@ -656,46 +667,41 @@ export default {
.powerlimt { .powerlimt {
padding-bottom: 30px; padding-bottom: 30px;
.powerTreeWrap { .powerTreeWrap {
background-color: #f4f6fc;
margin: 0 20px; margin: 0 20px;
border-radius: 4px; border-radius: 4px;
min-height: 300px; min-height: 300px;
padding-top: 2px; padding-top: 2px;
padding-left: 2px; padding-left: 2px;
padding-bottom: 10px;
.mainTitleWrap { .mainTitleWrap {
// height: 32px; height: 48px;
display: flex; display: flex;
padding: 0 10px;
.mainTitle { .mainTitle {
background-color: #f4f6fc; position: relative;
height: 32px; margin: 0 20px;
width: 180px; line-height: 48px;
line-height: 32px;
text-align: center; text-align: center;
border-radius: 2px; border-radius: 2px;
} }
.activeMainTitle { .activeMainTitle {
background-color: #fff;
color: #5850ff; color: #5850ff;
} }
} }
.content { .content {
background-color: #fff; margin: 20px;
border-radius: 0px 4px 4px 4px;
margin: 20px 10px 0;
.subTitleWrap { .subTitleWrap {
// height: 40px;
display: flex; display: flex;
flex-wrap: wrap; flex-wrap: wrap;
background-color: #f4f6fc;
.subTitle { .subTitle {
padding: 0px 5px; background: #fafafa;
background-color: #f4f6fc; padding: 0px 20px;
height: 40px; height: 40px;
width: 180px;
line-height: 40px; line-height: 40px;
text-align: center; text-align: center;
border-radius: 2px; border-radius: 4px 4px 0px 0px;
border-bottom: none;
margin-right: 2px;
} }
.acitveSubTitle { .acitveSubTitle {
background-color: #fff !important; background-color: #fff !important;
...@@ -707,7 +713,7 @@ export default { ...@@ -707,7 +713,7 @@ export default {
height: 250px; height: 250px;
position: relative; position: relative;
overflow: auto; overflow: auto;
border-radius: 0px 4px 4px 4px;
.noDataContent { .noDataContent {
width: 64px; width: 64px;
height: 64px; height: 64px;
......
<template> <template>
<div class="scrm-main"> <div class="scrm-main">
<div class="form-header" v-if="$globalState.session.accountLevel == 1 && $globalState.session.merchantModel == 1"> <div class="form-header" v-if="$globalState.session.accountLevel == 1 && $globalState.session.merchantModel == 1">
<!-- <GLButton @click="handleContact" icon="el-icon-link" fn="门店账户关联企微" type="primary" size="small" mode="el-button">门店账户关联企微</GLButton> --> <GLButton @click="handleContact" icon="el-icon-link" fn="门店账户关联企微" type="primary" size="small" mode="el-button">门店账户关联企微</GLButton>
<el-button type="primary" @click="handleContact" size="small" icon="el-icon-link">门店账户关联企微</el-button> <!-- <el-button type="primary" @click="handleContact" size="small" icon="el-icon-link">门店账户关联企微</el-button> -->
</div> </div>
<div class="follow-form"> <div class="follow-form">
<GLCombiForm :formObj="searchForm" :searchSelectObj="searchSelectObj" :formData="searchFormData" @handleOk="handleSearch" @handleRest="handleReset"></GLCombiForm> <GLCombiForm :formObj="searchForm" :searchSelectObj="searchSelectObj" :formData="searchFormData" @handleOk="handleSearch" @handleRest="handleReset"></GLCombiForm>
......
...@@ -87,7 +87,6 @@ export default { ...@@ -87,7 +87,6 @@ export default {
// 选择商户----获取权限 // 选择商户----获取权限
async selectMerchant(id, list) { async selectMerchant(id, list) {
let res = await this.$refs.productFrom.findMenuFunTreeByMerId({ id }) let res = await this.$refs.productFrom.findMenuFunTreeByMerId({ id })
console.log(res)
this.accountListSelect = res.map(item => { this.accountListSelect = res.map(item => {
item.select = false item.select = false
return item return item
......
...@@ -84,7 +84,6 @@ export default { ...@@ -84,7 +84,6 @@ export default {
}, },
methods: { methods: {
handleClik(tab, event) { handleClik(tab, event) {
console.log(tab, event)
const tabId = tab.name const tabId = tab.name
const productTab = this.tabMenu.find(i => i.accounttypeId == tabId) const productTab = this.tabMenu.find(i => i.accounttypeId == tabId)
this.productTab = productTab.productsArr[0] ? productTab.productsArr[0].productId : '' this.productTab = productTab.productsArr[0] ? productTab.productsArr[0].productId : ''
...@@ -94,7 +93,6 @@ export default { ...@@ -94,7 +93,6 @@ export default {
this.$parent.editStatus = true this.$parent.editStatus = true
this.productTab = data.length != 0 ? data[data.length - 1].productId : '' this.productTab = data.length != 0 ? data[data.length - 1].productId : ''
const { tabName, tabMenu, productTab } = this const { tabName, tabMenu, productTab } = this
console.log(tabName, data, productTab, '选中')
// 设置全选 // 设置全选
var merchantProTreeResponses = tabMenu.find(i => i.accounttypeId == tabName).products.find(j => j.productId == productTab) var merchantProTreeResponses = tabMenu.find(i => i.accounttypeId == tabName).products.find(j => j.productId == productTab)
var arr = merchantProTreeResponses ? merchantProTreeResponses.merchantProTreeResponses : '' var arr = merchantProTreeResponses ? merchantProTreeResponses.merchantProTreeResponses : ''
...@@ -137,7 +135,6 @@ export default { ...@@ -137,7 +135,6 @@ export default {
let accounttypeId = this.tabMenu.find(item => item) let accounttypeId = this.tabMenu.find(item => item)
this.tabName = accounttypeId ? accounttypeId.accounttypeId + '' : '' this.tabName = accounttypeId ? accounttypeId.accounttypeId + '' : ''
} }
console.log(this.tabMenu)
this.tabMenuStatus = this.tabMenu.some(item => item) this.tabMenuStatus = this.tabMenu.some(item => item)
}, },
// 获取当前的所有权限 // 获取当前的所有权限
...@@ -192,12 +189,10 @@ export default { ...@@ -192,12 +189,10 @@ export default {
}, },
// 获取已选择的权限 // 获取已选择的权限
findPermissionsByMerId(arr) { findPermissionsByMerId(arr) {
console.log(arr)
let accounttypeId = [] let accounttypeId = []
arr.forEach(item => { arr.forEach(item => {
accounttypeId.push(item.accounttypeId) accounttypeId.push(item.accounttypeId)
this.accountList.forEach((itm, index) => { this.accountList.forEach((itm, index) => {
console.log(accounttypeId)
if (accounttypeId.includes(itm.accounttypeId)) { if (accounttypeId.includes(itm.accounttypeId)) {
this.tabMenu[index] = itm this.tabMenu[index] = itm
if (!item.productList) { if (!item.productList) {
...@@ -333,7 +328,6 @@ export default { ...@@ -333,7 +328,6 @@ export default {
uniteChildSame(treeList, isSelected) { uniteChildSame(treeList, isSelected) {
const tree_ref = `tree_${this.tabName}_${this.productTab}` const tree_ref = `tree_${this.tabName}_${this.productTab}`
this.$refs[tree_ref][0].setChecked(treeList.id, isSelected) this.$refs[tree_ref][0].setChecked(treeList.id, isSelected)
console.log(treeList)
if (treeList.children !== null) { if (treeList.children !== null) {
for (let i = 0; i < treeList.children.length; i++) { for (let i = 0; i < treeList.children.length; i++) {
this.uniteChildSame(treeList.children[i], isSelected) this.uniteChildSame(treeList.children[i], isSelected)
...@@ -371,7 +365,6 @@ export default { ...@@ -371,7 +365,6 @@ export default {
let productList = [] let productList = []
item.productsArr.forEach(itm => { item.productsArr.forEach(itm => {
const checkedNodes = this.$refs[`tree_${item.accounttypeId}_${itm.productId}`] ? this.$refs[`tree_${item.accounttypeId}_${itm.productId}`][0].getCheckedNodes() : [] const checkedNodes = this.$refs[`tree_${item.accounttypeId}_${itm.productId}`] ? this.$refs[`tree_${item.accounttypeId}_${itm.productId}`][0].getCheckedNodes() : []
console.log(checkedNodes)
const menuIdList = checkedNodes const menuIdList = checkedNodes
// .filter((item) => item.logo === "menu") // .filter((item) => item.logo === "menu")
.filter(item => item.logo !== 'function' && item.logo !== 'functionValue' && item.logo !== 'neglect') .filter(item => item.logo !== 'function' && item.logo !== 'functionValue' && item.logo !== 'neglect')
...@@ -403,7 +396,6 @@ export default { ...@@ -403,7 +396,6 @@ export default {
}) })
}) })
} }
console.log(menuIdList, functionIdList, functionValueIdLists, list)
if (this.roleType) { if (this.roleType) {
productList.push({ productList.push({
productId: itm.productId, productId: itm.productId,
...@@ -432,7 +424,6 @@ export default { ...@@ -432,7 +424,6 @@ export default {
} }
} }
}) })
console.log(this.accountTypes, ' =-=-=-=-==')
return this.accountTypes return this.accountTypes
} }
}, },
...@@ -462,34 +453,6 @@ export default { ...@@ -462,34 +453,6 @@ export default {
.el-tabs__nav-wrap::after { .el-tabs__nav-wrap::after {
content: none; content: none;
} }
// .el-tabs--card > .el-tabs__header .el-tabs__nav {
// border: 0;
// }
// .el-tabs--card > .el-tabs__header {
// border: 0;
// border-bottom: 1px solid #e5e5e5;
// // background-color: #f4f6fc;
// }
// .el-tabs--card > .el-tabs__header .el-tabs__item {
// position: relative;
// border: none;
// // width: 180px;
// margin: 2px;
// text-align: center;
// &::after {
// content: '';
// display: inline-block;
// width: calc(100% - 40px);
// height: 2px;
// background-color: #5850ff;
// position: absolute;
// bottom: -2px;
// left: 20px;
// }
// }
// .el-tabs__item.is-active {
// background-color: #fff;
// }
.el-form-item { .el-form-item {
margin-bottom: 0 !important; margin-bottom: 0 !important;
} }
......
...@@ -5,19 +5,20 @@ ...@@ -5,19 +5,20 @@
<div class="MsgWrap powerlimt"> <div class="MsgWrap powerlimt">
<span class="content-title">产品功能权限</span> <span class="content-title">产品功能权限</span>
<div class="powerTreeWrap"> <div class="powerTreeWrap role-border">
<div class="mainTitleWrap"> <div class="mainTitleWrap role-border-b">
<div class="mainTitle" :class="{ activeMainTitle: currentIndex == index }" v-for="(item, index) in powerDataArray" :key="index" @click="powerTabClick(index)"> <div class="mainTitle" :class="{ activeMainTitle: currentIndex == index }" v-for="(item, index) in powerDataArray" :key="index" @click="powerTabClick(index)">
{{ item.accounttypeName || 'null' }} {{ item.accounttypeName || 'null' }}
<div class="tab_line" v-show="currentIndex == index"></div>
</div> </div>
</div> </div>
<div class="content"> <div class="content">
<div class="subTitleWrap" v-if="products.length > 0"> <div class="subTitleWrap" v-if="products.length > 0">
<div class="subTitle" :class="{ acitveSubTitle: subCurrentIndex == sindex }" v-for="(ele, sindex) in products" :key="sindex" @click="powerSubTabClick(sindex)"> <div class="subTitle role-border" :class="{ acitveSubTitle: subCurrentIndex == sindex }" v-for="(ele, sindex) in products" :key="sindex" @click="powerSubTabClick(sindex)">
{{ ele.productName }} {{ ele.productName }}
</div> </div>
</div> </div>
<div class="contentTree"> <div class="contentTree role-border">
<template v-if="merchantProTreeResponses.length > 0"> <template v-if="merchantProTreeResponses.length > 0">
<el-tree default-expand-all :data="merchantProTreeResponses" :render-content="renderContent" :props="defaultProps"></el-tree> <el-tree default-expand-all :data="merchantProTreeResponses" :render-content="renderContent" :props="defaultProps"></el-tree>
</template> </template>
...@@ -141,6 +142,16 @@ export default { ...@@ -141,6 +142,16 @@ export default {
} }
</script> </script>
<style lang="scss"> <style lang="scss">
.tab_line {
width: 100%;
height: 2px;
background: #5850ff;
border-radius: 4px;
position: absolute;
left: 50%;
top: 48px;
transform: translate(-50%, 0);
}
.config-employee { .config-employee {
margin-bottom: 64px; margin-bottom: 64px;
} }
...@@ -163,8 +174,6 @@ export default { ...@@ -163,8 +174,6 @@ export default {
.powerlimt { .powerlimt {
padding-bottom: 30px; padding-bottom: 30px;
.powerTreeWrap { .powerTreeWrap {
background-color: #f4f6fc;
// margin: 0 20px;
border-radius: 4px; border-radius: 4px;
min-height: 300px; min-height: 300px;
padding-top: 2px; padding-top: 2px;
...@@ -176,12 +185,12 @@ export default { ...@@ -176,12 +185,12 @@ export default {
flex-wrap: wrap; flex-wrap: wrap;
.mainTitle { .mainTitle {
background-color: #f4f6fc; height: 48px;
height: 32px; line-height: 48px;
width: 180px;
line-height: 32px;
text-align: center; text-align: center;
border-radius: 2px; border-radius: 2px;
position: relative;
margin: 0 20px;
cursor: pointer; cursor: pointer;
} }
.activeMainTitle { .activeMainTitle {
...@@ -197,14 +206,14 @@ export default { ...@@ -197,14 +206,14 @@ export default {
// height: 40px; // height: 40px;
display: flex; display: flex;
flex-wrap: wrap; flex-wrap: wrap;
background-color: #f4f6fc;
.subTitle { .subTitle {
background-color: #f4f6fc; background-color: #fafafa;
height: 40px; height: 40px;
width: 180px; width: 180px;
font-size: 14px; font-size: 14px;
line-height: 40px; line-height: 40px;
text-align: center; text-align: center;
border-bottom: none;
border-radius: 2px; border-radius: 2px;
} }
.acitveSubTitle { .acitveSubTitle {
......
...@@ -17,11 +17,11 @@ ...@@ -17,11 +17,11 @@
<div class="menu-box-panel"> <div class="menu-box-panel">
<div :key="index" v-for="(item, index) in tabMenu"> <div :key="index" v-for="(item, index) in tabMenu">
<div class="menu-box-tab" v-show="tabName == item.accounttypeId"> <div class="menu-box-tab" v-show="tabName == item.accounttypeId">
<div v-show="item.productsArr.indexOf(itm) != -1" class="tab-item text-hide" :class="{ 'select-checked': productTab == itm.productId }" @click="productClick(itm.productId)" v-for="(itm, idx) in item.products" :key="idx"> <div v-show="item.productsArr.indexOf(itm) != -1" class="tab-item role-border text-hide" :class="{ 'select-checked': productTab == itm.productId }" @click="productClick(itm.productId)" v-for="(itm, idx) in item.products" :key="idx">
{{ itm.productName }} {{ itm.productName }}
</div> </div>
</div> </div>
<div v-show="tabName == item.accounttypeId" class="menu-box-tree" v-if="item.products" :style="{ 'min-height': treeHeight + 'px' }"> <div v-show="tabName == item.accounttypeId" class="menu-box-tree role-border" v-if="item.products" :style="{ 'min-height': treeHeight + 'px' }">
<div v-for="(itm, idx) in item.products" :key="idx"> <div v-for="(itm, idx) in item.products" :key="idx">
<div class="nodata" v-if="item.productsArr.length == 0 || itm.merchantProTreeResponses.length == 0"> <div class="nodata" v-if="item.productsArr.length == 0 || itm.merchantProTreeResponses.length == 0">
<img src="../../../assets/img/empty.png" alt="" /> <img src="../../../assets/img/empty.png" alt="" />
...@@ -84,7 +84,6 @@ export default { ...@@ -84,7 +84,6 @@ export default {
}, },
methods: { methods: {
handleClik(tab, event) { handleClik(tab, event) {
console.log(tab)
const tabId = tab.name const tabId = tab.name
const productTab = this.tabMenu.find(i => i.accounttypeId == tabId) const productTab = this.tabMenu.find(i => i.accounttypeId == tabId)
this.productTab = productTab.productsArr[0] ? productTab.productsArr[0].productId : '' this.productTab = productTab.productsArr[0] ? productTab.productsArr[0].productId : ''
...@@ -94,7 +93,6 @@ export default { ...@@ -94,7 +93,6 @@ export default {
this.$parent.editStatus = true this.$parent.editStatus = true
this.productTab = data.length != 0 ? data[data.length - 1].productId : '' this.productTab = data.length != 0 ? data[data.length - 1].productId : ''
const { tabName, tabMenu, productTab } = this const { tabName, tabMenu, productTab } = this
console.log(tabName, data, productTab, '选中')
// 设置全选 // 设置全选
var merchantProTreeResponses = tabMenu.find(i => i.accounttypeId == tabName).products.find(j => j.productId == productTab) var merchantProTreeResponses = tabMenu.find(i => i.accounttypeId == tabName).products.find(j => j.productId == productTab)
var arr = merchantProTreeResponses ? merchantProTreeResponses.merchantProTreeResponses : '' var arr = merchantProTreeResponses ? merchantProTreeResponses.merchantProTreeResponses : ''
...@@ -137,7 +135,6 @@ export default { ...@@ -137,7 +135,6 @@ export default {
let accounttypeId = this.tabMenu.find(item => item) let accounttypeId = this.tabMenu.find(item => item)
this.tabName = accounttypeId ? accounttypeId.accounttypeId + '' : '' this.tabName = accounttypeId ? accounttypeId.accounttypeId + '' : ''
} }
console.log(this.tabMenu)
this.tabMenuStatus = this.tabMenu.some(item => item) this.tabMenuStatus = this.tabMenu.some(item => item)
}, },
// 获取当前的所有权限 // 获取当前的所有权限
...@@ -158,7 +155,7 @@ export default { ...@@ -158,7 +155,7 @@ export default {
accounttypeId: item.accounttypeId accounttypeId: item.accounttypeId
} }
}) })
this.tabName = this.tabMenu_r[0].accounttypeId this.tabName = this.tabMenu_r[0].accounttypeId + ''
return this.tabMenu_r return this.tabMenu_r
}, },
// 获取当前的所有权限 // 获取当前的所有权限
...@@ -192,7 +189,6 @@ export default { ...@@ -192,7 +189,6 @@ export default {
}, },
// 获取已选择的权限 // 获取已选择的权限
findPermissionsByMerId(arr) { findPermissionsByMerId(arr) {
console.log(arr)
let accounttypeId = [] let accounttypeId = []
arr.forEach(item => { arr.forEach(item => {
accounttypeId.push(item.accounttypeId) accounttypeId.push(item.accounttypeId)
...@@ -226,7 +222,7 @@ export default { ...@@ -226,7 +222,7 @@ export default {
return item && item.accounttypeId && this.tabMenu[index].productsArr.length > 0 return item && item.accounttypeId && this.tabMenu[index].productsArr.length > 0
}) })
setTimeout(() => { setTimeout(() => {
this.tabName = tabMenu[0].accounttypeId this.tabName = tabMenu[0].accounttypeId + ''
this.productTab = tabMenu[0].productsArr[0].productId this.productTab = tabMenu[0].productsArr[0].productId
}, 100) }, 100)
}, },
...@@ -333,7 +329,6 @@ export default { ...@@ -333,7 +329,6 @@ export default {
uniteChildSame(treeList, isSelected) { uniteChildSame(treeList, isSelected) {
const tree_ref = `tree_${this.tabName}_${this.productTab}` const tree_ref = `tree_${this.tabName}_${this.productTab}`
this.$refs[tree_ref][0].setChecked(treeList.id, isSelected) this.$refs[tree_ref][0].setChecked(treeList.id, isSelected)
console.log(treeList)
if (treeList.children !== null) { if (treeList.children !== null) {
for (let i = 0; i < treeList.children.length; i++) { for (let i = 0; i < treeList.children.length; i++) {
this.uniteChildSame(treeList.children[i], isSelected) this.uniteChildSame(treeList.children[i], isSelected)
...@@ -371,7 +366,6 @@ export default { ...@@ -371,7 +366,6 @@ export default {
let productList = [] let productList = []
item.productsArr.forEach(itm => { item.productsArr.forEach(itm => {
const checkedNodes = this.$refs[`tree_${item.accounttypeId}_${itm.productId}`] ? this.$refs[`tree_${item.accounttypeId}_${itm.productId}`][0].getCheckedNodes() : [] const checkedNodes = this.$refs[`tree_${item.accounttypeId}_${itm.productId}`] ? this.$refs[`tree_${item.accounttypeId}_${itm.productId}`][0].getCheckedNodes() : []
console.log(checkedNodes)
const menuIdList = checkedNodes const menuIdList = checkedNodes
// .filter((item) => item.logo === "menu") // .filter((item) => item.logo === "menu")
.filter(item => item.logo !== 'function' && item.logo !== 'functionValue' && item.logo !== 'neglect') .filter(item => item.logo !== 'function' && item.logo !== 'functionValue' && item.logo !== 'neglect')
...@@ -432,7 +426,6 @@ export default { ...@@ -432,7 +426,6 @@ export default {
} }
} }
}) })
console.log(this.accountTypes, ' =-=-=-=-==')
return this.accountTypes return this.accountTypes
} }
}, },
...@@ -470,7 +463,7 @@ export default { ...@@ -470,7 +463,7 @@ export default {
line-height: 20px; line-height: 20px;
display: flex; display: flex;
flex-wrap: wrap; flex-wrap: wrap;
margin-top: 12px; margin-top: 28px;
label { label {
margin-right: 20px; margin-right: 20px;
} }
...@@ -482,7 +475,6 @@ export default { ...@@ -482,7 +475,6 @@ export default {
.tab-item { .tab-item {
background: #fafafa; background: #fafafa;
border-radius: 4px 4px 0px 0px; border-radius: 4px 4px 0px 0px;
border: 1px solid #f4f6fc;
margin-right: 2px; margin-right: 2px;
font-size: 14px; font-size: 14px;
line-height: 14px; line-height: 14px;
...@@ -502,7 +494,6 @@ export default { ...@@ -502,7 +494,6 @@ export default {
} }
.menu-box-tree { .menu-box-tree {
background: #ffffff; background: #ffffff;
border: 1px solid #f4f6fc;
} }
} }
} }
...@@ -518,4 +509,8 @@ export default { ...@@ -518,4 +509,8 @@ export default {
margin-bottom: 12px; margin-bottom: 12px;
} }
} }
/deep/ .el-tree {
height: 640px;
overflow: auto;
}
</style> </style>
...@@ -59,16 +59,13 @@ ...@@ -59,16 +59,13 @@
</div> </div>
</el-col> </el-col>
</el-row> </el-row>
<!-- <div > -->
<SelectProduct class="role-detail" ref="productFrom" :roleType="true"></SelectProduct> <SelectProduct class="role-detail" ref="productFrom" :roleType="true"></SelectProduct>
<!-- </div> -->
</div> </div>
<GLFooter style="z-index: 1"> <GLFooter style="z-index: 1">
<el-button @click="toBack">取消</el-button> <el-button @click="toBack">取消</el-button>
<el-button v-if="pageType == 'create'" type="primary" plain @click="toCreateRole(1)">存为草稿</el-button> <el-button v-if="pageType == 'create'" type="primary" plain @click="toCreateRole(1)">存为草稿</el-button>
<el-button type="primary" @click="toCreateRole(0)">提交</el-button> <el-button type="primary" @click="toCreateRole(0)">提交</el-button>
</GLFooter> </GLFooter>
<!-- </div> -->
</div> </div>
</template> </template>
<script> <script>
...@@ -143,7 +140,6 @@ export default { ...@@ -143,7 +140,6 @@ export default {
// 获取商户树 // 获取商户树
getMerchantTree(id, list) { getMerchantTree(id, list) {
this.$apis.role.roleTreeDataById({ id }).then(res => { this.$apis.role.roleTreeDataById({ id }).then(res => {
console.log(res)
for (let i = 0; i < list.length; i++) { for (let i = 0; i < list.length; i++) {
for (let j = 0; j < res.length; j++) { for (let j = 0; j < res.length; j++) {
if (res[j].accounttypeId == list[i].accounttypeId) { if (res[j].accounttypeId == list[i].accounttypeId) {
...@@ -152,7 +148,6 @@ export default { ...@@ -152,7 +148,6 @@ export default {
} }
} }
this.accountListSelect = res this.accountListSelect = res
console.log(this.accountListSelect)
}) })
}, },
getMerchantName() { getMerchantName() {
...@@ -213,7 +208,6 @@ export default { ...@@ -213,7 +208,6 @@ export default {
this.rootList.forEach(item => { this.rootList.forEach(item => {
accounttypeId.push(item.accounttypeId) accounttypeId.push(item.accounttypeId)
}) })
console.log(this.rootList, accounttypeId, '99999')
this.accounttypeIds = accounttypeId this.accounttypeIds = accounttypeId
this.$refs.productFrom.findMenuFunTree(item.accounttypeId, item.select) this.$refs.productFrom.findMenuFunTree(item.accounttypeId, item.select)
}, },
......
...@@ -14,10 +14,10 @@ ...@@ -14,10 +14,10 @@
{{ scope.scope.statusName }} {{ scope.scope.statusName }}
</div> </div>
<template slot="auth-button" slot-scope="scope" :data="scope.scope"> <template slot="auth-button" slot-scope="scope" :data="scope.scope">
<!-- <GLTableButton :buttonList="buttonList" :buttonItem="scope.scope"></GLTableButton> --> <GLTableButton :buttonList="buttonList" :buttonItem="scope.scope"></GLTableButton>
<el-button type="text" @click="toLookPage(scope.scope)">查看</el-button> <!-- <el-button type="text" @click="toLookPage(scope.scope)">查看</el-button>
<el-button v-if="scope.scope.roleName != '超级管理员'" type="text" @click="toEditPage(scope.scope)">修改</el-button> <el-button v-if="scope.scope.roleName != '超级管理员'" type="text" @click="toEditPage(scope.scope)">修改</el-button>
<el-button v-if="scope.scope.delFlag" type="text" @click="todelete(scope.scope)">删除</el-button> <el-button v-if="scope.scope.delFlag" type="text" @click="todelete(scope.scope)">删除</el-button> -->
</template> </template>
</GLTable> </GLTable>
</div> </div>
......
...@@ -155,7 +155,6 @@ export default { ...@@ -155,7 +155,6 @@ export default {
}) })
) )
this.newTreeList = this.toContiuneTree(this.newTreeList, 0, maxval) this.newTreeList = this.toContiuneTree(this.newTreeList, 0, maxval)
console.log(this.newTreeList)
this.maxval = maxval - 1 this.maxval = maxval - 1
this.$nextTick(() => { this.$nextTick(() => {
this.changeTreeClass(maxval) this.changeTreeClass(maxval)
...@@ -274,7 +273,7 @@ export default { ...@@ -274,7 +273,7 @@ export default {
display: flex; display: flex;
align-items: center; align-items: center;
box-sizing: border-box; box-sizing: border-box;
padding: 0px 32px; padding: 0px 10px;
// border-bottom: 1px solid #e5e5e5; // border-bottom: 1px solid #e5e5e5;
.line_element { .line_element {
position: relative; position: relative;
...@@ -284,6 +283,7 @@ export default { ...@@ -284,6 +283,7 @@ export default {
font-size: 14px; font-size: 14px;
font-weight: 400; font-weight: 400;
color: #333333; color: #333333;
margin: 0 20px;
cursor: pointer; cursor: pointer;
} }
.line_element_active { .line_element_active {
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!