Commit 2dc8cd1d by 胡悦

更改通用版

1 parent 956df331
<template>
<div class="control">
<div class="left flex user-select pointer">
<template v-for="(i,index) in tab">
<div
:class="['item flex',index == 0?'text-center':'brand',{'active':tabIndex == index}]"
:key="index"
@click="change(index)"
>
<template v-for="(i, index) in tab">
<div :class="['item flex', index == 0 ? 'text-center' : 'brand', { active: tabIndex == index }]" :key="index" @click="change(index)">
<div class="text text-hide">
{{i}}
{{ i }}
</div>
<template v-if="index == 1">
<div class="arrow"></div>
</template>
</div>
</template>
<div
class="options-box"
:key="brandsKey"
ref="brands"
>
<template v-for="(i,index) in brands">
<div
:class="['options-item flex',{'active':i.active}]"
:key="index"
@click="chooseBrand({i,index})"
>
<div class="text-hide">{{i.brandName}}</div>
<div class="options-box" :key="brandsKey" ref="brands">
<template v-for="(i, index) in brands">
<div :class="['options-item flex', { active: i.active }]" :key="index" @click="chooseBrand({ i, index })">
<div class="text-hide">{{ i.brandName }}</div>
</div>
</template>
</div>
</div>
<div class="right y-center flex user-select pointer">
<template v-for="(i,index) in options">
<div
:key="index"
@click="reportChange(index)"
:class="['item text-center',{'active':reportIndex == index}]"
>
{{i}}
<template v-for="(i, index) in options">
<div :key="index" @click="reportChange(index)" :class="['item text-center', { active: reportIndex == index }]">
{{ i }}
</div>
</template>
<div :class="['line',`line-${reportIndex}`]"></div>
<div :class="['line', `line-${reportIndex}`]"></div>
</div>
</div>
</template>
<script type='text/ecmascript-6'>
<script type="text/ecmascript-6">
export default {
name: 'ViewControl',
data () {
return {
tab: ['广汇集团', '品牌概览'],
tab: ['XXX集团', '品牌概览'],
tabIndex: 0,
options: ['日表', '月表'],
reportIndex: 1,
......@@ -78,7 +62,7 @@ export default {
let { tabIndex } = this
if (index == 0) {
if (tabIndex == index) return
this.tab = ['广汇集团', '品牌概览']
this.tab = ['XXX集团', '品牌概览']
this.brands.map(e => e.active = false)
} else {
if (!item) return
......@@ -117,7 +101,7 @@ export default {
}
</script>
<style scoped lang='scss'>
<style scoped lang="scss">
.control {
position: relative;
.left {
......@@ -208,7 +192,7 @@ export default {
background-color: #eb6001;
}
}
.active{
.active {
position: sticky;
top: 0;
z-index: 2;
......@@ -267,4 +251,4 @@ export default {
}
}
}
</style>
\ No newline at end of file
</style>
......@@ -3,7 +3,7 @@
<div class="logo user-select">
<img src="@/assets/images/logo.svg" alt="logo" />
</div>
<div class="view-title flex user-select">广汇集团客户池数据大屏</div>
<div class="view-title flex user-select">XXX集团客户池数据大屏</div>
<div class="time">
<div class="top flex">
<img src="@/assets/images/time.svg" class="icon" />
......
......@@ -3,16 +3,17 @@
* @version:
* @Author: limin
* @Date: 2021-06-07 14:12:32
* @LastEditors: limin
* @LastEditTime: 2021-06-28 10:13:38
* @LastEditors: huyue
* @LastEditTime: 2022-07-11 11:01:00
*/
// 本地环境配置
module.exports = {
envVersion: 'trial',
title: '广汇汽车服务',
title: 'XXX汽车服务',
request: {
// baseURL: 'http://192.168.3.126:8081', // 本地测试项目地址,
baseURL: 'http://192.168.1.152:8081', // 本地开发项目地址,
// baseURL: 'http://192.168.1.152:8081', // 本地开发项目地址,
baseURL: 'http://192.168.1.160:8081', // 本地开发项目地址,
// 设置超时时间
timeout: 180000,
// 携带凭证
......
module.exports = {
title: '广汇汽车服务',
title: 'XXX汽车服务',
request: {
// baseURL: 'http://ghwx.cgacar.com/scrm-wechat' // 生产
baseURL: 'http://cim.chinagrandauto.com/scrm-wechat' // 生产
......
module.exports = {
title: '广汇汽车服务',
title: 'XXX汽车服务',
request: {
baseURL: 'http://xxxxx' // 项目地址
},
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!