Commit 535689ed by caoyanzhi

Merge branch 'dev' of http://115.159.76.241/office/haoban-4 into dev

# Conflicts:
#	src/views/apps/customer-app/index.vue
parents 6bab3ace a54637c5
<!--
* @Descripttion: 当前组件信息
* @version: 1.0.0
* @Author: 无尘
* @Date: 2019-03-20 14:36:37
* @LastEditors: 无尘
* @LastEditTime: 2020-09-07 16:14:34
-->
<template>
<div class="my-customer-wrap common-set-wrap">
<nav-crumb :navpath="navpath" @selectBrandId="selectBrandId"> </nav-crumb>
<div class="right-content">
<div class="right-box" style="min-height: calc(100vh - 112px);">
<div class="apps-content flex" style="min-height: calc(100vh - 112px);">
<div class="apps-content-left w-157" style="min-height: calc(100vh - 112px);">
<common-detail-left :tab-list-data="tabListData" :active-sel-tab="activeSelTab" @setSelectTab="setSelectTab"> </common-detail-left>
</div>
<div class="apps-content-right">
<transition name="fade" mode="out-in">
<router-view :brand-id="activeBrand" :active-group-id="activeGroup" :tab-type="activeTab" @showTab="showTab"> </router-view>
</transition>
</div>
</div>
</div>
</div>
</div>
</template>
<script>
import navCrumb from '@/components/nav/nav-app.vue';
import commonDetailLeft from '@/components/app/app-detail-left.vue';
// import errMsg from '@/common/js/error';
// import showMsg from '@/common/js/showmsg';
export default {
name: 'Reviewed',
components: {
navCrumb,
commonDetailLeft
},
data() {
return {
wxEnterpriseId: localStorage.getItem('haoBanUser') ? JSON.parse(localStorage.getItem('haoBanUser')).wxEnterpriseId : '',
activeSelTab: '1',
activeTab: '1',
// 面包屑参数
navpath: [
{
name: '首页',
path: '/index'
},
{
name: '我的顾客',
path: ''
}
],
tabListData: [
{
tabId: '1',
menuName: '顾客数据维度',
iconUrl: 'iconjichushezhi',
menuUrl: ''
},
{
tabId: '2',
menuName: '顾客展示',
iconUrl: 'icongukeguanliicon',
menuUrl: ''
}
],
activeBrand: '', // 商户(品牌) id
activeGroup: '', // 商户(品牌) groupId
};
},
mounted() {
document.documentElement.style.backgroundColor = '#f0f2f5';
},
destroyed() {
document.documentElement.style.backgroundColor = '#fff';
},
methods: {
/**
* 返回 的 brandId
* @param {String} id
* @param {String} groupId
*/
selectBrandId(id, groupId) {
let that = this;
that.activeBrand = id;
that.activeGroup = groupId;
},
/**
* 路由跳转
* @param {String} path
*/
changeRoute(path) {
this.$router.push(path);
},
/**
* 选择后返回menuUrl,做各路由判断
* @param {Object} item
*/
setSelectTab(item) {
const that = this;
that.activeTab = item.menuUrl;
if (item.target == 1) {
if (item.menuUrl.indexOf('http') != -1) {
window.open(item.menuUrl);
}else {
window.open(`/haoban-4/#${item.menuUrl}`);
}
}else {
that.$router.push(item.menuUrl);
}
},
/**
* 各路由返回 menuUrl
* @param {String} menuUrl
*/
showTab(menuUrl) {
const that = this;
that.activeTab = menuUrl;
that.activeSelTab = menuUrl;
that.tabListData.forEach(ele => {
if (ele.menuUrl == menuUrl) {
ele.onlyIconActive = false;
}
if (!!ele.children) {
ele.children.forEach(el => {
if (el.menuUrl == menuUrl) {
ele.onlyIconActive = true;
}
if (!!el.children) {
el.children.forEach(item => {
if (item.menuUrl == menuUrl) {
ele.onlyIconActive = true;
}
});
}
});
}
});
}
},
watch: {
activeBrand: function(newData, oldData) {
const that = this;
that.activeBrand = newData;
},
activeGroup: function(newData, oldData) {
const that = this;
that.activeGroup = newData;
}
}
};
</script>
<style type="text/less" lang="less" scoped>
.line-h-18 {
line-height: 18px;
}
.my-customer-wrap {
height: 100%;
// 拖拽排序公共样式
.move-row-cell {
.icontuozhuaiopen {
display: none;
}
&.show-icon {
.icontuozhuaiopen {
display: inline-block;
vertical-align: middle;
}
}
&:hover {
.icontuozhuaiopen {
display: inline-block;
vertical-align: middle;
}
}
}
}
.right-content {
/*width: 100%;*/
padding: 0 20px 20px 20px;
min-height: calc(100% - 160px);
.right-box {
background: #fff;
min-height: 500px;
padding: 0px;
.apps-content {
.apps-content-left {
min-width: 205px;
height: 100%;
background: #fff;
overflow-x: hidden;
overflow-y: auto;
}
.apps-content-right {
width: calc(100% - 205px);
padding-left: 10px;
background: #f0f2f5;
.common-app-right {
height: 100%;
padding: 20px;
box-sizing: border-box;
background: #fff;
&.no-padding {
padding: 0;
}
.font-22 {
font-size: 22px;
}
}
}
}
}
}
</style>
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment