Commit ba0d155f by 前端

客户价值分析

1 parent 4054ab02
......@@ -56,13 +56,13 @@ export default {
<style scoped lang="scss">
.tabs {
margin: 0.98vh 0 0.98vh 0;
padding: 0 1.67vw;
padding: 20px 1.67vw;
height: 6.95vh;
width: 100%;
box-sizing: border-box;
justify-content: space-between;
.tab {
margin: 0.61vh 0;
// padding: 2vh 0;
.tab-title {
font-weight: 400;
font-size: 12px;
......
......@@ -31,7 +31,7 @@ function getBarOptions(obj) {
data: name
},
grid: {
left: '8%',
left: '6%',
right: '6%',
top: '6%',
bottom: '4%',
......@@ -114,7 +114,7 @@ function getBarReverseOptions(obj) {
data: value.map(item => item.label)
},
grid: {
left: '15%',
left: '8%',
right: '0%',
top: '0%',
bottom: '0%',
......
......@@ -21,6 +21,7 @@ import '@/assets/css/index.scss'
import './utils/util'
import 'components'
import * as echarts from 'echarts'
import dialog from './plugins/dialog'
import Bus from '../src/bus' //这是我的路径,正确引用你们的路径
Vue.prototype.$bus = Bus
Vue.prototype.$echarts = echarts
......@@ -36,6 +37,7 @@ Vue.prototype.to = function (name, params) {
// import 'lib-flexible/flexible.js'
Vue.config.productionTip = false
Vue.use(dialog)
const isMock = ['prod', 'production'].includes(process.env.NODE_ENV)
fetchConfig(!isMock).then(res => {
// 从配置服务器获取动态配置
......
<template>
<div class="mask" v-if="isShow">
<div class="dialog-wrap">
<div class="dialog">
<div class="dialog-title">
客户价值分析
<div class="close" @click="closeHandle">
<img src="@/assets/images/close.png" />
</div>
</div>
<div class="dialog-content flex">
<div class="content-top axis">
<img src="@/assets/images/axis.png" />
</div>
<div class="content-top bg">
<div class="content-top-title">
<img class="title-icon" src="@/assets/images/title-icon.png" />
<div class="title">客户价值</div>
<img class="title-icon" src="@/assets/images/title-icon.png" />
</div>
<div class="content-info">
重要价值:R高、F高、M高
<br />
重要发展:R高、F低、M高
<br />
重要召回:R低、F高、M高
<br />
重要挽留:R低、F低、M高
<br />
一般价值:R高、F高、M低
<br />
一般发展:R高、F低、M低
<br />
一般召回:R低、F高、M低
<br />
一般挽留:R低、F低、M低
</div>
</div>
<div class="content-bottom bg">
<div class="title">售后客户价值模型</div>
<div>
R=最近一次和上一次到店间隔时间
<br />
F=一年内到店频次
<br />
M=一年内售后工单金额
</div>
</div>
<div class="content-bottom bg">
<div class="title">当前逻辑</div>
<div>
6个月内(高)< R ≤ 超6个月(低) <br />
2次以内(低)≤ F <超2次(高)
<br />
3000元 (低)≤ M <超 3000元(高)
</div>
</div>
</div>
</div>
</div>
</div>
</template>
<script>
export default {
name: 'my-dialog',
data() {
return {
msg: '',
isShow: true
}
},
methods: {
handleBtn(index) {
if (this.btns[index].onPress) {
this.btns[index].onPress()
}
this.isShow = false
},
closeHandle() {
this.$el.parentElement.removeChild(this.$el)
}
}
}
</script>
<style lang="scss" scoped>
.mask {
width: 100%;
height: 100%;
position: fixed;
z-index: 99;
left: 0px;
top: 0px;
background: rgba(0, 0, 0, 0.8);
}
.dialog-wrap {
width: 61.11vw;
height: 73.29vh;
position: absolute;
z-index: 1;
left: 50%;
top: 50%;
background-image: url('../../assets/images/bg-5.png');
background-repeat: no-repeat;
background-size: 100% 100%;
transform: translate(-50%, -50%);
border-radius: 5px;
padding: 3.9vh 3.67vw;
box-sizing: border-box;
.close {
width: 20px;
height: 20px;
position: absolute;
right: -330px;
top: -5px;
cursor: pointer;
}
.dialog-title {
width: 13.19vw;
height: 4.39vh;
background-image: url('../../assets/images/title-dialog.png');
background-repeat: no-repeat;
background-size: 100% 100%;
text-align: center;
font-size: 20px;
color: #ffffff;
margin: 0 auto;
position: relative;
line-height: 4.39vh;
}
.dialog-content {
flex-wrap: wrap;
justify-content: space-between;
margin-top: 3.5vh;
.axis {
width: 26.88vw;
height: 34.97vh;
margin-right: 1.25vw;
img {
height: 100%;
}
}
.content-top-title {
width: 10vw;
margin: 7px auto;
display: flex;
align-items: center;
height: 2.68vh;
.title-icon {
width: 21px;
height: 7px;
}
.title {
font-weight: 500;
font-size: 16px;
color: #ffffff;
margin: 0 10px;
height: 2.68vh;
line-height: 2.68vh;
}
}
.content-info {
font-weight: 400;
font-size: 14px;
color: #ffffff;
margin: 0 auto;
text-align: center;
}
}
.content-top {
width: 25.14vw;
height: 27.93vh;
margin-bottom: 4.45vh;
}
.content-bottom {
width: 25.14vw;
height: 14.88vh;
font-weight: 400;
font-size: 14px;
color: #ffffff;
padding: 1.2vh 1.39vw;
box-sizing: border-box;
.title {
font-weight: 600;
font-size: 16px;
margin-bottom: 8px;
height: 2.68vh;
}
}
.bg {
background: #090e38;
border: 2px solid #07116f;
box-shadow: inset 0 0 20px 0 #1b008c;
}
}
</style>
\ No newline at end of file
import Dialog from './dialog';
export default {
install(Vue) {
let DialogObj=Vue.extend(Dialog);
Vue.prototype.$Dialog=function () {
// const div = document.createElement('div')
// document.body.appendChild(div)
// let DialogInit = new DialogObj().$mount(div)
let DialogInit=new DialogObj().$mount();
document.body.appendChild(DialogInit.$el);
}
}
}
\ No newline at end of file
......@@ -11,6 +11,9 @@
<div class="title title-icon">
<span class="icon"></span>
<div class="title-h3">客户价值分析</div>
<div class="go" @click="goAnalyse">
<img src="@/assets/images/go.png" />
</div>
</div>
<div class="container">
<bar-chart domId="analyseChart" :revese="true" boxHeight="14.54vh" :analysisList="analysisList"></bar-chart>
......@@ -23,7 +26,8 @@ export default {
name: 'Analyse',
data() {
return {
analysisList: {}
analysisList: {},
isShow: true
}
},
mounted() {
......@@ -36,6 +40,10 @@ export default {
this.analysisList = res.data.dataList[0]
}
})
},
goAnalyse(){
console.log(this.$Dialog())
this.$Dialog.isShow = true
}
}
}
......@@ -45,6 +53,7 @@ export default {
width: 18.06vw;
.container {
margin-top: -1vh;
margin-left: 1.5vw;
}
.icon {
display: inline-block;
......@@ -55,7 +64,15 @@ export default {
}
.title-h3 {
width: 10px;
margin: 10px 4px;
margin: 4px 4px;
// height:10.98vh;
font-size: 10px;
}
.go {
width: 12px;
height: 12px;
margin: 3px;
cursor: pointer;
}
}
</style>
......@@ -29,7 +29,7 @@ module.exports = {
},
proxy: {
'/dev': {
target: 'http://192.168.1.152:8080',
target: 'http://dj-data-view.beta.glsx.com.cn',
changeOrigin: true,
ws: true,
pathRewrite: {
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!