Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in / Register
Toggle navigation
E
enterprise-opt-kit
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
fubaole
enterprise-opt-kit
Commits
3e1e1eb3
Commit
3e1e1eb3
authored
May 25, 2021
by
乐宝呗666
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改bug
parent
872bec7b
Hide whitespace changes
Inline
Side-by-side
Showing
30 changed files
with
388 additions
and
579 deletions
+388
-579
index.html
public/index.html
+3
-3
App.vue
src/App.vue
+1
-1
con.client.js
src/api/con.client.js
+7
-0
con.organ.js
src/api/con.organ.js
+18
-0
service.js
src/api/service.js
+1
-1
sys.basic.js
src/api/sys.basic.js
+2
-2
sys.knowled.js
src/api/sys.knowled.js
+4
-3
barChart.vue
src/components/echarts/barChart.vue
+3
-3
doubleYBarChart.vue
src/components/echarts/doubleYBarChart.vue
+2
-3
graphChart.vue
src/components/echarts/graphChart.vue
+30
-5
lineChart.vue
src/components/echarts/lineChart.vue
+1
-1
negativeBarChart.vue
src/components/echarts/negativeBarChart.vue
+1
-1
treeChart.vue
src/components/echarts/treeChart.vue
+113
-115
waterBallChart.vue
src/components/echarts/waterBallChart.vue
+2
-1
routes.js
src/router/routes.js
+0
-2
page.vue
src/views/content/client/page.vue
+13
-67
cashFlow.vue
src/views/content/operation/components/cashFlow.vue
+2
-2
contractAmount.vue
src/views/content/operation/components/contractAmount.vue
+11
-6
productIncome.vue
src/views/content/operation/components/productIncome.vue
+2
-2
revenueStatistics.vue
src/views/content/operation/components/revenueStatistics.vue
+2
-2
totalExpenses.vue
src/views/content/operation/components/totalExpenses.vue
+1
-1
orgDetail.vue
src/views/content/organization/components/orgDetail.vue
+9
-6
peopleCounting.vue
src/views/content/organization/components/peopleCounting.vue
+14
-14
polyline.vue
src/views/content/organization/components/polyline.vue
+0
-125
waterBall.vue
src/views/content/organization/components/waterBall.vue
+0
-133
page.vue
src/views/content/organization/page.vue
+57
-36
importantProject.vue
src/views/system/index/components/importantProject.vue
+7
-7
knowledgeDialog.vue
src/views/system/index/components/knowledgeDialog.vue
+37
-12
knowledgeGraph.vue
src/views/system/index/components/knowledgeGraph.vue
+39
-19
index.js
store/index.js
+6
-6
No files found.
public/index.html
View file @
3e1e1eb3
...
@@ -17,7 +17,7 @@
...
@@ -17,7 +17,7 @@
<title><
%=
VUE_APP_TITLE
%
></title>
<title><
%=
VUE_APP_TITLE
%
></title>
<style>
<style>
html
,
body
,
#app
{
height
:
100%
;
margin
:
0px
;
padding
:
0px
;
width
:
100%
;
}
html
,
body
,
#app
{
height
:
100%
;
margin
:
0px
;
padding
:
0px
;
width
:
100%
;
}
.d2-home
{
background-color
:
#
303133
;
height
:
100%
;
display
:
flex
;
flex-direction
:
column
;
}
.d2-home
{
background-color
:
#
000E42
;
height
:
100%
;
display
:
flex
;
flex-direction
:
column
;
}
.d2-home__main
{
user-select
:
none
;
width
:
100%
;
flex-grow
:
1
;
display
:
flex
;
justify-content
:
center
;
align-items
:
center
;
flex-direction
:
column
;
}
.d2-home__main
{
user-select
:
none
;
width
:
100%
;
flex-grow
:
1
;
display
:
flex
;
justify-content
:
center
;
align-items
:
center
;
flex-direction
:
column
;
}
.d2-home__footer
{
width
:
100%
;
flex-grow
:
0
;
text-align
:
center
;
padding
:
1em
0
;
}
.d2-home__footer
{
width
:
100%
;
flex-grow
:
0
;
text-align
:
center
;
padding
:
1em
0
;
}
.d2-home__footer
>
a
{
font-size
:
12px
;
color
:
#ABABAB
;
text-decoration
:
none
;
}
.d2-home__footer
>
a
{
font-size
:
12px
;
color
:
#ABABAB
;
text-decoration
:
none
;
}
...
@@ -43,13 +43,13 @@
...
@@ -43,13 +43,13 @@
src=
"./image/loading/loading-spin.svg"
src=
"./image/loading/loading-spin.svg"
alt=
"loading"
>
alt=
"loading"
>
</div>
</div>
<div
class=
"d2-home__footer"
>
<
!-- <
div class="d2-home__footer">
<a
<a
href="https://github.com/d2-projects/d2-admin"
href="https://github.com/d2-projects/d2-admin"
target="_blank">
target="_blank">
https://github.com/d2-projects/d2-admin
https://github.com/d2-projects/d2-admin
</a>
</a>
</div>
</div>
-->
</div>
</div>
</div>
</div>
<!-- 使用 CDN 加速的 JS 文件,配置在 vue.config.js 下 -->
<!-- 使用 CDN 加速的 JS 文件,配置在 vue.config.js 下 -->
...
...
src/App.vue
View file @
3e1e1eb3
...
@@ -12,7 +12,7 @@ export default {
...
@@ -12,7 +12,7 @@ export default {
'$i18n.locale'
:
'i18nHandle'
'$i18n.locale'
:
'i18nHandle'
},
},
created
()
{
created
()
{
this
.
i18nHandle
(
this
.
$i18n
.
locale
)
//
this.i18nHandle(this.$i18n.locale)
},
},
methods
:
{
methods
:
{
i18nHandle
(
val
,
oldVal
)
{
i18nHandle
(
val
,
oldVal
)
{
...
...
src/api/con.client.js
View file @
3e1e1eb3
...
@@ -13,6 +13,13 @@ export function getCustomerByProvince () {
...
@@ -13,6 +13,13 @@ export function getCustomerByProvince () {
method
:
'get'
method
:
'get'
})
})
}
}
// 用户端客户合同分布
export
function
getCustomerByAmount
()
{
return
request
({
url
:
'/tp/customerInformation/getCustomerByAmount'
,
method
:
'get'
})
}
// 获取客户图标信息
// 获取客户图标信息
export
function
GetClientList
()
{
export
function
GetClientList
()
{
return
request
({
return
request
({
...
...
src/api/con.organ.js
0 → 100644
View file @
3e1e1eb3
import
{
request
}
from
'./service'
// 获取组织结构树-PC
export
function
getDeptTree
()
{
return
request
({
url
:
'/tp/organ/getDeptTree'
,
method
:
'get'
})
}
// 查询相应部门或中心下的统计的招聘信息
export
function
recruitmentStatistics
(
params
)
{
return
request
({
url
:
'/tp/recruitment/recruitmentStatistics'
,
method
:
'get'
,
params
})
}
src/api/service.js
View file @
3e1e1eb3
...
@@ -15,7 +15,7 @@ function createService () {
...
@@ -15,7 +15,7 @@ function createService () {
baseURL
:
process
.
env
.
NODE_ENV
===
'production'
?
process
.
env
.
VUE_APP_REQUEST_URL
:
process
.
env
.
VUE_APP_BASE_API
,
baseURL
:
process
.
env
.
NODE_ENV
===
'production'
?
process
.
env
.
VUE_APP_REQUEST_URL
:
process
.
env
.
VUE_APP_BASE_API
,
// baseURL: process.env.VUE_APP_BASE_API, // url = base url + request url
// baseURL: process.env.VUE_APP_BASE_API, // url = base url + request url
// withCredentials: true, // send cookies when cross-domain requests
// withCredentials: true, // send cookies when cross-domain requests
timeout
:
5
000
// request timeout
timeout
:
60
000
// request timeout
})
})
// 请求拦截
// 请求拦截
service
.
interceptors
.
request
.
use
(
service
.
interceptors
.
request
.
use
(
...
...
src/api/sys.basic.js
View file @
3e1e1eb3
...
@@ -120,9 +120,9 @@ export function productDemonstration (params) {
...
@@ -120,9 +120,9 @@ export function productDemonstration (params) {
})
})
}
}
// 获取行业信息
// 获取行业信息
export
function
getIndustry
Data
()
{
export
function
getIndustry
List
()
{
return
request
({
return
request
({
url
:
'/tp/customerInformation/getList'
,
url
:
'/tp/customerInformation/get
Industry
List'
,
method
:
'post'
method
:
'post'
})
})
}
}
...
...
src/api/sys.knowled.js
View file @
3e1e1eb3
...
@@ -10,9 +10,10 @@ export function getByName (name, type) {
...
@@ -10,9 +10,10 @@ export function getByName (name, type) {
})
})
}
}
// 根据客户id查询
// 根据客户id查询
export
function
GetKnowledId
(
id
,
type
)
{
export
function
GetKnowledId
(
params
)
{
return
request
({
return
request
({
url
:
`/tp/map/select?id=
${
id
}
&type=
${
type
}
`
,
url
:
'/tp/map/select'
,
method
:
'get'
method
:
'get'
,
params
})
})
}
}
src/components/echarts/barChart.vue
View file @
3e1e1eb3
...
@@ -34,8 +34,8 @@ export default {
...
@@ -34,8 +34,8 @@ export default {
formatter
:
'{b}: {c}'
formatter
:
'{b}: {c}'
},
},
grid
:
{
grid
:
{
top
:
'1
5
%'
,
top
:
'1
8
%'
,
left
:
'1
0
%'
,
left
:
'1
5
%'
,
right
:
'10%'
,
right
:
'10%'
,
bottom
:
'30%'
bottom
:
'30%'
},
},
...
@@ -47,7 +47,7 @@ export default {
...
@@ -47,7 +47,7 @@ export default {
type
:
'shadow'
type
:
'shadow'
},
},
axisLabel
:
{
axisLabel
:
{
rotate
:
3
0
rotate
:
vm
.
message
.
xAxis
.
length
>
4
?
30
:
0
},
},
axisLine
:
{
axisLine
:
{
lineStyle
:
{
lineStyle
:
{
...
...
src/components/echarts/doubleYBarChart.vue
View file @
3e1e1eb3
...
@@ -40,7 +40,7 @@ export default {
...
@@ -40,7 +40,7 @@ export default {
},
},
grid
:
{
grid
:
{
top
:
'25%'
,
top
:
'25%'
,
left
:
'1
0
%'
,
left
:
'1
5
%'
,
right
:
'10%'
,
right
:
'10%'
,
bottom
:
'30%'
bottom
:
'30%'
},
},
...
@@ -52,7 +52,7 @@ export default {
...
@@ -52,7 +52,7 @@ export default {
type
:
'shadow'
type
:
'shadow'
},
},
axisLabel
:
{
axisLabel
:
{
rotate
:
3
0
rotate
:
vm
.
message
.
xAxis
.
length
>
2
?
30
:
0
},
},
axisLine
:
{
axisLine
:
{
lineStyle
:
{
lineStyle
:
{
...
@@ -97,7 +97,6 @@ export default {
...
@@ -97,7 +97,6 @@ export default {
],
],
series
:
vm
.
message
.
data
series
:
vm
.
message
.
data
}
}
console
.
log
(
vm
.
message
)
vm
.
drawBar
()
vm
.
drawBar
()
// window.addEventListener("resize",()=>{
// window.addEventListener("resize",()=>{
// chart.resize();
// chart.resize();
...
...
src/components/echarts/graphChart.vue
View file @
3e1e1eb3
<
template
>
<
template
>
<div
:id=
"idstr"
></div>
<!--
<div
class=
"wrapper"
>
<div
class=
"back text-right"
@
click=
"goBack"
v-if=
"message.parentId"
>
<
返回
</div>
-->
<div
:id=
"idstr"
class=
"h-100"
></div>
<!--
</div>
-->
</
template
>
</
template
>
<
script
>
<
script
>
export
default
{
export
default
{
data
()
{
data
()
{
return
{
return
{
dataObj
:
{},
option
:
{},
option
:
{},
chart
:
null
,
chart
:
null
,
clickNum
:
[
1
,
1
,
1
,
1
,
1
]
recordList
:
[
]
}
}
},
},
props
:
[
'message'
,
'idstr'
],
props
:
[
'message'
,
'idstr'
],
...
@@ -19,7 +21,7 @@ export default {
...
@@ -19,7 +21,7 @@ export default {
methods
:
{
methods
:
{
drawLine
()
{
drawLine
()
{
const
vm
=
this
const
vm
=
this
const
_list
=
vm
.
message
const
_list
=
vm
.
message
.
data
_list
.
nodes
.
forEach
(
item
=>
{
_list
.
nodes
.
forEach
(
item
=>
{
item
.
itemStyle
=
{
item
.
itemStyle
=
{
color
:
item
.
color
color
:
item
.
color
...
@@ -362,9 +364,21 @@ export default {
...
@@ -362,9 +364,21 @@ export default {
vm
.
chart
.
setOption
(
vm
.
option
)
vm
.
chart
.
setOption
(
vm
.
option
)
vm
.
eventList
()
vm
.
eventList
()
},
},
goBack
()
{
if
(
this
.
recordList
.
length
)
{
const
popItem
=
this
.
recordList
.
pop
()
this
.
$emit
(
'downData'
,
{
id
:
popItem
.
parentId
,
color
:
popItem
.
parentType
})
}
},
eventList
()
{
eventList
()
{
const
vm
=
this
const
vm
=
this
vm
.
chart
.
off
(
'click'
)
vm
.
chart
.
on
(
'click'
,
function
(
params
)
{
vm
.
chart
.
on
(
'click'
,
function
(
params
)
{
// if (vm.message.isLeaf) return
if
(
vm
.
message
.
parentId
===
undefined
)
return
vm
.
recordList
.
push
({
name
:
params
.
name
,
id
:
params
.
data
.
id
,
parentId
:
vm
.
message
.
parentId
,
color
:
params
.
data
.
color
,
parentType
:
vm
.
message
.
type
})
// console.log(vm.recordList)
vm
.
$emit
(
'downData'
,
params
.
data
)
})
})
}
}
},
},
...
@@ -383,5 +397,16 @@ export default {
...
@@ -383,5 +397,16 @@ export default {
</
script
>
</
script
>
<
style
lang=
"scss"
scoped
>
<
style
lang=
"scss"
scoped
>
.wrapper
{
position
:
relative
;
.back
{
position
:
absolute
;
top
:
0
;
right
:
0
.24rem
;
color
:
#fff
;
font-size
:
.12rem
;
z-index
:
1
;
cursor
:
pointer
;
}
}
</
style
>
</
style
>
src/components/echarts/lineChart.vue
View file @
3e1e1eb3
...
@@ -36,7 +36,7 @@ export default {
...
@@ -36,7 +36,7 @@ export default {
grid
:
{
grid
:
{
top
:
'20%'
,
top
:
'20%'
,
left
:
'10%'
,
left
:
'10%'
,
bottom
:
'1
5
%'
bottom
:
'1
8
%'
},
},
xAxis
:
{
xAxis
:
{
type
:
'category'
,
type
:
'category'
,
...
...
src/components/echarts/negativeBarChart.vue
View file @
3e1e1eb3
...
@@ -29,7 +29,7 @@ export default {
...
@@ -29,7 +29,7 @@ export default {
}
}
},
},
grid
:
{
grid
:
{
top
:
'1
5
%'
,
top
:
'1
8
%'
,
left
:
'10%'
,
left
:
'10%'
,
right
:
'10%'
,
right
:
'10%'
,
bottom
:
'15%'
bottom
:
'15%'
...
...
src/components/echarts/treeChart.vue
View file @
3e1e1eb3
...
@@ -17,121 +17,119 @@ export default {
...
@@ -17,121 +17,119 @@ export default {
methods
:
{
methods
:
{
drawLine
()
{
drawLine
()
{
const
vm
=
this
const
vm
=
this
const
data
=
{
// const data = {
name
:
'flare'
,
// name: 'flare',
children
:
[
// children: [
{
// {
name
:
'analytics'
,
// name: 'analytics',
children
:
[
// children: [
{
// {
name
:
'cluster'
,
// name: 'cluster',
children
:
[
// children: [
{
name
:
'AgglomerativeCluster'
,
value
:
3938
},
// { name: 'AgglomerativeCluster', value: 3938 },
{
name
:
'CommunityStructure'
,
value
:
3812
},
// { name: 'CommunityStructure', value: 3812 },
{
name
:
'HierarchicalCluster'
,
value
:
6714
},
// { name: 'HierarchicalCluster', value: 6714 },
{
name
:
'MergeEdge'
,
value
:
743
}
// { name: 'MergeEdge', value: 743 }
]
// ]
},
// },
{
// {
name
:
'graph'
,
// name: 'graph',
children
:
[
// children: [
{
name
:
'BetweennessCentrality'
,
value
:
3534
},
// { name: 'BetweennessCentrality', value: 3534 },
{
name
:
'LinkDistance'
,
value
:
5731
},
// { name: 'LinkDistance', value: 5731 },
{
name
:
'MaxFlowMinCut'
,
value
:
7840
},
// { name: 'MaxFlowMinCut', value: 7840 },
{
name
:
'ShortestPaths'
,
value
:
5914
},
// { name: 'ShortestPaths', value: 5914 },
{
name
:
'SpanningTree'
,
value
:
3416
}
// { name: 'SpanningTree', value: 3416 }
]
// ]
},
// },
{
// {
name
:
'optimization'
,
// name: 'optimization',
children
:
[
// children: [
{
name
:
'AspectRatioBanker'
,
value
:
7074
}
// { name: 'AspectRatioBanker', value: 7074 }
]
// ]
}
// }
]
// ]
},
// },
{
// {
name
:
'animate'
,
// name: 'animate',
children
:
[
// children: [
{
name
:
'Easing'
,
value
:
17010
},
// { name: 'Easing', value: 17010 },
{
name
:
'FunctionSequence'
,
value
:
5842
},
// { name: 'FunctionSequence', value: 5842 },
{
// {
name
:
'interpolate'
,
// name: 'interpolate',
children
:
[
// children: [
{
name
:
'ArrayInterpolator'
,
value
:
1983
},
// { name: 'ArrayInterpolator', value: 1983 },
{
name
:
'ColorInterpolator'
,
value
:
2047
},
// { name: 'ColorInterpolator', value: 2047 },
{
name
:
'DateInterpolator'
,
value
:
1375
},
// { name: 'DateInterpolator', value: 1375 },
{
name
:
'Interpolator'
,
value
:
8746
},
// { name: 'Interpolator', value: 8746 },
{
name
:
'MatrixInterpolator'
,
value
:
2202
},
// { name: 'MatrixInterpolator', value: 2202 },
{
name
:
'NumberInterpolator'
,
value
:
1382
},
// { name: 'NumberInterpolator', value: 1382 },
{
name
:
'ObjectInterpolator'
,
value
:
1629
},
// { name: 'ObjectInterpolator', value: 1629 },
{
name
:
'PointInterpolator'
,
value
:
1675
},
// { name: 'PointInterpolator', value: 1675 },
{
name
:
'RectangleInterpolator'
,
value
:
2042
}
// { name: 'RectangleInterpolator', value: 2042 }
]
// ]
},
// },
{
name
:
'ISchedulable'
,
value
:
1041
},
// { name: 'ISchedulable', value: 1041 },
{
name
:
'Parallel'
,
value
:
5176
},
// { name: 'Parallel', value: 5176 },
{
name
:
'Pause'
,
value
:
449
},
// { name: 'Pause', value: 449 },
{
name
:
'Scheduler'
,
value
:
5593
},
// { name: 'Scheduler', value: 5593 },
{
name
:
'Sequence'
,
value
:
5534
},
// { name: 'Sequence', value: 5534 },
{
name
:
'Transition'
,
value
:
9201
},
// { name: 'Transition', value: 9201 },
{
name
:
'Transitioner'
,
value
:
19975
},
// { name: 'Transitioner', value: 19975 },
{
name
:
'TransitionEvent'
,
value
:
1116
},
// { name: 'TransitionEvent', value: 1116 },
{
name
:
'Tween'
,
value
:
6006
}
// { name: 'Tween', value: 6006 }
]
// ]
},
// },
{
// {
name
:
'data'
,
// name: 'data',
children
:
[
// children: [
{
// {
name
:
'converters'
,
// name: 'converters',
children
:
[
// children: [
{
name
:
'Converters'
,
value
:
721
},
// { name: 'Converters', value: 721 },
{
name
:
'DelimitedTextConverter'
,
value
:
4294
},
// { name: 'DelimitedTextConverter', value: 4294 },
{
name
:
'GraphMLConverter'
,
value
:
9800
},
// { name: 'GraphMLConverter', value: 9800 },
{
name
:
'IDataConverter'
,
value
:
1314
},
// { name: 'IDataConverter', value: 1314 },
{
name
:
'JSONConverter'
,
value
:
2220
}
// { name: 'JSONConverter', value: 2220 }
]
// ]
},
// },
{
name
:
'DataField'
,
value
:
1759
},
// { name: 'DataField', value: 1759 },
{
name
:
'DataSchema'
,
value
:
2165
},
// { name: 'DataSchema', value: 2165 },
{
name
:
'DataSet'
,
value
:
586
},
// { name: 'DataSet', value: 586 },
{
name
:
'DataSource'
,
value
:
3331
},
// { name: 'DataSource', value: 3331 },
{
name
:
'DataTable'
,
value
:
772
},
// { name: 'DataTable', value: 772 },
{
name
:
'DataUtil'
,
value
:
3322
}
// { name: 'DataUtil', value: 3322 }
]
// ]
},
// },
{
// {
name
:
'display'
,
// name: 'display',
children
:
[
// children: [
{
name
:
'DirtySprite'
,
value
:
8833
},
// { name: 'DirtySprite', value: 8833 },
{
name
:
'LineSprite'
,
value
:
1732
},
// { name: 'LineSprite', value: 1732 },
{
name
:
'RectSprite'
,
value
:
3623
},
// { name: 'RectSprite', value: 3623 },
{
name
:
'TextSprite'
,
value
:
10066
}
// { name: 'TextSprite', value: 10066 }
]
// ]
},
// },
{
// {
name
:
'flex'
,
// name: 'flex',
children
:
[
// children: []
{
name
:
'FlareVis'
,
value
:
4116
}
// },
]
// {
},
// name: 'physics',
{
// children: [
name
:
'physics'
,
// { name: 'DragForce', value: 1082 },
children
:
[
// { name: 'GravityForce', value: 1336 },
{
name
:
'DragForce'
,
value
:
1082
},
// { name: 'IForce', value: 319 },
{
name
:
'GravityForce'
,
value
:
1336
},
// { name: 'NBodyForce', value: 10498 },
{
name
:
'IForce'
,
value
:
319
},
// { name: 'Particle', value: 2822 },
{
name
:
'NBodyForce'
,
value
:
10498
},
// { name: 'Simulation', value: 9983 },
{
name
:
'Particle'
,
value
:
2822
},
// { name: 'Spring', value: 2213 },
{
name
:
'Simulation'
,
value
:
9983
},
// { name: 'SpringForce', value: 1681 }
{
name
:
'Spring'
,
value
:
2213
},
// ]
{
name
:
'SpringForce'
,
value
:
1681
}
// }
]
// ]
}
// }
]
const
data
=
vm
.
message
}
// 基于准备好的dom,初始化echarts实例
// 基于准备好的dom,初始化echarts实例
vm
.
chart
=
this
.
$echarts
.
init
(
document
.
getElementById
(
vm
.
idstr
))
vm
.
chart
=
this
.
$echarts
.
init
(
document
.
getElementById
(
vm
.
idstr
))
// 清空图表
// 清空图表
...
...
src/components/echarts/waterBallChart.vue
View file @
3e1e1eb3
...
@@ -26,6 +26,7 @@ export default {
...
@@ -26,6 +26,7 @@ export default {
vm
.
chart
=
echarts
.
init
(
document
.
getElementById
(
vm
.
idstr
))
vm
.
chart
=
echarts
.
init
(
document
.
getElementById
(
vm
.
idstr
))
// 清空图表
// 清空图表
vm
.
chart
.
clear
()
vm
.
chart
.
clear
()
console
.
log
(
vm
.
message
)
vm
.
option
=
{
vm
.
option
=
{
// 图表主标题
// 图表主标题
// 提示框组件
// 提示框组件
...
@@ -80,7 +81,7 @@ export default {
...
@@ -80,7 +81,7 @@ export default {
color
:
'#ffffff'
,
// 在波浪上方时的文字颜色
color
:
'#ffffff'
,
// 在波浪上方时的文字颜色
insideColor
:
'#ffffff'
,
// 在波浪下方时的文字颜色
insideColor
:
'#ffffff'
,
// 在波浪下方时的文字颜色
textStyle
:
{
textStyle
:
{
fontSize
:
2
4
fontSize
:
1
4
}
}
},
},
// 图形的高亮样式
// 图形的高亮样式
...
...
src/router/routes.js
View file @
3e1e1eb3
...
@@ -4,8 +4,6 @@ import business from './modules/business'
...
@@ -4,8 +4,6 @@ import business from './modules/business'
import
client
from
'./modules/client'
import
client
from
'./modules/client'
import
organization
from
'./modules/organization'
import
organization
from
'./modules/organization'
import
child
from
'./modules/child'
import
child
from
'./modules/child'
console
.
log
(
child
,
'child'
)
console
.
log
(
organization
,
'organization'
)
// 由于懒加载页面太多的话会造成webpack热更新太慢,所以开发环境不使用懒加载,只有生产环境使用懒加载
// 由于懒加载页面太多的话会造成webpack热更新太慢,所以开发环境不使用懒加载,只有生产环境使用懒加载
const
_import
=
require
(
'@/libs/util.import.'
+
process
.
env
.
NODE_ENV
)
const
_import
=
require
(
'@/libs/util.import.'
+
process
.
env
.
NODE_ENV
)
...
...
src/views/content/client/page.vue
View file @
3e1e1eb3
...
@@ -11,22 +11,22 @@
...
@@ -11,22 +11,22 @@
<div
class=
"flex-1"
>
<div
class=
"flex-1"
>
<div
class=
"box"
>
<div
class=
"box"
>
<div
class=
"boxTitle"
>
客户总数
<span>
(个)
</span></div>
<div
class=
"boxTitle"
>
客户总数
<span>
(个)
</span></div>
<div
class=
"boxValue"
>
{{
clientObj
.
total
[
'客户总数'
]
}}
</div>
<div
class=
"boxValue"
>
{{
totalObj
}}
</div>
</div>
</div>
<div
class=
"box"
>
<div
class=
"box"
>
<div
class=
"boxTitle"
>
商机客户
<span>
(个)
</span></div>
<div
class=
"boxTitle"
>
商机客户
<span>
(个)
</span></div>
<div
class=
"boxValue"
>
{{
clientObj
.
total
[
'最终用户'
]
}}
</div>
<div
class=
"boxValue"
>
{{
totalObj
}}
</div>
</div>
</div>
</div>
</div>
<div
class=
"horizontal"
></div>
<div
class=
"horizontal"
></div>
<div
class=
"flex-1"
>
<div
class=
"flex-1"
>
<div
class=
"box"
>
<div
class=
"box"
>
<div
class=
"boxTitle"
>
集成商
<span>
(个)
</span></div>
<div
class=
"boxTitle"
>
集成商
<span>
(个)
</span></div>
<div
class=
"boxValue"
>
{{
clientObj
.
total
[
'集成商'
]
}}
</div>
<div
class=
"boxValue"
>
{{
totalObj
}}
</div>
</div>
</div>
<div
class=
"box"
>
<div
class=
"box"
>
<div
class=
"boxTitle"
>
本年新增
<span>
(个)
</span></div>
<div
class=
"boxTitle"
>
本年新增
<span>
(个)
</span></div>
<div
class=
"boxValue"
>
{{
clientObj
.
total
[
'本年新增客户'
]
}}
</div>
<div
class=
"boxValue"
>
{{
totalObj
}}
</div>
</div>
</div>
</div>
</div>
<div
class=
"horizontal"
></div>
<div
class=
"horizontal"
></div>
...
@@ -234,29 +234,21 @@ export default {
...
@@ -234,29 +234,21 @@ export default {
components
:
{
headerLayout
,
pieChart
,
barChart
,
mulBarChart
,
serviceAnalysis
},
components
:
{
headerLayout
,
pieChart
,
barChart
,
mulBarChart
,
serviceAnalysis
},
data
()
{
data
()
{
return
{
return
{
loading
:
true
,
totalObj
:
{},
// 客户数据
clientData
:
{},
// 客户数据
clientObj
:
{},
// 客户数据
typeDistribute
:
{},
// 业务分布
typeDistribute
:
{},
// 业务分布
customDistribute
:
{},
// 地区分布
customDistribute
:
{},
// 地区分布
clientAnalysis
:
{},
// 客户分析
clientAnalysis
:
{},
// 客户分析
input
:
''
,
state
:
''
,
state
:
''
,
restaurants
:
[],
params
:
{
name
:
''
},
customername
:
{},
customername
:
{},
customerid
:
''
,
selectYear
:
'综合'
,
// 选中重要客户项
selectYear
:
'综合'
,
yearList
:
[
'综合'
,
'按资金'
,
'按项目'
]
// 重要客户下拉框
yearList
:
[
'综合'
,
'按资金'
,
'按项目'
]
}
}
},
},
mounted
()
{
mounted
()
{
this
.
getClientList
()
this
.
GetCustomerInfo
()
this
.
GetCustomerInfo
()
this
.
getCustomerByProvince
()
this
.
getCustomerByProvince
()
this
.
getDistribution
()
this
.
getDistribution
()
this
.
getCustomerByAmount
()
},
},
methods
:
{
methods
:
{
// 行业分布
// 行业分布
...
@@ -278,6 +270,11 @@ export default {
...
@@ -278,6 +270,11 @@ export default {
const
_data
=
await
API_CLIENT
.
getCustomerByProvince
()
const
_data
=
await
API_CLIENT
.
getCustomerByProvince
()
this
.
customDistribute
=
_data
.
data
this
.
customDistribute
=
_data
.
data
},
},
// 合同分布
async
getCustomerByAmount
()
{
const
_data
=
await
API_CLIENT
.
getCustomerByAmount
()
this
.
clientAnalysis
=
_data
.
data
},
// 默认展示公司信息
// 默认展示公司信息
GetCustomerInfo
()
{
GetCustomerInfo
()
{
API_CLIENT
.
CustomerInfo
().
then
(
res
=>
{
API_CLIENT
.
CustomerInfo
().
then
(
res
=>
{
...
@@ -299,57 +296,6 @@ export default {
...
@@ -299,57 +296,6 @@ export default {
API_CLIENT
.
GetCustomerId
(
item
.
id
).
then
(
res
=>
{
API_CLIENT
.
GetCustomerId
(
item
.
id
).
then
(
res
=>
{
this
.
customername
=
res
.
data
this
.
customername
=
res
.
data
})
})
},
// 客户图表数据
getClientList
()
{
API_CLIENT
.
GetClientList
().
then
(
res
=>
{
this
.
loading
=
false
this
.
clientData
=
res
this
.
clientObj
=
this
.
clientData
.
data
// 行业分布
// const arg = this.clientObj.status
// const title = []
// const da = []
// arg.forEach(element => {
// title.push(element.status)
// var jso = { name: element.status, value: element.num }
// da.push(jso)
// })
// this.typeDistribute = { legend: title, data: da }
// 客户地区分布
// const argdis = this.clientObj.area
// const titdis = []
// const dadis = []
// argdis.forEach(e => {
// titdis.push(e.area)
// var dis = { name: e.area, value: e.num }
// dadis.push(dis)
// })
// this.customDistribute = { xAxis: titdis, data: dadis }
// 客户合同分析
const
legend
=
this
.
clientObj
.
analysis
.
title
const
seriesData
=
this
.
clientObj
.
analysis
.
data
const
xAxis
=
Object
.
keys
(
this
.
clientObj
.
analysis
.
data
)
const
_data
=
[]
for
(
let
i
=
0
;
i
<
legend
.
length
;
i
++
)
{
var
_obj
=
{
name
:
legend
[
i
],
type
:
'bar'
,
data
:
[]
}
for
(
const
key
in
seriesData
)
{
_obj
.
data
.
push
(
seriesData
[
key
][
i
].
num
)
}
_data
.
push
(
_obj
)
}
this
.
clientAnalysis
=
{
legend
:
legend
,
xAxis
:
xAxis
,
yAxis
:
'单位:个'
,
data
:
_data
}
})
}
}
}
}
}
}
...
...
src/views/content/operation/components/cashFlow.vue
View file @
3e1e1eb3
<
template
>
<
template
>
<div>
<div>
<div
class=
"d-flex search-box jc-end"
>
<div
class=
"d-flex search-box jc-end"
>
<el-select
v-model=
"selectTypeId"
s
ize=
"mini"
@
change=
"getCashFlowYear"
>
<el-select
v-model=
"selectTypeId"
s
tyle=
"width:2rem;"
size=
"mini"
@
change=
"getCashFlowYear"
filterable
>
<el-option
<el-option
v-for=
"item in typeList"
v-for=
"item in typeList"
:key=
"item.id"
:key=
"item.id"
...
@@ -9,7 +9,7 @@
...
@@ -9,7 +9,7 @@
:value=
"item.id"
>
:value=
"item.id"
>
</el-option>
</el-option>
</el-select>
</el-select>
<el-select
v-model=
"selectYear"
size=
"mini"
@
change=
"getCashFlow"
>
<el-select
v-model=
"selectYear"
size=
"mini"
style=
"width:1.4rem;"
@
change=
"getCashFlow"
>
<el-option
<el-option
v-for=
"item in yearList"
v-for=
"item in yearList"
:key=
"item"
:key=
"item"
...
...
src/views/content/operation/components/contractAmount.vue
View file @
3e1e1eb3
<
template
>
<
template
>
<div>
<div>
<div
class=
"d-flex search-box jc-end"
>
<div
class=
"d-flex search-box jc-end"
>
<el-select
v-model=
"selectType"
size=
"mini"
@
change=
"getContractYear"
>
<el-select
v-model=
"selectType"
size=
"mini"
style=
"width:1.4rem;"
@
change=
"getContractYear"
>
<el-option
<el-option
v-for=
"item in typeList"
v-for=
"item in typeList"
:key=
"item"
:key=
"item
.id
"
:label=
"item"
:label=
"item
.name
"
:value=
"item"
>
:value=
"item
.id
"
>
</el-option>
</el-option>
</el-select>
</el-select>
<el-select
v-model=
"selectYear"
size=
"mini"
@
change=
"getContract"
>
<el-select
v-model=
"selectYear"
size=
"mini"
@
change=
"getContract"
>
...
@@ -31,8 +31,13 @@ export default {
...
@@ -31,8 +31,13 @@ export default {
return
{
return
{
selectYear
:
''
,
selectYear
:
''
,
yearList
:
[],
yearList
:
[],
selectType
:
'销售合同'
,
selectType
:
'1'
,
typeList
:
[
'销售合同'
,
'采购合同'
],
typeList
:
[
{
id
:
'1'
,
name
:
'购销合同'
},
{
id
:
'2'
,
name
:
'服务合同'
},
{
id
:
'3'
,
name
:
'混合合同'
},
{
id
:
'4'
,
name
:
'其他'
}
],
dataList
:
{}
dataList
:
{}
}
}
},
},
...
...
src/views/content/operation/components/productIncome.vue
View file @
3e1e1eb3
<
template
>
<
template
>
<div>
<div>
<div
class=
"d-flex search-box jc-end"
>
<div
class=
"d-flex search-box jc-end"
>
<el-select
v-model=
"selectYear"
size=
"mini"
@
change=
"getProject"
>
<el-select
v-model=
"selectYear"
size=
"mini"
style=
"width:1.5rem;"
@
change=
"getProject"
>
<el-option
<el-option
v-for=
"item in yearList"
v-for=
"item in yearList"
:key=
"item"
:key=
"item"
...
@@ -14,7 +14,7 @@
...
@@ -14,7 +14,7 @@
<div
class=
"flex-1 ball"
>
<div
class=
"flex-1 ball"
>
<waterBall
:message=
"acutalBall.charts"
idstr=
"ball1"
class=
"heightCut68"
></waterBall>
<waterBall
:message=
"acutalBall.charts"
idstr=
"ball1"
class=
"heightCut68"
></waterBall>
<p>
预算收入
{{
acutalBall
.
budgetCost
}}
万元
</p>
<p>
预算收入
{{
acutalBall
.
budgetCost
}}
万元
</p>
<p>
实际收入
{{
acutalBall
.
actualCost
}}
170
万元
</p>
<p>
实际收入
{{
acutalBall
.
actualCost
}}
万元
</p>
</div>
</div>
<div
class=
"flex-1 ball"
>
<div
class=
"flex-1 ball"
>
<waterBall
:message=
"budgetBall.charts"
idstr=
"ball2"
class=
"heightCut68"
></waterBall>
<waterBall
:message=
"budgetBall.charts"
idstr=
"ball2"
class=
"heightCut68"
></waterBall>
...
...
src/views/content/operation/components/revenueStatistics.vue
View file @
3e1e1eb3
<
template
>
<
template
>
<div>
<div>
<div
class=
"d-flex search-box jc-end"
>
<div
class=
"d-flex search-box jc-end"
>
<el-select
v-model=
"selectType"
size=
"mini"
@
change=
"getRevenueYear"
>
<el-select
v-model=
"selectType"
size=
"mini"
style=
"width:1.4rem;"
@
change=
"getRevenueYear"
>
<el-option
<el-option
v-for=
"item in typeList"
v-for=
"item in typeList"
:key=
"item"
:key=
"item"
...
@@ -9,7 +9,7 @@
...
@@ -9,7 +9,7 @@
:value=
"item"
>
:value=
"item"
>
</el-option>
</el-option>
</el-select>
</el-select>
<el-select
v-model=
"selectYear"
size=
"mini"
@
change=
"getRevenue('')"
>
<el-select
v-model=
"selectYear"
size=
"mini"
style=
"width:1.5rem;"
@
change=
"getRevenue('')"
>
<el-option
<el-option
v-for=
"item in yearList"
v-for=
"item in yearList"
:key=
"item"
:key=
"item"
...
...
src/views/content/operation/components/totalExpenses.vue
View file @
3e1e1eb3
<
template
>
<
template
>
<div>
<div>
<div
class=
"d-flex search-box jc-end"
>
<div
class=
"d-flex search-box jc-end"
>
<el-select
v-model=
"selectYear"
size=
"mini"
@
change=
"getFee('')"
>
<el-select
v-model=
"selectYear"
size=
"mini"
style=
"width:1.4rem;"
@
change=
"getFee('')"
>
<el-option
<el-option
v-for=
"item in yearList"
v-for=
"item in yearList"
:key=
"item"
:key=
"item"
...
...
src/views/content/organization/components/orgDetail.vue
View file @
3e1e1eb3
...
@@ -6,7 +6,7 @@
...
@@ -6,7 +6,7 @@
<label>
组织架构
</label>
<label>
组织架构
</label>
<span
@
click=
"goBack"
>
<
返回
</span>
<span
@
click=
"goBack"
>
<
返回
</span>
</div>
</div>
<treeChart
class=
"org-content"
idstr=
"orgCharts"
/>
<treeChart
class=
"org-content"
:message=
"organList"
idstr=
"orgCharts"
/>
</div>
</div>
</d2-container>
</d2-container>
</
template
>
</
template
>
...
@@ -14,20 +14,23 @@
...
@@ -14,20 +14,23 @@
<
script
>
<
script
>
import
headerLayout
from
'@/components/headerLayout/index'
// 公共头部
import
headerLayout
from
'@/components/headerLayout/index'
// 公共头部
import
treeChart
from
'@/components/echarts/treeChart'
import
treeChart
from
'@/components/echarts/treeChart'
import
*
as
API_ORGAN
from
'@/api/con.organ'
export
default
{
export
default
{
components
:
{
headerLayout
,
treeChart
},
components
:
{
headerLayout
,
treeChart
},
data
()
{
data
()
{
return
{
return
{
itemContent
:
{},
organList
:
{}
content
:
''
}
}
},
},
mounted
()
{
mounted
()
{
this
.
itemContent
=
JSON
.
parse
(
this
.
$route
.
query
.
row
)
this
.
getDeptTree
()
this
.
content
=
''
},
},
methods
:
{
methods
:
{
// 获取组织机构
async
getDeptTree
()
{
const
_data
=
await
API_ORGAN
.
getDeptTree
()
this
.
organList
=
_data
.
data
},
goBack
()
{
goBack
()
{
this
.
$router
.
back
(
-
1
)
this
.
$router
.
back
(
-
1
)
}
}
...
...
src/views/content/organization/components/peopleCounting.vue
View file @
3e1e1eb3
...
@@ -52,7 +52,7 @@ export default {
...
@@ -52,7 +52,7 @@ export default {
showBarFn
(
item
)
{
showBarFn
(
item
)
{
this
.
showBar
=
true
this
.
showBar
=
true
this
.
itemList
=
{
this
.
itemList
=
{
parent
:
'company'
,
parent
Id
:
'company'
,
xAxis
:
[
'运营管理中心'
,
'解决方案中心'
,
'智能制造中心'
,
'生态合作中心'
,
'客户运营中心'
],
xAxis
:
[
'运营管理中心'
,
'解决方案中心'
,
'智能制造中心'
,
'生态合作中心'
,
'客户运营中心'
],
data
:
[
data
:
[
{
value
:
123.2
,
parent
:
'company'
,
isLeaf
:
false
},
{
value
:
123.2
,
parent
:
'company'
,
isLeaf
:
false
},
...
@@ -68,7 +68,7 @@ export default {
...
@@ -68,7 +68,7 @@ export default {
setTimeout
(()
=>
{
setTimeout
(()
=>
{
if
(
item
.
indexOf
(
'company'
)
!==
-
1
)
{
if
(
item
.
indexOf
(
'company'
)
!==
-
1
)
{
this
.
itemList
=
{
this
.
itemList
=
{
parent
:
'company'
,
parent
Id
:
'company'
,
xAxis
:
[
'运营管理中心'
,
'解决方案中心'
,
'智能制造中心'
,
'生态合作中心'
,
'客户运营中心'
],
xAxis
:
[
'运营管理中心'
,
'解决方案中心'
,
'智能制造中心'
,
'生态合作中心'
,
'客户运营中心'
],
data
:
[
data
:
[
{
value
:
123.2
,
parent
:
'company'
,
isLeaf
:
false
},
{
value
:
123.2
,
parent
:
'company'
,
isLeaf
:
false
},
...
@@ -81,28 +81,28 @@ export default {
...
@@ -81,28 +81,28 @@ export default {
}
}
if
(
item
.
indexOf
(
'中心'
)
!==
-
1
)
{
if
(
item
.
indexOf
(
'中心'
)
!==
-
1
)
{
this
.
itemList
=
{
this
.
itemList
=
{
parent
:
'运营管理中心'
,
parent
Id
:
item
,
xAxis
:
[
'运营管理部门'
,
'解决方案部门'
,
'智能制造部门'
,
'生态合作部门'
,
'客户运营部门'
],
xAxis
:
[
'运营管理部门'
,
'解决方案部门'
,
'智能制造部门'
,
'生态合作部门'
,
'客户运营部门'
],
data
:
[
data
:
[
{
value
:
123.2
,
parent
:
'运营管理中心'
,
isLeaf
:
false
},
{
value
:
123.2
,
parent
:
item
,
isLeaf
:
false
},
{
value
:
76.7
,
parent
:
'运营管理中心'
,
isLeaf
:
false
},
{
value
:
76.7
,
parent
:
item
,
isLeaf
:
false
},
{
value
:
135.6
,
parent
:
'运营管理中心'
,
isLeaf
:
false
},
{
value
:
135.6
,
parent
:
item
,
isLeaf
:
false
},
{
value
:
162.2
,
parent
:
'运营管理中心'
,
isLeaf
:
false
},
{
value
:
162.2
,
parent
:
item
,
isLeaf
:
false
},
{
value
:
32.6
,
parent
:
'运营管理中心'
,
isLeaf
:
false
}
{
value
:
32.6
,
parent
:
item
,
isLeaf
:
false
}
]
]
}
}
}
}
if
(
item
.
indexOf
(
'部门'
)
!==
-
1
)
{
if
(
item
.
indexOf
(
'部门'
)
!==
-
1
)
{
this
.
itemList
=
{
this
.
itemList
=
{
parent
:
'解决方案部门'
,
parent
Id
:
item
,
level
:
'people'
,
level
:
'people'
,
xAxis
:
[
'小小黄'
,
'小小安'
,
'小小圆'
,
'小小静'
,
'小小宝'
],
xAxis
:
[
'小小黄'
,
'小小安'
,
'小小圆'
,
'小小静'
,
'小小宝'
],
data
:
[
data
:
[
{
value
:
23.2
,
parent
:
'解决方案部门'
,
isLeaf
:
true
},
{
value
:
23.2
,
parent
:
item
,
isLeaf
:
true
},
{
value
:
6.7
,
parent
:
'解决方案部门'
,
isLeaf
:
true
},
{
value
:
6.7
,
parent
:
item
,
isLeaf
:
true
},
{
value
:
35.6
,
parent
:
'解决方案部门'
,
isLeaf
:
true
},
{
value
:
35.6
,
parent
:
item
,
isLeaf
:
true
},
{
value
:
62.2
,
parent
:
'解决方案部门'
,
isLeaf
:
true
},
{
value
:
62.2
,
parent
:
item
,
isLeaf
:
true
},
{
value
:
2.6
,
parent
:
'解决方案部门'
,
isLeaf
:
true
}
{
value
:
2.6
,
parent
:
item
,
isLeaf
:
true
}
]
]
}
}
}
}
...
...
src/views/content/organization/components/polyline.vue
deleted
100644 → 0
View file @
872bec7b
<
template
>
<div
:id=
"idstr"
></div>
</
template
>
<
script
>
// 引入基本模板
const
echarts
=
require
(
'echarts/lib/echarts'
)
// 引入提示框和title组件
require
(
'echarts/lib/component/tooltip'
)
require
(
'echarts/lib/component/title'
)
export
default
{
data
()
{
return
{
dataObj
:
{},
option
:
{},
chart
:
null
,
clickNum
:
[
1
,
1
,
1
,
1
,
1
]
}
},
props
:
[
'message'
,
'idstr'
],
mounted
()
{
this
.
drawLine
()
},
methods
:
{
drawLine
()
{
const
vm
=
this
// 基于准备好的dom,初始化echarts实例
vm
.
chart
=
echarts
.
init
(
document
.
getElementById
(
vm
.
idstr
))
// 清空图表
vm
.
chart
.
clear
()
vm
.
option
=
{
color
:
[
'#30DDF4'
,
'#E23AA2'
,
'#F5A623'
,
'#D6FFBA'
],
legend
:
{
data
:
[
'简历数'
,
'面试数'
,
'发放offer'
,
'入职'
],
right
:
20
,
top
:
10
,
textStyle
:
{
color
:
'#ffffff'
},
icon
:
'circle'
// 这个字段控制形状类型包括 circle,rect ,roundRect,triangle,diamond,pin,arrow,none
},
grid
:
{
top
:
'20%'
,
left
:
'10%'
,
bottom
:
'10%'
},
xAxis
:
{
type
:
'category'
,
data
:
[
'1月'
,
'2月'
,
'3月'
,
'4月'
,
'5月'
,
'6月'
,
'7月'
],
axisLine
:
{
lineStyle
:
{
color
:
'#FFF'
}
},
axisLabel
:
{
interval
:
0
}
},
yAxis
:
{
type
:
'value'
,
axisLine
:
{
lineStyle
:
{
color
:
'#FFF'
}
},
splitLine
:
{
show
:
true
,
lineStyle
:
{
type
:
'dashed'
}
}
},
series
:
[{
name
:
'简历数'
,
data
:
[
820
,
932
,
901
,
934
,
1290
,
1330
,
620
],
type
:
'line'
},
{
name
:
'面试数'
,
data
:
[
420
,
532
,
701
,
434
,
290
,
330
,
120
],
type
:
'line'
},
{
name
:
'发放offer'
,
data
:
[
520
,
232
,
401
,
334
,
790
,
830
,
320
],
type
:
'line'
},
{
name
:
'入职'
,
data
:
[
620
,
732
,
101
,
234
,
690
,
530
,
520
],
type
:
'line'
}]
}
vm
.
drawBar
()
// window.addEventListener("resize",()=>{
// chart.resize();
// });
},
drawBar
()
{
// 绘制图表
const
vm
=
this
vm
.
chart
.
setOption
(
vm
.
option
)
vm
.
eventList
()
},
eventList
()
{
const
vm
=
this
vm
.
chart
.
on
(
'click'
,
function
(
params
)
{
})
}
},
watch
:
{
message
:
function
()
{
const
vm
=
this
setTimeout
(
function
()
{
vm
.
drawLine
()
},
1000
)
// console.log(this.message)
}
}
}
</
script
>
<
style
lang=
"less"
>
</
style
>
src/views/content/organization/components/waterBall.vue
deleted
100644 → 0
View file @
872bec7b
<
template
>
<div
:id=
"idstr"
></div>
</
template
>
<
script
>
import
'echarts-liquidfill/src/liquidFill.js'
// 引入基本模板
const
echarts
=
require
(
'echarts/lib/echarts'
)
// 引入提示框和title组件
require
(
'echarts/lib/component/tooltip'
)
require
(
'echarts/lib/component/title'
)
export
default
{
data
()
{
return
{
dataObj
:
{},
option
:
{},
chart
:
null
,
clickNum
:
[
1
,
1
,
1
,
1
,
1
]
}
},
props
:
[
'message'
,
'idstr'
],
mounted
()
{
this
.
drawLine
()
},
methods
:
{
drawLine
()
{
const
vm
=
this
// 基于准备好的dom,初始化echarts实例
vm
.
chart
=
echarts
.
init
(
document
.
getElementById
(
vm
.
idstr
))
// 清空图表
vm
.
chart
.
clear
()
vm
.
option
=
{
// 图表主标题
// 提示框组件
tooltip
:
{
trigger
:
'item'
,
// 触发类型, 数据项图形触发,主要在散点图,饼图等无类目轴的图表中使用。
textStyle
:
{
color
:
'#fff'
// 文字颜色
},
// 提示框浮层内容格式器,支持字符串模板和回调函数两种形式
// 水球图: {a}(系列名称),{b}(无),{c}(数值)
// 使用函数模板 传入的数据值 -> value: number|Array,
formatter
:
function
(
value
)
{
return
value
.
seriesName
+
': '
+
value
.
data
*
100
+
'%'
}
},
series
:
[{
type
:
'liquidFill'
,
name
:
'离职率'
,
// 系列名称,用于tooltip的显示,legend 的图例筛选
radius
:
'80%'
,
// 水球图的半径
center
:
[
'50%'
,
'50%'
],
// 水球图的中心(圆心)坐标,数组的第一项是横坐标,第二项是纵坐标
// 水填充图的形状 circle 默认圆形 rect 圆角矩形 triangle 三角形
// diamond 菱形 pin 水滴状 arrow 箭头状 还可以是svg的path
shape
:
'circle'
,
// color: '#000', // 波浪颜色
phase
:
0
,
// 波的相位弧度 不设置 默认自动
direction
:
'right'
,
// 波浪移动的速度 两个参数 left 从右往左 right 从左往右
outline
:
{
show
:
true
,
borderDistance
:
0
,
// 边框线与图表的距离 数字
itemStyle
:
{
opacity
:
1
,
// 边框的透明度 默认为 1
borderWidth
:
2
,
// 边框的宽度
shadowBlur
:
1
,
// 边框的阴影范围 一旦设置了内外都有阴影
shadowColor
:
'#fff'
,
// 边框的阴影颜色,
borderColor
:
'#30DDF4'
// 边框颜色
}
},
// 图形样式
itemStyle
:
{
color
:
new
echarts
.
graphic
.
LinearGradient
(
0
,
0
,
0
,
1
,
[{
offset
:
0
,
color
:
'#90E0FF'
},
{
offset
:
1
,
color
:
'#E23AA2'
}]
),
// 水球显示的背景颜色
opacity
:
1
,
// 波浪的透明度
shadowBlur
:
10
// 波浪的阴影范围
},
backgroundStyle
:
{
color
:
'#000E42'
,
// 水球未到的背景颜色
borderWidth
:
0
,
borderColor
:
'rgb(255,0,255,0.9)'
},
// 图形上的文本标签
label
:
{
color
:
'#ffffff'
,
// 在波浪上方时的文字颜色
insideColor
:
'#ffffff'
,
// 在波浪下方时的文字颜色
textStyle
:
{
fontSize
:
28
}
},
// 图形的高亮样式
emphasis
:
{
itemStyle
:
{
opacity
:
0.8
// 鼠标经过波浪颜色的透明度
}
},
data
:
[
0.45
]
// 系列中的数据内容数组
}]
}
vm
.
drawBar
()
// window.addEventListener("resize",()=>{
// chart.resize();
// });
},
drawBar
()
{
// 绘制图表
const
vm
=
this
vm
.
chart
.
setOption
(
vm
.
option
)
vm
.
eventList
()
},
eventList
()
{
const
vm
=
this
vm
.
chart
.
on
(
'click'
,
function
(
params
)
{
})
}
},
watch
:
{
message
:
function
()
{
const
vm
=
this
setTimeout
(
function
()
{
vm
.
drawLine
()
},
1000
)
// console.log(this.message)
}
}
}
</
script
>
<
style
lang=
"less"
>
</
style
>
src/views/content/organization/page.vue
View file @
3e1e1eb3
...
@@ -43,17 +43,17 @@
...
@@ -43,17 +43,17 @@
<div
class=
"sum-box d-flex"
>
<div
class=
"sum-box d-flex"
>
<div
class=
"sum-item flex-1"
>
<div
class=
"sum-item flex-1"
>
<span
class=
"title"
>
月招聘目标
</span>
<span
class=
"title"
>
月招聘目标
</span>
<span
class=
"num"
><strong>
40
</strong>
人
</span>
<span
class=
"num"
><strong>
{{
recruitment
.
target
}}
</strong>
人
</span>
</div>
</div>
<div
class=
"sum-item flex-1"
>
<div
class=
"sum-item flex-1"
>
<span
class=
"title"
>
月入职
</span>
<span
class=
"title"
>
月入职
</span>
<span
class=
"num"
><strong>
40
</strong>
人
</span>
<span
class=
"num"
><strong>
{{
recruitment
.
enters
}}
</strong>
人
</span>
</div>
</div>
</div>
</div>
<div
class=
"ballBox d-flex ai-end"
>
<div
class=
"ballBox d-flex ai-end"
>
<div
class=
"ball"
><waterBall
:message=
"ball1"
idstr=
"ball1"
class=
"ball1"
></waterBall><p>
招聘完成率
</p></div>
<div
class=
"ball"
><waterBall
:message=
"
recruitment.
ball1"
idstr=
"ball1"
class=
"ball1"
></waterBall><p>
招聘完成率
</p></div>
<div
class=
"ball"
><waterBall
:message=
"ball2"
idstr=
"ball2"
class=
"ball2"
></waterBall><p>
录用率
</p></div>
<div
class=
"ball"
><waterBall
:message=
"
recruitment.
ball2"
idstr=
"ball2"
class=
"ball2"
></waterBall><p>
录用率
</p></div>
<div
class=
"ball"
><waterBall
:message=
"ball3"
idstr=
"ball3"
class=
"ball3"
></waterBall><p>
离职率
</p></div>
<div
class=
"ball"
><waterBall
:message=
"
recruitment.
ball3"
idstr=
"ball3"
class=
"ball3"
></waterBall><p>
离职率
</p></div>
</div>
</div>
</div>
</div>
</div>
</div>
...
@@ -113,11 +113,12 @@
...
@@ -113,11 +113,12 @@
import
headerLayout
from
'@/components/headerLayout/index'
// 公共头部
import
headerLayout
from
'@/components/headerLayout/index'
// 公共头部
import
barChart
from
'@/components/echarts/barChart'
// 柱图上月绩效
import
barChart
from
'@/components/echarts/barChart'
// 柱图上月绩效
import
pieChart
from
'@/components/echarts/pieChart'
// 岗位分布
import
pieChart
from
'@/components/echarts/pieChart'
// 岗位分布
import
peopleCounting
from
'./components/peopleCounting'
// 人数统计
import
waterBall
from
'@/components/echarts/waterBallChart'
// 岗位分布
import
waterBall
from
'./components/waterBall'
// 岗位分布
import
lineChart
from
'@/components/echarts/lineChart'
// 折线图
import
lineChart
from
'@/components/echarts/lineChart'
// 折线图
import
staffInfo
from
'./components/staffInfo'
import
peopleCounting
from
'./components/peopleCounting'
// 人数统计
import
staffInfo
from
'./components/staffInfo'
import
*
as
API_ORGAN
from
'@/api/con.organ'
export
default
{
export
default
{
components
:
{
headerLayout
,
pieChart
,
barChart
,
waterBall
,
lineChart
,
peopleCounting
,
staffInfo
},
components
:
{
headerLayout
,
pieChart
,
barChart
,
waterBall
,
lineChart
,
peopleCounting
,
staffInfo
},
data
()
{
data
()
{
...
@@ -132,14 +133,15 @@ export default {
...
@@ -132,14 +133,15 @@ export default {
}
}
],
],
dataList
:
{
dataList
:
{
parent
:
''
,
parentId
:
''
,
idxs
:
[
1
,
2
,
3
,
4
,
5
],
xAxis
:
[
'运营管理中心'
,
'解决方案中心'
,
'智能制造中心'
,
'生态合作中心'
,
'客户运营中心'
],
xAxis
:
[
'运营管理中心'
,
'解决方案中心'
,
'智能制造中心'
,
'生态合作中心'
,
'客户运营中心'
],
data
:
[
data
:
[
{
value
:
123.2
,
parent
:
''
,
isLeaf
:
false
},
{
id
:
1
,
value
:
123.2
,
parent
:
''
,
isLeaf
:
false
},
{
value
:
76.7
,
parent
:
''
,
isLeaf
:
false
},
{
id
:
2
,
value
:
76.7
,
parent
:
''
,
isLeaf
:
false
},
{
value
:
135.6
,
parent
:
''
,
isLeaf
:
false
},
{
id
:
3
,
value
:
135.6
,
parent
:
''
,
isLeaf
:
false
},
{
value
:
162.2
,
parent
:
''
,
isLeaf
:
false
},
{
id
:
4
,
value
:
162.2
,
parent
:
''
,
isLeaf
:
false
},
{
value
:
32.6
,
parent
:
''
,
isLeaf
:
false
}
{
id
:
5
,
value
:
32.6
,
parent
:
''
,
isLeaf
:
false
}
]
]
},
},
performActive
:
1
,
performActive
:
1
,
...
@@ -178,15 +180,31 @@ export default {
...
@@ -178,15 +180,31 @@ export default {
type
:
'line'
type
:
'line'
}]
}]
},
},
recruitment
:
{},
recruitment
:
{}
ball1
:
{},
ball2
:
{},
ball3
:
{}
}
}
},
},
mounted
()
{
mounted
()
{
this
.
recruitmentStatistics
()
},
},
methods
:
{
methods
:
{
// 获取人才招聘信息
async
recruitmentStatistics
()
{
const
_data
=
await
API_ORGAN
.
recruitmentStatistics
()
this
.
recruitment
=
_data
.
data
this
.
recruitment
.
ball1
=
{
data
:
[
_data
.
data
.
rmCompletionRate
||
'0.00'
],
name
:
'招聘完成率'
}
this
.
recruitment
.
ball2
=
{
data
:
[
_data
.
data
.
employmentRate
||
'0.00'
],
name
:
'录用率'
}
this
.
recruitment
.
ball3
=
{
data
:
[
_data
.
data
.
turnoverRate
||
'0.00'
],
name
:
'离职率'
}
},
querySearch
(
queryString
,
cb
)
{
querySearch
(
queryString
,
cb
)
{
// cb()
// cb()
},
},
...
@@ -198,41 +216,44 @@ export default {
...
@@ -198,41 +216,44 @@ export default {
setTimeout
(()
=>
{
setTimeout
(()
=>
{
if
(
!
item
)
{
if
(
!
item
)
{
this
.
dataList
=
{
this
.
dataList
=
{
parent
:
''
,
parent
Id
:
''
,
xAxis
:
[
'运营管理中心'
,
'解决方案中心'
,
'智能制造中心'
,
'生态合作中心'
,
'客户运营中心'
],
xAxis
:
[
'运营管理中心'
,
'解决方案中心'
,
'智能制造中心'
,
'生态合作中心'
,
'客户运营中心'
],
idxs
:
[
1
,
2
,
3
,
4
,
5
],
data
:
[
data
:
[
{
value
:
123.2
,
parent
:
''
,
isLeaf
:
false
},
{
id
:
1
,
value
:
123.2
,
parent
:
''
,
isLeaf
:
false
},
{
value
:
76.7
,
parent
:
''
,
isLeaf
:
false
},
{
id
:
2
,
value
:
76.7
,
parent
:
''
,
isLeaf
:
false
},
{
value
:
135.6
,
parent
:
''
,
isLeaf
:
false
},
{
id
:
3
,
value
:
135.6
,
parent
:
''
,
isLeaf
:
false
},
{
value
:
162.2
,
parent
:
''
,
isLeaf
:
false
},
{
id
:
4
,
value
:
162.2
,
parent
:
''
,
isLeaf
:
false
},
{
value
:
32.6
,
parent
:
''
,
isLeaf
:
false
}
{
id
:
5
,
value
:
32.6
,
parent
:
''
,
isLeaf
:
false
}
]
]
}
}
}
}
if
(
item
.
indexOf
(
'中心'
)
!==
-
1
)
{
if
(
item
.
indexOf
(
'中心'
)
!==
-
1
)
{
this
.
dataList
=
{
this
.
dataList
=
{
parent
:
'运营管理中心'
,
parent
Id
:
item
,
xAxis
:
[
'运营管理部门'
,
'解决方案部门'
,
'智能制造部门'
,
'生态合作部门'
,
'客户运营部门'
],
xAxis
:
[
'运营管理部门'
,
'解决方案部门'
,
'智能制造部门'
,
'生态合作部门'
,
'客户运营部门'
],
idxs
:
[
11
,
22
,
33
,
44
,
55
],
data
:
[
data
:
[
{
value
:
123.2
,
parent
:
'运营管理中心'
,
isLeaf
:
false
},
{
id
:
11
,
value
:
123.2
,
parent
:
'运营管理中心'
,
isLeaf
:
false
},
{
value
:
76.7
,
parent
:
'运营管理中心'
,
isLeaf
:
false
},
{
id
:
22
,
value
:
76.7
,
parent
:
'运营管理中心'
,
isLeaf
:
false
},
{
value
:
135.6
,
parent
:
'运营管理中心'
,
isLeaf
:
false
},
{
id
:
33
,
value
:
135.6
,
parent
:
'运营管理中心'
,
isLeaf
:
false
},
{
value
:
162.2
,
parent
:
'运营管理中心'
,
isLeaf
:
false
},
{
id
:
44
,
value
:
162.2
,
parent
:
'运营管理中心'
,
isLeaf
:
false
},
{
value
:
32.6
,
parent
:
'运营管理中心'
,
isLeaf
:
false
}
{
id
:
55
,
value
:
32.6
,
parent
:
'运营管理中心'
,
isLeaf
:
false
}
]
]
}
}
}
}
if
(
item
.
indexOf
(
'部门'
)
!==
-
1
)
{
if
(
item
.
indexOf
(
'部门'
)
!==
-
1
)
{
this
.
dataList
=
{
this
.
dataList
=
{
parent
:
'解决方案部门'
,
parent
Id
:
item
,
level
:
'people'
,
level
:
'people'
,
xAxis
:
[
'小小黄'
,
'小小安'
,
'小小圆'
,
'小小静'
,
'小小宝'
],
xAxis
:
[
'小小黄'
,
'小小安'
,
'小小圆'
,
'小小静'
,
'小小宝'
],
idxs
:
[
111
,
222
,
333
,
444
,
555
],
data
:
[
data
:
[
{
value
:
23.2
,
parent
:
'解决方案部门'
,
isLeaf
:
true
},
{
id
:
111
,
value
:
23.2
,
parent
:
'解决方案部门'
,
isLeaf
:
true
},
{
value
:
6.7
,
parent
:
'解决方案部门'
,
isLeaf
:
true
},
{
id
:
222
,
value
:
6.7
,
parent
:
'解决方案部门'
,
isLeaf
:
true
},
{
value
:
35.6
,
parent
:
'解决方案部门'
,
isLeaf
:
true
},
{
id
:
333
,
value
:
35.6
,
parent
:
'解决方案部门'
,
isLeaf
:
true
},
{
value
:
62.2
,
parent
:
'解决方案部门'
,
isLeaf
:
true
},
{
id
:
444
,
value
:
62.2
,
parent
:
'解决方案部门'
,
isLeaf
:
true
},
{
value
:
2.6
,
parent
:
'解决方案部门'
,
isLeaf
:
true
}
{
id
:
555
,
value
:
2.6
,
parent
:
'解决方案部门'
,
isLeaf
:
true
}
]
]
}
}
}
}
...
...
src/views/system/index/components/importantProject.vue
View file @
3e1e1eb3
...
@@ -6,13 +6,13 @@
...
@@ -6,13 +6,13 @@
<el-option
<el-option
v-for=
"(item,index) in industryOptions"
v-for=
"(item,index) in industryOptions"
:key=
"index"
:key=
"index"
:label=
"item
.customerAttribute
"
:label=
"item"
:value=
"item
.customerAttribute
"
>
:value=
"item"
>
</el-option>
</el-option>
</el-select>
</el-select>
<div
class=
"search d-flex"
>
<div
class=
"search d-flex"
>
<el-input
v-model=
"searchName"
placeholder=
"请输入内容"
clearable
></el-input>
<el-input
v-model=
"searchName"
placeholder=
"请输入内容"
clearable
></el-input>
<el-button
class=
"searchBtn"
@
click=
"get
MajorItems
"
>
查询
</el-button>
<el-button
class=
"searchBtn"
@
click=
"get
TypeData
"
>
查询
</el-button>
</div>
</div>
</div>
</div>
<div
class=
"content"
>
<div
class=
"content"
>
...
@@ -78,7 +78,7 @@ export default {
...
@@ -78,7 +78,7 @@ export default {
}
}
},
},
mounted
()
{
mounted
()
{
this
.
getIndustry
Data
()
this
.
getIndustry
List
()
this
.
getMajorItems
()
this
.
getMajorItems
()
this
.
productDemonstration
()
this
.
productDemonstration
()
},
},
...
@@ -88,8 +88,8 @@ export default {
...
@@ -88,8 +88,8 @@ export default {
this
.
productDemonstration
()
this
.
productDemonstration
()
},
},
// 获取下拉框数据
// 获取下拉框数据
async
getIndustry
Data
()
{
async
getIndustry
List
()
{
const
_data
=
await
API_BASIC
.
getIndustry
Data
()
const
_data
=
await
API_BASIC
.
getIndustry
List
()
this
.
industryOptions
=
_data
.
data
this
.
industryOptions
=
_data
.
data
},
},
// 查询概况页面数据
// 查询概况页面数据
...
@@ -124,7 +124,7 @@ export default {
...
@@ -124,7 +124,7 @@ export default {
// },
// },
// 案例展示 产品展示
// 案例展示 产品展示
productDemonstration
()
{
productDemonstration
()
{
API_BASIC
.
productDemonstration
({
industry
:
this
.
industry
||
null
}).
then
(
res
=>
{
API_BASIC
.
productDemonstration
({
industry
:
this
.
industry
||
null
,
name
:
this
.
searchName
||
null
}).
then
(
res
=>
{
if
(
res
.
status
===
200
)
{
if
(
res
.
status
===
200
)
{
this
.
caseList
=
res
.
data
this
.
caseList
=
res
.
data
}
}
...
...
src/views/system/index/components/knowledgeDialog.vue
View file @
3e1e1eb3
...
@@ -8,7 +8,7 @@
...
@@ -8,7 +8,7 @@
append-to-body
class=
"knowledgeDialog"
>
append-to-body
class=
"knowledgeDialog"
>
<div
class=
"leftBox"
>
<div
class=
"leftBox"
>
<!--
<div
id=
"topo"
></div>
-->
<!--
<div
id=
"topo"
></div>
-->
<graphChart
:message=
"mapData"
idstr=
"topo
"
></graphChart>
<graphChart
:message=
"mapData"
@
downData=
"downData"
idstr=
"topo"
style=
"height:58vh;
"
></graphChart>
</div>
</div>
<div
class=
"rightBox"
>
<div
class=
"rightBox"
>
<div
class=
"search-box"
>
<div
class=
"search-box"
>
...
@@ -17,7 +17,8 @@
...
@@ -17,7 +17,8 @@
v-for=
"item in options"
v-for=
"item in options"
:key=
"item.value"
:key=
"item.value"
:label=
"item.label"
:label=
"item.label"
:value=
"item.value"
>
:value=
"item.value"
placeholder=
"请选择类型"
>
</el-option>
</el-option>
</el-select>
</el-select>
<div
class=
"search"
>
<div
class=
"search"
>
...
@@ -75,7 +76,15 @@ export default {
...
@@ -75,7 +76,15 @@ export default {
label
:
'成员'
label
:
'成员'
}
}
],
],
visible
:
true
,
colorMap
:
{
'#30DDF4'
:
null
,
'#8419c7'
:
1
,
'#b9c719'
:
2
,
'#199fc7'
:
3
,
'#4f19c7'
:
4
,
'#69c719'
:
5
},
visible
:
false
,
state
:
''
,
state
:
''
,
mapData
:
{},
mapData
:
{},
knowledData
:
[],
knowledData
:
[],
...
@@ -96,6 +105,7 @@ export default {
...
@@ -96,6 +105,7 @@ export default {
methods
:
{
methods
:
{
topoDialog
(
data
,
value
,
state
)
{
topoDialog
(
data
,
value
,
state
)
{
const
vm
=
this
const
vm
=
this
vm
.
visible
=
true
vm
.
value
=
value
vm
.
value
=
value
vm
.
state
=
state
vm
.
state
=
state
if
(
data
)
{
if
(
data
)
{
...
@@ -105,6 +115,10 @@ export default {
...
@@ -105,6 +115,10 @@ export default {
},
},
// 根据name查id
// 根据name查id
querySearch
(
queryString
,
cb
)
{
querySearch
(
queryString
,
cb
)
{
if
(
!
this
.
value
)
{
this
.
$message
.
warning
(
'请选择节点类型'
)
return
false
}
API_KNOWLED
.
getByName
(
queryString
,
this
.
value
).
then
(
res
=>
{
API_KNOWLED
.
getByName
(
queryString
,
this
.
value
).
then
(
res
=>
{
this
.
knowledData
=
res
.
data
this
.
knowledData
=
res
.
data
for
(
var
i
=
0
;
i
<
this
.
knowledData
.
length
;
i
++
)
{
for
(
var
i
=
0
;
i
<
this
.
knowledData
.
length
;
i
++
)
{
...
@@ -124,20 +138,23 @@ export default {
...
@@ -124,20 +138,23 @@ export default {
})
})
},
},
handleSelectChild
(
item
)
{
handleSelectChild
(
item
)
{
API_KNOWLED
.
GetKnowledId
(
item
.
id
,
this
.
value
).
then
(
res
=>
{
API_KNOWLED
.
GetKnowledId
({
id
:
item
.
id
||
null
,
type
:
this
.
value
}).
then
(
res
=>
{
this
.
mapData
=
res
.
data
this
.
mapData
=
{
this
.
sourceData
=
JSON
.
parse
(
JSON
.
stringify
(
res
.
data
))
data
:
res
.
data
,
parentId
:
item
.
id
,
type
:
this
.
value
}
this
.
sourceData
=
JSON
.
parse
(
JSON
.
stringify
(
this
.
mapData
))
this
.
checked
=
[
1
,
2
,
3
,
4
,
5
]
this
.
checked
=
[
1
,
2
,
3
,
4
,
5
]
localStorage
.
setItem
(
'data'
,
JSON
.
stringify
(
res
.
d
ata
))
localStorage
.
setItem
(
'data'
,
JSON
.
stringify
(
this
.
mapD
ata
))
})
})
},
},
// 通过控制关系筛选来控制左侧图谱展示,默认展示1
// 通过控制关系筛选来控制左侧图谱展示,默认展示1
handleChange
()
{
handleChange
()
{
const
vm
=
this
const
vm
=
this
const
newNodes
=
[]
const
newNodes
=
[]
console
.
log
(
vm
.
sourceData
.
nodes
,
vm
.
checked
)
if
(
vm
.
sourceData
.
data
.
nodes
)
{
if
(
vm
.
sourceData
.
nodes
)
{
vm
.
sourceData
.
data
.
nodes
.
forEach
((
v
,
i
)
=>
{
vm
.
sourceData
.
nodes
.
forEach
((
v
,
i
)
=>
{
vm
.
checked
.
forEach
(
a
=>
{
vm
.
checked
.
forEach
(
a
=>
{
if
(
v
.
color
===
colorMap
.
get
(
a
))
{
if
(
v
.
color
===
colorMap
.
get
(
a
))
{
newNodes
.
push
(
v
)
newNodes
.
push
(
v
)
...
@@ -145,11 +162,19 @@ export default {
...
@@ -145,11 +162,19 @@ export default {
})
})
})
})
}
}
vm
.
mapData
.
nodes
=
newNodes
vm
.
mapData
.
data
.
nodes
=
newNodes
},
downData
(
item
)
{
this
.
value
=
item
.
color
if
(
item
.
color
.
toString
().
indexOf
(
'#'
)
>
-
1
)
{
this
.
value
=
this
.
colorMap
[
item
.
color
]
}
this
.
handleSelectChild
({
id
:
item
.
id
})
},
},
// 关闭
// 关闭
close
()
{
close
()
{
this
.
$store
.
commit
(
'd2admin/information/changeKnowledgeDialogShow'
,
false
)
this
.
visible
=
false
// this.$store.commit('d2admin/information/changeKnowledgeDialogShow', false)
}
}
}
}
}
}
...
...
src/views/system/index/components/knowledgeGraph.vue
View file @
3e1e1eb3
...
@@ -7,7 +7,8 @@
...
@@ -7,7 +7,8 @@
v-for=
"item in options"
v-for=
"item in options"
:key=
"item.value"
:key=
"item.value"
:label=
"item.label"
:label=
"item.label"
:value=
"item.value"
>
:value=
"item.value"
placeholder=
"请选择类型"
>
</el-option>
</el-option>
</el-select>
</el-select>
<div
class=
"search"
>
<div
class=
"search"
>
...
@@ -25,9 +26,10 @@
...
@@ -25,9 +26,10 @@
</div>
</div>
</div>
</div>
<graphChart
:message=
"mapData"
idstr=
"graphChart"
class=
"heightCut112"
></graphChart>
<graphChart
:message=
"mapData"
@
downData=
"downData"
idstr=
"graphChart"
class=
"heightCut112"
></graphChart>
<div
class=
"open"
@
click=
"openDialog"
></div>
<div
class=
"open"
@
click=
"openDialog"
></div>
<knowledgeDialog
v-if=
"knowledgeDialogShow"
ref=
"child"
></knowledgeDialog>
<!--
<knowledgeDialog
v-if=
"knowledgeDialogShow"
ref=
"child"
></knowledgeDialog>
-->
<knowledgeDialog
ref=
"child"
></knowledgeDialog>
</div>
</div>
</
template
>
</
template
>
...
@@ -46,7 +48,8 @@ export default {
...
@@ -46,7 +48,8 @@ export default {
label
:
'项目'
label
:
'项目'
},
{
},
{
value
:
2
,
value
:
2
,
label
:
'销售'
label
:
'销售'
,
color
:
'#8419c7'
},
{
},
{
value
:
3
,
value
:
3
,
label
:
'商机'
label
:
'商机'
...
@@ -58,8 +61,16 @@ export default {
...
@@ -58,8 +61,16 @@ export default {
label
:
'成员'
label
:
'成员'
}
}
],
],
value
:
4
,
colorMap
:
{
state
:
'中国银行保险监督管理委员会'
,
'#30DDF4'
:
null
,
'#8419c7'
:
1
,
'#b9c719'
:
2
,
'#199fc7'
:
3
,
'#4f19c7'
:
4
,
'#69c719'
:
5
},
value
:
null
,
state
:
''
,
knowledname
:
{},
knowledname
:
{},
knowledid
:
''
,
knowledid
:
''
,
knowledData
:
[],
knowledData
:
[],
...
@@ -73,11 +84,15 @@ export default {
...
@@ -73,11 +84,15 @@ export default {
}
}
},
},
mounted
()
{
mounted
()
{
this
.
handleSelect
({
id
:
'83449'
})
this
.
handleSelect
({
id
:
null
})
},
},
methods
:
{
methods
:
{
// 根据name查id
// 根据name查id
querySearch
(
queryString
,
cb
)
{
querySearch
(
queryString
,
cb
)
{
if
(
!
this
.
value
)
{
this
.
$message
.
warning
(
'请选择节点类型'
)
return
false
}
API_KNOWLED
.
getByName
(
queryString
,
this
.
value
).
then
(
res
=>
{
API_KNOWLED
.
getByName
(
queryString
,
this
.
value
).
then
(
res
=>
{
this
.
knowledData
=
res
.
data
this
.
knowledData
=
res
.
data
for
(
var
i
=
0
;
i
<
this
.
knowledData
.
length
;
i
++
)
{
for
(
var
i
=
0
;
i
<
this
.
knowledData
.
length
;
i
++
)
{
...
@@ -98,22 +113,27 @@ export default {
...
@@ -98,22 +113,27 @@ export default {
},
},
// 点击下拉列表搜索
// 点击下拉列表搜索
handleSelect
(
item
)
{
handleSelect
(
item
)
{
API_KNOWLED
.
GetKnowledId
(
item
.
id
,
this
.
value
).
then
(
res
=>
{
API_KNOWLED
.
GetKnowledId
({
id
:
item
.
id
||
null
,
type
:
this
.
value
}).
then
(
res
=>
{
this
.
mapData
=
res
.
data
this
.
mapData
=
{
localStorage
.
setItem
(
'data'
,
JSON
.
stringify
(
res
.
data
))
data
:
res
.
data
,
parentId
:
item
.
id
,
type
:
this
.
value
}
localStorage
.
setItem
(
'data'
,
JSON
.
stringify
(
this
.
mapData
))
})
})
},
},
openDialog
()
{
openDialog
()
{
let
data
=
''
const
data
=
JSON
.
parse
(
localStorage
.
getItem
(
'data'
))
if
(
this
.
state
)
{
// this.$store.commit('d2admin/information/changeKnowledgeDialogShow', true)
data
=
JSON
.
parse
(
localStorage
.
getItem
(
'data'
))
this
.
$refs
.
child
.
topoDialog
(
data
,
this
.
value
,
this
.
state
)
}
else
{
},
data
=
''
downData
(
item
)
{
this
.
value
=
item
.
color
if
(
item
.
color
.
toString
().
indexOf
(
'#'
)
>
-
1
)
{
this
.
value
=
this
.
colorMap
[
item
.
color
]
}
}
this
.
$store
.
commit
(
'd2admin/information/changeKnowledgeDialogShow'
,
true
)
console
.
log
(
'传来的值:'
,
this
.
value
,
item
.
id
)
setTimeout
(()
=>
{
this
.
handleSelect
({
id
:
item
.
id
})
this
.
$refs
.
child
.
topoDialog
(
data
,
this
.
value
,
this
.
state
)
},
500
)
}
}
},
},
watch
:
{
watch
:
{
...
...
store/index.js
View file @
3e1e1eb3
...
@@ -8,14 +8,14 @@ Vue.use(Vuex)
...
@@ -8,14 +8,14 @@ Vue.use(Vuex)
export
default
new
Vuex
.
Store
({
export
default
new
Vuex
.
Store
({
state
:
{
state
:
{
token
:
''
token
:
''
},
},
mutations
:
{
mutations
:
{
token
(
state
,
token
)
{
token
(
state
,
token
)
{
state
.
token
=
token
;
state
.
token
=
token
sessionStorage
.
token
=
token
sessionStorage
.
token
=
token
}
}
},
},
modules
:
{
modules
:
{
d2admin
d2admin
}
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment