Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
C
cdsf-static-bg
Project
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
姜雷
cdsf-static-bg
Commits
cdfb2018
Commit
cdfb2018
authored
Sep 21, 2018
by
姜雷
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
添加用车管理页面
parent
21b27075
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
12 changed files
with
345 additions
and
11 deletions
+345
-11
publicCar.js
src/api/management/publicCar.js
+15
-0
user.js
src/api/management/user.js
+23
-2
login.js
src/api/user/login.js
+2
-2
index.js
src/config/index.js
+11
-0
mutation-types.js
src/containers/management/publicCar/mutation-types.js
+1
-0
publicCar.js
src/containers/management/publicCar/publicCar.js
+38
-0
publicCar.vue
src/containers/management/publicCar/publicCar.vue
+227
-1
store.js
src/containers/management/publicCar/store.js
+18
-0
store.js
src/containers/management/user/store.js
+3
-1
user.js
src/containers/management/user/user.js
+2
-2
user.vue
src/containers/management/user/user.vue
+0
-0
account.vue
src/containers/system/account/account.vue
+5
-3
No files found.
src/api/management/publicCar.js
0 → 100644
View file @
cdfb2018
import
fetch
from
'@/api/fetch'
;
export
const
fetchApplyList
=
entity
=>
fetch
({
url
:
'/publicCar/teacherAppoCar4Page'
,
method
:
'post'
,
data
:
entity
,
});
export
const
dealApply
=
entity
=>
fetch
({
url
:
'/publicCar/teacherAppoCar4Deal'
,
method
:
'post'
,
data
:
entity
,
});
src/api/management/user.js
View file @
cdfb2018
import
fetch
from
'@/api/fetch'
;
export
const
fetch
Us
erList
=
entity
=>
export
const
fetch
Teach
erList
=
entity
=>
fetch
({
url
:
'/admin/admin4Page'
,
url
:
'/teacher/teacher4Page'
,
method
:
'post'
,
data
:
entity
,
});
export
const
addTeacher
=
entity
=>
fetch
({
url
:
'/teacher/teacher4Add'
,
method
:
'post'
,
data
:
entity
,
});
export
const
updateTeacher
=
entity
=>
fetch
({
url
:
'/teacher/teacher4Update'
,
method
:
'post'
,
data
:
entity
,
});
export
const
toggleTeacherStatus
=
entity
=>
fetch
({
url
:
'/teacher/teacher4Auther'
,
method
:
'post'
,
data
:
entity
,
});
src/api/user/login.js
View file @
cdfb2018
...
...
@@ -10,8 +10,8 @@ export const login = entity =>
// 登出
export
const
logout
=
()
=>
fetch
({
method
:
'pos
t'
,
data
:
{}
,
url
:
'/login/manager/appLoginOu
t'
,
method
:
'get'
,
});
// 修改密码
export
const
changePwd
=
entity
=>
...
...
src/config/index.js
View file @
cdfb2018
...
...
@@ -14,7 +14,18 @@ export const accountStatusOptions = [
value
:
1
,
},
];
export
const
sexOptions
=
[
{
label
:
'男'
,
value
:
1
,
},
{
label
:
'女'
,
value
:
2
,
},
];
export
default
{
...
constants
,
accountStatusOptions
,
sexOptions
,
};
src/containers/management/publicCar/mutation-types.js
0 → 100644
View file @
cdfb2018
export
const
GET_PUBLIC_CAR_LIST
=
'GET_PUBLIC_CAR_LIST'
;
src/containers/management/publicCar/publicCar.js
0 → 100644
View file @
cdfb2018
import
pagination
from
'../../../store/modules/pagination'
;
import
{
fetchApplyList
}
from
'@/api/management/publicCar'
;
import
{
GET_PUBLIC_CAR_LIST
}
from
'./mutation-types'
;
const
state
=
{
list
:
[],
};
const
getters
=
{
list
:
state
=>
state
.
list
,
};
const
actions
=
{
fetchList
({
dispatch
,
state
,
commit
},
entity
)
{
return
fetchApplyList
({
...
state
.
pagination
,
...
entity
,
}).
then
(
res
=>
{
const
{
list
,
...
pagination
}
=
res
.
data
;
dispatch
(
'updatePagination'
,
pagination
);
commit
(
GET_PUBLIC_CAR_LIST
,
list
);
});
},
};
const
mutations
=
{
[
GET_PUBLIC_CAR_LIST
](
state
,
list
)
{
state
.
list
=
list
;
},
};
export
default
{
namespaced
:
true
,
modules
:
{
pagination
,
},
state
,
getters
,
actions
,
mutations
,
};
src/containers/management/publicCar/publicCar.vue
View file @
cdfb2018
<
template
>
<div>
publicCar
</div>
<div
class=
"manage-publicCar main-wrap"
>
<el-form
class=
"search-bar"
>
<div
class=
"grid-content"
>
<el-input
v-model
.
trim=
"filters.name"
placeholder=
"请输入姓名"
clearable
></el-input>
</div>
<div
class=
"grid-content"
>
<el-input
v-model
.
trim=
"filters.department"
placeholder=
"请输入科室"
clearable
></el-input>
</div>
<div
class=
"grid-content"
>
<el-select
v-model=
"filters.dealResult"
filterable
clearable
placeholder=
"处理状态"
>
<el-option
v-for=
"item in dealResultOptions"
:key=
"item.id"
:label=
"item.label"
:value=
"item.value"
>
</el-option>
</el-select>
</div>
<div
class=
"grid-content"
>
<el-date-picker
v-model=
"filters.createDate"
type=
"datetime"
placeholder=
"请输入申请开始时间"
clearable
>
</el-date-picker>
</div>
<div
class=
"grid-content"
>
<el-date-picker
v-model=
"filters.endDate"
type=
"datetime"
placeholder=
"请输入用车结束时间"
clearable
>
</el-date-picker>
</div>
<el-button
type=
"primary"
icon=
"el-icon-search"
@
click=
"searchList"
>
搜索
</el-button>
</el-form>
<div
class=
"tabel-wrap"
>
<el-table
border
v-loading=
"loading"
:data=
"list"
style=
"width: 100%"
>
<el-table-column
type=
"index"
label=
"序号"
width=
"50"
>
</el-table-column>
<el-table-column
prop=
"name"
label=
"申请人"
min-width=
"80"
>
</el-table-column>
<el-table-column
prop=
"createDate"
:formatter=
"(c,r,val) => $formatDate(new Date(val),'yyyy-MM-dd')"
label=
"申请时间"
min-width=
"80"
>
</el-table-column>
<el-table-column
prop=
"department"
label=
"用车部门"
min-width=
"100"
>
</el-table-column>
<el-table-column
prop=
"categoryName"
label=
"用车类型"
min-width=
"100"
>
</el-table-column>
<el-table-column
prop=
"userCount"
label=
"用车人数"
min-width=
"80"
>
</el-table-column>
<el-table-column
prop=
"dealResult"
:formatter=
"getResultValue"
label=
"处理状态"
min-width=
"80"
>
</el-table-column>
<el-table-column
fixed=
"right"
label=
"操作"
min-width=
"130"
align=
"center"
>
<template
slot-scope=
"scope"
>
<template
v-if=
"scope.row.dealResult == 1"
>
<el-button
type=
"primary"
size=
"mini"
class=
"operationBtnWidth"
@
click=
"showEditDialog(1, scope)"
>
处理
</el-button>
</
template
>
<
template
v-else-if=
"scope.row.dealResult == 2"
>
<el-button
type=
"primary"
size=
"mini"
class=
"operationBtnWidth"
@
click=
"showEditDialog(0, scope)"
>
详情
</el-button>
<el-button
type=
"primary"
size=
"mini"
class=
"operationBtnWidth"
@
click=
"showEditDialog(0, scope)"
>
打印
</el-button>
</
template
>
<
template
v-else
>
<el-button
type=
"primary"
size=
"mini"
class=
"operationBtnWidth"
@
click=
"showEditDialog(0, scope)"
>
详情
</el-button>
</
template
>
</template>
</el-table-column>
</el-table>
<el-pagination
layout=
"prev, pager, next"
:current-page=
"pagination.pageNum"
:page-size=
"pagination.pageSize"
:total=
"pagination.total"
@
current-change=
"changePage"
>
</el-pagination>
</div>
<drag-dialog
:title=
"editType ? '处理' : '详情'"
:visible
.
sync=
"dialogEditVisible"
:before-close=
"resetEditDialog"
width=
"70%"
>
<el-form
class=
"editForm"
:disabled=
"loading"
>
<el-form-item
class=
"col-line-2"
label=
"用车部门"
label-width=
"100px"
>
<span>
{{selected.department}}
</span>
</el-form-item>
<el-form-item
class=
"col-line-2"
label=
"用车申请时间"
label-width=
"100px"
>
<span>
{{selected.createDate}}
</span>
</el-form-item>
<el-form-item
class=
"col-line-2"
label=
"申请人"
label-width=
"100px"
>
<span>
{{selected.name}}
</span>
</el-form-item>
<el-form-item
class=
"col-line-2"
label=
"用车人数"
label-width=
"100px"
>
<span>
{{selected.userCount}}
</span>
</el-form-item>
<el-form-item
label=
"用车类型"
label-width=
"100px"
>
<span>
{{selected.categoryName}}
</span>
</el-form-item>
<el-form-item
label=
"用车起止时间"
label-width=
"100px"
>
<span>
{{selected.beginDate}}
</span>
<span>
{{selected.endDate}}
</span>
</el-form-item>
<el-form-item
label=
"用车详细路线"
label-width=
"100px"
>
<span>
{{selected.lineDescription}}
</span>
</el-form-item>
<el-form-item
class=
"col-line-2"
label=
"派车人"
label-width=
"100px"
>
<span>
{{selected.dealName}}
</span>
</el-form-item>
<el-form-item
class=
"col-line-2"
label=
"派车车牌"
label-width=
"100px"
>
<span>
{{selected.carPlate}}
</span>
</el-form-item>
<el-form-item
class=
"col-line-3"
label=
"出车公里数"
label-width=
"100px"
>
<span>
{{selected.startKilometers}}
</span>
</el-form-item>
<el-form-item
class=
"col-line-3"
label=
"收车公里数"
label-width=
"100px"
>
<span>
{{selected.stopKilometers}}
</span>
</el-form-item>
<el-form-item
class=
"col-line-3"
label=
"实际公里数"
label-width=
"100px"
>
<span>
{{selected.trueKilometers}}
</span>
</el-form-item>
<el-form-item
label=
"资金来源"
label-width=
"100px"
>
<span>
{{selected.priceSource}}
</span>
</el-form-item>
<el-form-item
label=
"用车单价"
label-width=
"100px"
>
<span>
{{selected.price}}
</span>
<span>
{{selected.totalPrice}}
</span>
</el-form-item>
<el-form-item
label-width=
"100px"
>
<el-radio>
同意
</el-radio>
<el-radio>
不同意
</el-radio>
<span>
{{selected.dealOpinion}}
</span>
</el-form-item>
</el-form>
<div
v-if=
"editType"
slot=
"footer"
class=
"dialog-footer"
>
<el-button
@
click=
"resetEditDialog"
>
取 消
</el-button>
<el-button
type=
"primary"
@
click=
"dealApplyHandle"
>
确 定
</el-button>
</div>
<div
v-else
slot=
"footer"
class=
"dialog-footer"
>
<el-button
type=
"primary"
@
click=
"resetEditDialog"
>
确 定
</el-button>
</div>
</drag-dialog>
</div>
</template>
<
script
>
import
listMixin
from
'@/mixin/listPage.js'
;
import
{
mapGetters
,
mapActions
}
from
'vuex'
;
import
store
from
'./store.js'
;
import
{
dealApply
}
from
'@/api/management/publicCar.js'
;
export
default
{
beforeRouteEnter
(
to
,
from
,
next
)
{
store
.
install
();
next
();
},
mixins
:
[
listMixin
],
data
()
{
return
{
filters
:
{
name
:
''
,
department
:
''
,
dealResult
:
''
,
createDate
:
''
,
endDate
:
''
,
},
selected
:
{},
//1处理中 2已同意 3未同意
dealResultOptions
:
[
{
label
:
'处理中'
,
value
:
1
,
},
{
label
:
'已同意'
,
value
:
2
,
},
{
label
:
'未同意'
,
value
:
3
,
},
],
};
},
computed
:
{
...
mapGetters
(
'management/publicCar'
,
[
'list'
,
'pagination'
]),
},
methods
:
{
...
mapActions
(
'management/publicCar'
,
[
'fetchList'
]),
getResultValue
(
c
,
r
,
val
)
{
let
item
=
this
.
dealResultOptions
.
find
(
item
=>
item
.
value
==
val
);
return
item
?
item
.
label
:
val
;
},
initSelected
()
{
this
.
selected
=
{
userId
:
''
,
name
:
''
,
department
:
''
,
duty
:
''
,
title
:
''
,
sex
:
''
,
birthday
:
''
,
jobNumber
:
''
,
cellphone
:
''
,
};
},
showEditDialog
(
type
,
data
)
{
this
.
editType
=
type
;
if
(
type
)
{
this
.
selected
=
{
id
:
data
.
row
.
id
,
department
:
data
.
row
.
department
,
createDate
:
data
.
row
.
createDate
,
name
:
data
.
row
.
name
,
userCount
:
data
.
row
.
userCount
,
categoryName
:
data
.
row
.
categoryName
,
beginDate
:
data
.
row
.
beginDate
,
endDate
:
data
.
row
.
endDate
,
lineDescription
:
data
.
row
.
lineDescription
,
dealName
:
data
.
row
.
dealName
,
carPlate
:
data
.
row
.
carPlate
,
startKilometers
:
data
.
row
.
startKilometers
,
stopKilometers
:
data
.
row
.
stopKilometers
,
trueKilometers
:
data
.
row
.
trueKilometers
,
priceSource
:
data
.
row
.
priceSource
,
price
:
data
.
row
.
price
,
totalPrice
:
data
.
row
.
totalPrice
,
dealResult
:
data
.
row
.
dealResult
,
dealOpinion
:
data
.
row
.
dealOpinion
,
};
}
else
{
this
.
initSelected
();
}
this
.
dialogEditVisible
=
true
;
},
dealApplyHandle
()
{
dealApply
();
},
},
};
</
script
>
<
style
lang=
"scss"
>
.manage-publicCar
{
.editForm
{
display
:
flex
;
}
.col-line-2
{
width
:
45%
;
}
}
</
style
>
src/containers/management/publicCar/store.js
0 → 100644
View file @
cdfb2018
import
store
from
'@/store/index'
;
import
publicCar
from
'./publicCar'
;
export
default
{
install
()
{
if
(
!
store
.
state
.
management
)
{
store
.
registerModule
([
'management'
],
{
namespaced
:
true
,
});
}
if
(
!
store
.
state
.
management
.
publicCar
)
{
store
.
registerModule
([
'management'
,
'publicCar'
],
publicCar
);
}
},
uninstall
()
{
store
.
unregisterModule
([
'management'
,
'publicCar'
]);
},
};
src/containers/management/user/store.js
View file @
cdfb2018
...
...
@@ -8,7 +8,9 @@ export default {
namespaced
:
true
,
});
}
store
.
registerModule
([
'management'
,
'user'
],
user
);
if
(
!
store
.
state
.
management
.
user
)
{
store
.
registerModule
([
'management'
,
'user'
],
user
);
}
},
uninstall
()
{
store
.
unregisterModule
([
'management'
,
'user'
]);
...
...
src/containers/management/user/user.js
View file @
cdfb2018
import
pagination
from
'../../../store/modules/pagination'
;
import
{
fetch
Us
erList
}
from
'@/api/management/user'
;
import
{
fetch
Teach
erList
}
from
'@/api/management/user'
;
import
{
GET_USER_LIST
}
from
'./mutation-types'
;
const
state
=
{
...
...
@@ -10,7 +10,7 @@ const getters = {
};
const
actions
=
{
fetchUserList
({
dispatch
,
state
,
commit
},
entity
)
{
return
fetch
Us
erList
({
return
fetch
Teach
erList
({
...
state
.
pagination
,
...
entity
,
}).
then
(
res
=>
{
...
...
src/containers/management/user/user.vue
View file @
cdfb2018
This diff is collapsed.
Click to expand it.
src/containers/system/account/account.vue
View file @
cdfb2018
...
...
@@ -75,8 +75,7 @@
<el-input
:value=
"selected.cellphone"
@
change=
"updateCellphone"
type=
"number"
placeholder=
"请输入手机号"
clearable
></el-input>
</el-form-item>
<el-form-item
label=
"性别"
label-width=
"200px"
>
<el-radio
v-model=
"selected.sex"
:label=
"1"
>
男
</el-radio>
<el-radio
v-model=
"selected.sex"
:label=
"2"
>
女
</el-radio>
<el-radio
v-for=
"(sex, index) in sexOptions"
:key=
"index"
v-model=
"selected.sex"
:label=
"sex.value"
>
{{sex.label}}
</el-radio>
</el-form-item>
</el-form>
<div
slot=
"footer"
class=
"dialog-footer"
>
...
...
@@ -115,6 +114,7 @@ import {
fetchUserMenuList
,
updateUserAuthMenu
,
}
from
'@/api/system/account'
;
import
{
sexOptions
}
from
'@/config'
;
export
default
{
beforeRouteEnter
(
to
,
from
,
next
)
{
...
...
@@ -132,6 +132,7 @@ export default {
accountStatusOptions
:
accountStatusOptions
,
dialogAuthVisible
:
false
,
menuList
:
[],
sexOptions
:
sexOptions
,
};
},
computed
:
{
...
...
@@ -154,7 +155,8 @@ export default {
};
},
getSexValue
(
c
,
r
,
val
)
{
return
val
==
1
?
'男'
:
'女'
;
let
item
=
this
.
sexOptions
.
find
(
item
=>
item
.
value
==
val
);
return
item
?
item
.
label
:
val
;
},
getStatusValue
(
c
,
r
,
val
)
{
let
item
=
this
.
accountStatusOptions
.
find
(
item
=>
item
.
value
==
val
);
...
...
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