Commit 2383a43b by ext.wangyuman1

bug修复

1 parent 674c6e7a
...@@ -91,3 +91,12 @@ export function getTypeList() { ...@@ -91,3 +91,12 @@ export function getTypeList() {
url: groundBase + '/property/type', url: groundBase + '/property/type',
}) })
} }
// 列表修改
export function listMove(data) {
return request({
url: groundBase + '/property/move',
method: 'put',
data,
})
}
...@@ -7,7 +7,7 @@ ...@@ -7,7 +7,7 @@
<el-icon-arrow-up class="el-icon-arrow-up mr5"></el-icon-arrow-up> <el-icon-arrow-up class="el-icon-arrow-up mr5"></el-icon-arrow-up>
全部 全部
</div> </div>
<div class="title-btn" @click="addGroup">添加</div> <div class="title-btn" @click="addGroup(0)">添加</div>
</div> </div>
<el-scrollbar class="item-list"> <el-scrollbar class="item-list">
<div <div
...@@ -98,8 +98,12 @@ ...@@ -98,8 +98,12 @@
class-name="small-padding fixed-width" class-name="small-padding fixed-width"
> >
<template #default="{ row }"> <template #default="{ row }">
<el-button text @click="goRoute()" v-if="!row.isFirst">上移</el-button> <el-button text @click="getListMove(row.catalogueId, row.id, 0)" v-if="!row.isFirst"
<el-button text @click="goRoute()" v-if="!row.isLast">下移</el-button> >上移</el-button
>
<el-button text @click="getListMove(row.catalogueId, row.id, 1)" v-if="!row.isLast"
>下移</el-button
>
<el-button text @click="goRoute('staffAdd', row.id)">编辑</el-button> <el-button text @click="goRoute('staffAdd', row.id)">编辑</el-button>
<el-button text @click="removeFn('single', row.id)" v-if="row.fixed !== 1" <el-button text @click="removeFn('single', row.id)" v-if="row.fixed !== 1"
>删除</el-button >删除</el-button
...@@ -144,6 +148,7 @@ import Add from './add' ...@@ -144,6 +148,7 @@ import Add from './add'
import { import {
getList, getList,
remove, remove,
listMove,
getCodeCategoryList, getCodeCategoryList,
addCodeCategory, addCodeCategory,
updateCodeCategory, updateCodeCategory,
...@@ -217,6 +222,15 @@ export default { ...@@ -217,6 +222,15 @@ export default {
}, },
mounted() {}, mounted() {},
methods: { methods: {
getListMove(catalogueId, id, direction) {
let obj = { id, direction, catalogueId }
listMove(obj).then((res) => {
console.log(res)
if (res.code === 200) {
this.getList()
}
})
},
handleClose(val) { handleClose(val) {
if (val) { if (val) {
// 新建字段提交 // 新建字段提交
...@@ -256,7 +270,6 @@ export default { ...@@ -256,7 +270,6 @@ export default {
this.groupIndex = index this.groupIndex = index
this.query.catalogueId = data.id this.query.catalogueId = data.id
this.getList() this.getList()
// this.search()
}, },
getList() { getList() {
this.loading = true this.loading = true
...@@ -264,7 +277,6 @@ export default { ...@@ -264,7 +277,6 @@ export default {
.then(({ rows, total }) => { .then(({ rows, total }) => {
rows[0].isFirst = true rows[0].isFirst = true
rows[rows.length - 1].isLast = true rows[rows.length - 1].isLast = true
console.log(268, rows)
this.list = rows this.list = rows
this.total = Number(total) this.total = Number(total)
this.loading = false this.loading = false
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!