Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
ZhangJianFrontEnd
Overview
Overview
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
vue-project
ZhangJian
ZhangJianFrontEnd
Commits
17f9f1c9
Commit
17f9f1c9
authored
Aug 10, 2021
by
yuanfeng
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
接口
parent
ed704ff7
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
65 additions
and
11 deletions
+65
-11
index.js
src/index.js
+1
-0
Left.vue
src/pages/index/Left.vue
+13
-4
index.vue
src/pages/index/index.vue
+48
-4
index.js
src/public/apis/index.js
+3
-3
No files found.
src/index.js
View file @
17f9f1c9
...
...
@@ -2,6 +2,7 @@ import Vue from 'vue'
import
VueRouter
from
'vue-router'
import
Vuex
from
'vuex'
import
App
from
'./App.vue'
import
'./public/apis'
import
createStore
from
'./store'
// Vuex
import
createRouter
from
'./router/router'
import
UsePlugin
from
'runner/common/plugins'
...
...
src/pages/index/Left.vue
View file @
17f9f1c9
...
...
@@ -131,6 +131,15 @@ export default {
}
},
props
:
{
leftData
:
{
type
:
Object
,
default
()
{
return
{}
}
}
},
data
()
{
return
{
// 男女学员数量
...
...
@@ -405,15 +414,15 @@ export default {
mounted
()
{
this
.
init
()
this
.
getAge
()
this
.
getEdu
()
this
.
getIndustry
()
this
.
changeDegree
(
'participate'
)
},
methods
:
{
init
()
{
this
.
dealGender
()
this
.
getAge
()
this
.
getEdu
()
this
.
getIndustry
()
this
.
changeDegree
(
'participate'
)
},
// 求性别百分比
dealGender
()
{
...
...
src/pages/index/index.vue
View file @
17f9f1c9
...
...
@@ -2,12 +2,14 @@
<div
class=
"index-page"
>
<layout
:layoutConf=
"layoutSize"
>
<page-head
title=
"张謇教育基地管理平台"
slot=
"header"
/>
<template
v-if=
"fetchSuccess"
>
<!-- left -->
<left
slot=
"left"
/>
<left
:leftData=
"leftData"
slot=
"left"
/>
<!-- center -->
<center
slot=
"center"
/>
<center
:centerData=
"centerData"
slot=
"center"
/>
<!-- right -->
<right
slot=
"right"
/>
<right
:rightData=
"rightData"
slot=
"right"
/>
</
template
>
</layout>
</div>
</template>
...
...
@@ -27,7 +29,15 @@ export default {
center
:
{
width
:
'100%'
}
}
},
// 接口获取是否成功标识
fetchSuccess
:
false
,
// 左侧数据
leftData
:
{},
// 中间数据
centerData
:
{},
// 右侧数据
rightData
:
{}
}
},
...
...
@@ -35,6 +45,40 @@ export default {
Left
,
Center
,
Right
},
mounted
()
{
this
.
init
()
},
methods
:
{
async
init
()
{
try
{
const
data
=
await
this
.
fetch
(
'managePlatform'
)
this
.
fetchSuccess
=
true
// 左侧数据
this
.
leftData
=
{
gender
:
data
.
p1
||
{},
// 男女比例
age
:
data
.
p2
||
{},
// 年龄结构
edu
:
data
.
p3
||
{},
// 学历情况
party
:
data
.
p4
||
{},
// 党派分布
ethnic
:
data
.
p5
||
{},
// 民族分布
industry
:
data
.
p6
||
{},
// 行业分布
participate
:
data
.
p7
||
{},
// 参与度
active
:
data
.
p8
||
{},
// 活跃度
studentDemeanor
:
data
.
p9
||
{},
// 学员风采
starClass
:
data
.
p10
||
{}
// 明星班级
}
// 中间数据
this
.
centerData
=
{
}
// 右侧数据
this
.
rightData
=
{
}
}
catch
(
err
)
{
console
.
log
(
'managePlatform >'
,
err
)
}
}
}
}
</
script
>
...
...
src/public/apis/index.js
View file @
17f9f1c9
...
...
@@ -4,12 +4,12 @@
;(
function
()
{
// 接口请求域名
window
.
domain
=
{
stg
:
''
,
// 测试环境域名
prd
:
''
// 生产环境域名
stg
:
'
http://192.168.0.121:9000/
'
,
// 测试环境域名
prd
:
'
http://192.168.0.121:9000/
'
// 生产环境域名
}
// 接口请求路径
window
.
apis
=
{
managePlatform
:
'api/page1info'
}
})()
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