diff --git a/magic-boot-ui/src/components/Psyduck/pd-dialog.vue b/magic-boot-ui/src/components/Psyduck/pd-dialog.vue index d37a0d7..a6c0ce9 100644 --- a/magic-boot-ui/src/components/Psyduck/pd-dialog.vue +++ b/magic-boot-ui/src/components/Psyduck/pd-dialog.vue @@ -1,16 +1,15 @@ @@ -23,11 +22,6 @@ export default { type: String, default: '' }, - content: { - type: String, - default: '', - require: false - }, width: { type: String, default: '50%' diff --git a/magic-boot-ui/src/views/system/dict/dict-items.vue b/magic-boot-ui/src/views/system/dict/dict-items.vue index 0927be8..4d9f144 100644 --- a/magic-boot-ui/src/views/system/dict/dict-items.vue +++ b/magic-boot-ui/src/views/system/dict/dict-items.vue @@ -19,30 +19,24 @@ - - - - - - - - - - - - - - - - - + + + @@ -115,12 +109,7 @@ export default { } ] }, - textMap: { - update: '修改', - create: '添加' - }, - dialogFormVisible: false, - dialogStatus: '', + dialogTitle: '', rules: { value: [{ required: true, message: '请输入值', trigger: 'change' }], label: [{ required: true, message: '请输入标签名', trigger: 'change' }], @@ -162,8 +151,8 @@ export default { handleCreate() { this.temp = this.getTemp() this.getSort() - this.dialogStatus = 'create' - this.dialogFormVisible = true + this.dialogTitle = '添加' + this.$refs.formDialog.show() this.$nextTick(() => { this.$refs['dataForm'].clearValidate() }) @@ -172,10 +161,10 @@ export default { this.$refs['dataForm'].validate((valid) => { if (valid) { this.$post('dict/items/save', this.temp).then(() => { - this.dialogFormVisible = false + this.$refs.formDialog.hide() this.$notify({ title: '成功', - message: (this.dialogStatus === 'create' ? '创建' : '修改') + '成功', + message: this.dialogTitle + '成功', type: 'success', duration: 2000 }) @@ -187,8 +176,8 @@ export default { }, handleUpdate(row) { this.$common.objAssign(this.temp, row) - this.dialogStatus = 'update' - this.dialogFormVisible = true + this.dialogTitle = '修改' + this.$refs.formDialog.show() this.$nextTick(() => { this.$refs['dataForm'].clearValidate() }) diff --git a/magic-boot-ui/src/views/system/dict/dict-list.vue b/magic-boot-ui/src/views/system/dict/dict-list.vue index 17e2493..917a1c2 100644 --- a/magic-boot-ui/src/views/system/dict/dict-list.vue +++ b/magic-boot-ui/src/views/system/dict/dict-list.vue @@ -19,37 +19,33 @@ - - - - - - - - - - - - - - - - - - - - + + + - - - + + + @@ -130,7 +126,7 @@ export default { title: '字典项', type: 'primary', click: (row) => { - this.dictItemsVisible = true + this.$refs.dictItemsDialog.show() this.dictId = row.id } } @@ -140,21 +136,13 @@ export default { }, dictId: '', temp: this.getTemp(), - dialogFormVisible: false, - dictItemsVisible: false, - dialogStatus: '', - textMap: { - update: '修改', - create: '添加' - }, - pvData: [], + dialogTitle: '', rules: { dictType: [{ required: true, message: '请输入标签', trigger: 'change' }], type: [{ required: true, message: '请输入类型', trigger: 'change' }], sort: [{ required: true, message: '请输入排序', trigger: 'change' }], descRibe: [{ required: true, message: '请输入描述', trigger: 'change' }] - }, - downloadLoading: false + } } }, methods: { @@ -179,8 +167,8 @@ export default { handleCreate() { this.temp = this.getTemp() this.getSort() - this.dialogStatus = 'create' - this.dialogFormVisible = true + this.dialogTitle = '添加' + this.$refs.dictDialog.show() this.$nextTick(() => { this.$refs['dataForm'].clearValidate() }) @@ -190,10 +178,10 @@ export default { if (valid) { this.$post('dict/save', this.temp).then((response) => { this.temp.id = response.data - this.dialogFormVisible = false + this.$refs.dictDialog.hide() this.$notify({ title: '成功', - message: (this.dialogStatus === 'create' ? '创建' : '修改') + '成功', + message: this.dialogTitle + '成功', type: 'success', duration: 2000 }) @@ -205,8 +193,8 @@ export default { }, handleUpdate(row) { this.$common.objAssign(this.temp, row) - this.dialogStatus = 'update' - this.dialogFormVisible = true + this.dialogTitle = '修改' + this.$refs.dictDialog.show() this.$nextTick(() => { this.$refs['dataForm'].clearValidate() }) diff --git a/magic-boot-ui/src/views/system/menu/menu-list.vue b/magic-boot-ui/src/views/system/menu/menu-list.vue index def0741..c010754 100644 --- a/magic-boot-ui/src/views/system/menu/menu-list.vue +++ b/magic-boot-ui/src/views/system/menu/menu-list.vue @@ -24,7 +24,7 @@ - + @@ -185,11 +185,7 @@ export default { } ] }, - dialogStatus: '', - textMap: { - update: '修改', - create: '添加' - }, + dialogTitle: '', searchTimeout: '' } }, @@ -223,7 +219,7 @@ export default { },500) }, addSubMenu(id) { - this.dialogStatus = 'create' + this.dialogTitle = '添加' this.$refs.menuFormDialog.show() this.$nextTick(() => { this.$refs.menuForm.addSubMenu(id) @@ -237,7 +233,7 @@ export default { }) }, handleUpdate(row) { - this.dialogStatus = 'update' + this.dialogTitle = '修改' this.$refs.menuFormDialog.show() this.$nextTick(() => { this.$refs.menuForm.getInfo(row); diff --git a/magic-boot-ui/src/views/system/office/office-list.vue b/magic-boot-ui/src/views/system/office/office-list.vue index 7123405..c23c393 100644 --- a/magic-boot-ui/src/views/system/office/office-list.vue +++ b/magic-boot-ui/src/views/system/office/office-list.vue @@ -30,7 +30,7 @@ - +