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
40ae291c
Commit
40ae291c
authored
Jun 27, 2019
by
lixy
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
车辆信息管理
parent
605672c3
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
55 additions
and
26 deletions
+55
-26
index.js
src/api/base_info/constant/index.js
+52
-23
main.js
src/main.js
+1
-1
index.vue
src/views/vehicle/vehicleInfo/index.vue
+2
-2
No files found.
src/api/base_info/constant/index.js
View file @
40ae291c
...
@@ -26,31 +26,60 @@ function loadFromServer(type) {
...
@@ -26,31 +26,60 @@ function loadFromServer(type) {
}
}
// url : baseURL+"",//路径
// url : baseURL+"",//路径
let
rs
=
[];
let
rs
=
[];
$
.
ajax
({
if
(
type
==
4
){
type
:
'get'
,
$
.
ajax
({
// url: process.env.BASE_API + '/vehicle/constant/type/' + type,
type
:
'get'
,
url
:
process
.
env
.
BASE_API
+
'/vehicle/area/findAll'
,
// url: process.env.BASE_API + '/vehicle/constant/type/' + type,
async
:
false
,
url
:
process
.
env
.
BASE_API
+
'/vehicle/area/findAll'
,
headers
:
{
async
:
false
,
Authorization
:
headerAuthorization
headers
:
{
},
Authorization
:
headerAuthorization
dataType
:
'json'
,
},
data
:
{},
dataType
:
'json'
,
success
:
function
(
result
)
{
data
:
{},
// 返回数据根据结果进行相应的处理
success
:
function
(
result
)
{
if
(
result
.
code
===
rsCode
.
RS_CODE_SUC
)
{
// 返回数据根据结果进行相应的处理
result
.
data
.
map
(
function
(
item
){
if
(
result
.
code
===
rsCode
.
RS_CODE_SUC
)
{
rs
.
push
(
item
);
result
.
data
.
map
(
function
(
item
){
})
rs
.
push
(
item
);
}
else
{
})
}
else
{
console
.
log
(
'请求常量信息出错。'
);
}
return
rs
;
},
error
:
function
()
{
console
.
log
(
'请求常量信息出错。'
);
console
.
log
(
'请求常量信息出错。'
);
}
}
return
rs
;
});
},
}
else
{
error
:
function
()
{
$
.
ajax
({
console
.
log
(
'请求常量信息出错。'
);
type
:
'get'
,
}
url
:
process
.
env
.
BASE_API
+
'/vehicle/constant/type/'
+
type
,
});
// url: process.env.BASE_API + '/vehicle/area/findAll',
async
:
false
,
headers
:
{
Authorization
:
headerAuthorization
},
dataType
:
'json'
,
data
:
{},
success
:
function
(
result
)
{
// 返回数据根据结果进行相应的处理
if
(
result
.
code
===
rsCode
.
RS_CODE_SUC
)
{
result
.
data
.
map
(
function
(
item
){
rs
.
push
(
item
);
})
}
else
{
console
.
log
(
'请求常量信息出错。'
);
}
return
rs
;
},
error
:
function
()
{
console
.
log
(
'请求常量信息出错。'
);
}
});
}
console
.
log
(
rs
);
console
.
log
(
rs
);
return
rs
;
return
rs
;
}
}
...
...
src/main.js
View file @
40ae291c
...
@@ -18,7 +18,7 @@ import Sticky from 'components/Sticky'; // 粘性header组件
...
@@ -18,7 +18,7 @@ import Sticky from 'components/Sticky'; // 粘性header组件
import
IconSvg
from
'components/Icon-svg'
;
// svg 组件
import
IconSvg
from
'components/Icon-svg'
;
// svg 组件
import
vueWaves
from
'./directive/waves'
;
// 水波纹指令
import
vueWaves
from
'./directive/waves'
;
// 水波纹指令
import
errLog
from
'store/errLog'
;
// error log组件
import
errLog
from
'store/errLog'
;
// error log组件
import
'./mock/index.js'
;
// 该项目所有请求使用mockjs模拟
//
import './mock/index.js'; // 该项目所有请求使用mockjs模拟
import
{
getToken
}
from
'utils/auth'
;
import
{
getToken
}
from
'utils/auth'
;
import
'babel-polyfill'
;
//支持IE执行原生script
import
'babel-polyfill'
;
//支持IE执行原生script
import
XEUtils
from
'xe-utils'
;
//加入常用工具类
import
XEUtils
from
'xe-utils'
;
//加入常用工具类
...
...
src/views/vehicle/vehicleInfo/index.vue
View file @
40ae291c
...
@@ -1742,7 +1742,7 @@
...
@@ -1742,7 +1742,7 @@
if
(
!
this
.
$utils
.
isInteger
(
code
)
||
code
==
VEHICLE_CONSTANT_BRAND_CODE_UNKOWN
)
{
if
(
!
this
.
$utils
.
isInteger
(
code
)
||
code
==
VEHICLE_CONSTANT_BRAND_CODE_UNKOWN
)
{
return
'未知'
;
return
'未知'
;
}
}
return
getConstantByTypeAndCode
(
VEHICLE_CONSTANT_VEHICLE_BRAND
,
code
).
val
;
return
getConstantByTypeAndCode
(
VEHICLE_CONSTANT_VEHICLE_BRAND
,
code
)?
getConstantByTypeAndCode
(
VEHICLE_CONSTANT_VEHICLE_BRAND
,
code
).
val
:
'品牌不存在'
;
},
},
getAllBranch
:
()
=>
{
getAllBranch
:
()
=>
{
return
getConstantListByType
(
VEHICLE_CONSTANT_VEHICLE_BRAND
);
return
getConstantListByType
(
VEHICLE_CONSTANT_VEHICLE_BRAND
);
...
@@ -1751,7 +1751,7 @@
...
@@ -1751,7 +1751,7 @@
if
(
!
this
.
$utils
.
isInteger
(
code
)
||
code
==
VEHICLE_CONSTANT_USE_TYPE_UNKOWN
)
{
if
(
!
this
.
$utils
.
isInteger
(
code
)
||
code
==
VEHICLE_CONSTANT_USE_TYPE_UNKOWN
)
{
return
'未知'
;
return
'未知'
;
}
}
return
getConstantByTypeAndCode
(
VEHICLE_CONSTANT_VEHICLE_USE
,
code
)
.
val
;
return
getConstantByTypeAndCode
(
VEHICLE_CONSTANT_VEHICLE_USE
,
code
)
?
getConstantByTypeAndCode
(
VEHICLE_CONSTANT_VEHICLE_USE
,
code
).
val
:
'用途未知'
;
},
},
getAllUseType
:
()
=>
{
getAllUseType
:
()
=>
{
return
getConstantListByType
(
VEHICLE_CONSTANT_VEHICLE_USE
);
return
getConstantListByType
(
VEHICLE_CONSTANT_VEHICLE_USE
);
...
...
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