提交 536c8dd7 authored 作者: lihuihui's avatar lihuihui

update

上级 3ec36f76
...@@ -39,8 +39,8 @@ export default { ...@@ -39,8 +39,8 @@ export default {
this.dispatch('ElFormItem', 'el.form.blur', editor.getContent()) this.dispatch('ElFormItem', 'el.form.blur', editor.getContent())
}, },
dispatch(componentName, eventName, params) { dispatch(componentName, eventName, params) {
var parent = this.$parent || this.$root let parent = this.$parent || this.$root
var name = parent.$options.componentName let name = parent.$options.componentName
while (parent && (!name || name !== componentName)) { while (parent && (!name || name !== componentName)) {
parent = parent.$parent parent = parent.$parent
......
...@@ -182,8 +182,24 @@ export default { ...@@ -182,8 +182,24 @@ export default {
// 删除页面 // 删除页面
handleRemovePageClick() { handleRemovePageClick() {
if (this.stepPageInfo.length > 1) { if (this.stepPageInfo.length > 1) {
this.$confirm('确认删除步骤?', '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
})
.then(() => {
this.stepPageInfo = this.stepPageInfo.filter((item, index) => index !== parseInt(this.activeName)) this.stepPageInfo = this.stepPageInfo.filter((item, index) => index !== parseInt(this.activeName))
this.activeName = (this.activeName === '0' ? '0' : this.activeName - 1).toString() this.activeName = (this.activeName === '0' ? '0' : this.activeName - 1).toString()
this.$message({
type: 'success',
message: '删除成功!'
})
})
} else {
this.$message({
message: '最少保留一个步骤',
type: 'warning'
})
} }
}, },
// 点击提交钮判断基本信息是否填写 // 点击提交钮判断基本信息是否填写
......
...@@ -83,8 +83,7 @@ export default { ...@@ -83,8 +83,7 @@ export default {
} }
} }
}, },
mounted() { mounted() {},
},
methods: { methods: {
beforeRequest(params, isReset) { beforeRequest(params, isReset) {
// 重置 // 重置
...@@ -103,9 +102,18 @@ export default { ...@@ -103,9 +102,18 @@ export default {
this.$router.push({ path: '/activity/create', query: { id: row.id } }) this.$router.push({ path: '/activity/create', query: { id: row.id } })
}, },
deleteRegister(row) { deleteRegister(row) {
deleteRegister({ id: row.id }).then( this.$confirm('确认删除?', '提示', {
this.$refs.list.refetch(true) confirmButtonText: '确定',
) cancelButtonText: '取消',
type: 'warning'
})
.then(() => {
this.$message({
type: 'success',
message: '删除成功!'
})
deleteRegister({ id: row.id }).then(this.$refs.list.refetch(true))
})
} }
} }
} }
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论