Commit 0b072fcb authored by 乐宝呗666's avatar 乐宝呗666

格式化代码,提取header

parent f83b50a8
......@@ -9,7 +9,8 @@ module.exports = {
],
rules: {
'no-console': process.env.NODE_ENV === 'production' ? 'error' : 'off',
'no-debugger': process.env.NODE_ENV === 'production' ? 'error' : 'off'
'no-debugger': process.env.NODE_ENV === 'production' ? 'error' : 'off',
'no-async-promise-executor':process.env.NODE_ENV === 'production' ? 'error' : 'off',
},
parserOptions: {
parser: 'babel-eslint'
......
......@@ -2348,7 +2348,6 @@
"version": "7.10.4",
"resolved": "https://registry.npmjs.org/@babel/runtime/-/runtime-7.10.4.tgz",
"integrity": "sha512-UpTN5yUJr9b4EX2CnGNWIvER7Ab83ibv0pcvvHc4UOdrBI5jb8bj+32cCwPX6xu0mt2daFNjYhoi+X7beH0RSw==",
"dev": true,
"requires": {
"regenerator-runtime": "^0.13.4"
},
......@@ -2356,8 +2355,7 @@
"regenerator-runtime": {
"version": "0.13.5",
"resolved": "https://registry.npmjs.org/regenerator-runtime/-/regenerator-runtime-0.13.5.tgz",
"integrity": "sha512-ZS5w8CpKFinUzOwW3c83oPeVXoNsrLsaCoLtJvAClH135j/R77RuymhiSErhm2lKcwSCIpmvIWSbDkIfAqKQlA==",
"dev": true
"integrity": "sha512-ZS5w8CpKFinUzOwW3c83oPeVXoNsrLsaCoLtJvAClH135j/R77RuymhiSErhm2lKcwSCIpmvIWSbDkIfAqKQlA=="
}
}
},
......@@ -2873,6 +2871,59 @@
"@types/yargs": "^13.0.0"
}
},
"@jiaminghi/bezier-curve": {
"version": "0.0.9",
"resolved": "https://registry.npmjs.org/@jiaminghi/bezier-curve/-/bezier-curve-0.0.9.tgz",
"integrity": "sha512-u9xJPOEl6Dri2E9FfmJoGxYQY7vYJkURNX04Vj64tdi535tPrpkuf9Sm0lNr3QTKdHQh0DdNRsaa62FLQNQEEw==",
"requires": {
"@babel/runtime": "^7.5.5"
}
},
"@jiaminghi/c-render": {
"version": "0.4.3",
"resolved": "https://registry.npmjs.org/@jiaminghi/c-render/-/c-render-0.4.3.tgz",
"integrity": "sha512-FJfzj5hGj7MLqqqI2D7vEzHKbQ1Ynnn7PJKgzsjXaZpJzTqs2Yw5OSeZnm6l7Qj7jyPAP53lFvEQNH4o4j6s+Q==",
"requires": {
"@babel/runtime": "^7.5.5",
"@jiaminghi/bezier-curve": "*",
"@jiaminghi/color": "*",
"@jiaminghi/transition": "*"
}
},
"@jiaminghi/charts": {
"version": "0.2.18",
"resolved": "https://registry.npmjs.org/@jiaminghi/charts/-/charts-0.2.18.tgz",
"integrity": "sha512-K+HXaOOeWG9OOY1VG6M4mBreeeIAPhb9X+khG651AbnwEwL6G2UtcAQ8GWCq6GzhczcLwwhIhuaHqRygwHC0sA==",
"requires": {
"@babel/runtime": "^7.5.5",
"@jiaminghi/c-render": "^0.4.3"
}
},
"@jiaminghi/color": {
"version": "0.1.1",
"resolved": "https://registry.npmjs.org/@jiaminghi/color/-/color-0.1.1.tgz",
"integrity": "sha512-M09+Sb5HGqVim0zo+nG5gU1v+6gXT8ptr0BZR6dMGt83XmCJgnZtO8s7llTW4hLFFFM5co6geZvTekqLpSPAAQ==",
"requires": {
"@babel/runtime": "^7.5.5"
}
},
"@jiaminghi/data-view": {
"version": "2.10.0",
"resolved": "https://registry.npmjs.org/@jiaminghi/data-view/-/data-view-2.10.0.tgz",
"integrity": "sha512-Cud2MTiMcqc5k2KWabR/svuVQmXHANqURo+yj40370/LdI/gyUJ6LG203hWXEnT1nMCeiv/SLVmxv3PXLScCeA==",
"requires": {
"@babel/runtime": "^7.5.5",
"@jiaminghi/charts": "*"
}
},
"@jiaminghi/transition": {
"version": "1.1.11",
"resolved": "https://registry.npmjs.org/@jiaminghi/transition/-/transition-1.1.11.tgz",
"integrity": "sha512-owBggipoHMikDHHDW5Gc7RZYlVuvxHADiU4bxfjBVkHDAmmck+fCkm46n2JzC3j33hWvP9nSCAeh37t6stgWeg==",
"requires": {
"@babel/runtime": "^7.5.5"
}
},
"@kazupon/vue-i18n-loader": {
"version": "0.5.0",
"resolved": "https://registry.npmjs.org/@kazupon/vue-i18n-loader/-/vue-i18n-loader-0.5.0.tgz",
......
......@@ -11,6 +11,7 @@
"test:unit": "vue-cli-service test:unit"
},
"dependencies": {
"@jiaminghi/data-view": "^2.10.0",
"axios": "^0.19.0",
"axios-mock-adapter": "^1.18.1",
"better-scroll": "^1.15.2",
......
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta charset="utf-8" data-use-rem="1920">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width,initial-scale=1.0">
<link rel="icon" href="<%= BASE_URL %>icon.ico">
......
src/assets/img/titleBg.png

93 KB | W: | H:

src/assets/img/titleBg.png

253 KB | W: | H:

src/assets/img/titleBg.png
src/assets/img/titleBg.png
src/assets/img/titleBg.png
src/assets/img/titleBg.png
  • 2-up
  • Swipe
  • Onion skin
......@@ -12,6 +12,102 @@
// 在这里写公用的class
// 注意 这个文件里只写class
// mixin等内容请在 public.scss 里书写
// 字体大小
$base-font-size: 2.4rem;
$font-sizes: (
xxs: 0.1,//0.24rem
xs: 0.125,//0.30rem
sm: 0.1333,//0.32rem
md: 0.1667,//0.4rem
lg: 0.1875,//0.45rem
xl: 0.2083,//0.5rem
xxl: 0.3167,//0.76rem
);
// 宽高
.w-100 {
width: 100%;
}
.h-100 {
height: 100%;
}
//flex
.d-flex {
display: flex;
}
.flex-column {
flex-direction: column;
}
.flex-wrap {
flex-wrap: wrap;
}
.flex-nowrap {
flex-wrap: nowrap;
}
$flex-jc: (
start: flex-start,
end: flex-end,
center: center,
between: space-between,
around: space-around,
evenly: space-evenly,
);
$flex-ai: (
start: flex-start,
end: flex-end,
center: center,
stretch: stretch,
);
.flex-1 {
flex: 1;
}
.flex-4 {
flex:4;
}
.flex-3 {
flex:3;
}
.flex-2 {
flex:2;
}
//对齐
@each $var in (left, center, right) {
.text-#{$var} {
text-align: $var !important;
}
}
//flex
@each $key,
$value in $flex-jc {
.jc-#{$key} {
justify-content: $value;
}
}
@each $key,
$value in $flex-ai {
.ai-#{$key} {
align-items: $value;
}
}
//字体
@each $fontkey,
$fontvalue in $font-sizes {
.fs-#{$fontkey} {
font-size: $fontvalue * $base-font-size;
}
}
// 文字相关
.#{$prefix}-text-center {
......
......@@ -59,7 +59,14 @@ $prefix: d2;
}
.bg {
// background-color: #000E42;
// background-size: cover;
// background-position: center center;
}
.dv-loading {
color: #fff;
}
ul{list-style: none; padding: 0}
.d2-container-full{height: 100%;}
.d2-container-full__body{height: 100%;}
......
<template>
<div class="headerLayout">
<div class="tabList">
<div v-for="(item,index) in buttenList" :key="index" @click="change(index)">
<el-button class="tabButton" size="mini" :class="num==index?'is-active':''">{{item}}</el-button>
</div>
</div>
<h3>企业运行图谱</h3>
<div class="time">{{nowDate | moment("YYYY/MM/DD")}} {{nowDate | moment("HH:mm:ss")}} 星期{{week | weekFilter}}</div>
<div class="right-menu">
<el-dropdown class="avatar-container" trigger="click">
<div class="avatar-wrapper">
<img src="~@/assets/img/timg.jpg" class="user-avatar">
<i class="el-icon-caret-bottom" />
</div>
<el-dropdown-menu slot="dropdown" class="user-dropdown">
<router-link to="/">
<el-dropdown-item>
Home
</el-dropdown-item>
</router-link>
<el-dropdown-item divided @click.native="logout">
<span style="display:block; width: 60px">Log Out</span>
</el-dropdown-item>
</el-dropdown-menu>
</el-dropdown>
</div>
</div>
</template>
<script>
export default {
data () {
return {
screenWidth: document.body.clientWidth,
num: 0,
nowDate: '',
week: '',
hour: '',
monthData: {
id: 'dataByMonth',
xData: ['1月', '2月', '3月', '4月', '5月', '6月', '7月', '8月', '9月', '10月', '11月', '12月'],
yData: [70, 90, 110, 108, 100, 110, 130, 140, 150, 120, 110, 98],
colors: ['RGBA(27, 157, 247, 1)', 'RGBA(30, 201, 251, 1)']
},
buttenList: ['概况', '运营', '商机', '客户']
}
},
filters: {
weekFilter: function (value) {
let nvalue = ''
switch (value) {
case 1:
nvalue = '一'
break
case 2:
nvalue = '二'
break
case 3:
nvalue = '三'
break
case 4:
nvalue = '四'
break
case 5:
nvalue = '五'
break
case 6:
nvalue = '六'
break
case 0:
nvalue = '日'
break
}
return nvalue
}
},
watch: {
screenwidth (val) {
if (!this.timer) {
this.screenWidth = val
this.timer = true
const that = this
setTimeout(function () {
console.log(that.screenWidth)
that.timer = false
}, 400)
}
}
},
mounted () {
this.init()
this.getDate()
const that = this
window.onresize = () => {
return (() => {
window.screenWidth = document.body.clientWidth
that.screenWidth = window.screenWidth
})()
}
},
methods: {
logout () {
this.$router.push('/login')
},
init () {
this.num = sessionStorage.getItem('num')
const user = JSON.parse(sessionStorage.getItem('user'))
if (user.role === 1) {
this.buttenList.push('管理端')
}
},
getDate () {
const vm = this
this.nowDate = new Date()
this.week = new Date().getDay()
setTimeout(function () {
vm.getDate()
}, 1000)
},
change (index) {
this.num = index
sessionStorage.setItem('num', index)
const token = sessionStorage.getItem('token')
switch (index) {
case 0:
this.$router.replace('/index')
break
case 1:
this.$router.replace('/content/operation/page')
break
case 2:
this.$router.replace('/content/business/page')
break
case 3:
this.$router.replace('/content/client/page')
break
// case 4:
// this.$router.replace('/content/organization/page')
// break
// case 5:
// this.$router.replace('/content/organization/page')
// break
case 4:
// this.$router.replace('/http://localhost:9528/#/dashboard')
// window.location.replace('http://localhost:9528/#/dashboard')
window.open('http://111.203.232.175:8085/#/dashboard?token=' + token)
// window.open('http://localhost:9528/#/dashboard?token=' + token)
}
}
}
}
</script>
<style lang="scss" scoped>
@import '~@/assets/style/headerLayout.scss';
.right-menu {
float: right;
height: 100%;
line-height: 50px;
&:focus {
outline: none;
}
.right-menu-item {
display: inline-block;
padding: 0 8px;
height: 100%;
font-size: 18px;
color: #5a5e66;
vertical-align: text-bottom;
&.hover-effect {
cursor: pointer;
transition: background .3s;
&:hover {
background: rgba(0, 0, 0, .025)
}
}
}
.avatar-container {
margin-right: 30px;
.avatar-wrapper {
margin-top: 14px;
position: relative;
.user-avatar {
cursor: pointer;
width: 40px;
height: 40px;
border-radius: 10px;
}
.el-icon-caret-bottom {
cursor: pointer;
position: absolute;
right: -20px;
top: 25px;
font-size: 12px;
}
}
}
}
</style>
......@@ -7,7 +7,6 @@ import d2Admin from './plugin/d2admin'
// store
import store from '../store/index'
// import $ from 'jquery'
// 菜单和路由设置
import router from './router'
......@@ -20,8 +19,9 @@ import moment from 'moment'
// 引入echarts
import echarts from 'echarts'
import dataV from '@jiaminghi/data-view'
// 适配flex
import '@/utils/flexible.js'
Vue.prototype.$echarts = echarts
// Vue.prototype.$ = $
......@@ -29,14 +29,14 @@ Vue.prototype.$echarts = echarts
Vue.prototype.downUrl = 'http://10.11.16.19:8080'
Vue.prototype.baseUrl = 'http://10.12.8.67:51005'
// 核心插件
Vue.use(d2Admin)
Vue.use(dataV)
Vue.prototype.moment = moment
Vue.filter('moment', function (value, formatString) {
formatString = formatString || 'YYYY-MM-DD HH:mm:ss'
if (value == 0 || value == null || value == '') {
if (value === 0 || value === null || value === '') {
return '-'
} else {
return moment(value).format(formatString)
......
......@@ -26,10 +26,9 @@ const router = new VueRouter({
router.beforeEach((to, from, next) => {
// 进度条
NProgress.start()
//验证当前路由所有的匹配中是否需要有登录验证的
// 验证当前路由所有的匹配中是否需要有登录验证的
// next()
if (to.matched.some(r => r.meta.auth)) {
const token = sessionStorage.getItem('token')
if (token) {
next()
......@@ -45,20 +44,20 @@ router.beforeEach((to, from, next) => {
NProgress.done()
}
} else {
if(from.name==='login'){
//防止无限循环
if (from.name === 'login') {
// 防止无限循环
if (to.name === 'login') {
next();
next()
return
}
next({
path: '/index',
});
}else
path: '/index'
})
} else {
// 不需要身份校验 直接通过
next()
}
}
})
router.afterEach(to => {
......
......@@ -14,7 +14,7 @@ const frameIn = [
{
path: '/',
redirect: { name: 'index' },
component: _import('system/index'),
component: _import('content/layout'),
children: [
// 首页 概况
{
......@@ -23,7 +23,7 @@ const frameIn = [
meta: {
auth: true
},
component: _import('system/index')
component: _import('content/overview')
},
// 刷新页面 必须保留
{
......
/*
* rem.js
* v0.1.1
* fixed 2015-3-12
*/
(function (win) {
var doc = win.document
var html = doc.documentElement
var option = html.getAttribute('data-use-rem')
if (option === null) {
return
}
// defaut baseWidth : 640px;
var baseWidth = parseInt(option).toString() === 'NaN' ? 960 : parseInt(option)
var grids = baseWidth / 100
var clientWidth = html.clientWidth || 960
// set rem first
html.style.fontSize = clientWidth / grids + 'px'
// create testDom
var testDom = document.createElement('div')
var testDomWidth = 0
var adjustRatio = 0
testDom.style.cssText = 'height:0;width:1rem;'
// doc.body.appendChild(testDom);
var calcTestDom = function () {
testDomWidth = testDom.offsetWidth
if (testDomWidth !== Math.round(clientWidth / grids)) {
adjustRatio = clientWidth / grids / testDomWidth
var reCalcRem = clientWidth * adjustRatio / grids
html.style.fontSize = reCalcRem + 'px'
} else {
doc.body.removeChild(testDom)
}
}
// detect if rem calc is working directly
// if not , recalc and set the rem value
setTimeout(calcTestDom, 20)
var reCalc = function () {
var newCW = html.clientWidth
if (newCW === clientWidth) {
return
}
clientWidth = newCW
html.style.fontSize = newCW * (adjustRatio || 1) / grids + 'px'
// if( testDom ) setTimeout(calcTestDom, 20);
}
// Abort if browser does not support addEventListener
if (!doc.addEventListener) {
return
}
var resizeEvt = 'orientationchange' in win ? 'orientationchange' : 'resize'
win.addEventListener(resizeEvt, reCalc, false)
// detect clientWidth is changed ?
doc.addEventListener('DOMContentLoaded', reCalc, false)
})(window)
......@@ -4,7 +4,7 @@
<script>
// 引入基本模板
let echarts = require('echarts/lib/echarts')
const echarts = require('echarts/lib/echarts')
// 引入提示框和title组件
require('echarts/lib/component/tooltip')
require('echarts/lib/component/title')
......@@ -24,13 +24,13 @@ export default {
},
methods: {
drawLine () {
let vm = this
const vm = this
// 基于准备好的dom,初始化echarts实例
vm.chart = echarts.init(document.getElementById(vm.idstr))
// 清空图表
vm.chart.clear()
this.message.data.forEach(function (item) {
if (item.name == '税率' || item.name == '占比') {
if (item.name === '税率' || item.name === '占比') {
item.yAxisIndex = 1 // 当name为税率或者占比(折线图)时,设置yAxisIndex为1(右侧的Y轴),
}
})
......@@ -54,9 +54,9 @@ export default {
textStyle: {
color: '#ffffff' // 图例文字颜色
},
orient: 'vertical', //垂直显示
y: 'center', //延Y轴居中
x: 'right',//居右显示
orient: 'vertical', // 垂直显示
y: 'center', // 延Y轴居中
x: 'right', // 居右显示
data: this.message.title
},
xAxis: [
......@@ -115,19 +115,19 @@ export default {
},
drawBar () {
// 绘制图表
let vm = this
const vm = this
vm.chart.setOption(vm.option)
vm.eventList()
},
eventList () {
let vm = this
const vm = this
vm.chart.on('click', function (params) {
})
}
},
watch: {
message: function () {
let vm = this
const vm = this
setTimeout(function () {
vm.drawLine()
}, 1000)
......
......@@ -4,7 +4,7 @@
<script>
// 引入基本模板
let echarts = require('echarts/lib/echarts')
const echarts = require('echarts/lib/echarts')
// 引入提示框和title组件
require('echarts/lib/component/tooltip')
require('echarts/lib/component/title')
......@@ -24,7 +24,7 @@ export default {
},
methods: {
drawLine () {
let vm = this
const vm = this
// 基于准备好的dom,初始化echarts实例
vm.chart = echarts.init(document.getElementById(vm.idstr))
// 清空图表
......@@ -98,13 +98,13 @@ export default {
},
drawBar () {
// 绘制图表
let vm = this
const vm = this
vm.chart.setOption(vm.option)
}
},
watch: {
message: function () {
let vm = this
const vm = this
setTimeout(function () {
vm.drawLine()
}, 1000)
......
......@@ -4,7 +4,7 @@
<script>
// 引入基本模板
let echarts = require('echarts/lib/echarts')
const echarts = require('echarts/lib/echarts')
// 引入提示框和title组件
require('echarts/lib/component/tooltip')
require('echarts/lib/component/title')
......@@ -37,7 +37,7 @@ export default {
},
methods: {
drawLine () {
let vm = this
const vm = this
// 基于准备好的dom,初始化echarts实例
vm.chart = echarts.init(document.getElementById(vm.idstr))
// 清空图表
......@@ -94,19 +94,19 @@ export default {
},
drawBar () {
// 绘制图表
let vm = this
const vm = this
vm.chart.setOption(vm.option)
vm.eventList()
},
eventList () {
let vm = this
const vm = this
vm.chart.on('click', function (params) {
})
}
},
watch: {
message: function () {
let vm = this
const vm = this
setTimeout(function () {
vm.drawLine()
}, 1000)
......
......@@ -4,7 +4,7 @@
<script>
// 引入基本模板
let echarts = require('echarts/lib/echarts')
const echarts = require('echarts/lib/echarts')
// 引入提示框和title组件
require('echarts/lib/component/tooltip')
require('echarts/lib/component/title')
......@@ -24,7 +24,7 @@ export default {
},
methods: {
drawLine () {
let vm = this
const vm = this
const bars = []
this.message.title.forEach(e => {
bars.push({ type: 'bar' })
......@@ -39,8 +39,8 @@ export default {
let flag = true
da.forEach(arg => {
// console.log(arg["type"], this.message.title[j])
if (arg["type"] === this.message.title[j]) {
arr.push(arg["num"])
if (arg.type === this.message.title[j]) {
arr.push(arg.num)
flag = false
}
})
......@@ -105,19 +105,19 @@ export default {
},
drawBar () {
// 绘制图表
let vm = this
const vm = this
vm.chart.setOption(vm.option)
vm.eventList()
},
eventList () {
let vm = this
const vm = this
vm.chart.on('click', function (params) {
})
}
},
watch: {
message: function () {
let vm = this
const vm = this
setTimeout(function () {
vm.drawLine()
}, 1000)
......
<template>
<d2-container class="business">
<headerLayout></headerLayout>
<!-- <headerLayout></headerLayout> -->
<div class="section">
<div class="leftBlock">
<div class="topBox">
......@@ -82,17 +82,15 @@
</template>
<script>
import headerLayout from '../../system/index/components/headerLayout' // 公共头部
// import {pie, pies} from './components/pie' // 饼图/
import quoteProportion from './components/barPolyline' // 报价及占比
import scatterPlot from './components/scatterPlot' // 项目分析
import knowledgeGraph from '../../system/index/components/knowledgeGraph'// 知识图谱
import knowledgeGraph from '../overview/components/knowledgeGraph'// 知识图谱
import funnel from './components/funnel' // 梯形图
import * as API_BUSSINESS from '@/api/con.business.js'
const pie = () => import('./components/pie')
const pies = () => import('./components/pie')
export default {
components: { headerLayout, pie, pies, quoteProportion, scatterPlot, knowledgeGraph, funnel },
components: { pie, pies, quoteProportion, scatterPlot, knowledgeGraph, funnel },
data () {
return {
businessType: [], // 商机业务类型
......@@ -115,7 +113,7 @@ export default {
numFilter (value) {
value = value / 1000000
// 截取当前数据到小数点后两位(以百万元为单位)
let realVal = parseFloat(value).toFixed(2)
const realVal = parseFloat(value).toFixed(2)
return realVal
}
},
......@@ -129,80 +127,80 @@ export default {
this.totalData = res
this.totalObj = this.totalData.data
// 商机税率
let argRate = this.totalData.data.taxrate
let taxrate = []
let arr5 = []
let arr6 = []
const argRate = this.totalData.data.taxrate
const taxrate = []
const arr5 = []
const arr6 = []
let maxra = 0
argRate.forEach(e => {
taxrate.push(e['taxrate'])
arr5.push(e['num'])
arr6.push(e['percentage'])
let mid = parseInt(e['num'])
taxrate.push(e.taxrate)
arr5.push(e.num)
arr6.push(e.percentage)
const mid = parseInt(e.num)
if (mid > maxra) {
maxra = mid
}
})
let darate = []
let sj = { 'name': '商机', 'type': 'bar', 'data': arr5 }
let rate = { 'name': '税率', 'type': 'line', 'data': arr6 }
const darate = []
const sj = { name: '商机', type: 'bar', data: arr5 }
const rate = { name: '税率', type: 'line', data: arr6 }
darate.push(sj)
darate.push(rate)
this.taxRate = { 'data': darate, 'max': maxra, 'title': [ '商机', '税率' ], 'column': taxrate }
this.taxRate = { data: darate, max: maxra, title: ['商机', '税率'], column: taxrate }
// 商机报价及占比
let argquo = this.totalData.data.offer
let column = []
let arr2 = []
let arr3 = []
const argquo = this.totalData.data.offer
const column = []
const arr2 = []
const arr3 = []
let max = 0
argquo.forEach(e => {
column.push(e['level'])
arr2.push(e['num'])
arr3.push(e['percentage'])
let mid = parseInt(e['num'])
column.push(e.level)
arr2.push(e.num)
arr3.push(e.percentage)
const mid = parseInt(e.num)
if (mid > max) {
max = mid
}
})
let daq = []
let bj = { 'name': '报价', 'type': 'bar', 'data': arr2 }
let ratio = { 'name': '占比', 'type': 'line', 'data': arr3 }
const daq = []
const bj = { name: '报价', type: 'bar', data: arr2 }
const ratio = { name: '占比', type: 'line', data: arr3 }
daq.push(bj)
daq.push(ratio)
this.quoteProportion = { 'data': daq, 'max': max, 'title': [ '报价', '占比' ], 'column': column }
this.quoteProportion = { data: daq, max: max, title: ['报价', '占比'], column: column }
// 项目分析
this.projectObj = this.totalData.data.analysis
this.projectAnalysis = this.projectObj
// 商机成功率
let argsuc = this.totalData.data.success
let titlesuc = []
let dasuc = []
const argsuc = this.totalData.data.success
const titlesuc = []
const dasuc = []
argsuc.forEach(e => {
titlesuc.push(e['success'])
var suc = { 'name': e['success'], 'value': e['num'] }
titlesuc.push(e.success)
var suc = { name: e.success, value: e.num }
dasuc.push(suc)
})
this.funnelChart.push({ 'success': titlesuc, 'num': dasuc })
this.funnelChart.push({ success: titlesuc, num: dasuc })
// 对商机业务类型遍历
let arg = this.totalData.data.type
let title = []
let da = []
const arg = this.totalData.data.type
const title = []
const da = []
arg.forEach(element => {
title.push(element['type'])
var jso = { 'name': element['type'], 'value': element['num'] }
title.push(element.type)
var jso = { name: element.type, value: element.num }
da.push(jso)
})
this.businessType.push({ 'title': title, 'data': da })
this.businessType.push({ title: title, data: da })
// 对商机来源遍历
let argsou = this.totalData.data.source
let titlesou = []
let dasou = []
const argsou = this.totalData.data.source
const titlesou = []
const dasou = []
argsou.forEach(element => {
titlesou.push(element['source'])
var sou = { 'name': element['source'], 'value': element['num'] }
titlesou.push(element.source)
var sou = { name: element.source, value: element.num }
dasou.push(sou)
})
this.source.push({ 'title': titlesou, 'data': dasou })
this.source.push({ title: titlesou, data: dasou })
}).catch(err => {
console.log(err)
})
......
......@@ -4,7 +4,7 @@
<script>
// 引入基本模板
let echarts = require('echarts/lib/echarts')
const echarts = require('echarts/lib/echarts')
// 引入提示框和title组件
require('echarts/lib/component/tooltip')
require('echarts/lib/component/title')
......@@ -25,7 +25,7 @@ export default {
},
methods: {
drawLine () {
let vm = this
const vm = this
// 基于准备好的dom,初始化echarts实例
vm.chart = echarts.init(document.getElementById(vm.idstr))
// 清空图表
......@@ -106,19 +106,19 @@ export default {
},
drawBar () {
// 绘制图表
let vm = this
const vm = this
vm.chart.setOption(vm.option)
vm.eventList()
},
eventList () {
let vm = this
const vm = this
vm.chart.on('click', function (params) {
})
}
},
watch: {
message: function () {
let vm = this
const vm = this
setTimeout(function () {
vm.drawLine()
}, 1000)
......
......@@ -4,7 +4,7 @@
<script>
// 引入基本模板
let echarts = require('echarts/lib/echarts')
const echarts = require('echarts/lib/echarts')
// 引入提示框和title组件
require('echarts/lib/component/tooltip')
require('echarts/lib/component/title')
......@@ -24,7 +24,7 @@ export default {
},
methods: {
drawLine () {
let vm = this
const vm = this
// 基于准备好的dom,初始化echarts实例
vm.chart = echarts.init(document.getElementById(vm.idstr))
// 清空图表
......@@ -82,7 +82,7 @@ export default {
},
drawBar () {
// 绘制图表
let vm = this
const vm = this
vm.chart.setOption(vm.option)
// // 设置默认选中高亮部分
// vm.chart.dispatchAction({
......@@ -115,14 +115,14 @@ export default {
vm.eventList()
},
eventList () {
let vm = this
const vm = this
vm.chart.on('click', function (params) {
})
}
},
watch: {
message: function () {
let vm = this
const vm = this
setTimeout(function () {
vm.drawLine()
}, 1000)
......
......@@ -4,7 +4,7 @@
<script>
// 引入基本模板
let echarts = require('echarts/lib/echarts')
const echarts = require('echarts/lib/echarts')
// 引入提示框和title组件
require('echarts/lib/component/tooltip')
require('echarts/lib/component/title')
......@@ -24,7 +24,7 @@ export default {
},
methods: {
drawLine () {
let vm = this
const vm = this
const bars = []
this.message.title.forEach(e => {
bars.push({ type: 'bar' })
......@@ -37,8 +37,8 @@ export default {
for (let j = 0; j < this.message.title.length; j++) {
let flag = true
da.forEach(arg => {
if (arg["type"] === this.message.title[j]) {
arr.push(arg["num"])
if (arg.type === this.message.title[j]) {
arr.push(arg.num)
flag = false
}
})
......@@ -100,19 +100,19 @@ export default {
},
drawBar () {
// 绘制图表
let vm = this
const vm = this
vm.chart.setOption(vm.option)
vm.eventList()
},
eventList () {
let vm = this
const vm = this
vm.chart.on('click', function (params) {
})
}
},
watch: {
message: function () {
let vm = this
const vm = this
setTimeout(function () {
vm.drawLine()
}, 1000)
......
<template>
<d2-container class="client">
<headerLayout></headerLayout>
<!-- <headerLayout></headerLayout> -->
<div class="section">
<div class="leftBlock">
<div class="topBox">
......@@ -150,15 +150,15 @@
</template>
<script>
import headerLayout from '../../system/index/components/headerLayout' // 公共头部
// import headerLayout from '../../system/index/components/headerLayout' // 公共头部
import pie from './components/pie' // 商机业务类型
import distributed from './components/distributed' // 客户分布
import scatterPlot from './components/scatterPlot' // 客户分析
import knowledgeGraph from '../../system/index/components/knowledgeGraph'// 知识图谱
import knowledgeGraph from '../overview/components/knowledgeGraph'// 知识图谱
import * as API_CLIENT from '@/api/con.client.js'
export default {
components: { headerLayout, pie, distributed, scatterPlot, knowledgeGraph },
components: { pie, distributed, scatterPlot, knowledgeGraph },
data () {
return {
clientData: {}, // 客户数据
......@@ -184,7 +184,7 @@ export default {
},
methods: {
// 默认展示公司信息
GetCustomerInfo() {
GetCustomerInfo () {
API_CLIENT.CustomerInfo().then(res => {
this.customername = res.data
})
......@@ -216,27 +216,27 @@ export default {
// 客户分析
this.clientAnalysis = this.clientObj.analysis
// 客户分布
let argdis = this.clientObj.area
let titdis = []
let dadis = []
let numdis = []
const argdis = this.clientObj.area
const titdis = []
const dadis = []
const numdis = []
argdis.forEach(e => {
titdis.push(e['area'])
numdis.push(e['num'])
var dis = { 'name': e['area'], 'value': e['num'] }
titdis.push(e.area)
numdis.push(e.num)
var dis = { name: e.area, value: e.num }
dadis.push(dis)
})
this.distributed.push({ 'title': titdis, 'num': numdis, 'data': dadis })
this.distributed.push({ title: titdis, num: numdis, data: dadis })
// 对客户属性遍历
let arg = this.clientObj.status
let title = []
let da = []
const arg = this.clientObj.status
const title = []
const da = []
arg.forEach(element => {
title.push(element['status'])
var jso = { 'name': element['status'], 'value': element['num'] }
title.push(element.status)
var jso = { name: element.status, value: element.num }
da.push(jso)
})
this.businessType.push({ 'title': title, 'data': da })
this.businessType.push({ title: title, data: da })
})
}
}
......
import page from './layout'
export default page
<template>
<dv-full-screen-container class="bg">
<header-layout></header-layout>
<router-view />
</dv-full-screen-container>
</template>
<script>
import headerLayout from '@/components/HeaderLayout/index' // 公共头部
export default {
components: { headerLayout },
data () {
return {
}
},
mounted () {
},
methods: {
}
}
</script>
<style lang="scss" scoped>
</style>
......@@ -4,7 +4,7 @@
<script>
// 引入基本模板
let echarts = require('echarts/lib/echarts')
const echarts = require('echarts/lib/echarts')
// 引入提示框和title组件
require('echarts/lib/component/tooltip')
require('echarts/lib/component/title')
......@@ -24,7 +24,7 @@ export default {
},
methods: {
drawLine () {
let vm = this
const vm = this
// 基于准备好的dom,初始化echarts实例
vm.chart = echarts.init(document.getElementById(vm.idstr))
// 清空图表
......@@ -44,10 +44,12 @@ export default {
},
xAxis: { type: 'category' },
yAxis: { gridIndex: 0 },
series: [{ type: 'line',
series: [{
type: 'line',
smooth: true,
seriesLayoutBy: 'row',
areaStyle: { normal: {
areaStyle: {
normal: {
color: new echarts.graphic.LinearGradient(
0, 0, 0, 1,
[
......@@ -56,7 +58,8 @@ export default {
{ offset: 1, color: 'rgba(255,255,255,0)' }
]
)
} }
}
}
}]
}
vm.drawBar()
......@@ -66,19 +69,19 @@ export default {
},
drawBar () {
// 绘制图表
let vm = this
const vm = this
vm.chart.setOption(vm.option)
vm.eventList()
},
eventList () {
let vm = this
const vm = this
vm.chart.on('click', function (params) {
})
}
},
watch: {
message: function () {
let vm = this
const vm = this
setTimeout(function () {
vm.drawLine()
}, 1000)
......
......@@ -4,7 +4,7 @@
<script>
// 引入基本模板
let echarts = require('echarts/lib/echarts')
const echarts = require('echarts/lib/echarts')
// 引入提示框和title组件
require('echarts/lib/component/tooltip')
require('echarts/lib/component/title')
......@@ -24,7 +24,7 @@ export default {
},
methods: {
drawLine () {
let vm = this
const vm = this
// 基于准备好的dom,初始化echarts实例
vm.chart = echarts.init(document.getElementById(vm.idstr))
// 清空图表
......@@ -60,19 +60,19 @@ export default {
},
drawBar () {
// 绘制图表
let vm = this
const vm = this
vm.chart.setOption(vm.option)
vm.eventList()
},
eventList () {
let vm = this
const vm = this
vm.chart.on('click', function (params) {
})
}
},
watch: {
message: function () {
let vm = this
const vm = this
setTimeout(function () {
vm.drawLine()
}, 1000)
......
......@@ -4,7 +4,7 @@
<script>
// 引入基本模板
let echarts = require('echarts/lib/echarts')
const echarts = require('echarts/lib/echarts')
// 引入提示框和title组件
require('echarts/lib/component/tooltip')
require('echarts/lib/component/title')
......@@ -24,7 +24,7 @@ export default {
},
methods: {
drawLine () {
let vm = this
const vm = this
// 基于准备好的dom,初始化echarts实例
vm.chart = echarts.init(document.getElementById(vm.idstr))
// 清空图表
......@@ -40,7 +40,7 @@ export default {
orient: 'vertical',
data: ['技术岗', '销售岗', '管理岗', '职能岗', '其他岗'],
right: 20,
bottom:10,
bottom: 10,
textStyle: {
color: '#ffffff'
},
......@@ -87,19 +87,19 @@ export default {
},
drawBar () {
// 绘制图表
let vm = this
const vm = this
vm.chart.setOption(vm.option)
vm.eventList()
},
eventList () {
let vm = this
const vm = this
vm.chart.on('click', function (params) {
})
}
},
watch: {
message: function () {
let vm = this
const vm = this
setTimeout(function () {
vm.drawLine()
}, 1000)
......
......@@ -4,7 +4,7 @@
<script>
// 引入基本模板
let echarts = require('echarts/lib/echarts')
const echarts = require('echarts/lib/echarts')
// 引入提示框和title组件
require('echarts/lib/component/tooltip')
require('echarts/lib/component/title')
......@@ -24,7 +24,7 @@ export default {
},
methods: {
drawLine () {
let vm = this
const vm = this
// 基于准备好的dom,初始化echarts实例
vm.chart = echarts.init(document.getElementById(vm.idstr))
// 清空图表
......@@ -59,19 +59,19 @@ export default {
},
drawBar () {
// 绘制图表
let vm = this
const vm = this
vm.chart.setOption(vm.option)
vm.eventList()
},
eventList () {
let vm = this
const vm = this
vm.chart.on('click', function (params) {
})
}
},
watch: {
message: function () {
let vm = this
const vm = this
setTimeout(function () {
vm.drawLine()
}, 1000)
......
......@@ -4,7 +4,7 @@
<script>
// 引入基本模板
let echarts = require('echarts/lib/echarts')
const echarts = require('echarts/lib/echarts')
// 引入提示框和title组件
require('echarts/lib/component/tooltip')
require('echarts/lib/component/title')
......@@ -24,7 +24,7 @@ export default {
},
methods: {
drawLine () {
let vm = this
const vm = this
// 基于准备好的dom,初始化echarts实例
vm.chart = echarts.init(document.getElementById(vm.idstr))
// 清空图表
......@@ -39,7 +39,7 @@ export default {
dataset: {
source: [
['product', '2012', '2013', '2014', '2015', '2016', '2017'],
['Matcha Latte', 41.1, 30.4, 65.1, 53.3, 83.8, 98.7],
['Matcha Latte', 41.1, 30.4, 65.1, 53.3, 83.8, 98.7]
]
},
xAxis: { type: 'category' },
......@@ -55,19 +55,19 @@ export default {
},
drawBar () {
// 绘制图表
let vm = this
const vm = this
vm.chart.setOption(vm.option)
vm.eventList()
},
eventList () {
let vm = this
const vm = this
vm.chart.on('click', function (params) {
})
}
},
watch: {
message: function () {
let vm = this
const vm = this
setTimeout(function () {
vm.drawLine()
}, 1000)
......
<template>
<d2-container class="operation">
<headerLayout></headerLayout>
<!-- <headerLayout></headerLayout> -->
<div class="section">
<div class="leftBlock">
<div class="topBox height100">
......@@ -57,7 +57,7 @@
</template>
<script>
import headerLayout from '../../system/index/components/headerLayout' // 公共头部
// import headerLayout from '../../system/index/components/headerLayout' // 公共头部
import doubleHistogram from './components/doubleHistogram' // 双柱状图
import pie from './components/pie' // 饼图
import lineChart from './components/polyline' // 折线图
......@@ -65,10 +65,10 @@ import turnoverStatistics from './components/turnoverStatistics' // 营业额统
import cashFlow from './components/cashFlow' // 现金流
import revenueRanking from './components/revenueRanking' // 营收排行
import assetManagement from './components/assetManagement' // 资产管理
import knowledgeGraph from '../../system/index/components/knowledgeGraph'// 知识图谱
import knowledgeGraph from '../overview/components/knowledgeGraph'// 知识图谱
export default {
components: { headerLayout, doubleHistogram, pie, lineChart, turnoverStatistics, cashFlow, knowledgeGraph, revenueRanking, assetManagement },
components: { doubleHistogram, pie, lineChart, turnoverStatistics, cashFlow, knowledgeGraph, revenueRanking, assetManagement },
data () {
return {
profitChart: {}, // 流水利润完成比
......@@ -81,38 +81,38 @@ export default {
revenueRanking: {
table: [
{
'name': '平台应用吧',
'num': '1500W',
'percent': '50%'
name: '平台应用吧',
num: '1500W',
percent: '50%'
},
{
'name': '平台应用吧',
'num': '1500W',
'percent': '50%'
name: '平台应用吧',
num: '1500W',
percent: '50%'
},
{
'name': '平台应用吧',
'num': '1500W',
'percent': '50%'
name: '平台应用吧',
num: '1500W',
percent: '50%'
}
]
}, // 营收排行
assetManagement: {
table: [
{
'name': '服务器',
'num': '20个',
'principal': '米修'
name: '服务器',
num: '20个',
principal: '米修'
},
{
'name': '笔记本',
'num': '50个',
'principal': '米修'
name: '笔记本',
num: '50个',
principal: '米修'
},
{
'name': '源代码',
'num': '60个',
'principal': '米修'
name: '源代码',
num: '60个',
principal: '米修'
}
]
} // 资产管理
......
......@@ -4,7 +4,7 @@
<script>
// 引入基本模板
let echarts = require('echarts/lib/echarts')
const echarts = require('echarts/lib/echarts')
// 引入提示框和title组件
require('echarts/lib/component/tooltip')
require('echarts/lib/component/title')
......@@ -24,7 +24,7 @@ export default {
},
methods: {
drawLine () {
let vm = this
const vm = this
// 基于准备好的dom,初始化echarts实例
vm.chart = echarts.init(document.getElementById(vm.idstr))
// 清空图表
......@@ -40,7 +40,7 @@ export default {
orient: 'vertical',
data: ['技术岗', '销售岗', '管理岗', '职能岗', '其他岗'],
right: 20,
bottom:10,
bottom: 10,
textStyle: {
color: '#ffffff'
},
......@@ -86,19 +86,19 @@ export default {
},
drawBar () {
// 绘制图表
let vm = this
const vm = this
vm.chart.setOption(vm.option)
vm.eventList()
},
eventList () {
let vm = this
const vm = this
vm.chart.on('click', function (params) {
})
}
},
watch: {
message: function () {
let vm = this
const vm = this
setTimeout(function () {
vm.drawLine()
}, 1000)
......
......@@ -4,7 +4,7 @@
<script>
// 引入基本模板
let echarts = require('echarts/lib/echarts')
const echarts = require('echarts/lib/echarts')
// 引入提示框和title组件
require('echarts/lib/component/tooltip')
require('echarts/lib/component/title')
......@@ -24,7 +24,7 @@ export default {
},
methods: {
drawLine () {
let vm = this
const vm = this
// 基于准备好的dom,初始化echarts实例
vm.chart = echarts.init(document.getElementById(vm.idstr))
// 清空图表
......@@ -59,19 +59,19 @@ export default {
},
drawBar () {
// 绘制图表
let vm = this
const vm = this
vm.chart.setOption(vm.option)
vm.eventList()
},
eventList () {
let vm = this
const vm = this
vm.chart.on('click', function (params) {
})
}
},
watch: {
message: function () {
let vm = this
const vm = this
setTimeout(function () {
vm.drawLine()
}, 1000)
......
......@@ -6,7 +6,7 @@
import 'echarts-liquidfill/src/liquidFill.js'
// 引入基本模板
let echarts = require('echarts/lib/echarts')
const echarts = require('echarts/lib/echarts')
// 引入提示框和title组件
require('echarts/lib/component/tooltip')
require('echarts/lib/component/title')
......@@ -25,7 +25,7 @@ export default {
},
methods: {
drawLine () {
let vm = this
const vm = this
// 基于准备好的dom,初始化echarts实例
vm.chart = echarts.init(document.getElementById(vm.idstr))
// 清空图表
......@@ -106,19 +106,19 @@ export default {
},
drawBar () {
// 绘制图表
let vm = this
const vm = this
vm.chart.setOption(vm.option)
vm.eventList()
},
eventList () {
let vm = this
const vm = this
vm.chart.on('click', function (params) {
})
}
},
watch: {
message: function () {
let vm = this
const vm = this
setTimeout(function () {
vm.drawLine()
}, 1000)
......
<template>
<d2-container class="organization">
<headerLayout></headerLayout>
<!-- <headerLayout></headerLayout> -->
<div class="section">
<div class="leftBlock">
<div class="topBox">
......@@ -68,14 +68,14 @@
</template>
<script>
import headerLayout from '../../system/index/components/headerLayout' // 公共头部
// import headerLayout from '../../system/index/components/headerLayout' // 公共头部
import pie from './components/pie' // 岗位分布
import waterBall from './components/waterBall' // 岗位分布
import lineChart from './components/polyline' // 折线图
import knowledgeGraph from '../../system/index/components/knowledgeGraph'// 知识图谱
import knowledgeGraph from '../overview/components/knowledgeGraph'// 知识图谱
export default {
components: { headerLayout, pie, waterBall, lineChart, knowledgeGraph },
components: { pie, waterBall, lineChart, knowledgeGraph },
data () {
return {
input: '',
......@@ -87,15 +87,15 @@ export default {
ball4: {},
refundAmountLine: {},
talent: [
{ 'name': '高潜人才', 'color': 'rgba(48,221,244,0.4)' },
{ 'name': '高潜人才', 'color': 'rgba(48,221,244,0.6)' },
{ 'name': '高潜人才', 'color': 'rgba(226,58,162,0.4)' },
{ 'name': '稳定贡献者', 'color': 'rgba(160,255,216,0.6)' },
{ 'name': '稳定贡献者', 'color': 'rgba(48,221,244,0.4)' },
{ 'name': '高潜人才', 'color': 'rgba(48,221,244,0.6)' },
{ 'name': '待处理', 'color': 'rgba(231,112,125,0.6)' },
{ 'name': '待发展者', 'color': 'rgba(160,255,216,0.6)' },
{ 'name': '待发展者', 'color': 'rgba(48,221,244,0.4)' }
{ name: '高潜人才', color: 'rgba(48,221,244,0.4)' },
{ name: '高潜人才', color: 'rgba(48,221,244,0.6)' },
{ name: '高潜人才', color: 'rgba(226,58,162,0.4)' },
{ name: '稳定贡献者', color: 'rgba(160,255,216,0.6)' },
{ name: '稳定贡献者', color: 'rgba(48,221,244,0.4)' },
{ name: '高潜人才', color: 'rgba(48,221,244,0.6)' },
{ name: '待处理', color: 'rgba(231,112,125,0.6)' },
{ name: '待发展者', color: 'rgba(160,255,216,0.6)' },
{ name: '待发展者', color: 'rgba(48,221,244,0.4)' }
]
}
},
......@@ -122,4 +122,3 @@ export default {
}
}
</style>
......@@ -24,27 +24,27 @@ export default {
}
},
components: { pieChart, distributed },
mounted() {
mounted () {
this.getCustoList()
},
methods: {
// 查询概况页面数据
getCustoList() {
getCustoList () {
API_BASIC.GetBasicList().then(res => {
// 客户分布
let argcustomer = res.data.customer
let title = []
let data = []
let num = []
const argcustomer = res.data.customer
const title = []
const data = []
const num = []
argcustomer.forEach(e => {
title.push(e['status'])
num.push(e['new'])
var dis = { 'name': e['status'], 'value': e['new'] }
title.push(e.status)
num.push(e.new)
var dis = { name: e.status, value: e.new }
data.push(dis)
})
this.distributedChart.push({ 'title': title, 'num': num, 'data': data })
this.distributedChart.push({ title: title, num: num, data: data })
})
},
}
}
}
</script>
......
......@@ -17,21 +17,20 @@ export default {
keywords: []
}
},
mounted() {
mounted () {
this.GET_Keywords()
},
methods: {
GET_Keywords() {
GET_Keywords () {
API_BASIC.GetBasicList().then(res => {
let keyword = res.data.org[0].hotwords.split(',')
const keyword = res.data.org[0].hotwords.split(',')
keyword.forEach(element => {
let value = Math.ceil(Math.random()*5) + 10
this.keywords.push({'name':element,'value':value})
});
const value = Math.ceil(Math.random() * 5) + 10
this.keywords.push({ name: element, value: value })
})
})
}
},
}
}
</script>
......@@ -29,19 +29,19 @@ export default {
newsObj: {}
}
},
mounted() {
mounted () {
this.getCustomerList()
},
methods: {
getCustomerList() {
getCustomerList () {
API_BASIC.GetBasicList().then(res => {
this.newsList = res.data.news
this.newsList.forEach(element => {
this.newsObj = element
});
})
})
}
},
}
}
</script>
......
......@@ -33,10 +33,10 @@
</template>
<script>
import * as API_BASIC from '@/api/sys.basic.js'
import * as API_BASIC from '@/api/sys.basic.js'
export default {
data() {
data () {
return {
basicData: {},
basicObj: {},
......@@ -45,12 +45,12 @@ export default {
businessarr: []
}
},
mounted() {
mounted () {
this.getBasicList()
},
methods: {
// 查询概况页面数据
getBasicList() {
getBasicList () {
API_BASIC.GetBasicList().then(res => {
this.basicData = res.data
this.basicData.org.forEach(element => {
......@@ -58,9 +58,9 @@ export default {
this.labelArr = element.label.split(',')
this.hotwordsarr = element.hotwords.split(',')
this.businessarr = element.business.split(',')
});
})
},
})
}
}
}
</script>
......
......@@ -79,43 +79,43 @@ export default {
caseObj: {}
}
},
mounted() {
mounted () {
this.getCustomerList()
},
methods: {
// 查询概况页面数据
getCustomerList() {
getCustomerList () {
API_BASIC.GetBasicList().then(res => {
this.iconList = res.data.program
for(let i = 0; i < this.iconList.length; i++) {
this.iconList[i]['name'] = this.iconList[i].name
this.iconList[i]['urlArr'] = this.iconList[i].url.split(',')
this.iconList[i]['introArr'] = this.iconList[i].introduce.split(',')
for (let i = 0; i < this.iconList.length; i++) {
// this.iconList[i].name = this.iconList[i].name
this.iconList[i].urlArr = this.iconList[i].url.split(',')
this.iconList[i].introArr = this.iconList[i].introduce.split(',')
}
this.iconList.forEach(element => {
this.basicObj.name = element.name
this.introducearr = element.introduce.split(',')
this.urlarr = element.url.split(',')
});
})
// 案例展示
this.caseList = res.data.case
this.caseList.forEach(ele => {
this.caseObj = ele
})
// 客户分布
let argcustomer = res.data.customer
let titledis = []
let data = []
let num = []
const argcustomer = res.data.customer
const titledis = []
const data = []
const num = []
argcustomer.forEach(e => {
titledis.push(e['status'])
num.push(e['new'])
var dis = { 'name': e['status'], 'value': e['new'] }
titledis.push(e.status)
num.push(e.new)
var dis = { name: e.status, value: e.new }
data.push(dis)
})
this.distributedChart.push({ 'title': titledis, 'num': num, 'data': data })
this.distributedChart.push({ title: titledis, num: num, data: data })
})
},
}
}
}
</script>
......
......@@ -76,15 +76,15 @@ export default {
}
},
watch: {
screenwidth(val) {
if(!this.timer){
screenwidth (val) {
if (!this.timer) {
this.screenWidth = val
this.timer = true
let that = this
setTimeout(function(){
const that = this
setTimeout(function () {
console.log(that.screenWidth)
that.timer = false
},400)
}, 400)
}
}
},
......@@ -93,25 +93,25 @@ export default {
this.getDate()
const that = this
window.onresize = () => {
return(() => {
return (() => {
window.screenWidth = document.body.clientWidth
that.screenWidth = window.screenWidth
})()
}
},
methods: {
logout() {
logout () {
this.$router.push('/login')
},
init () {
this.num = sessionStorage.getItem('num')
let user = JSON.parse(sessionStorage.getItem('user'))
if(user.role === 1) {
const user = JSON.parse(sessionStorage.getItem('user'))
if (user.role === 1) {
this.buttenList.push('管理端')
}
},
getDate () {
let vm = this
const vm = this
this.nowDate = new Date()
this.week = new Date().getDay()
setTimeout(function () {
......@@ -121,7 +121,7 @@ export default {
change (index) {
this.num = index
sessionStorage.setItem('num', index)
let token = sessionStorage.getItem('token')
const token = sessionStorage.getItem('token')
switch (index) {
case 0:
this.$router.replace('/index')
......
......@@ -20,7 +20,7 @@
</div>
<h3>关系筛选</h3>
<el-checkbox-group v-model="checked">
<el-checkbox v-for="item in checkList" :label="item.value">{{item.name}}</el-checkbox>
<el-checkbox v-for="item in checkList" :label="item.value" :key="item.value">{{item.name}}</el-checkbox>
</el-checkbox-group>
<div class="inquire" @click="handleChange">查询</div>
</div>
......@@ -28,9 +28,9 @@
</template>
<script>
import * as API_KNOWLED from '@/api/sys.knowled.js'
import vis from '@/assets/js/VisHelper.js'
import knowledgeJSON from '@/assets/js/knowledgeJSON.js'
import * as API_KNOWLED from '@/api/sys.knowled.js'
import vis from '@/assets/js/VisHelper.js'
// import knowledgeJSON from '@/assets/js/knowledgeJSON.js'
export default {
data () {
return {
......@@ -41,12 +41,12 @@ export default {
knowledData: [],
checked: [1],
checkList: [
{'name':'对应销售','value':2},
{'name':'对应商机','value':3},
{'name':'对应客户','value':4}
{ name: '对应销售', value: 2 },
{ name: '对应商机', value: 3 },
{ name: '对应客户', value: 4 }
],
value:'',
topoData:{} //接收到的topo数据
value: '',
topoData: {} // 接收到的topo数据
}
},
mounted () {
......@@ -79,35 +79,35 @@ export default {
this.topoAll(res.data)
})
},
//通过控制关系筛选来控制左侧图谱展示,默认展示1
handleChange() {
let vm = this
let newData = {
retNodes:[],
retLinks:[],
// 通过控制关系筛选来控制左侧图谱展示,默认展示1
handleChange () {
const vm = this
const newData = {
retNodes: [],
retLinks: []
}
if(vm.topoData.retNodes){
vm.topoData.retNodes.forEach((v,i)=>{
vm.checked.forEach((a,b)=>{
if(v.type == a){
if (vm.topoData.retNodes) {
vm.topoData.retNodes.forEach((v, i) => {
vm.checked.forEach((a, b) => {
if (v.type === a) {
newData.retNodes.push(v)
}
})
})
newData.retLinks =vm.topoData.retLinks
newData.retLinks = vm.topoData.retLinks
vm.initTopu(newData)
}
},
topoAll (value) {
let vm = this
let data = {
retLinks:[],
retNodes:[]
const vm = this
const data = {
retLinks: [],
retNodes: []
}
let linksArr = []
value.links.forEach((v,i)=>{
const linksArr = []
value.links.forEach((v, i) => {
// v.indexName = '线上的字'
let linksObj = {}
const linksObj = {}
linksObj.id = v.id
linksObj.from = v.from
linksObj.to = v.to
......@@ -121,11 +121,11 @@ export default {
vm.handleChange()
// vm.initTopu(data)
},
topoDialog (data,value) {
let vm = this
topoDialog (data, value) {
const vm = this
vm.value = value
// let data = knowledgeJSON[0]
if(data){
if (data) {
vm.topoData = JSON.parse(data)
}
vm.handleChange()
......
......@@ -34,7 +34,7 @@
<script>
import vis from '@/assets/js/VisHelper.js'
import knowledgeJSON from '@/assets/js/knowledgeJSON.js'
// import knowledgeJSON from '@/assets/js/knowledgeJSON.js'
import knowledgeDialog from './knowledgeDialog'
import * as API_KNOWLED from '@/api/sys.knowled.js'
......@@ -100,17 +100,17 @@ export default {
})
},
topoAll (value) {
let vm = this
const vm = this
// let data = knowledgeJSON[0]
let data = {
retLinks:[],
retNodes:[]
const data = {
retLinks: [],
retNodes: []
}
let linksArr = []
value.links.forEach((v,i)=>{
const linksArr = []
value.links.forEach((v, i) => {
// v.indexName = '线上的字'
let linksObj = {}
const linksObj = {}
linksObj.id = v.id
linksObj.from = v.from
linksObj.to = v.to
......@@ -141,14 +141,14 @@ export default {
},
openDialog () {
let data = ''
if(this.state){
if (this.state) {
data = localStorage.getItem('data')
}else{
} else {
data = ''
}
this.$store.commit('d2admin/information/changeKnowledgeDialogShow', true)
setTimeout(() => {
this.$refs.child.topoDialog(data,this.value)
this.$refs.child.topoDialog(data, this.value)
}, 500)
}
},
......
......@@ -4,7 +4,7 @@
<script>
// 引入基本模板
let echarts = require('echarts/lib/echarts')
const echarts = require('echarts/lib/echarts')
// 引入提示框和title组件
require('echarts/lib/component/tooltip')
require('echarts/lib/component/title')
......@@ -25,7 +25,7 @@ export default {
},
methods: {
drawLine () {
let vm = this
const vm = this
// 基于准备好的dom,初始化echarts实例
vm.chart = echarts.init(document.getElementById(vm.idstr))
// 清空图表
......@@ -91,19 +91,19 @@ export default {
},
drawBar () {
// 绘制图表
let vm = this
const vm = this
vm.chart.setOption(vm.option)
vm.eventList()
},
eventList () {
let vm = this
const vm = this
vm.chart.on('click', function (params) {
})
}
},
watch: {
message: function () {
let vm = this
const vm = this
setTimeout(function () {
vm.drawLine()
}, 1000)
......
......@@ -3,7 +3,7 @@
</template>
<script>
// 引入基本模板
let echarts = require('echarts/lib/echarts')
const echarts = require('echarts/lib/echarts')
// 引入提示框和title组件
require('echarts/lib/component/tooltip')
require('echarts/lib/component/title')
......@@ -25,7 +25,7 @@ export default {
},
methods: {
drawLine () {
let vm = this
const vm = this
// 基于准备好的dom,初始化echarts实例
vm.chart = echarts.init(document.getElementById(vm.idstr))
// 清空图表
......@@ -68,19 +68,19 @@ export default {
},
drawBar () {
// 绘制图表
let vm = this
const vm = this
vm.chart.setOption(vm.option)
vm.eventList()
},
eventList () {
let vm = this
const vm = this
vm.chart.on('click', function (params) {
})
}
},
watch: {
message: function () {
let vm = this
const vm = this
setTimeout(function () {
vm.drawLine()
}, 1000)
......
......@@ -22,50 +22,50 @@ export default {
methods: {
drawLine () {
// 引入基本模板
let echarts = require('echarts/lib/echarts')
// 引入提示框和title组件
require('echarts/lib/component/tooltip')
require('echarts/lib/component/title')
const echarts = require('echarts/lib/echarts')
// 引入提示框和title组件
require('echarts/lib/component/tooltip')
require('echarts/lib/component/title')
var uploadedData = require('./data-1528971808162-BkOXf61WX.json')
echarts.registerMap('china', uploadedData)
var geoCoordMap = { //地理坐标
'台湾省': [121.5135, 25.0308],
'黑龙江省': [127.9688, 45.368],
'内蒙古': [110.3467, 41.4899],
'吉林省': [125.8154, 44.2584],
'北京市': [116.4551, 40.2539],
'辽宁省': [123.1238, 42.1216],
'河北省': [114.4995, 38.1006],
'天津市': [117.4219, 39.4189],
'山西省': [112.3352, 37.9413],
'陕西省': [109.1162, 34.2004],
'甘肃省': [103.5901, 36.3043],
'宁夏回族': [106.3586, 38.1775],
'青海省': [101.4038, 36.8207],
'新疆维吾尔': [87.9236, 43.5883],
'西藏': [91.11, 29.97],
'四川省': [103.9526, 30.7617],
'重庆市': [108.384366, 30.439702],
'山东省': [117.1582, 36.8701],
'河南省': [113.4668, 34.6234],
'江苏省': [118.8062, 31.9208],
'安徽省': [117.29, 32.0581],
'湖北省': [114.3896, 30.6628],
'浙江省': [119.5313, 29.8773],
'福建省': [119.4543, 25.9222],
'江西省': [116.0046, 28.6633],
'湖南省': [113.0823, 28.2568],
'贵州省': [106.6992, 26.7682],
'云南省': [102.9199, 25.4663],
'广东省': [113.12244, 23.009505],
'广西壮族': [108.479, 23.1152],
'海南省': [110.3893, 19.8516],
'上海市': [121.4648, 31.2891],
'香港': [114.2784, 22.3057]
}
var data = this.message
var convertData = function (data) {
var uploadedData = require('./data-1528971808162-BkOXf61WX.json')
echarts.registerMap('china', uploadedData)
var geoCoordMap = { // 地理坐标
台湾省: [121.5135, 25.0308],
黑龙江省: [127.9688, 45.368],
内蒙古: [110.3467, 41.4899],
吉林省: [125.8154, 44.2584],
北京市: [116.4551, 40.2539],
辽宁省: [123.1238, 42.1216],
河北省: [114.4995, 38.1006],
天津市: [117.4219, 39.4189],
山西省: [112.3352, 37.9413],
陕西省: [109.1162, 34.2004],
甘肃省: [103.5901, 36.3043],
宁夏回族: [106.3586, 38.1775],
青海省: [101.4038, 36.8207],
新疆维吾尔: [87.9236, 43.5883],
西藏: [91.11, 29.97],
四川省: [103.9526, 30.7617],
重庆市: [108.384366, 30.439702],
山东省: [117.1582, 36.8701],
河南省: [113.4668, 34.6234],
江苏省: [118.8062, 31.9208],
安徽省: [117.29, 32.0581],
湖北省: [114.3896, 30.6628],
浙江省: [119.5313, 29.8773],
福建省: [119.4543, 25.9222],
江西省: [116.0046, 28.6633],
湖南省: [113.0823, 28.2568],
贵州省: [106.6992, 26.7682],
云南省: [102.9199, 25.4663],
广东省: [113.12244, 23.009505],
广西壮族: [108.479, 23.1152],
海南省: [110.3893, 19.8516],
上海市: [121.4648, 31.2891],
香港: [114.2784, 22.3057]
}
var data = this.message
var convertData = function (data) {
var res = []
for (var i = 0; i < data.length; i++) {
var geoCoord = geoCoordMap[data[i].name]
......@@ -77,8 +77,8 @@ var convertData = function (data) {
}
}
return res
}
let vm = this
}
const vm = this
// 基于准备好的dom,初始化echarts实例
vm.chart = echarts.init(document.getElementById(vm.idstr))
// 清空图表
......@@ -111,7 +111,7 @@ var convertData = function (data) {
transitionDuration: 0,
trigger: 'item',
formatter: function (params) {
if (typeof (params.value)[2] == 'undefined') {
if (typeof (params.value)[2] === 'undefined') {
return params.name + ' : ' + params.value
} else {
return params.name + ' : ' + params.value[2]
......@@ -258,19 +258,19 @@ var convertData = function (data) {
},
drawBar () {
// 绘制图表
let vm = this
const vm = this
vm.chart.setOption(vm.option)
vm.eventList()
},
eventList () {
let vm = this
const vm = this
vm.chart.on('click', function (params) {
})
}
},
watch: {
message: function () {
let vm = this
const vm = this
setTimeout(function () {
vm.drawLine()
}, 1000)
......
......@@ -4,7 +4,7 @@
<script>
// 引入基本模板
let echarts = require('echarts/lib/echarts')
const echarts = require('echarts/lib/echarts')
// 引入提示框和title组件
require('echarts/lib/component/tooltip')
require('echarts/lib/component/title')
......@@ -24,7 +24,7 @@ export default {
},
methods: {
drawLine () {
let vm = this
const vm = this
// 基于准备好的dom,初始化echarts实例
vm.chart = echarts.init(document.getElementById(vm.idstr))
// 清空图表
......@@ -84,19 +84,19 @@ export default {
},
drawBar () {
// 绘制图表
let vm = this
const vm = this
vm.chart.setOption(vm.option)
vm.eventList()
},
eventList () {
let vm = this
const vm = this
vm.chart.on('click', function (params) {
})
}
},
watch: {
message: function () {
let vm = this
const vm = this
setTimeout(function () {
vm.drawLine()
}, 1000)
......
......@@ -4,7 +4,7 @@
<script>
// 引入基本模板
let echarts = require('echarts/lib/echarts')
const echarts = require('echarts/lib/echarts')
// 引入提示框和title组件
require('echarts/lib/component/tooltip')
require('echarts/lib/component/title')
......@@ -24,7 +24,7 @@ export default {
},
methods: {
drawLine () {
let vm = this
const vm = this
// 基于准备好的dom,初始化echarts实例
vm.chart = echarts.init(document.getElementById(vm.idstr))
// 清空图表
......@@ -68,7 +68,8 @@ export default {
data: [820, 932, 901, 934, 1290, 1330, 620],
smooth: true, // 折线图平滑
type: 'line',
areaStyle: { normal: {
areaStyle: {
normal: {
color: new echarts.graphic.LinearGradient(
0, 0, 0, 1,
[
......@@ -77,8 +78,9 @@ export default {
{ offset: 1, color: 'rgba(255,255,255,0)' }
]
)
} },
itemStyle: {// 线条样式
}
},
itemStyle: { // 线条样式
normal: {
color: '#30DDF4',
lineStyle: { // 系列级个性化折线样式
......@@ -103,19 +105,19 @@ export default {
},
drawBar () {
// 绘制图表
let vm = this
const vm = this
vm.chart.setOption(vm.option)
vm.eventList()
},
eventList () {
let vm = this
const vm = this
vm.chart.on('click', function (params) {
})
}
},
watch: {
message: function () {
let vm = this
const vm = this
setTimeout(function () {
vm.drawLine()
}, 1000)
......
<template>
<d2-container class="mainPage">
<headerLayout></headerLayout>
<div id="overview">
<dv-loading v-show="loading">Loading...</dv-loading>
<d2-container v-show="!loading" class="mainPage">
<div class="section">
<div style="position: absolute; width: 250px; left: 630px; z-index: 1; top: 20px">
<el-button @click="getData(1)">客户</el-button>
......@@ -20,10 +21,10 @@
</div>
</div>
</d2-container>
</div>
</template>
<script>
import headerLayout from './components/headerLayout' // 公共头部
import mapChina from './components/mainPageEcharts/mapChina' // 地图
import deptIntroduction from './components/deptIntroduction'// 部门介绍
import deptOperation from './components/deptOperation'// 部门运营
......@@ -31,51 +32,53 @@ import clientDistributed from './components/clientDistributed'// 客户增长分
import knowledgeGraph from './components/knowledgeGraph'// 知识图谱
import companyNews from './components/companyNews'// 公司新闻
import companyHotWord from './components/companyHotWord'// 企业热词
import * as API_BASIC from '@/api/sys.basic.js'
import * as API_BASIC from '@/api/sys.basic.js'
export default {
components: { headerLayout, mapChina, deptIntroduction, deptOperation, clientDistributed, knowledgeGraph, companyNews, companyHotWord },
components: { mapChina, deptIntroduction, deptOperation, clientDistributed, knowledgeGraph, companyNews, companyHotWord },
data () {
return {
loading: true,
newData: [],
mapChina: [],
type : 1
type: 1
}
},
mounted () {
this.GET_MapChina()
},
methods: {
getData(type) {
getData (type) {
this.type = type
this.GET_MapChina();
this.GET_MapChina()
},
GET_MapChina() {
GET_MapChina () {
const type = this.type
API_BASIC.GetMapChina(type).then(res => {
this.loading = false
this.newData = res.data
this.newData.forEach(e => {
var arr = { 'name': e['area'], 'value': e['num'] }
var arr = { name: e.area, value: e.num }
this.mapChina.push(arr)
});
})
},
// 方法
handleSure () {
deleteKmz({
'kmzId': this.delMsg.deleteId,
'userId': this.delMsg.userId
}).then(res => {
console.log(res)
if (res.code == 200) {
this.$message.success('success')
} else {
this.$message.error(res.message)
}
}).catch(err => {
console.log('err', err)
})
}
// 方法
// handleSure () {
// deleteKmz({
// kmzId: this.delMsg.deleteId,
// userId: this.delMsg.userId
// }).then(res => {
// console.log(res)
// if (res.code == 200) {
// this.$message.success('success')
// } else {
// this.$message.error(res.message)
// }
// }).catch(err => {
// console.log('err', err)
// })
// }
}
}
......
......@@ -84,7 +84,7 @@ import * as API_LOGIN from '@/api/user.js'
export default {
name: 'Login',
data() {
data () {
const validateUsername = (rule, value, callback) => {
if (!validUsername(value)) {
callback(new Error('Please enter the correct user name'))
......@@ -129,15 +129,15 @@ export default {
},
watch: {
$route: {
handler: function(route) {
handler: function (route) {
this.redirect = route.query && route.query.redirect
this.$router.push({ path: this.redirect });
this.$router.push({ path: this.redirect })
},
immediate: true
}
},
methods: {
showPwd() {
showPwd () {
if (this.passwordType === 'password') {
this.passwordType = ''
} else {
......@@ -147,13 +147,13 @@ export default {
this.$refs.password.focus()
})
},
handleLogin() {
handleLogin () {
this.$refs.loginForm.validate(valid => {
if (valid) {
this.loading = true
API_LOGIN.login(this.loginForm).then((res) => {
sessionStorage.setItem('token',res.token);
sessionStorage.setItem('user', JSON.stringify(res.user));
sessionStorage.setItem('token', res.token)
sessionStorage.setItem('user', JSON.stringify(res.user))
this.$router.push({ path: (this.redirect || '/') })
this.loading = false
}).catch(() => {
......
import { Message, MessageBox } from 'element-ui'
import util from '@/libs/util.js'
import router from '@/router'
import { AccountLogin } from '@api/sys.login'
import { AccountLogin } from '@/api/sys.login'
export default {
namespaced: true,
......
......@@ -150,7 +150,7 @@ module.exports = {
.end()
// 重新设置 alias
config.resolve.alias
.set('@api', resolve('src/api'))
.set('@', resolve('src'))
// 分析工具
if (process.env.npm_config_report) {
config
......
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