Commit 1fd0cce2 by 匡雅琴

elbutton切换glbutton

1 parent af33400b
<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
} }
}, },
......
...@@ -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)
}, },
// 获取当前的所有权限 // 获取当前的所有权限
...@@ -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)
...@@ -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
} }
}, },
......
...@@ -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)
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!