Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
T
tsndu-web
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
魏吉光
tsndu-web
Commits
6d96045f
Commit
6d96045f
authored
Oct 22, 2020
by
weijiguang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
1
parent
9699ea47
Hide whitespace changes
Inline
Side-by-side
Showing
12 changed files
with
213 additions
and
88 deletions
+213
-88
public/index.html
+2
-2
src/App.vue
+2
-2
src/api/invoke_methods.js
+4
-0
src/api/request_methods.js
+5
-2
src/assets/logo.png
+0
-0
src/index.less
+6
-0
src/router/routers.js
+8
-28
src/view/home/index.js
+29
-0
src/view/home/index.vue
+86
-1
src/view/index/index.vue
+51
-41
src/view/main/index.js
+12
-3
src/view/main/index.vue
+8
-9
No files found.
public/index.html
View file @
6d96045f
...
...
@@ -5,11 +5,11 @@
<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 %>favicon.ico"
>
<title>
<
%=
htmlWebpackPlugin
.
options
.
title
%
>
</title>
<title>
TSU车辆管理系统
</title>
</head>
<body>
<noscript>
<strong>
We're sorry but
<
%=
htmlWebpackPlugin
.
options
.
title
%
>
doesn't work properly without JavaScript enabled. Please enable it to continue.
</strong>
<strong>
We're sorry but
iview-admin
doesn't work properly without JavaScript enabled. Please enable it to continue.
</strong>
</noscript>
<div
id=
"app"
></div>
<!-- built files will be auto injected -->
...
...
src/App.vue
View file @
6d96045f
<
template
>
<div
id=
"app"
>
<router-view/>
<div
id=
"app"
>
<router-view
/>
</div>
</
template
>
...
...
src/api/invoke_methods.js
View file @
6d96045f
...
...
@@ -54,12 +54,16 @@ import {
getContract
,
getDriver
,
getVehicle
,
getDashboardData
,
}
from
"./request_methods"
;
export
default
{
namespaced
:
true
,
state
:
{},
actions
:
{
asyncGetDashboardData
(
_
,
payload
)
{
return
getDashboardData
(
payload
)
},
asyncUploadFile
(
_
,
payload
)
{
return
uploadFile
(
payload
)
},
...
...
src/api/request_methods.js
View file @
6d96045f
...
...
@@ -120,4 +120,7 @@ export const getContract = data => axios.post(`${proxy}/contract/get/${data}`);
// 司机 / 根据id获取司机信息
export
const
getDriver
=
data
=>
axios
.
post
(
`
${
proxy
}
/driver/get/
${
data
}
`
);
// 车辆 / 根据id获取车辆信息
export
const
getVehicle
=
data
=>
axios
.
post
(
`
${
proxy
}
/vehicle/get/
${
data
}
`
);
\ No newline at end of file
export
const
getVehicle
=
data
=>
axios
.
post
(
`
${
proxy
}
/vehicle/get/
${
data
}
`
);
// 仪表盘 / 获取数据
export
const
getDashboardData
=
data
=>
axios
.
post
(
`
${
proxy
}
/analytics/dashboard`
);
\ No newline at end of file
src/assets/logo.png
0 → 100644
View file @
6d96045f
22.4 KB
src/index.less
View file @
6d96045f
@import "~iview/src/styles/index.less";
html,body,#app {
width: 100%;
height: 100%;
}
\ No newline at end of file
src/router/routers.js
View file @
6d96045f
...
...
@@ -11,7 +11,7 @@ export default [
{
path
:
'/main'
,
key
:
'main'
,
icon
:
'
logo-xbox
'
,
icon
:
'
md-home
'
,
title
:
'首页'
,
visable
:
false
,
component
:
()
=>
import
(
"@/view/main/index.vue"
)
...
...
@@ -19,7 +19,7 @@ export default [
{
path
:
'/home'
,
key
:
'home'
,
icon
:
'
logo-xbox
'
,
icon
:
'
ios-speedometer-outline
'
,
title
:
'首页'
,
visable
:
false
,
component
:
()
=>
import
(
"@/view/home/index.vue"
)
...
...
@@ -27,30 +27,20 @@ export default [
{
path
:
'/company'
,
key
:
'company'
,
icon
:
'
logo-xbox
'
,
icon
:
'
ios-globe-outline
'
,
title
:
'企业管理'
,
visable
:
false
,
children
:
[
{
path
:
'/company/companys'
,
key
:
'companys'
,
icon
:
'logo-xbox'
,
title
:
'企业列表'
,
visable
:
false
,
component
:
()
=>
import
(
"@/view/company/companys/index.vue"
)
},
// {
// path: '/company/add',
// key: 'add',
// icon: 'logo-xbox',
// title: '添加企业',
// visable: false,
// component: () => import("@/view/company/add/index.vue")
// },
{
path
:
'/company/info'
,
key
:
'info'
,
icon
:
'logo-xbox'
,
title
:
'企业信息'
,
visable
:
false
,
component
:
()
=>
import
(
"@/view/company/info/index.vue"
)
...
...
@@ -58,7 +48,6 @@ export default [
{
path
:
'/company/accounts'
,
key
:
'accounts'
,
icon
:
'logo-xbox'
,
title
:
'帐号列表'
,
visable
:
false
,
component
:
()
=>
import
(
"@/view/company/accounts/index.vue"
)
...
...
@@ -68,14 +57,13 @@ export default [
{
path
:
'/data'
,
key
:
'data'
,
icon
:
'
logo-xbox
'
,
icon
:
'
ios-folder-outline
'
,
title
:
'基础数据'
,
visable
:
false
,
children
:
[
{
path
:
'/data/source'
,
key
:
'source'
,
icon
:
'logo-xbox'
,
title
:
'车源管理'
,
visable
:
false
,
component
:
()
=>
import
(
"@/view/data/source/index.vue"
)
...
...
@@ -83,7 +71,6 @@ export default [
{
path
:
'/data/model'
,
key
:
'model'
,
icon
:
'logo-xbox'
,
title
:
'品牌型号'
,
visable
:
false
,
component
:
()
=>
import
(
"@/view/data/model/index.vue"
)
...
...
@@ -91,7 +78,6 @@ export default [
{
path
:
'/data/fee'
,
key
:
'fee'
,
icon
:
'logo-xbox'
,
title
:
'费用项'
,
visable
:
false
,
component
:
()
=>
import
(
"@/view/data/fee/index.vue"
)
...
...
@@ -101,14 +87,13 @@ export default [
{
path
:
'/vehicle'
,
key
:
'vehicle'
,
icon
:
'
logo-xbox
'
,
icon
:
'
ios-car-outline
'
,
title
:
'车辆管理'
,
visable
:
false
,
children
:
[
{
path
:
'/vehicle/list'
,
key
:
'vehicle_list'
,
icon
:
'logo-xbox'
,
title
:
'车辆查询'
,
visable
:
false
,
component
:
()
=>
import
(
"@/view/vehicle/list/index.vue"
)
...
...
@@ -118,14 +103,13 @@ export default [
{
path
:
'/source_contract'
,
key
:
'source_contract'
,
icon
:
'
logo-xbox
'
,
icon
:
'
ios-document-outline
'
,
title
:
'车源合同'
,
visable
:
false
,
children
:
[
{
path
:
'/source_contract/list'
,
key
:
'source_contract_list'
,
icon
:
'logo-xbox'
,
title
:
'合同查询'
,
visable
:
false
,
component
:
()
=>
import
(
"@/view/source_contract/list/index.vue"
)
...
...
@@ -135,14 +119,13 @@ export default [
{
path
:
'/driver'
,
key
:
'driver'
,
icon
:
'
logo-xbox
'
,
icon
:
'
ios-people-outline
'
,
title
:
'司机管理'
,
visable
:
false
,
children
:
[
{
path
:
'/driver/list'
,
key
:
'list'
,
icon
:
'logo-xbox'
,
title
:
'司机查询'
,
visable
:
false
,
component
:
()
=>
import
(
"@/view/driver/list/index.vue"
)
...
...
@@ -152,14 +135,13 @@ export default [
{
path
:
'/driver_contract'
,
key
:
'driver_contract'
,
icon
:
'
logo-xbox
'
,
icon
:
'
ios-document-outline
'
,
title
:
'司机合同'
,
visable
:
false
,
children
:
[
{
path
:
'/driver_contract/list'
,
key
:
'driver_contract_list'
,
icon
:
'logo-xbox'
,
title
:
'合同查询'
,
visable
:
false
,
component
:
()
=>
import
(
"@/view/driver_contract/list/index.vue"
)
...
...
@@ -167,7 +149,6 @@ export default [
{
path
:
'/driver_contract/receivables'
,
key
:
'driver_receivables'
,
icon
:
'logo-xbox'
,
title
:
'应收帐款'
,
visable
:
false
,
component
:
()
=>
import
(
"@/view/driver_contract/receivables/index.vue"
)
...
...
@@ -175,7 +156,6 @@ export default [
{
path
:
'/driver_contract/bill_logs'
,
key
:
'driver_bill_logs'
,
icon
:
'logo-xbox'
,
title
:
'帐款日志'
,
visable
:
false
,
component
:
()
=>
import
(
"@/view/driver_contract/bill_logs/index.vue"
)
...
...
src/view/home/index.js
0 → 100644
View file @
6d96045f
import
store
from
"@/store"
;
const
{
dispatch
}
=
store
;
export
default
{
components
:
{
},
data
()
{
return
{
loading
:
false
,
data
:
null
,
}
},
methods
:
{
getData
()
{
this
.
loading
=
true
;
dispatch
(
"invoke/asyncGetDashboardData"
,
null
).
then
(
response
=>
{
this
.
loading
=
false
;
this
.
setData
(
response
.
data
);
});
},
setData
(
data
)
{
this
.
data
=
data
;
}
},
mounted
()
{
this
.
getData
();
}
};
\ No newline at end of file
src/view/home/index.vue
View file @
6d96045f
<
template
>
<div>
home
<Row
:gutter=
"20"
style=
"margin-top:25px"
>
<Col
span=
"6"
>
<Card
title=
"本月帐款"
>
<Spin
size=
"small"
v-if=
"!data"
></Spin>
<div
v-else
>
应收:
{{
data
.
currentMonthPlanAmount
}}
</br>
已收:
{{
data
.
currentMonthActualAmount
}}
</div>
</Card>
</Col>
<Col
span=
"6"
>
<Card
title=
"今日帐款"
>
<Spin
size=
"small"
v-if=
"!data"
></Spin>
<div
v-else
>
应收:
{{
data
.
todayPlanAmount
}}
</br>
已收:
{{
data
.
todayActualAmount
}}
</div>
</Card>
</Col>
<Col
span=
"6"
>
<Card
title=
"司机数量"
>
<Spin
size=
"small"
v-if=
"!data"
></Spin>
<div
v-else
>
全部:
{{
data
.
allDriverCount
}}
</br>
签约中:
{{
data
.
signedDriverCount
}}
</div>
</Card>
</Col>
<Col
span=
"6"
>
<Card
title=
"车辆数量"
>
<Spin
size=
"small"
v-if=
"!data"
></Spin>
<div
v-else
>
全部:
{{
data
.
allVehicleCount
}}
</br>
签约中:
{{
data
.
signedVehicleCount
}}
</div>
</Card>
</Col>
</Row>
<Row
:gutter=
"20"
style=
"margin-top:25px"
>
<Col
span=
"8"
>
<Card
title=
"合同数量"
>
<Spin
size=
"small"
v-if=
"!data"
></Spin>
<div
v-else
>
全部:
{{
data
.
allContract
}}
</br>
签约中:
{{
data
.
validContract
}}
</div>
</Card>
</Col>
<Col
span=
"8"
>
<Card
title=
"月租"
>
<Spin
size=
"small"
v-if=
"!data"
></Spin>
<div
v-else
>
本月新租:
{{
data
.
currentMonthContract
}}
</br>
上月新租:
{{
data
.
lastMonthContract
}}
</div>
</Card>
</Col>
<Col
span=
"8"
>
<Card
title=
"日租"
>
<Spin
size=
"small"
v-if=
"!data"
></Spin>
<div
v-else
>
今日新租:
{{
data
.
todayContract
}}
</br>
昨日新租:
{{
data
.
yesterdayContract
}}
</div>
</Card>
</Col>
</Row>
<Row
:gutter=
"20"
style=
"margin-top:25px"
>
</Row>
</div>
</
template
>
<
script
src=
"./index.js"
></
script
>
<
style
>
.item_card
{
width
:
33%
;
}
</
style
>
\ No newline at end of file
src/view/index/index.vue
View file @
6d96045f
<
template
>
<div>
<div
class=
"Title"
></div>
<div
class=
"LoginCard"
>
<Card
:bordered=
"true"
>
<p
slot=
"title"
>
系统登录
</p>
<Form
ref=
"loginForm"
:model=
"loginForm"
:rules=
"loginRule"
>
<Row>
<Col
span=
"24"
>
<FormItem
prop=
"username"
>
<Input
type=
"text"
v-model=
"loginForm.username"
placeholder=
"帐号"
>
<Icon
type=
"ios-person-outline"
slot=
"prepend"
></Icon>
</Input>
</FormItem>
</Col>
</Row>
<Row>
<Col
span=
"24"
>
<FormItem
prop=
"password"
>
<Input
type=
"password"
v-model=
"loginForm.password"
placeholder=
"密码"
>
<Icon
type=
"ios-lock-outline"
slot=
"prepend"
></Icon>
</Input>
</FormItem>
</Col>
</Row>
<Row>
<Col
span=
"24"
>
<FormItem>
<Button
type=
"primary"
@
click=
"login('loginForm')"
style=
"width:100%;"
>
确认
</Button>
</FormItem>
</Col>
</Row>
</Form>
</Card>
</div>
</div>
<Layout
class=
"layout"
>
<Header
class=
"header"
>
TSU车辆管理系统
</Header>
<Content>
<Card
class=
"login_card"
:bordered=
"true"
>
<p
slot=
"title"
>
系统登录
</p>
<Form
ref=
"loginForm"
:model=
"loginForm"
:rules=
"loginRule"
>
<Row>
<Col
span=
"24"
>
<FormItem
prop=
"username"
>
<Input
type=
"text"
v-model=
"loginForm.username"
placeholder=
"帐号"
>
<Icon
type=
"ios-person-outline"
slot=
"prepend"
></Icon>
</Input>
</FormItem>
</Col>
</Row>
<Row>
<Col
span=
"24"
>
<FormItem
prop=
"password"
>
<Input
type=
"password"
v-model=
"loginForm.password"
placeholder=
"密码"
>
<Icon
type=
"ios-lock-outline"
slot=
"prepend"
></Icon>
</Input>
</FormItem>
</Col>
</Row>
<Row>
<Col
span=
"24"
>
<FormItem>
<Button
type=
"primary"
@
click=
"login('loginForm')"
style=
"width:100%;"
>
确认
</Button>
</FormItem>
</Col>
</Row>
</Form>
</Card>
</Content>
<Footer
class=
"footer"
>
Copyright © 2020 北京金数云科技有限公司 | 京ICP备16010358号-2
</Footer>
</Layout>
</
template
>
<
script
src=
"./index.js"
></
script
>
<
style
>
.Title
{
background-color
:
cadetblue
;
font-size
:
24px
;
.layout
{
width
:
100%
;
height
:
100%
;
}
.footer
{
text-align
:
center
;
/* color: #FFF; */
/* letter-spacing: 5px;
font-size: 22px; */
}
.header
{
text-align
:
center
;
padding
:
10px
;
color
:
black
;
color
:
#FFF
;
letter-spacing
:
5px
;
font-size
:
22px
;
}
.
LoginC
ard
{
.
login_c
ard
{
width
:
350px
;
margin
:
0
auto
;
margin-top
:
50px
;
...
...
src/view/main/index.js
View file @
6d96045f
...
...
@@ -69,11 +69,20 @@ export default {
onMenuSelect
(
name
)
{
var
router
=
this
.
getMenuFromRouter
(
name
);
this
.
currentView
=
router
.
component
;
if
(
router
.
maps
)
{
for
(
var
i
=
0
;
i
<
router
.
maps
.
length
;
i
++
){
if
(
router
.
maps
[
i
]
==
'首页'
)
{
this
.
maps
=
[];
return
;
}
}
}
this
.
maps
=
router
.
maps
;
}
},
mounted
()
{
this
.
setMenus
();
this
.
onMenuSelect
(
"home"
);
}
};
\ No newline at end of file
};
\ No newline at end of file
src/view/main/index.vue
View file @
6d96045f
...
...
@@ -3,11 +3,11 @@
<Layout>
<Header>
<Menu
mode=
"horizontal"
theme=
"dark"
active-name=
"1"
>
<div
class=
"layout-logo"
></div>
<div
class=
"layout-logo"
>
TSU车辆管理系统
</div>
<div
class=
"layout-nav"
>
<MenuItem
name=
"1"
><Icon
type=
"ios-navigate"
></Icon>
Item 1
</MenuItem>
<
!--
<
MenuItem
name=
"1"
><Icon
type=
"ios-navigate"
></Icon>
Item 1
</MenuItem>
<MenuItem
name=
"2"
><Icon
type=
"ios-navigate"
></Icon>
Item 2
</MenuItem>
<MenuItem
name=
"3"
><Icon
type=
"ios-navigate"
></Icon>
Item 3
</MenuItem>
<MenuItem
name=
"3"
><Icon
type=
"ios-navigate"
></Icon>
Item 3
</MenuItem>
-->
</div>
<div
class=
"layout-avatar"
>
<AvatarView></AvatarView>
...
...
@@ -15,7 +15,7 @@
</Menu>
</Header>
<Layout
style=
"position:absolute; top:64px; bottom:0px; left:0px; right:0px;"
>
<Sider
hide-trigger
:style=
"
{background: '#fff'}">
<Sider
hide-trigger
:style=
"
{background: '#fff'}"
width="250"
>
<Menu
theme=
"light"
width=
"auto"
:open-names=
"['1']"
ref=
"menu"
@
on-select=
"onMenuSelect"
accordion
>
<div
v-for=
'(item, index) in routers'
v-bind:key=
'index'
>
<div
v-if=
'item.visable && !item.children'
>
...
...
@@ -35,7 +35,7 @@
</Menu>
</Sider>
<Layout
:style=
"{padding: '0 24px 24px'}"
>
<Breadcrumb
:style=
"{margin: '24px 0'}"
>
<Breadcrumb
:style=
"{margin: '24px 0'}"
v-if=
"maps && maps.length>0"
>
<BreadcrumbItem
v-for=
"(item, index) in maps"
v-bind:key=
"index"
>
{{item}}
</BreadcrumbItem>
</Breadcrumb>
<component
:is=
"currentView"
></component>
...
...
@@ -55,13 +55,12 @@
height
:
100%
;
}
.layout-logo
{
width
:
100px
;
height
:
30
px
;
background
:
#990000
;
color
:
#FFF
;
letter-spacing
:
5
px
;
font-size
:
22px
;
border-radius
:
3px
;
float
:
left
;
position
:
relative
;
top
:
15px
;
}
.layout-nav
{
//
width
:
420px
;
...
...
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