Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
C
cloud-platform-ui
Project
Project
Details
Activity
Releases
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
youjj
cloud-platform-ui
Commits
f052b6e5
Commit
f052b6e5
authored
Apr 13, 2019
by
164003836@qq.con
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
车辆信息管理:增加字段
parent
f1754c72
Changes
5
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
561 additions
and
102 deletions
+561
-102
index.js
src/api/base_info/constant/index.js
+22
-1
baseInfo.js
src/store/modules/baseInfo.js
+3
-0
dateUtils.js
src/utils/dateUtils.js
+11
-0
rsCode.js
src/utils/rsCode.js
+5
-1
index.vue
src/views/vehicle/vehicleInfo/index.vue
+520
-100
No files found.
src/api/base_info/constant/index.js
View file @
f052b6e5
import
store
from
'../../../store'
;
import
rsCode
from
'../../../utils/rsCode'
;
import
{
VEHICLE_CONSTANT_VEHICLE_BRAND
,
VEHICLE_CONSTANT_VEHICLE_USE
,
VEHICLE_CONSTANT_BRAND_CODE_UNKOWN
,
INSURANCE_COMPANY
,
VEHICLE_CONSTANT_INSURANCE_COMPANY_UNKOWN
,
VEHICLE_CONSTANT_USE_TYPE_UNKOWN
,
VEHICLE_CONSTANT_STATUS_NORMAL
}
from
'../../../store/modules/baseInfo'
;
function
loadFromServer
(
type
)
{
...
...
@@ -70,7 +79,7 @@ export function getConstantListByType(type) {
return
null
;
}
let
constantMap
=
store
.
getters
.
vehicleConstants
(
type
);
if
(
JSON
.
stringify
(
constantMap
)
===
'{}'
)
{
if
(
constantMap
==
null
||
typeof
(
constantMap
)
==
"undefined"
)
{
let
constants
=
loadFromServer
(
type
);
if
(
!
constants
||
constants
.
length
===
0
)
{
return
null
;
...
...
@@ -87,3 +96,15 @@ export function getConstantListByType(type) {
}
return
constantMap
;
}
export
function
getInsuranceCompany
(
code
)
{
if
(
code
==
null
||
typeof
(
code
)
==
"undefined"
||
code
===
VEHICLE_CONSTANT_INSURANCE_COMPANY_UNKOWN
)
{
return
'未知'
;
}
return
getConstantByTypeAndCode
(
INSURANCE_COMPANY
,
code
).
val
;
}
export
function
getAllInsuranceCompany
()
{
return
getConstantListByType
(
INSURANCE_COMPANY
);
}
src/store/modules/baseInfo.js
View file @
f052b6e5
// 以下为车辆相关常量类型的编码
export
const
VEHICLE_CONSTANT_VEHICLE_BRAND
=
1
;
// "车辆品牌"
export
const
VEHICLE_CONSTANT_VEHICLE_USE
=
2
;
// "车辆用途"
export
const
INSURANCE_COMPANY
=
3
;
// "保险公司"
export
const
VEHICLE_CONSTANT_BRAND_CODE_UNKOWN
=
0
;
// 车辆品牌-未知
export
const
VEHICLE_CONSTANT_USE_TYPE_UNKOWN
=
0
;
// "车辆用途" - 未知
export
const
VEHICLE_CONSTANT_INSURANCE_COMPANY_UNKOWN
=
0
;
// "车辆用途" - 未知
export
const
VEHICLE_CONSTANT_STATUS_DISCARD
=
3
;
// 车辆状态 - 废弃
export
const
VEHICLE_CONSTANT_STATUS_NORMAL
=
1
;
// 车辆状态 - 废弃
...
...
src/utils/dateUtils.js
View file @
f052b6e5
...
...
@@ -24,3 +24,14 @@ export function newEast8Date() {
export
function
deepCopyDate
(
date
)
{
return
toEast8Date
(
formatDate
(
date
,
'yyyy-MM-dd'
));
}
export
function
convertDate2Str
(
object
)
{
let
ownPropertyNames
=
Object
.
getOwnPropertyNames
(
object
);
for
(
let
index
in
ownPropertyNames
)
{
let
key
=
ownPropertyNames
[
index
];
if
(
'[object Date]'
===
Object
.
prototype
.
toString
.
call
(
object
[
key
]))
{
object
[
key
]
=
formatDate
(
object
[
key
],
'yyyy-MM-dd hh:mm:ss'
);
}
}
}
src/utils/rsCode.js
View file @
f052b6e5
...
...
@@ -3,12 +3,16 @@ export default {
code
:
{
INVALID_REST_REQ_PARAM
:
100000
,
//rest请求参数非法
VEHICLE_BOOKED_INFO_ALREADY_CHANGED
:
101001
,
//车辆预定信息已被修改,请刷新后继续操作
VEHICLE_INFO_NUMBER_PLATE_EXIST
:
102001
,
//车牌已存在
VEHICLE_INFO_CODE_EXIST
:
102003
,
//车辆编码已存在
VEHICLE_BOOKED_RECORD_ALREADY_CHANGED
:
103001
,
//车辆预定申请状态已被修改,请刷新后继续操作
},
msg
:
{
1
:
'成功'
,
100000
:
"rest请求参数非法"
,
101001
:
"车辆预定信息已被修改,请刷新后继续操作"
,
103001
:
"车辆预定申请状态已被修改,请刷新后继续操作"
103001
:
"车辆预定申请状态已被修改,请刷新后继续操作"
,
102001
:
"车牌已存在"
,
102003
:
"车辆编码已存在"
}
}
src/views/vehicle/vehicleInfo/index.vue
View file @
f052b6e5
This diff is collapsed.
Click to expand it.
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