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
113a608c
Commit
113a608c
authored
Aug 26, 2019
by
lixy
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
车型排序
parent
635931cd
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
69 additions
and
1 deletion
+69
-1
index.vue
src/views/vehicleType/index.vue
+69
-1
No files found.
src/views/vehicleType/index.vue
View file @
113a608c
...
@@ -74,6 +74,12 @@
...
@@ -74,6 +74,12 @@
<span>
{{
scope
.
row
.
leasableQuantity
}}
</span>
<span>
{{
scope
.
row
.
leasableQuantity
}}
</span>
</
template
>
</
template
>
</el-table-column>
</el-table-column>
<el-table-column
width=
"100"
align=
"center"
label=
"排序"
>
<
template
scope=
"scope"
>
<el-button
size=
"mini"
type=
"text"
@
click=
"clickRank(scope.row)"
>
{{
scope
.
row
.
sort
?
scope
.
row
.
sort
:
0
}}
</el-button>
</
template
>
</el-table-column>
<el-table-column
align=
"center"
width=
"200"
label=
"操作"
fixed=
"right"
>
<el-table-column
align=
"center"
width=
"200"
label=
"操作"
fixed=
"right"
>
<
template
scope=
"scope"
>
<
template
scope=
"scope"
>
<el-button
size=
"small"
class=
"el-button el-button--text el-button--small"
@
click=
"handleUpdate(scope.row)"
>
{{
vehicleTypeList_btn_edit
?
'编辑'
:
'查看'
}}
<el-button
size=
"small"
class=
"el-button el-button--text el-button--small"
@
click=
"handleUpdate(scope.row)"
>
{{
vehicleTypeList_btn_edit
?
'编辑'
:
'查看'
}}
...
@@ -94,6 +100,24 @@
...
@@ -94,6 +100,24 @@
</div>
</div>
<!-- 车型编辑 -->
<!-- 车型编辑 -->
<oneType
v-if=
"oneTypeDialogVisible"
:oneRow=
"oneRow"
:vehicleTypeList_btn_edit=
"vehicleTypeList_btn_edit"
:title=
"modalTitle"
v-on:oneDialogEvent =
"oneDialogEvent"
:brandlist=
"brandlist"
:numberList=
"numberList"
></oneType>
<oneType
v-if=
"oneTypeDialogVisible"
:oneRow=
"oneRow"
:vehicleTypeList_btn_edit=
"vehicleTypeList_btn_edit"
:title=
"modalTitle"
v-on:oneDialogEvent =
"oneDialogEvent"
:brandlist=
"brandlist"
:numberList=
"numberList"
></oneType>
<!-- 排序 modal弹窗 -->
<el-dialog
:title=
"modalTitle"
:visible
.
sync=
"rankDialogVisible"
>
<el-form
:model=
"labelForm"
ref=
"labelForm"
label-width=
"90px"
>
<el-row>
<el-col
:span=
"8"
>
<el-form-item
label=
"排序"
prop=
"rank"
>
<el-input
v-model=
"labelForm.sort"
placeholder=
"请输入排序值"
></el-input>
</el-form-item>
</el-col>
</el-row>
</el-form>
<div
slot=
"footer"
class=
"dialog-footer"
>
<el-button
@
click=
"cancelHandel"
>
取 消
</el-button>
<el-button
type=
"primary"
@
click=
"updateParentLabelRank('labelForm')"
>
确 定
</el-button>
</div>
</el-dialog>
</div>
</div>
</template>
</template>
...
@@ -125,7 +149,8 @@
...
@@ -125,7 +149,8 @@
delVehicleModel
,
delVehicleModel
,
getLabelList
,
getLabelList
,
getLabelByParentId
,
getLabelByParentId
,
upStatusChange
upStatusChange
,
updateVehicleModel
}
from
'api/vehicleType'
;
}
from
'api/vehicleType'
;
import
Element1
from
"../admin/menu/components/element"
;
import
Element1
from
"../admin/menu/components/element"
;
...
@@ -172,12 +197,14 @@
...
@@ -172,12 +197,14 @@
update
:
'编辑'
,
update
:
'编辑'
,
create
:
'创建'
create
:
'创建'
},
},
labelForm
:{},
tableKey
:
0
,
tableKey
:
0
,
departureDialogVisible
:
false
,
departureDialogVisible
:
false
,
arrivalDialogVisible
:
false
,
arrivalDialogVisible
:
false
,
vehicleTypeList_btn_add
:
false
,
//添加
vehicleTypeList_btn_add
:
false
,
//添加
vehicleTypeList_btn_edit
:
false
,
//编辑
vehicleTypeList_btn_edit
:
false
,
//编辑
vehicleTypeList_btn_del
:
false
,
//删除
vehicleTypeList_btn_del
:
false
,
//删除
rankDialogVisible
:
false
//排序
}
}
},
},
created
()
{
created
()
{
...
@@ -260,6 +287,12 @@
...
@@ -260,6 +287,12 @@
});
});
})
})
},
},
/**
* 弹框-取消
* */
cancelHandel
(){
this
.
rankDialogVisible
=
false
;
},
/**
/**
* 编辑
* 编辑
* */
* */
...
@@ -268,6 +301,41 @@
...
@@ -268,6 +301,41 @@
this
.
oneRow
=
row
;
this
.
oneRow
=
row
;
this
.
oneTypeDialogVisible
=
true
;
this
.
oneTypeDialogVisible
=
true
;
},
},
/**
* 排序点击事件
* */
clickRank
(
row
){
this
.
modalTitle
=
"编辑"
;
this
.
labelForm
=
{
sort
:
row
.
sort
,
id
:
row
.
id
};
// this.labelForm.rank = this.labelForm.rank + "";
this
.
rankDialogVisible
=
true
;
},
/**
* 编辑一级标签排序
* */
updateParentLabelRank
(
formName
){
const
set
=
this
.
$refs
;
let
params
=
{
id
:
this
.
labelForm
.
id
,
sort
:
this
.
labelForm
.
sort
};
updateVehicleModel
(
params
).
then
(
response
=>
{
if
(
response
.
status
===
200
)
{
this
.
$notify
({
title
:
'成功'
,
message
:
'编辑成功'
,
type
:
'success'
,
duration
:
2000
});
this
.
rankDialogVisible
=
false
;
this
.
getList
();
}
else
{
this
.
$notify
({
title
:
'编辑失败'
,
message
:
rsCode
.
msg
[
response
.
code
]
?
rsCode
.
msg
[
response
.
code
]
:
'操作失败!'
,
type
:
'error'
,
duration
:
2000
});
}
});
},
/**
/**
* 下架
* 下架
* */
* */
...
...
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