Skip to content
Toggle navigation
Projects
Groups
Snippets
Help
micro-customization-system
/
micro-trialrun
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Settings
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit 2a37fe9d
authored
Aug 23, 2021
by
jack
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
修复bug
1 parent
0ff3d3ac
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
30 additions
and
24 deletions
src/views/vehicleManage/index.vue
src/views/vehicleManage/index.vue
View file @
2a37fe9
...
@@ -50,11 +50,11 @@
...
@@ -50,11 +50,11 @@
<basic-dialog
:title=
"filterDialogTitle"
:isVisible=
"filterVisible"
@
confirmDialog=
"filterConfirm"
@
closeDialog=
"closeFilter"
>
<basic-dialog
:title=
"filterDialogTitle"
:isVisible=
"filterVisible"
@
confirmDialog=
"filterConfirm"
@
closeDialog=
"closeFilter"
>
<slot>
<slot>
<div
v-loading=
"loading"
>
<div
v-loading=
"loading"
>
<el-input
placeholder=
"输入关键字进行过滤"
v-model=
"filterText"
size=
"small"
>
<el-input
placeholder=
"输入关键字进行过滤"
v-model=
"filterText"
size=
"small"
>
</el-input>
</el-input>
<el-tree
class=
"filter-tree"
:data=
"filterTextData"
:filter-node-method=
"filterNode"
highlight-current
ref=
"tree"
node-key=
"id"
check-on-click-node
>
<el-tree
class=
"filter-tree"
:data=
"filterTextData"
:filter-node-method=
"filterNode"
highlight-current
ref=
"tree"
node-key=
"id"
check-on-click-node
>
</el-tree>
</el-tree>
</div>
</div>
</slot>
</slot>
</basic-dialog>
</basic-dialog>
...
@@ -327,6 +327,7 @@ export default {
...
@@ -327,6 +327,7 @@ export default {
label
:
"车牌:"
,
label
:
"车牌:"
,
prop
:
"licensePlate"
,
prop
:
"licensePlate"
,
type
:
"input"
,
type
:
"input"
,
maxlength
:
9
,
clearable
:
true
,
clearable
:
true
,
},
},
{
label
:
"外色:"
,
prop
:
"color"
,
type
:
"input"
,
clearable
:
true
},
{
label
:
"外色:"
,
prop
:
"color"
,
type
:
"input"
,
clearable
:
true
},
...
@@ -386,7 +387,7 @@ export default {
...
@@ -386,7 +387,7 @@ export default {
// 新增车辆-车型数据
// 新增车辆-车型数据
vehicleList
:
[],
vehicleList
:
[],
loading
:
false
loading
:
false
,
};
};
},
},
watch
:
{
watch
:
{
...
@@ -426,10 +427,18 @@ export default {
...
@@ -426,10 +427,18 @@ export default {
this
.
vehicleVisible
=
!
this
.
vehicleVisible
;
this
.
vehicleVisible
=
!
this
.
vehicleVisible
;
this
.
isReadonly
=
false
;
this
.
isReadonly
=
false
;
if
(
this
.
vehicleVisible
)
{
if
(
this
.
vehicleVisible
)
{
let
_list
=
_
.
cloneDeep
(
this
.
vehicleData
);
let
_arr
=
[];
_list
.
map
((
k
)
=>
{
this
.
$set
(
k
,
"disabled"
,
false
);
if
(
k
.
prop
!=
"seriesId"
&&
k
.
prop
!=
"typeId"
)
{
_arr
.
push
(
k
);
}
});
this
.
vehicleTitle
=
"新增车辆"
;
this
.
vehicleTitle
=
"新增车辆"
;
this
.
vehicleHasOk
=
true
;
this
.
vehicleHasOk
=
true
;
this
.
vehicleForm
=
{};
this
.
vehicleForm
=
{};
this
.
vehicleData
=
_
.
cloneDeep
(
this
.
vehicleDefalutData
)
;
this
.
vehicleData
=
_
arr
;
}
}
if
(
this
.
$refs
.
vehicleRuleForm
)
if
(
this
.
$refs
.
vehicleRuleForm
)
this
.
$refs
.
vehicleRuleForm
.
$children
[
0
].
clearValidate
();
this
.
$refs
.
vehicleRuleForm
.
$children
[
0
].
clearValidate
();
...
@@ -438,19 +447,18 @@ export default {
...
@@ -438,19 +447,18 @@ export default {
this
.
vehicleVisible
=
!
this
.
vehicleVisible
;
this
.
vehicleVisible
=
!
this
.
vehicleVisible
;
this
.
isReadonly
=
false
;
this
.
isReadonly
=
false
;
if
(
this
.
vehicleVisible
)
{
if
(
this
.
vehicleVisible
)
{
let
_list
=
this
.
vehicleDefalutData
;
//
let _list = this.vehicleDefalutData;
this
.
vehicleTitle
=
"编辑车辆"
;
this
.
vehicleTitle
=
"编辑车辆"
;
this
.
vehicleHasOk
=
true
;
this
.
vehicleHasOk
=
true
;
infoVehicle
({
tempId
:
scope
.
tempId
}).
then
((
res
)
=>
{
infoVehicle
({
tempId
:
scope
.
tempId
}).
then
((
res
)
=>
{
const
{
code
,
data
}
=
res
;
const
{
code
,
data
}
=
res
;
if
(
code
==
200
)
{
if
(
code
==
200
)
{
//动态创建车系、车型选择框
//动态创建车系、车型选择框
let
_list
=
this
.
creatSelect
(
data
);
let
_list
=
this
.
creatSelect
(
data
);
_list
.
map
(
k
=>
{
_list
.
map
(
(
k
)
=>
{
this
.
$set
(
k
,
"disabled"
,
false
)
this
.
$set
(
k
,
"disabled"
,
false
);
})
})
;
this
.
vehicleData
=
_
.
cloneDeep
(
_list
);
this
.
vehicleData
=
_
.
cloneDeep
(
_list
);
this
.
vehicleArr
.
forEach
((
item
)
=>
{
this
.
vehicleArr
.
forEach
((
item
)
=>
{
...
@@ -471,12 +479,11 @@ export default {
...
@@ -471,12 +479,11 @@ export default {
infoVehicle
({
tempId
:
scope
.
tempId
}).
then
((
res
)
=>
{
infoVehicle
({
tempId
:
scope
.
tempId
}).
then
((
res
)
=>
{
const
{
code
,
data
}
=
res
;
const
{
code
,
data
}
=
res
;
if
(
code
==
200
)
{
if
(
code
==
200
)
{
//动态创建车系、车型选择框
//动态创建车系、车型选择框
let
_list
=
this
.
creatSelect
(
data
);
let
_list
=
this
.
creatSelect
(
data
);
_list
.
map
(
k
=>
{
_list
.
map
(
(
k
)
=>
{
this
.
$set
(
k
,
"disabled"
,
true
)
this
.
$set
(
k
,
"disabled"
,
true
);
})
})
;
this
.
vehicleData
=
_
.
cloneDeep
(
_list
);
this
.
vehicleData
=
_
.
cloneDeep
(
_list
);
this
.
vehicleArr
.
forEach
((
item
)
=>
{
this
.
vehicleArr
.
forEach
((
item
)
=>
{
...
@@ -750,20 +757,20 @@ export default {
...
@@ -750,20 +757,20 @@ export default {
},
},
// 监听切换车系
// 监听切换车系
changeCarModel
(
e
,
row
)
{
changeCarModel
(
e
,
row
)
{
console
.
log
(
row
)
console
.
log
(
row
)
;
let
list
=
this
.
vehicleDefalutData
;
let
list
=
this
.
vehicleDefalutData
;
let
m
=
row
.
options
;
let
m
=
row
.
options
;
let
o
=
{};
let
o
=
{};
// 找第三级
// 找第三级
let
nn
=
m
.
find
(
k
=>
{
let
nn
=
m
.
find
(
(
k
)
=>
{
let
_n
=
k
.
childs
.
find
(
j
=>
j
.
id
==
e
);
let
_n
=
k
.
childs
.
find
(
(
j
)
=>
j
.
id
==
e
);
if
(
_n
)
{
if
(
_n
)
{
o
=
_n
;
o
=
_n
;
}
}
return
_n
;
return
_n
;
})
})
;
let
idx
=
this
.
vehicleDefalutData
.
findIndex
((
k
)
=>
k
.
prop
==
"seriesId"
);
let
idx
=
this
.
vehicleDefalutData
.
findIndex
((
k
)
=>
k
.
prop
==
"seriesId"
);
let
i
=
list
.
findIndex
((
k
)
=>
k
.
prop
==
"typeId"
);
let
i
=
list
.
findIndex
((
k
)
=>
k
.
prop
==
"typeId"
);
...
@@ -804,13 +811,13 @@ export default {
...
@@ -804,13 +811,13 @@ export default {
// 车系
// 车系
if
(
n
)
{
if
(
n
)
{
m
=
(
n
.
childs
||
[]).
find
((
j
)
=>
j
.
id
==
data
.
subBrandId
);
m
=
(
n
.
childs
||
[]).
find
((
j
)
=>
j
.
id
==
data
.
subBrandId
);
}
}
console
.
log
(
m
);
console
.
log
(
m
);
if
(
m
)
{
if
(
m
)
{
km
=
(
m
.
childs
||
[]).
find
((
j
)
=>
j
.
id
==
data
.
seriesId
);
km
=
(
m
.
childs
||
[]).
find
((
j
)
=>
j
.
id
==
data
.
seriesId
);
}
}
let
_series
=
{
let
_series
=
{
...
@@ -854,7 +861,6 @@ export default {
...
@@ -854,7 +861,6 @@ export default {
return
_list
;
return
_list
;
},
},
},
},
};
};
</
script
>
</
script
>
\ No newline at end of file
\ No newline at end of file
Write
Preview
Markdown
is supported
Attach a file
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 post a comment