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

修改登录 修改bug

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