diff --git a/src/mixins/ListMixin.js b/src/mixins/ListMixin.js index f170ca2..9f5404a 100644 --- a/src/mixins/ListMixin.js +++ b/src/mixins/ListMixin.js @@ -2,7 +2,7 @@ import { get, deleteData } from "@/server/api.js"; export const ListMixin = { data () { return { - isShowDialog: false, + isShowDialog: '', item: null, pagination: { // 分页参数 pageNumber: 1, @@ -29,21 +29,25 @@ export const ListMixin = { }) }, // 监听回调 - completeCallBack () { - this.isShowDialog = false + completeCallBack (data) { + this.isShowDialog = '' this.item = null this.getList() }, // 新增按钮操作 handleAdd () { - this.isShowDialog = true + this.isShowDialog = 'edit' this.item = null }, // 修改按钮操作 handleUpdate (row) { - this.isShowDialog = true + this.isShowDialog = 'edit' this.item = row }, + // 改变isShowDialog的值 + changeDialogStatus(data) { + this.isShowDialog = data + }, // 删除数据 delHanle (keyName, url) { this.$confirm('是否确认删除"' + keyName + '"的数据项?', '警告', { diff --git a/src/views/etl/components/edit.vue b/src/views/etl/components/edit.vue index 1d18d39..d7d8a54 100644 --- a/src/views/etl/components/edit.vue +++ b/src/views/etl/components/edit.vue @@ -80,7 +80,7 @@ export default { }, methods: { cancel() { // 取消按钮 - this.$emit('editCallBack') + this.$emit('update:isShowDialog','') }, handleAdd() { // 新增按钮操作 this.title = '添加' diff --git a/src/views/etl/index.vue b/src/views/etl/index.vue index ee88882..79450b7 100644 --- a/src/views/etl/index.vue +++ b/src/views/etl/index.vue @@ -40,7 +40,7 @@ - + @@ -88,7 +88,7 @@ // 任务配置项 configuration(item){ this.item=item; - + this.changeDialogStatus('configuration'); }, // 搜索按钮操作 handleQuery() { diff --git a/src/views/field/components/edit.vue b/src/views/field/components/edit.vue index 1d18d39..d7d8a54 100644 --- a/src/views/field/components/edit.vue +++ b/src/views/field/components/edit.vue @@ -80,7 +80,7 @@ export default { }, methods: { cancel() { // 取消按钮 - this.$emit('editCallBack') + this.$emit('update:isShowDialog','') }, handleAdd() { // 新增按钮操作 this.title = '添加' diff --git a/src/views/field/index.vue b/src/views/field/index.vue index cf62312..3e5f73a 100644 --- a/src/views/field/index.vue +++ b/src/views/field/index.vue @@ -39,7 +39,7 @@ - +