Commit 6e70cf13 authored by 乐宝呗666's avatar 乐宝呗666

修改登录 修改bug

parent 986cef4d
......@@ -8,10 +8,11 @@ export function getStatisticsCustomer () {
})
}
// 用户端客户行业分布
export function getCustomerByCustomerAttribute () {
export function getCustomerByCustomerAttribute (params) {
return request({
url: '/tp/customerInformation/getCustomerByCustomerAttribute',
method: 'get'
method: 'get',
params
})
}
// 用户端客户地区分布
......
This diff is collapsed.
This diff is collapsed.
src/assets/img/password.png

1.18 KB | W: | H:

src/assets/img/password.png

5.87 KB | W: | H:

src/assets/img/password.png
src/assets/img/password.png
src/assets/img/password.png
src/assets/img/password.png
  • 2-up
  • Swipe
  • Onion skin
src/assets/img/user.png

1.18 KB | W: | H:

src/assets/img/user.png

4.83 KB | W: | H:

src/assets/img/user.png
src/assets/img/user.png
src/assets/img/user.png
src/assets/img/user.png
  • 2-up
  • Swipe
  • Onion skin
......@@ -83,6 +83,20 @@ export default {
}
]
}
if (vm.idstr === 'lastMonthPerformance' || vm.idstr === 'peopleCenter') {
vm.option.series[0].large = true
vm.option.dataZoom = [{
type: 'inside'
}, {
type: 'slider',
fillerColor: '#30DDF4',
height: '15',
bottom: '10',
textStyle: {
color: '#fff'
}
}]
}
vm.drawBar()
// window.addEventListener("resize",()=>{
// chart.resize();
......@@ -116,9 +130,17 @@ export default {
},
watch: {
message: {
handler () {
handler (newVal, oldVal) {
const vm = this
setTimeout(function () {
if (newVal.idxs && oldVal.idxs) {
const _newIdxs = newVal.idxs.join(',')
const _oldIdxs = oldVal.idxs.join(',')
if (_newIdxs === _oldIdxs) {
console.log('same111')
vm.recordList.pop()
}
}
vm.drawLine()
}, 0)
},
......
......@@ -127,9 +127,16 @@ export default {
},
watch: {
message: {
handler () {
handler (newVal, oldVal) {
const vm = this
setTimeout(function () {
if (newVal.idxs && oldVal.idxs) {
const _newIdxs = newVal.idxs.join(',')
const _oldIdxs = oldVal.idxs.join(',')
if (_newIdxs === _oldIdxs) {
vm.recordList.pop()
}
}
vm.drawLine()
}, 0)
},
......
......@@ -317,7 +317,7 @@ export default {
},
edgeSymbol: ['none', 'none'],
roam: true,
draggable: true, // 每个节点的拖拉
draggable: false, // 每个节点的拖拉
emphasis: {
scale: false,
focus: 'series',
......
......@@ -75,10 +75,15 @@ export default {
vm.eventList()
},
goBack () {
if (this.recordList.length) {
const popItem = this.recordList.pop()
// console.log('长度长度长度:', this.recordList.length)
let popItem = null
if (this.recordList.length >= 2) {
// 展示心中数据 列表需剩下 第一个 type
popItem = this.recordList[0]
this.recordList = [this.recordList[0]]
this.$emit('downData', popItem)
} else {
this.recordList = []
this.isShowBack = false
this.$emit('downData', '')
}
......@@ -102,9 +107,16 @@ export default {
},
watch: {
message: {
handler () {
handler (newVal, oldVal) {
const vm = this
setTimeout(function () {
if (!vm.noDrill && newVal.legend && oldVal.legend) {
const _newLegend = newVal.legend.join(',')
const _oldLegend = oldVal.legend.join(',')
if (_newLegend === _oldLegend) {
vm.recordList.pop()
}
}
vm.drawLine()
}, 0)
},
......
......@@ -204,7 +204,7 @@ export default {
},
// 产品类型分析
async getProductType () {
const _data = await API_BUSSINESS.getProductType({ type: this.productType || null, deptId: this.clickTypeId || null })
const _data = await API_BUSSINESS.getProductType({ industry: this.productType || null, deptId: this.clickTypeId || null })
if (!_data.data) { return false }
let isLeaf = false
if (!_data.data.data.length) {
......@@ -217,8 +217,8 @@ export default {
legend: _data.data.legend,
data: _data.data.data.map(item => {
return {
name: item.productType || item.name,
value: Number(item.number),
name: item.name,
value: Number(item.number) || Number(item.value),
id: item.id || null
}
})
......
......@@ -47,7 +47,7 @@
</div>
<div class="boxHeight-3 mt-2">
<div class="title">行业分布</div>
<pieChart :message="typeDistribute" :noDrill="true" idstr="customTypeDistribute" class="heightCut44"></pieChart>
<pieChart @downData="downDistributeData" :message="typeDistribute" idstr="customTypeDistribute" class="heightCut44"></pieChart>
</div>
<div class="boxHeight-3 mt-2">
<div class="title">地区分布</div>
......@@ -187,6 +187,7 @@ export default {
return {
totalObj: {}, // 客户数据
typeDistribute: {}, // 业务分布
industry: '',
customDistribute: {}, // 地区分布
clientAnalysis: {}, // 客户分析
state: '',
......@@ -216,18 +217,26 @@ export default {
},
// 行业分布
async getDistribution () {
const _data = await API_CLIENT.getCustomerByCustomerAttribute()
const _data = await API_CLIENT.getCustomerByCustomerAttribute({ industry: this.industry || null, deptId: this.clickDistributeId })
if (!_data.data) { return false }
const _distribute = {
legend: _data.data.legend,
data: _data.data.data.map(item => {
return {
name: item.name,
value: Number(item.number)
}
})
let isLeaf = false
if (!_data.data.data.length) {
// 下级无数据 即为叶子节点
isLeaf = true
this.typeDistribute.isLeaf = isLeaf
} else {
this.typeDistribute = {
isLeaf: isLeaf,
legend: _data.data.legend,
data: _data.data.data.map(item => {
return {
name: item.industry || item.name,
value: Number(item.number) || Number(item.value),
id: item.id || null
}
})
}
}
this.typeDistribute = _distribute
},
// 客户地区分布
async getCustomerByProvince () {
......@@ -264,6 +273,13 @@ export default {
API_CLIENT.GetCustomerId(item.id).then(res => {
this.companyInfo = res.data
})
},
// 行业分布下钻数据
downDistributeData (item) {
// console.log('传来的值:', item)
this.industry = item.type || null
this.clickDistributeId = item.id || null
this.getDistribution()
}
}
}
......
......@@ -181,44 +181,39 @@ export default {
async fractionLastCenterPerformance (param) {
this.parentId = param || null
const _data = await API_ORGAN.fractionLastCenterPerformance({ type: this.parentId })
if (!_data.data) { return false }
// if (!_data.data) { return false }
let isLeaf = false
if (!_data.data.idxs.length) {
if (_data.data.type === 'people') {
// 下级无数据 即为叶子节点
isLeaf = true
this.dataList.isLeaf = isLeaf
} else {
this.dataList = {
parentId: param || '',
isLeaf: isLeaf,
xAxis: _data.data.xAxis,
yAxis: '单位:个',
idxs: _data.data.idxs,
data: _data.data.data
}
}
this.dataList = {
parentId: param || '',
isLeaf: isLeaf,
xAxis: _data.data.xAxis,
yAxis: '单位:个',
idxs: _data.data.idxs,
data: _data.data.data
}
},
// 按部门查询
async lastCenterPerformance (param) {
this.parentId = param || null
const _data = await API_ORGAN.lastCenterPerformance({ deptId: this.parentId })
if (!_data.data) { return false }
// if (!_data.data) { return false }
let isLeaf = false
if (!_data.data.idxs.length) {
if (_data.data.type === 'people') {
// 下级无数据 即为叶子节点
isLeaf = true
this.dataList.isLeaf = isLeaf
} else {
this.dataList = {
parentId: param || '',
isLeaf: isLeaf,
xAxis: _data.data.xAxis,
yAxis: '单位:分数',
idxs: _data.data.idxs,
data: _data.data.data
}
}
console.log(this.dataList)
this.dataList = {
parentId: param || '',
isLeaf: isLeaf,
xAxis: _data.data.xAxis,
yAxis: '单位:分数',
idxs: _data.data.idxs,
data: _data.data.data
}
},
// 上月绩效下钻
downData (item) {
......
<template>
<div class="login-container">
<el-row>
<el-col :span="12"><div class="grid-content bg-purple">
<img src="~/@/assets/img/loginlogo.png" alt="" style="width: 700px; margin-left: 170px; margin-top: 105px">
</div></el-col>
<el-col :span="12"><div class="grid-content bg-purple-light">
<el-form ref="loginForm" :model="loginForm" :rules="loginRules" class="login-form" auto-complete="on" label-position="left">
<div class="title-container">
<h3 class="title" style="width: 450px">企业运营图谱</h3>
<div class="main d-flex">
<div class="login-img flex-1">
<img src="~/@/assets/img/login-img.png" alt="">
</div>
<el-form ref="loginForm" :model="loginForm" :rules="loginRules" class="login-form" auto-complete="on" label-position="left">
<h3 class="title">- 企业运营图谱 -</h3>
<el-form-item prop="username">
<span class="svg-container" style="height: .24rem;">
<img src="~/@/assets/img/user.png" alt="" style="width: .24rem;">
</span>
<el-input
ref="username"
v-model="loginForm.username"
placeholder="请输入账号"
name="username"
type="text"
tabindex="1"
auto-complete="on"
/>
</el-form-item>
<el-form-item prop="username">
<span class="svg-container" style="height: 34px;">
<img src="~/@/assets/img/user.png" alt="" style="width: 32px">
</span>
<el-input
ref="username"
v-model="loginForm.username"
placeholder="请输入账号"
name="username"
type="text"
tabindex="1"
auto-complete="on"
/>
</el-form-item>
<el-form-item prop="password">
<span class="svg-container" style="height: 34px">
<img src="~/@/assets/img/password.png" alt="" style="width: 32px">
</span>
<el-input
:key="passwordType"
ref="password"
v-model="loginForm.password"
:type="passwordType"
placeholder="请输入密码"
name="password"
tabindex="2"
auto-complete="on"
@keyup.enter.native="handleLogin"
show-password
/>
<span class="show-pwd" @click="showPwd" >
<svg-icon :icon-class="passwordType === 'password' ? 'eye' : 'eye-open'" />
</span>
</el-form-item>
<!-- <div class="foundpass" style="padding-bottom: 22px; float: right;">
<el-button type="text" @click="resetVisible = true" style="color: #00ffff"><d2-icon name="question-circle"/>忘记密码</el-button>
</div> -->
<el-button :loading="loading" type="primary" style="width:100%;margin-bottom:30px;background-image: linear-gradient(to right, #3a8ee6 , #30ddf4);" @click.native.prevent="handleLogin" round>登录</el-button>
<!-- <div class="tips">
<span style="margin-right:20px;">账号: admin</span>
<span> 密码: 123456</span>
</div> -->
</el-form>
</div></el-col>
</el-row>
<el-form-item prop="password">
<span class="svg-container" style="height: .24rem">
<img src="~/@/assets/img/password.png" alt="" style="width: .24rem;">
</span>
<el-input
:key="passwordType"
ref="password"
v-model="loginForm.password"
:type="passwordType"
placeholder="请输入密码"
name="password"
tabindex="2"
auto-complete="on"
@keyup.enter.native="handleLogin"
show-password
/>
<span class="show-pwd" @click="showPwd" >
<svg-icon :icon-class="passwordType === 'password' ? 'eye' : 'eye-open'" />
</span>
</el-form-item>
<!-- <div class="foundpass" style="padding-bottom: 22px; float: right;">
<el-button type="text" @click="resetVisible = true" style="color: #00ffff"><d2-icon name="question-circle"/>忘记密码</el-button>
</div> -->
<el-button :loading="loading" type="primary" style="color:#000;width:100%;background-image:-webkit-linear-gradient(left,#80FCFF,#80ffd9,#DAFFBF);" @click.native.prevent="handleLogin" round>登录</el-button>
<!-- <div class="tips">
<span style="margin-right:20px;">账号: admin</span>
<span> 密码: 123456</span>
</div> -->
</el-form>
</div>
<el-dialog
title="收货地址"
......@@ -178,7 +172,7 @@ export default {
/* 修复input 背景不协调 和光标变色 */
/* Detail see https://github.com/PanJiaChen/vue-element-admin/pull/927 */
$bg:#283443;
$bg:#1A4688;
$light_gray:#fff;
$cursor: #fff;
......@@ -190,10 +184,13 @@ $cursor: #fff;
/* reset element-ui css */
.login-container {
.el-form-item__content {
line-height: 1;
}
.el-input {
display: inline-block;
height: 47px;
width: 85%;
height: .48rem;
width: 80%;
input {
background: transparent;
......@@ -202,7 +199,7 @@ $cursor: #fff;
border-radius: 0px;
padding: 12px 5px 12px 15px;
color: $light_gray;
height: 47px;
height: .48rem;
caret-color: $cursor;
&:-webkit-autofill {
......@@ -213,10 +210,12 @@ $cursor: #fff;
}
.el-form-item {
border: 1px solid rgba(255, 255, 255, 0.1);
background: rgba(0, 0, 0, 0.1);
border-radius: 5px;
background: rgba(102,163,226,0.20);
// border: 1px solid #30DDF4;
box-shadow: 0px 10px 10px 0px rgba(4,36,106,0.1);
border-radius: .25rem;
color: #454545;
margin-bottom: .4rem;
}
}
</style>
......@@ -227,19 +226,62 @@ $dark_gray:#889aa4;
$light_gray:#eee;
.login-container {
min-height: 100%;
width: 100%;
background-color: rgba(0,14,66,1);
width: 100vw;
height: 100vh;
display: flex;
justify-content: center;
align-items: center;
background-image: url('~@/assets/img/login-bg.png');
background-size: cover;
background-repeat: no-repeat;
background-position: 50%;
overflow: hidden;
.main {
width: 80%;
height: 60%;
display: flex;
border-radius: 10px;
}
.login-img {
overflow: hidden;
img {
width:100%;
height: auto;
}
}
.login-form {
position: relative;
width: 520px;
max-width: 100%;
padding: 160px 35px 0;
margin: 0 auto;
overflow: hidden;
margin-top: 130px;
width: 4.88rem;
padding: 0 .8rem;
box-sizing: border-box;
background-image: linear-gradient(180deg, rgba(15,85,191,0.60) 0%, rgba(5,12,38,0.80) 100%);
.title {
font-size: .28rem;
color: $light_gray;
text-align: center;
background-image:-webkit-linear-gradient(left,#80FCFF,#80ffd9,#DAFFBF);
-webkit-background-clip:text;
-webkit-text-fill-color:transparent;
padding-top: .7rem;
padding-bottom: .7rem;
}
.svg-container {
padding: .12rem;
color: $dark_gray;
vertical-align: middle;
width: .24rem;
display: inline-block;
}
.show-pwd {
position: absolute;
right: .08rem;
top: 7px;
font-size: 16px;
color: $dark_gray;
cursor: pointer;
user-select: none;
}
}
.tips {
......@@ -253,35 +295,5 @@ $light_gray:#eee;
}
}
}
.svg-container {
padding: 6px 5px 6px 15px;
color: $dark_gray;
vertical-align: middle;
width: 30px;
display: inline-block;
}
.title-container {
position: relative;
.title {
font-size: 50px;
color: $light_gray;
margin: 0px auto 40px auto;
text-align: center;
font-weight: bold;
}
}
.show-pwd {
position: absolute;
right: 10px;
top: 7px;
font-size: 16px;
color: $dark_gray;
cursor: pointer;
user-select: none;
}
}
</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