|
|
|
@ -12,14 +12,21 @@ |
|
|
|
></el-input> |
|
|
|
</el-col> |
|
|
|
<el-col :span="4"> |
|
|
|
<el-button type="" style="margin-left: 5%;background:rgb(203,240,209);color:rgb(31, 148, 96)" @click="getlist" |
|
|
|
<el-button |
|
|
|
type="" |
|
|
|
style=" |
|
|
|
margin-left: 5%; |
|
|
|
background: rgb(203, 240, 209); |
|
|
|
color: rgb(31, 148, 96); |
|
|
|
" |
|
|
|
@click="getlist" |
|
|
|
>查询</el-button |
|
|
|
> |
|
|
|
</el-col> |
|
|
|
</el-row> |
|
|
|
<el-table |
|
|
|
:data="tableData" |
|
|
|
style="width: 100%; height: 500px;margin-top:20px" |
|
|
|
style="width: 100%; height: 500px; margin-top: 20px" |
|
|
|
row-key="id" |
|
|
|
class="el-table__body-wrapper tbody" |
|
|
|
@row-click="rowick" |
|
|
|
@ -52,12 +59,17 @@ |
|
|
|
<template> |
|
|
|
<el-tag |
|
|
|
class="move" |
|
|
|
style="cursor: move; margin-left: 15px;background-color: rgb(245, 245, 245);border:none" |
|
|
|
style=" |
|
|
|
cursor: move; |
|
|
|
margin-left: 15px; |
|
|
|
background-color: rgb(245, 245, 245); |
|
|
|
border: none; |
|
|
|
" |
|
|
|
draggable="true" |
|
|
|
> |
|
|
|
<i |
|
|
|
class="el-icon-d-caret" |
|
|
|
style="width: 1rem; height: 1rem;color: rgb(113, 113, 113)" |
|
|
|
style="width: 1rem; height: 1rem; color: rgb(113, 113, 113)" |
|
|
|
></i> |
|
|
|
</el-tag> |
|
|
|
</template> |
|
|
|
@ -68,7 +80,7 @@ |
|
|
|
:title="title == 1 ? '新增' : '编辑'" |
|
|
|
:visible.sync="dialogVisible" |
|
|
|
width="75%" |
|
|
|
:close-on-click-modal="false" |
|
|
|
:close-on-click-modal="false" |
|
|
|
> |
|
|
|
<el-form ref="form" :model="form" label-width="80px"> |
|
|
|
<el-row> |
|
|
|
@ -143,7 +155,9 @@ |
|
|
|
</el-form> |
|
|
|
<span slot="footer" class="dialog-footer"> |
|
|
|
<el-button @click="dialogVisible = false">取 消</el-button> |
|
|
|
<el-button type="primary" @click="addoredit">确 定</el-button> |
|
|
|
<el-button type="primary" @click="addoredit" class="bulletcommit" |
|
|
|
>确 定</el-button |
|
|
|
> |
|
|
|
</span> |
|
|
|
</el-dialog> |
|
|
|
</el-card> |
|
|
|
@ -159,20 +173,34 @@ |
|
|
|
>编辑</el-button |
|
|
|
> |
|
|
|
<div style="margin-top: 10px"> |
|
|
|
<el-button type="" @click="delsrts" class="commonbutton">删除</el-button> |
|
|
|
<el-button type="" @click="delsrts" class="commonbutton" |
|
|
|
>删除</el-button |
|
|
|
> |
|
|
|
</div> |
|
|
|
<div style="margin-top: 10px"> |
|
|
|
<el-button type="" @click="topping" class="commonbutton">置顶</el-button> |
|
|
|
<el-button type="" @click="topping" class="commonbutton" |
|
|
|
>置顶</el-button |
|
|
|
> |
|
|
|
<div style="margin-top: 10px"> |
|
|
|
<el-button type="" @click="toppings" class="commonbutton">置底</el-button> |
|
|
|
<el-button type="" @click="toppings" class="commonbutton" |
|
|
|
>置底</el-button |
|
|
|
> |
|
|
|
</div> |
|
|
|
<div style="margin-top: 10px"> |
|
|
|
<el-button type="" :disabled="isshow" @click="assertion" class="commonbutton" |
|
|
|
<el-button |
|
|
|
type="" |
|
|
|
:disabled="isshow" |
|
|
|
@click="assertion" |
|
|
|
class="commonbutton" |
|
|
|
>排序</el-button |
|
|
|
> |
|
|
|
</div> |
|
|
|
<div style="margin-top: 10px"> |
|
|
|
<el-button type="" :disabled="isshow" @click="cancellation" class="commonbutton" |
|
|
|
<el-button |
|
|
|
type="" |
|
|
|
:disabled="isshow" |
|
|
|
@click="cancellation" |
|
|
|
class="commonbutton" |
|
|
|
>取消</el-button |
|
|
|
> |
|
|
|
</div> |
|
|
|
@ -212,7 +240,7 @@ export default { |
|
|
|
title: 1, |
|
|
|
dialogVisible: false, |
|
|
|
isshow: true, |
|
|
|
curRow:{}, |
|
|
|
curRow: {}, |
|
|
|
}; |
|
|
|
}, |
|
|
|
created() { |
|
|
|
@ -224,7 +252,7 @@ export default { |
|
|
|
methods: { |
|
|
|
//删除 |
|
|
|
delsrts() { |
|
|
|
this.form={...this.curRow} |
|
|
|
this.form = { ...this.curRow }; |
|
|
|
if (this.form.id == undefined) { |
|
|
|
this.$message.warning("请选择删除的数据"); |
|
|
|
} else { |
|
|
|
@ -303,7 +331,7 @@ export default { |
|
|
|
}, |
|
|
|
//置低 |
|
|
|
toppings() { |
|
|
|
this.form={...this.curRow} |
|
|
|
this.form = { ...this.curRow }; |
|
|
|
if (this.form.id == undefined) { |
|
|
|
this.$message.warning("请点击选择操作的数据"); |
|
|
|
} else { |
|
|
|
@ -315,7 +343,7 @@ export default { |
|
|
|
}, |
|
|
|
//置顶 |
|
|
|
topping() { |
|
|
|
this.form={...this.curRow} |
|
|
|
this.form = { ...this.curRow }; |
|
|
|
console.log(this.form.id); |
|
|
|
if (this.form.id == undefined) { |
|
|
|
this.$message.warning("请点击选择操作的数据"); |
|
|
|
@ -328,7 +356,7 @@ export default { |
|
|
|
}, |
|
|
|
//编辑弹框 |
|
|
|
editpopup() { |
|
|
|
this.form={...this.curRow} |
|
|
|
this.form = { ...this.curRow }; |
|
|
|
console.log(this.form.id); |
|
|
|
if (this.form.id == undefined) { |
|
|
|
this.$message.success("请点击选择操作的数据"); |
|
|
|
@ -380,9 +408,9 @@ export default { |
|
|
|
this.title = 1; |
|
|
|
this.dialogVisible = true; |
|
|
|
this.form = {}; |
|
|
|
this.$nextTick(()=>{ |
|
|
|
this.$refs.refinput.focus() |
|
|
|
}) |
|
|
|
this.$nextTick(() => { |
|
|
|
this.$refs.refinput.focus(); |
|
|
|
}); |
|
|
|
categorytype(this.pages).then((res) => { |
|
|
|
this.ars = res.data.items; |
|
|
|
console.log(res); |
|
|
|
@ -398,7 +426,7 @@ export default { |
|
|
|
//点击列表通过id查询 |
|
|
|
rowick(row) { |
|
|
|
commonid(row.id).then((res) => { |
|
|
|
this.curRow={...res.data} |
|
|
|
this.curRow = { ...res.data }; |
|
|
|
// console.log(res); |
|
|
|
// this.form = res.data; |
|
|
|
}); |
|
|
|
|