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
0ab57171
Commit
0ab57171
authored
Jun 24, 2019
by
lixy
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
片区-车辆添加车型关联
parent
33fec714
Changes
13
Hide whitespace changes
Inline
Side-by-side
Showing
13 changed files
with
192 additions
and
40 deletions
+192
-40
index.js
src/api/base_info/constant/index.js
+26
-4
index.js
src/api/vehicle/vehicleInfo/index.js
+9
-0
vehicleType.js
src/api/vehicleType.js
+10
-0
index.vue
src/views/admin/user/index.vue
+6
-2
bannerSetting.vue
src/views/baseInfo/bannerSetting.vue
+1
-1
index.vue
src/views/baseInfo/branchCompany/index.vue
+53
-8
index.vue
src/views/baseInfo/stockCrowd/index.vue
+2
-2
index.vue
src/views/branchCompany/stock/index.vue
+9
-3
upkeepDialogVisible.vue
src/views/modal/upkeepDialogVisible.vue
+1
-1
departureModal.vue
src/views/tourManage/modal/departureModal.vue
+1
-3
oneTourModal.vue
src/views/tourManage/modal/oneTourModal.vue
+3
-3
index.vue
src/views/vehicle/vehicleInfo/index.vue
+70
-12
oneType.vue
src/views/vehicleType/modal/oneType.vue
+1
-1
No files found.
src/api/base_info/constant/index.js
View file @
0ab57171
...
@@ -25,10 +25,11 @@ function loadFromServer(type) {
...
@@ -25,10 +25,11 @@ function loadFromServer(type) {
headerAuthorization
=
getToken
();
// 让每个请求携带token--['Authorization']为自定义key 请根据实际情况自行修改
headerAuthorization
=
getToken
();
// 让每个请求携带token--['Authorization']为自定义key 请根据实际情况自行修改
}
}
// url : baseURL+"",//路径
// url : baseURL+"",//路径
let
rs
;
let
rs
=
[]
;
$
.
ajax
({
$
.
ajax
({
type
:
'get'
,
type
:
'get'
,
url
:
process
.
env
.
BASE_API
+
'/vehicle/constant/type/'
+
type
,
// url: process.env.BASE_API + '/vehicle/constant/type/' + type,
url
:
process
.
env
.
BASE_API
+
'/vehicle/area/findAll'
,
async
:
false
,
async
:
false
,
headers
:
{
headers
:
{
Authorization
:
headerAuthorization
Authorization
:
headerAuthorization
...
@@ -38,15 +39,19 @@ function loadFromServer(type) {
...
@@ -38,15 +39,19 @@ function loadFromServer(type) {
success
:
function
(
result
)
{
success
:
function
(
result
)
{
// 返回数据根据结果进行相应的处理
// 返回数据根据结果进行相应的处理
if
(
result
.
code
===
rsCode
.
RS_CODE_SUC
)
{
if
(
result
.
code
===
rsCode
.
RS_CODE_SUC
)
{
rs
=
result
.
data
;
result
.
data
.
map
(
function
(
item
){
rs
.
push
(
item
);
})
}
else
{
}
else
{
console
.
log
(
'请求常量信息出错。'
);
console
.
log
(
'请求常量信息出错。'
);
}
}
return
rs
;
},
},
error
:
function
()
{
error
:
function
()
{
console
.
log
(
'请求常量信息出错。'
);
console
.
log
(
'请求常量信息出错。'
);
}
}
});
});
console
.
log
(
rs
);
return
rs
;
return
rs
;
}
}
...
@@ -108,6 +113,23 @@ export function getConstantListByType(type) {
...
@@ -108,6 +113,23 @@ export function getConstantListByType(type) {
return
constantMap
;
return
constantMap
;
}
}
export
function
getConstantListByTypeNew
(
type
)
{
if
(
!
type
)
{
console
.
error
(
'empty constant type'
);
return
null
;
}
let
constantMap
=
store
.
getters
.
vehicleConstants
(
type
);
if
(
constantMap
==
null
||
typeof
(
constantMap
)
==
"undefined"
)
{
let
constants
=
loadFromServer
(
type
);
if
(
!
constants
||
constants
.
length
===
0
)
{
return
null
;
}
constantMap
=
constants
;
}
return
constantMap
;
}
/** 保险公司 */
/** 保险公司 */
export
function
getInsuranceCompany
(
code
)
{
export
function
getInsuranceCompany
(
code
)
{
if
(
code
==
null
||
typeof
(
code
)
==
"undefined"
||
code
===
VEHICLE_CONSTANT_INSURANCE_COMPANY_UNKOWN
)
{
if
(
code
==
null
||
typeof
(
code
)
==
"undefined"
||
code
===
VEHICLE_CONSTANT_INSURANCE_COMPANY_UNKOWN
)
{
...
@@ -129,5 +151,5 @@ export function getZone(code) {
...
@@ -129,5 +151,5 @@ export function getZone(code) {
}
}
export
function
getAllZone
()
{
export
function
getAllZone
()
{
return
getConstantListByType
(
ZONE
);
return
getConstantListByType
New
(
ZONE
);
}
}
src/api/vehicle/vehicleInfo/index.js
View file @
0ab57171
...
@@ -53,3 +53,12 @@ export function getBookedInfo(vehicleId, yearMonth) {
...
@@ -53,3 +53,12 @@ export function getBookedInfo(vehicleId, yearMonth) {
method
:
'get'
method
:
'get'
});
});
}
}
/*
* 根据id获取片区下省份
* */
export
function
getSysRegionByIds
(
ids
)
{
return
fetch
({
url
:
'/vehicle/sysRegion/getSysRegionByIds/'
+
ids
,
method
:
'get'
});
}
src/api/vehicleType.js
View file @
0ab57171
...
@@ -60,6 +60,16 @@ export function deleteVehicleType(id) {
...
@@ -60,6 +60,16 @@ export function deleteVehicleType(id) {
method
:
'delete'
method
:
'delete'
});
});
}
}
/**
* 获取全部车型
* */
export
function
getAllVehicleList
()
{
return
fetch
({
url
:
'/vehicle/vehicleModel/findAll'
,
method
:
'get'
});
}
/**
/**
* 车型标签是否多选
* 车型标签是否多选
*/
*/
...
...
src/views/admin/user/index.vue
View file @
0ab57171
...
@@ -65,7 +65,7 @@
...
@@ -65,7 +65,7 @@
</el-form-item>
</el-form-item>
<el-form-item
label=
"所属片区"
prop=
"zoneId"
>
<el-form-item
label=
"所属片区"
prop=
"zoneId"
>
<el-select
class=
"filter-item"
v-model=
"form.zoneId"
placeholder=
"请选择"
>
<el-select
class=
"filter-item"
v-model=
"form.zoneId"
placeholder=
"请选择"
>
<el-option
v-for=
"
(val, key, index) in getAllZone()"
:key=
"val.code"
:label=
"val.val"
:value=
"val.code
"
>
</el-option>
<el-option
v-for=
"
val in getAllZoneList"
:key=
"val.id"
:label=
"val.name"
:value=
"val.id
"
>
</el-option>
</el-select>
</el-select>
</el-form-item>
</el-form-item>
<el-form-item
label=
"所属分公司"
prop=
"companyId"
>
<el-form-item
label=
"所属分公司"
prop=
"companyId"
>
...
@@ -255,7 +255,11 @@ export default {
...
@@ -255,7 +255,11 @@ export default {
computed
:
{
computed
:
{
...
mapGetters
([
...
mapGetters
([
'elements'
'elements'
])
]),
getAllZoneList
(){
this
.
allZoneArr
=
getAllZone
();
return
getAllZone
();
},
},
},
methods
:
{
methods
:
{
getAllZone
,
getAllZone
,
...
...
src/views/baseInfo/bannerSetting.vue
View file @
0ab57171
...
@@ -344,7 +344,7 @@
...
@@ -344,7 +344,7 @@
this
.
showLoadingBody
=
true
;
this
.
showLoadingBody
=
true
;
return
isJPG
&&
isLt2M
;
return
isJPG
&&
isLt2M
;
},
},
handleAvatarSuccess
(
res
,
file
)
{
debugger
handleAvatarSuccess
(
res
,
file
)
{
this
.
form
.
cover
=
res
.
data
;
this
.
form
.
cover
=
res
.
data
;
this
.
showLoadingBody
=
false
;
this
.
showLoadingBody
=
false
;
},
},
...
...
src/views/baseInfo/branchCompany/index.vue
View file @
0ab57171
...
@@ -113,19 +113,19 @@
...
@@ -113,19 +113,19 @@
</el-form-item>
</el-form-item>
<el-form-item
label=
"所属地区"
prop=
"zoneId"
>
<el-form-item
label=
"所属地区"
prop=
"zoneId"
>
<el-select
class=
"filter-item"
v-model=
"form.zoneId"
placeholder=
"请选择"
>
<el-select
class=
"filter-item"
v-model=
"form.zoneId"
placeholder=
"请选择"
@
change=
"getProvinceRegions"
>
<el-option
v-for=
"
(val, key, index) in getAllZone()"
:key=
"val.code"
:label=
"val.val"
:value=
"val.code
"
>
</el-option>
<el-option
v-for=
"
val in getAllZoneList"
:key=
"val.id"
:label=
"val.name"
:value=
"val.id
"
>
</el-option>
</el-select>
</el-select>
</el-form-item>
</el-form-item>
<el-form-item
label=
"省份"
prop=
"addrProvince"
>
<el-form-item
label=
"省份"
prop=
"addrProvince"
>
<el-select
v-model
.
number=
"form.addrProvince"
placeholder=
"请选择省份(直辖市)"
>
<el-select
v-model
.
number=
"form.addrProvince"
placeholder=
"请选择省份(直辖市)"
@
change=
"changeProvince"
>
<el-option
v-for=
"item in provinceRegions"
:key=
"item.id"
:label=
"item.name"
:value=
"item.id"
></el-option>
<el-option
v-for=
"item in provinceRegions"
:key=
"item.id"
:label=
"item.name"
:value=
"item.id"
></el-option>
</el-select>
</el-select>
</el-form-item>
</el-form-item>
<el-form-item
label=
"城市"
prop=
"addrCity"
>
<el-form-item
label=
"城市"
prop=
"addrCity"
>
<el-select
v-model
.
number=
"form.addrCity"
placeholder=
"请选择城市"
>
<el-select
v-model
.
number=
"form.addrCity"
placeholder=
"请选择城市"
@
change=
"changeCity"
>
<el-option
v-for=
"item in cityRegions"
:key=
"item.id"
:label=
"item.name"
:value=
"item.id"
></el-option>
<el-option
v-for=
"item in cityRegions"
:key=
"item.id"
:label=
"item.name"
:value=
"item.id"
></el-option>
</el-select>
</el-select>
</el-form-item>
</el-form-item>
...
@@ -179,6 +179,10 @@
...
@@ -179,6 +179,10 @@
putObj
putObj
}
from
'api/base_info/branch_company'
;
}
from
'api/base_info/branch_company'
;
import
{
getSysRegionByIds
}
from
'api/vehicle/vehicleInfo/'
;
import
{
import
{
getSonRegionByCodes
,
getSonRegionByCodes
,
getRegionByCodes
,
getRegionByCodes
,
...
@@ -211,6 +215,8 @@
...
@@ -211,6 +215,8 @@
leaderContactInfo
:
undefined
,
leaderContactInfo
:
undefined
,
updateTime
:
undefined
updateTime
:
undefined
},
},
allZoneArr
:[],
//全部片区
provinceRegions
:
[],
//片区下省份数据
rules
:
{
rules
:
{
latitude
:
[
latitude
:
[
{
{
...
@@ -366,9 +372,13 @@
...
@@ -366,9 +372,13 @@
'elements'
,
'elements'
,
'companyStatusAndCode'
'companyStatusAndCode'
]),
]),
provinceRegions
()
{
getAllZoneList
(){
return
getSonRegionByCodes
(
1
);
this
.
allZoneArr
=
getAllZone
();
return
getAllZone
();
},
},
// provinceRegions() {
// return getSonRegionByCodes(1);
// },
cityRegions
()
{
cityRegions
()
{
if
(
!
this
.
$utils
.
isInteger
(
this
.
form
.
addrProvince
))
{
if
(
!
this
.
$utils
.
isInteger
(
this
.
form
.
addrProvince
))
{
return
null
;
return
null
;
...
@@ -395,7 +405,42 @@
...
@@ -395,7 +405,42 @@
}
}
},
},
methods
:
{
methods
:
{
getAllZone
,
/**
* 根据片区获取省份数据
* */
getProvinceRegions
()
{
let
that
=
this
;
this
.
form
.
addrCity
=
undefined
;
this
.
form
.
addrProvince
=
undefined
;
this
.
form
.
addrTown
=
undefined
;
if
(
!
this
.
$utils
.
isInteger
(
this
.
form
.
zoneId
))
{
return
null
;
}
this
.
allZoneArr
.
map
(
function
(
item
){
if
(
item
.
id
==
that
.
form
.
zoneId
){
getSysRegionByIds
(
item
.
provinceIds
).
then
(
response
=>
{
let
listRs
=
undefined
;
if
(
!
that
.
$utils
.
isEmpty
(
response
.
data
))
{
listRs
=
response
.
data
;
}
that
.
provinceRegions
=
listRs
;
});
}
});
},
/**
* 改变省份,清空城市
* */
changeProvince
(){
this
.
form
.
addrCity
=
undefined
;
this
.
form
.
addrTown
=
undefined
;
},
/**
* 改变城市,清空城镇
* */
changeCity
(){
this
.
form
.
addrTown
=
undefined
;
},
getValue
(
e
){
getValue
(
e
){
this
.
listQuery
.
addrCity
=
undefined
;
this
.
listQuery
.
addrCity
=
undefined
;
},
},
...
@@ -527,7 +572,7 @@
...
@@ -527,7 +572,7 @@
});
});
},
},
choiceImg
(){
choiceImg
(){
this
.
$refs
.
filElem
.
dispatchEvent
(
new
MouseEvent
(
'click'
))
this
.
$refs
.
filElem
.
dispatchEvent
(
new
MouseEvent
(
'click'
))
},
},
getFile
(
event
){
getFile
(
event
){
let
formData
=
new
FormData
();
let
formData
=
new
FormData
();
...
...
src/views/baseInfo/stockCrowd/index.vue
View file @
0ab57171
...
@@ -350,7 +350,7 @@
...
@@ -350,7 +350,7 @@
let
allList
=
this
.
list
;
let
allList
=
this
.
list
;
this
.
nomore
=
false
;
this
.
nomore
=
false
;
this
.
nodata
=
false
;
this
.
nodata
=
false
;
this
.
send
=
!
0
;
debugger
this
.
send
=
!
0
;
stockSearchPage
(
this
.
listQuery
)
stockSearchPage
(
this
.
listQuery
)
.
then
(
res
=>
{
.
then
(
res
=>
{
if
(
res
.
code
==
1
)
{
if
(
res
.
code
==
1
)
{
...
@@ -408,7 +408,7 @@
...
@@ -408,7 +408,7 @@
this
.
nodata
=
true
;
this
.
nodata
=
true
;
}
}
}
}
this
.
send
=
!
1
;
debugger
this
.
send
=
!
1
;
});
});
},
},
}
}
...
...
src/views/branchCompany/stock/index.vue
View file @
0ab57171
...
@@ -84,7 +84,7 @@
...
@@ -84,7 +84,7 @@
<el-input
v-model
.
number=
"form.price"
placeholder=
"请输入股权单价"
></el-input>
<el-input
v-model
.
number=
"form.price"
placeholder=
"请输入股权单价"
></el-input>
</el-form-item>
</el-form-item>
<el-form-item
label=
"省份"
prop=
"addrProvince"
>
<el-form-item
label=
"省份"
prop=
"addrProvince"
>
<el-select
v-model
.
number=
"form.addrProvince"
placeholder=
"请选择省份(直辖市)"
>
<el-select
v-model
.
number=
"form.addrProvince"
placeholder=
"请选择省份(直辖市)"
@
change=
"changeProvince"
>
<el-option
v-for=
"item in provinceRegions"
:key=
"item.id"
:label=
"item.name"
:value=
"item.id"
></el-option>
<el-option
v-for=
"item in provinceRegions"
:key=
"item.id"
:label=
"item.name"
:value=
"item.id"
></el-option>
</el-select>
</el-select>
</el-form-item>
</el-form-item>
...
@@ -104,7 +104,7 @@
...
@@ -104,7 +104,7 @@
<el-form-item
label=
"公司图片"
prop=
"drivingLicensePath"
:style=
"{display:'block'}"
>
<el-form-item
label=
"公司图片"
prop=
"drivingLicensePath"
:style=
"{display:'block'}"
>
<el-upload
<el-upload
class=
"avatar-uploader"
class=
"avatar-uploader"
:action=
"BASE_API
+ '/vehicle/branchCompany/stock/upload/companyPic'"
:action=
"BASE_API+ '/vehicle/branchCompany/stock/upload/companyPic'"
:show-file-list=
"false"
:show-file-list=
"false"
:headers=
"getHeaderWithToken"
:headers=
"getHeaderWithToken"
:on-success=
"handleAvatarSuccess"
:on-success=
"handleAvatarSuccess"
...
@@ -275,6 +275,12 @@
...
@@ -275,6 +275,12 @@
}
}
},
},
methods
:
{
methods
:
{
/**
* 改变省份,清空城市
* */
changeProvince
(){
this
.
form
.
addrCity
=
undefined
;
},
getCompanyPicUrl
(
companyPic
)
{
getCompanyPicUrl
(
companyPic
)
{
return
process
.
env
.
BASE_API
+
return
process
.
env
.
BASE_API
+
'/vehicle/branchCompany/stock/download/companyPic?realFileRelPath='
+
encodeURI
(
companyPic
);
'/vehicle/branchCompany/stock/download/companyPic?realFileRelPath='
+
encodeURI
(
companyPic
);
...
@@ -424,7 +430,7 @@
...
@@ -424,7 +430,7 @@
this
.
getList
();
this
.
getList
();
},
},
choiceImg
(){
choiceImg
(){
this
.
$refs
.
filElem
.
dispatchEvent
(
new
MouseEvent
(
'click'
))
this
.
$refs
.
filElem
.
dispatchEvent
(
new
MouseEvent
(
'click'
))
},
},
getFile
(
event
){
getFile
(
event
){
let
formData
=
new
FormData
();
let
formData
=
new
FormData
();
...
...
src/views/modal/upkeepDialogVisible.vue
View file @
0ab57171
...
@@ -127,7 +127,7 @@
...
@@ -127,7 +127,7 @@
},
},
mounted
()
{
mounted
()
{
let
row
=
this
.
upkeepRow
;
let
row
=
this
.
upkeepRow
;
this
.
cleanUpkeepForm
();
debugger
this
.
cleanUpkeepForm
();
this
.
upkeepForm
.
branchCompanyId
=
row
.
subordinateBranch
;
this
.
upkeepForm
.
branchCompanyId
=
row
.
subordinateBranch
;
let
that
=
this
;
let
that
=
this
;
let
selectArry
=
[];
let
selectArry
=
[];
...
...
src/views/tourManage/modal/departureModal.vue
View file @
0ab57171
...
@@ -129,7 +129,7 @@
...
@@ -129,7 +129,7 @@
select
=
ii
;
select
=
ii
;
}
}
});
});
this
.
lists
.
map
(
function
(
iitem
){
debugger
this
.
lists
.
map
(
function
(
iitem
){
if
(
iitem
.
id
==
item
.
id
){
if
(
iitem
.
id
==
item
.
id
){
iitem
.
name
=
select
.
name
;
iitem
.
name
=
select
.
name
;
iitem
.
address
=
select
.
address
;
iitem
.
address
=
select
.
address
;
...
@@ -140,7 +140,6 @@
...
@@ -140,7 +140,6 @@
iitem
.
latitude
=
select
.
latitude
;
iitem
.
latitude
=
select
.
latitude
;
}
}
});
});
debugger
},
},
/**
/**
* 深拷贝
* 深拷贝
...
@@ -208,7 +207,6 @@
...
@@ -208,7 +207,6 @@
}
}
});
});
});
});
debugger
// this.lists.map(function)
// this.lists.map(function)
this
.
$emit
(
'departureEvent'
,
this
.
lists
);
this
.
$emit
(
'departureEvent'
,
this
.
lists
);
console
.
log
(
this
.
lists
)
console
.
log
(
this
.
lists
)
...
...
src/views/tourManage/modal/oneTourModal.vue
View file @
0ab57171
...
@@ -512,7 +512,7 @@
...
@@ -512,7 +512,7 @@
tagDTOS
.
push
({
tagId
:
item
.
id
});
tagDTOS
.
push
({
tagId
:
item
.
id
});
}
}
});
});
let
siteDTOS
=
[];
debugger
let
siteDTOS
=
[];
//出发地
//出发地
this
.
departureList
.
map
(
function
(
item
){
this
.
departureList
.
map
(
function
(
item
){
let
p
=
{
let
p
=
{
...
@@ -710,7 +710,7 @@
...
@@ -710,7 +710,7 @@
/**
/**
* 编辑一条途径地
* 编辑一条途径地
**/
**/
editPathway
(
item
){
debugger
editPathway
(
item
){
this
.
onePathObj
=
item
;
this
.
onePathObj
=
item
;
this
.
onePathObj
.
showTitle
=
"途径地编辑"
;
//弹框名称
this
.
onePathObj
.
showTitle
=
"途径地编辑"
;
//弹框名称
this
.
onePathObj
.
headTitle
=
"途径地名称"
;
this
.
onePathObj
.
headTitle
=
"途径地名称"
;
...
@@ -857,7 +857,7 @@
...
@@ -857,7 +857,7 @@
/**
/**
* 封面图上传
* 封面图上传
* **/
* **/
handleAvatarSuccess
(
res
,
file
){
debugger
handleAvatarSuccess
(
res
,
file
){
this
.
form
.
cover
=
res
.
data
;
this
.
form
.
cover
=
res
.
data
;
},
},
/**
/**
...
...
src/views/vehicle/vehicleInfo/index.vue
View file @
0ab57171
...
@@ -66,9 +66,9 @@
...
@@ -66,9 +66,9 @@
<el-row>
<el-row>
<el-col
:span=
"8"
>
<el-col
:span=
"8"
>
<el-form-item
label=
"所属地区"
prop=
"zoneId"
>
<el-form-item
label=
"所属地区"
prop=
"zoneId"
>
<el-select
class=
"filter-item"
v-model=
"listQuery.zoneId"
placeholder=
"请选择"
>
<el-select
class=
"filter-item"
v-model=
"listQuery.zoneId"
placeholder=
"请选择"
@
change=
"getProvinceRegions"
>
<el-option
:key=
"undefined"
label=
"无"
:value=
"undefined"
></el-option>
<el-option
:key=
"undefined"
label=
"无"
:value=
"undefined"
></el-option>
<el-option
v-for=
"
(val, key, index) in getAllZone()"
:key=
"val.code"
:label=
"val.val"
:value=
"val.code
"
>
</el-option>
<el-option
v-for=
"
val in getAllZoneList"
:key=
"val.id"
:label=
"val.name"
:value=
"val.id
"
>
</el-option>
</el-select>
</el-select>
</el-form-item>
</el-form-item>
<!--
<el-form-item
label=
"片区"
prop=
"addrCity"
>
-->
<!--
<el-form-item
label=
"片区"
prop=
"addrCity"
>
-->
...
@@ -80,7 +80,7 @@
...
@@ -80,7 +80,7 @@
</el-col>
</el-col>
<el-col
:span=
"8"
>
<el-col
:span=
"8"
>
<el-form-item
label=
"省份"
>
<el-form-item
label=
"省份"
>
<el-select
class=
"filter-item"
v-model=
"listQuery.addrProvince"
placeholder=
"请选择省份(直辖市)"
@
change=
'getValue'
>
<el-select
class=
"filter-item"
v-model=
"listQuery.addrProvince"
placeholder=
"请选择省份(直辖市)"
@
change=
'getValue'
>
<el-option
:key=
"undefined"
label=
"无"
:value=
"undefined"
></el-option>
<el-option
:key=
"undefined"
label=
"无"
:value=
"undefined"
></el-option>
<el-option
v-for=
"item in provinceRegions"
:key=
"item.id"
:label=
"item.name"
:value=
"item.id"
></el-option>
<el-option
v-for=
"item in provinceRegions"
:key=
"item.id"
:label=
"item.name"
:value=
"item.id"
></el-option>
</el-select>
</el-select>
...
@@ -499,6 +499,18 @@
...
@@ -499,6 +499,18 @@
</el-select>
</el-select>
</el-form-item>
</el-form-item>
</el-col>
</el-col>
<el-col
:span=
"12"
>
<el-form-item
label=
"车型"
>
<el-select
v-model=
"form.modelId"
filterable
placeholder=
"请选择"
>
<el-option
v-for=
"item in allVehicleList"
:key=
"item.id"
:label=
"item.name"
:value=
"item.id"
>
</el-option>
</el-select>
</el-form-item>
</el-col>
<!--<el-col :span="12">-->
<!--<el-col :span="12">-->
<!--<el-form-item label="收车时间" prop="receiveTime">-->
<!--<el-form-item label="收车时间" prop="receiveTime">-->
<!--<el-date-picker-->
<!--<el-date-picker-->
...
@@ -726,9 +738,14 @@
...
@@ -726,9 +738,14 @@
book
,
book
,
getBookedInfoIn2Month
,
getBookedInfoIn2Month
,
getBookedInfo
,
getBookedInfo
,
putObj
putObj
,
getSysRegionByIds
}
from
'api/vehicle/vehicleInfo/'
;
}
from
'api/vehicle/vehicleInfo/'
;
import
{
getAllVehicleList
}
from
'api/vehicleType'
;
import
{
import
{
getConstantByTypeAndCode
,
getConstantByTypeAndCode
,
getConstantListByType
,
getConstantListByType
,
...
@@ -792,10 +809,12 @@
...
@@ -792,10 +809,12 @@
import
{
import
{
getAllZone
getAllZone
}
from
'api/base_info/constant/'
;
}
from
'api/base_info/constant/'
;
import
ElFormItem
from
"../../../../node_modules/element-ui/packages/form/src/form-item.vue"
;
export
default
{
export
default
{
name
:
'vehicleInfo'
,
name
:
'vehicleInfo'
,
components
:
{
components
:
{
ElFormItem
,
ElCol
,
ElCol
,
ElRow
,
ElRow
,
Element1
,
Element1
,
...
@@ -811,8 +830,10 @@
...
@@ -811,8 +830,10 @@
dialogForm4LicenceVisible
:
false
,
dialogForm4LicenceVisible
:
false
,
licenceSrcUrl
:
undefined
,
licenceSrcUrl
:
undefined
,
showLoadingBody
:
false
,
showLoadingBody
:
false
,
allVehicleList
:
[],
//全部车型
form
:
{
form
:
{
state2
:
''
,
state2
:
''
,
modelId
:
undefined
,
//车型id
status
:
undefined
,
status
:
undefined
,
code
:
undefined
,
code
:
undefined
,
numberPlate
:
undefined
,
numberPlate
:
undefined
,
...
@@ -1091,11 +1112,14 @@
...
@@ -1091,11 +1112,14 @@
arrivalBranchCompanyName
:
''
arrivalBranchCompanyName
:
''
},
},
upkeepDialogVisible
:
false
,
upkeepDialogVisible
:
false
,
allUpkeepItems
:
null
allUpkeepItems
:
null
,
allZoneArr
:[],
//全部片区
provinceRegions
:
[],
//片区下省份数据
}
}
},
},
created
()
{
created
()
{
this
.
getList
();
this
.
getList
();
this
.
getAllVehicleType
();
//获取全部车型
getAll
()
getAll
()
.
then
(
response
=>
{
.
then
(
response
=>
{
this
.
allCompaniesArr
=
response
.
data
;
this
.
allCompaniesArr
=
response
.
data
;
...
@@ -1116,9 +1140,6 @@
...
@@ -1116,9 +1140,6 @@
'belong2Type'
,
'belong2Type'
,
'vehicleStatus'
'vehicleStatus'
]),
]),
provinceRegions
()
{
return
getSonRegionByCodes
(
1
);
},
cityRegions
()
{
cityRegions
()
{
if
(
!
this
.
$utils
.
isInteger
(
this
.
form
.
addrProvince
))
{
if
(
!
this
.
$utils
.
isInteger
(
this
.
form
.
addrProvince
))
{
return
null
;
return
null
;
...
@@ -1137,6 +1158,10 @@
...
@@ -1137,6 +1158,10 @@
}
}
return
getSonRegionByCodes
(
this
.
listQuery
.
addrProvince
);
return
getSonRegionByCodes
(
this
.
listQuery
.
addrProvince
);
},
},
getAllZoneList
(){
this
.
allZoneArr
=
getAllZone
();
return
getAllZone
();
},
townRegions4Query
()
{
townRegions4Query
()
{
if
(
!
this
.
$utils
.
isInteger
(
this
.
listQuery
.
addrCity
))
{
if
(
!
this
.
$utils
.
isInteger
(
this
.
listQuery
.
addrCity
))
{
return
null
;
return
null
;
...
@@ -1244,10 +1269,43 @@
...
@@ -1244,10 +1269,43 @@
}
}
},
},
methods
:
{
methods
:
{
getAllZone
,
/**
* 根据片区获取省份数据
* */
getProvinceRegions
()
{
let
that
=
this
;
this
.
listQuery
.
addrCity
=
undefined
;
this
.
listQuery
.
addrProvince
=
undefined
;
if
(
!
this
.
$utils
.
isInteger
(
this
.
listQuery
.
zoneId
))
{
return
null
;
}
this
.
allZoneArr
.
map
(
function
(
item
){
if
(
item
.
id
==
that
.
listQuery
.
zoneId
){
getSysRegionByIds
(
item
.
provinceIds
).
then
(
response
=>
{
let
listRs
=
undefined
;
if
(
!
that
.
$utils
.
isEmpty
(
response
.
data
))
{
listRs
=
response
.
data
;
}
that
.
provinceRegions
=
listRs
;
});
}
});
},
getValue
(
e
){
getValue
(
e
){
this
.
listQuery
.
addrCity
=
undefined
;
this
.
listQuery
.
addrCity
=
undefined
;
},
},
/**
* 获取全部车型
* */
getAllVehicleType
()
{
getAllVehicleList
().
then
(
response
=>
{
let
listRs
=
undefined
;
if
(
!
this
.
$utils
.
isEmpty
(
response
.
data
))
{
listRs
=
response
.
data
;
}
this
.
allVehicleList
=
listRs
;
});
},
/**
/**
* 刷新
* 刷新
* */
* */
...
@@ -1667,7 +1725,7 @@
...
@@ -1667,7 +1725,7 @@
getAllVehicleStatus
:
function
()
{
getAllVehicleStatus
:
function
()
{
return
this
.
vehicleStatus
;
return
this
.
vehicleStatus
;
},
},
getBrand
:
function
(
code
)
{
debugger
getBrand
:
function
(
code
)
{
if
(
!
this
.
$utils
.
isInteger
(
code
)
||
code
==
VEHICLE_CONSTANT_BRAND_CODE_UNKOWN
)
{
if
(
!
this
.
$utils
.
isInteger
(
code
)
||
code
==
VEHICLE_CONSTANT_BRAND_CODE_UNKOWN
)
{
return
'未知'
;
return
'未知'
;
}
}
...
@@ -1751,9 +1809,8 @@
...
@@ -1751,9 +1809,8 @@
this
.
$utils
.
objectEach
(
response
.
data
,
(
item
,
key
)
=>
{
this
.
$utils
.
objectEach
(
response
.
data
,
(
item
,
key
)
=>
{
this
.
form
[
key
]
=
item
;
this
.
form
[
key
]
=
item
;
});
});
selectArry
.
map
(
function
(
iitem
)
{
selectArry
.
map
(
function
(
iitem
)
{
if
(
that
.
form
[
"
parkBranchCompanyId
"
]
==
iitem
.
id
){
if
(
that
.
form
[
"
subordinateBranch
"
]
==
iitem
.
id
){
that
.
form
.
state2
=
iitem
.
name
;
that
.
form
.
state2
=
iitem
.
name
;
that
.
form
.
subordinateBranch
=
iitem
.
id
;
that
.
form
.
subordinateBranch
=
iitem
.
id
;
}
}
...
@@ -1932,6 +1989,7 @@
...
@@ -1932,6 +1989,7 @@
status
:
undefined
,
status
:
undefined
,
code
:
undefined
,
code
:
undefined
,
state2
:
undefined
,
state2
:
undefined
,
modelId
:
undefined
,
//车型id
numberPlate
:
undefined
,
numberPlate
:
undefined
,
brand
:
undefined
,
brand
:
undefined
,
subordinateBranch
:
undefined
,
subordinateBranch
:
undefined
,
...
...
src/views/vehicleType/modal/oneType.vue
View file @
0ab57171
...
@@ -524,7 +524,7 @@
...
@@ -524,7 +524,7 @@
i
.
children
.
map
(
function
(
ic
)
{
i
.
children
.
map
(
function
(
ic
)
{
if
(
ic
.
id
==
that
.
childName
){
if
(
ic
.
id
==
that
.
childName
){
i
.
selectChild
=
ic
.
name
;
i
.
selectChild
=
ic
.
name
;
let
a
=
[];
debugger
let
a
=
[];
i
.
childNameLists
[
0
]
=
that
.
childName
;
i
.
childNameLists
[
0
]
=
that
.
childName
;
}
}
})
})
...
...
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