提交 af716ea1 authored 作者: lihuihui's avatar lihuihui

update

上级 07a5c2f3
......@@ -142,6 +142,12 @@ export default {
this.$router.push({ path: '/banner/update', query: { id: row.id } })
},
handleDelete(row) {
this.$confirm('此操作将永久删除该banner, 是否继续?', '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
})
.then(() => {
deleteBanner({ id: row.id }).then(res => {
if (res.code === 0) {
this.$message({
......@@ -151,6 +157,8 @@ export default {
this.$refs.list.refetch(true)
}
})
})
.catch(() => {})
}
}
}
......
......@@ -129,9 +129,9 @@ export default {
},
// 更新发布状态
updateStatus(row) {
const params = row
params.status = row.status ? '1' : '0'
updateEssay(row).then(res => {
const params = JSON.parse(JSON.stringify(row))
params.status = params.status ? '1' : '0'
updateEssay(params).then(res => {
if (res.code === 0) {
this.$message({
message: '修改成功',
......@@ -145,6 +145,12 @@ export default {
this.$router.push({ path: '/essay/update', query: { id: row.id } })
},
handleDelete(row) {
this.$confirm('此操作将永久删除该图文, 是否继续?', '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
})
.then(() => {
deleteEssay({ id: row.id }).then(res => {
if (res.code === 0) {
this.$message({
......@@ -154,6 +160,8 @@ export default {
this.$refs.list.refetch(true)
}
})
})
.catch(() => {})
}
}
}
......
......@@ -26,7 +26,7 @@
<div class="upload-img-box">
<upload-image v-model="ruleForm.picture"></upload-image>
<div class="upload-img-tips">
<div>只能上传jpg/png文件,且不超过500kb</div>
<div>建议上传jpg/png文件,且不超过500kb</div>
<div>建议竖图上传尺寸 96×120</div>
<div>建议横图上传尺寸 311×120</div>
</div>
......
......@@ -25,7 +25,7 @@
<el-switch v-model="row.status" @change="updateStatus(row)"> </el-switch>
</template>
<template v-slot:sort-select="{ row }">
<el-select style="width: 70px;" v-model="row.sort" placeholder="请选择" @change="updateStatus(row)">
<el-select style="width: 70px" v-model="row.sort" placeholder="请选择" @change="updateStatus(row)">
<el-option v-for="item in options" :key="item.value" :label="item.label" :value="item.value"> </el-option>
</el-select>
</template>
......@@ -128,15 +128,15 @@ export default {
},
// 更新发布状态
updateStatus(row) {
const params = row
const params = JSON.parse(JSON.stringify(row))
params.status = row.status ? '1' : '0'
updateMenu(row).then(res => {
updateMenu(params).then(res => {
if (res.code === 0) {
this.$message({
message: '修改成功',
type: 'success'
})
this.$refs.list.refetch(true)
// this.$refs.list.refetch(true)
}
})
},
......@@ -144,6 +144,12 @@ export default {
this.$router.push({ path: '/menu/update', query: { id: row.id } })
},
handleDelete(row) {
this.$confirm('此操作将永久删除该模块, 是否继续?', '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
})
.then(() => {
deleteMenu({ id: row.id }).then(res => {
if (res.code === 0) {
this.$message({
......@@ -153,6 +159,8 @@ export default {
this.$refs.list.refetch(true)
}
})
})
.catch(() => {})
}
}
}
......
......@@ -22,7 +22,7 @@
<div class="upload-img-box">
<upload-image v-model="ruleForm.picture"></upload-image>
<div class="upload-img-tips">
<div>只能上传jpg/png文件,且不超过500kb</div>
<div>建议上传jpg/png文件,且不超过500kb</div>
<div>建议菜单图片上传尺寸 40×40</div>
</div>
</div>
......@@ -78,7 +78,7 @@
<el-form-item>
<div style="padding-top: 20px">
<el-button type="primary" @click="submitForm">确认</el-button>
<el-button @click="drawer = true">取消</el-button>
<el-button @click="$router.go(-1)">取消</el-button>
</div>
</el-form-item>
</el-form>
......@@ -352,6 +352,8 @@ export default {
.title {
font-size: 16px;
color: #000000;
width: 150px;
line-height: 20px;
}
.tool-btn {
display: flex;
......
......@@ -114,6 +114,12 @@ export default {
this.$router.push({ path: '/notice/update', query: { id: row.id } })
},
handleDelete(row) {
this.$confirm('此操作将永久删除该通知, 是否继续?', '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
})
.then(() => {
deleteNotice({ id: row.id }).then(res => {
if (res.code === 0) {
this.$message({
......@@ -123,6 +129,8 @@ export default {
this.$refs.list.refetch(true)
}
})
})
.catch(() => {})
}
}
}
......
......@@ -131,9 +131,9 @@ export default {
},
// 更新发布状态
updateStatus(row) {
const params = row
params.status = row.status ? '1' : '0'
updatePages(row).then(res => {
const params = JSON.parse(JSON.stringify(row))
params.status = params.status ? '1' : '0'
updatePages(params).then(res => {
if (res.code === 0) {
this.$message({
message: '修改成功',
......@@ -147,6 +147,12 @@ export default {
this.$router.push({ path: '/pages/update', query: { id: row.id } })
},
handleDelete(row) {
this.$confirm('此操作将永久删除该页面, 是否继续?', '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
})
.then(() => {
deletePages({ id: row.id }).then(res => {
if (res.code === 0) {
this.$message({
......@@ -156,6 +162,8 @@ export default {
this.$refs.list.refetch(true)
}
})
})
.catch(() => {})
}
}
}
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论