From 81e4770aab2abf26f90390f997e8b3a97f797946 Mon Sep 17 00:00:00 2001 From: xuhuajiao <13476289682@163.com> Date: Tue, 2 Aug 2022 13:58:31 +0800 Subject: [PATCH] =?UTF-8?q?notiy=E6=94=B9message?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/mixins/crud.js | 24 +++++++++---------- .../category/descriptionPreview/index.vue | 4 ++-- src/views/category/fieldManage/index.vue | 4 ++-- src/views/category/fileNoFormat/index.vue | 4 ++-- .../category/fileNoFormat/module/form.vue | 8 +++---- .../fileNoFormat/module/sortDialog.vue | 4 ++-- src/views/category/index.vue | 4 ++-- src/views/category/listBrowsing/index.vue | 4 ++-- .../category/listBrowsing/module/form.vue | 8 +++---- .../listBrowsing/module/sortDialog.vue | 4 ++-- src/views/category/orderingRule/index.vue | 4 ++-- .../category/orderingRule/module/form.vue | 4 ++-- .../orderingRule/module/sortDialog.vue | 4 ++-- src/views/category/sortDialog.vue | 4 ++-- src/views/components/BindingTagDlg.vue | 8 +++---- src/views/components/category/PreviewForm.vue | 2 +- src/views/login.vue | 3 +-- src/views/mnt/database/execute.vue | 12 +++++----- src/views/mnt/server/index.vue | 4 ++-- .../tagManage/bindTagList/index.vue | 4 ++-- src/views/system/user/center/updateEmail.vue | 4 ++-- src/views/system/user/center/updatePass.vue | 4 ++-- src/views/tools/aliPay/config.vue | 4 ++-- src/views/tools/email/config.vue | 4 ++-- src/views/tools/email/send.vue | 4 ++-- src/views/tools/storage/local/index.vue | 4 ++-- src/views/tools/storage/qiniu/form.vue | 4 ++-- 27 files changed, 72 insertions(+), 73 deletions(-) diff --git a/src/mixins/crud.js b/src/mixins/crud.js index bb90342..9cfd159 100644 --- a/src/mixins/crud.js +++ b/src/mixins/crud.js @@ -112,36 +112,36 @@ export default { * 通用的提示封装 */ submitSuccessNotify() { - this.$notify({ - title: '提交成功', + this.$message({ + message: '提交成功', type: 'success', duration: 2500 }) }, addSuccessNotify() { - this.$notify({ - title: '新增成功', + this.$message({ + message: '新增成功', type: 'success', duration: 2500 }) }, editSuccessNotify() { - this.$notify({ - title: '编辑成功', + this.$message({ + message: '编辑成功', type: 'success', duration: 2500 }) }, delSuccessNotify() { - this.$notify({ - title: '删除成功', + this.$message({ + message: '删除成功', type: 'success', duration: 2500 }) }, notify(title, type) { - this.$notify({ - title: title, + this.$message({ + message: title, type: type, duration: 2500 }) @@ -199,8 +199,8 @@ export default { this.delAllLoading = false this.dleChangePage(ids.length) this.init() - this.$notify({ - title: '删除成功', + this.$message({ + message: '删除成功', type: 'success', duration: 2500 }) diff --git a/src/views/category/descriptionPreview/index.vue b/src/views/category/descriptionPreview/index.vue index a9be811..0abf444 100644 --- a/src/views/category/descriptionPreview/index.vue +++ b/src/views/category/descriptionPreview/index.vue @@ -154,8 +154,8 @@ export default { this.loading = true edit(this.editField).then(() => { this.loading = false - this.$notify({ - title: '保存成功', + this.$message({ + message: '保存成功', type: 'success', duration: 2500 }) diff --git a/src/views/category/fieldManage/index.vue b/src/views/category/fieldManage/index.vue index ee6008e..dbb00d5 100644 --- a/src/views/category/fieldManage/index.vue +++ b/src/views/category/fieldManage/index.vue @@ -186,8 +186,8 @@ export default { }, toDelete(data) { if (data[0].isSystem) { - this.$notify({ - title: '系统字段不可删除', + this.$message({ + message: '系统字段不可删除', type: 'warning', duration: 2500 }) diff --git a/src/views/category/fileNoFormat/index.vue b/src/views/category/fileNoFormat/index.vue index 47609f8..6e2c57f 100644 --- a/src/views/category/fileNoFormat/index.vue +++ b/src/views/category/fileNoFormat/index.vue @@ -150,8 +150,8 @@ export default { const deleteData = this.table.right.selections del(deleteData).then((res) => { this.delAllLoading = false - this.$notify({ - title: '删除成功', + this.$message({ + message: '删除成功', type: 'success', duration: 2500 }) diff --git a/src/views/category/fileNoFormat/module/form.vue b/src/views/category/fileNoFormat/module/form.vue index 43bade4..307409b 100644 --- a/src/views/category/fileNoFormat/module/form.vue +++ b/src/views/category/fileNoFormat/module/form.vue @@ -51,8 +51,8 @@ export default { } }) add(addData).then((res) => { - this.$notify({ - title: '保存成功', + this.$message({ + message: '保存成功', type: 'success', duration: 2500 }) @@ -62,8 +62,8 @@ export default { }) } else { edit(this.formData.fields).then((res) => { - this.$notify({ - title: '保存成功', + this.$message({ + message: '保存成功', type: 'success', duration: 2500 }) diff --git a/src/views/category/fileNoFormat/module/sortDialog.vue b/src/views/category/fileNoFormat/module/sortDialog.vue index a270c68..a1bd1d5 100644 --- a/src/views/category/fileNoFormat/module/sortDialog.vue +++ b/src/views/category/fileNoFormat/module/sortDialog.vue @@ -57,8 +57,8 @@ export default { }) order(this.sortTableData).then(() => { this.sortVisible = false - this.$notify({ - title: '保存成功', + this.$message({ + message: '保存成功', type: 'success', duration: 2500 }) diff --git a/src/views/category/index.vue b/src/views/category/index.vue index 7445a84..c0647e2 100644 --- a/src/views/category/index.vue +++ b/src/views/category/index.vue @@ -208,8 +208,8 @@ export default { [CRUD.HOOK.beforeToAdd](crud, form, btn) { const isCanAddKey = JSON.parse(localStorage.getItem('currentCategoryKey')) if (isCanAddKey.isType === 4 || isCanAddKey.isType === 5) { - this.$notify({ - title: '此门类下不可新建门类', + this.$message({ + message: '此门类下不可新建门类', type: 'error', duration: 2500 }) diff --git a/src/views/category/listBrowsing/index.vue b/src/views/category/listBrowsing/index.vue index 6397d5d..89aa52d 100644 --- a/src/views/category/listBrowsing/index.vue +++ b/src/views/category/listBrowsing/index.vue @@ -196,8 +196,8 @@ export default { }) add(deleteData).then((res) => { this.delAllLoading = false - this.$notify({ - title: '删除成功', + this.$message({ + message: '删除成功', type: 'success', duration: 2500 }) diff --git a/src/views/category/listBrowsing/module/form.vue b/src/views/category/listBrowsing/module/form.vue index a19155e..6fd0b12 100644 --- a/src/views/category/listBrowsing/module/form.vue +++ b/src/views/category/listBrowsing/module/form.vue @@ -66,8 +66,8 @@ export default { this.loading = true if (this.title === '新增字段') { add(this.formData.fields).then((res) => { - this.$notify({ - title: '保存成功', + this.$message({ + message: '保存成功', type: 'success', duration: 2500 }) @@ -77,8 +77,8 @@ export default { }) } else { edit(this.formData.fields).then((res) => { - this.$notify({ - title: '保存成功', + this.$message({ + message: '保存成功', type: 'success', duration: 2500 }) diff --git a/src/views/category/listBrowsing/module/sortDialog.vue b/src/views/category/listBrowsing/module/sortDialog.vue index 98d7654..389ed06 100644 --- a/src/views/category/listBrowsing/module/sortDialog.vue +++ b/src/views/category/listBrowsing/module/sortDialog.vue @@ -57,8 +57,8 @@ export default { }) order(this.sortTableData).then(() => { this.sortVisible = false - this.$notify({ - title: '保存成功', + this.$message({ + message: '保存成功', type: 'success', duration: 2500 }) diff --git a/src/views/category/orderingRule/index.vue b/src/views/category/orderingRule/index.vue index 2bf52b3..262abee 100644 --- a/src/views/category/orderingRule/index.vue +++ b/src/views/category/orderingRule/index.vue @@ -165,8 +165,8 @@ export default { }) edit(deleteData).then((res) => { this.delAllLoading = false - this.$notify({ - title: '删除成功', + this.$message({ + message: '删除成功', type: 'success', duration: 2500 }) diff --git a/src/views/category/orderingRule/module/form.vue b/src/views/category/orderingRule/module/form.vue index d03febb..fd31a3a 100644 --- a/src/views/category/orderingRule/module/form.vue +++ b/src/views/category/orderingRule/module/form.vue @@ -44,8 +44,8 @@ export default { save() { this.loading = true edit(this.formData.fields).then((res) => { - this.$notify({ - title: '保存成功', + this.$message({ + message: '保存成功', type: 'success', duration: 2500 }) diff --git a/src/views/category/orderingRule/module/sortDialog.vue b/src/views/category/orderingRule/module/sortDialog.vue index 35fae1e..9e4fee0 100644 --- a/src/views/category/orderingRule/module/sortDialog.vue +++ b/src/views/category/orderingRule/module/sortDialog.vue @@ -57,8 +57,8 @@ export default { }) order(this.sortTableData).then(() => { this.sortVisible = false - this.$notify({ - title: '保存成功', + this.$message({ + message: '保存成功', type: 'success', duration: 2500 }) diff --git a/src/views/category/sortDialog.vue b/src/views/category/sortDialog.vue index 8e4d529..64bff00 100644 --- a/src/views/category/sortDialog.vue +++ b/src/views/category/sortDialog.vue @@ -60,8 +60,8 @@ export default { }) sort(data).then(() => { this.sortVisible = false - this.$notify({ - title: '保存成功', + this.$message({ + message: '保存成功', type: 'success', duration: 2500 }) diff --git a/src/views/components/BindingTagDlg.vue b/src/views/components/BindingTagDlg.vue index 15cee22..7829c05 100644 --- a/src/views/components/BindingTagDlg.vue +++ b/src/views/components/BindingTagDlg.vue @@ -246,15 +246,15 @@ export default { this.step = 5 resolve() } else if (writeRes.code === '-1') { - this.$notify({ - title: writeRes.message, + this.$message({ + message: writeRes.message, type: 'error', duration: 2500 }) reject() } else if (writeRes.code === '-1000') { - this.$notify({ - title: '读写器超时未响应', + this.$message({ + message: '读写器超时未响应', type: 'error', duration: 2500 }) diff --git a/src/views/components/category/PreviewForm.vue b/src/views/components/category/PreviewForm.vue index d0f5c4f..19b5146 100644 --- a/src/views/components/category/PreviewForm.vue +++ b/src/views/components/category/PreviewForm.vue @@ -207,7 +207,7 @@ export default { await FetchFindAllSubsetById({ id: fieldInfo.dictionaryConfigId.id }).then(res => { const option = this.getNode(res, this.addOrUpdateForm[val.fieldName]) if (option) { - string += '' + option[0].dicName + val.connector + string += '' + option[0].dicCode + val.connector } }) } else { diff --git a/src/views/login.vue b/src/views/login.vue index c68f25f..e3abaf5 100644 --- a/src/views/login.vue +++ b/src/views/login.vue @@ -209,8 +209,7 @@ export default { point() { const point = Cookies.get('point') !== undefined if (point) { - this.$notify({ - title: '提示', + this.$message({ message: '当前登录状态已过期,请重新登录!', type: 'warning', duration: 5000 diff --git a/src/views/mnt/database/execute.vue b/src/views/mnt/database/execute.vue index 94622fc..7a9c86b 100644 --- a/src/views/mnt/database/execute.vue +++ b/src/views/mnt/database/execute.vue @@ -57,14 +57,14 @@ export default { }, handleSuccess(response, file, fileList) { if (response === 'success') { - this.$notify({ - title: '执行成功', + this.$message({ + message: '执行成功', type: 'success', duration: 2500 }) } else { - this.$notify({ - title: response, + this.$message({ + message: response, type: 'error', duration: 0 }) @@ -72,8 +72,8 @@ export default { }, handleError(e, file, fileList) { const msg = JSON.parse(e.message) - this.$notify({ - title: msg.message, + this.$message({ + message: msg.message, type: 'error', duration: 0 }) diff --git a/src/views/mnt/server/index.vue b/src/views/mnt/server/index.vue index c26cc9c..2017419 100644 --- a/src/views/mnt/server/index.vue +++ b/src/views/mnt/server/index.vue @@ -114,8 +114,8 @@ export default { this.loading = true testServerConnect(this.form).then((res) => { this.loading = false - this.$notify({ - title: res ? '连接成功' : '连接失败', + this.$message({ + message: res ? '连接成功' : '连接失败', type: res ? 'success' : 'error', duration: 2500 }) diff --git a/src/views/storeManage/tagManage/bindTagList/index.vue b/src/views/storeManage/tagManage/bindTagList/index.vue index 616ec67..201598c 100644 --- a/src/views/storeManage/tagManage/bindTagList/index.vue +++ b/src/views/storeManage/tagManage/bindTagList/index.vue @@ -163,8 +163,8 @@ export default { }) unbindTag(unbindData).then((res) => { this.unbindBtnLoading = false - this.$notify({ - title: '解除绑定成功', + this.$message({ + message: '解除绑定成功', type: 'success', duration: 2500 }) diff --git a/src/views/system/user/center/updateEmail.vue b/src/views/system/user/center/updateEmail.vue index 85dcf09..bbd7703 100644 --- a/src/views/system/user/center/updateEmail.vue +++ b/src/views/system/user/center/updateEmail.vue @@ -108,8 +108,8 @@ export default { updateEmail(this.form).then(res => { this.loading = false this.resetForm() - this.$notify({ - title: '邮箱修改成功', + this.$message({ + message: '邮箱修改成功', type: 'success', duration: 1500 }) diff --git a/src/views/system/user/center/updatePass.vue b/src/views/system/user/center/updatePass.vue index d791b4e..0f89824 100644 --- a/src/views/system/user/center/updatePass.vue +++ b/src/views/system/user/center/updatePass.vue @@ -66,8 +66,8 @@ export default { this.loading = true updatePass(this.form).then(res => { this.resetForm() - this.$notify({ - title: '密码修改成功,请重新登录', + this.$message({ + message: '密码修改成功,请重新登录', type: 'success', duration: 1500 }) diff --git a/src/views/tools/aliPay/config.vue b/src/views/tools/aliPay/config.vue index e7b50d4..19addb9 100644 --- a/src/views/tools/aliPay/config.vue +++ b/src/views/tools/aliPay/config.vue @@ -74,8 +74,8 @@ export default { if (valid) { this.loading = true update(this.form).then(res => { - this.$notify({ - title: '修改成功', + this.$message({ + message: '修改成功', type: 'success', duration: 2500 }) diff --git a/src/views/tools/email/config.vue b/src/views/tools/email/config.vue index b72b724..183307c 100644 --- a/src/views/tools/email/config.vue +++ b/src/views/tools/email/config.vue @@ -67,8 +67,8 @@ export default { if (valid) { this.loading = true update(this.form).then(res => { - this.$notify({ - title: '修改成功', + this.$message({ + message: '修改成功', type: 'success', duration: 2500 }) diff --git a/src/views/tools/email/send.vue b/src/views/tools/email/send.vue index d4bd568..baecd32 100644 --- a/src/views/tools/email/send.vue +++ b/src/views/tools/email/send.vue @@ -67,8 +67,8 @@ export default { if (valid) { this.loading = true send(this.form).then(res => { - this.$notify({ - title: '发送成功', + this.$message({ + message: '发送成功', type: 'success', duration: 2500 }) diff --git a/src/views/tools/storage/local/index.vue b/src/views/tools/storage/local/index.vue index 30275ae..67a58d1 100644 --- a/src/views/tools/storage/local/index.vue +++ b/src/views/tools/storage/local/index.vue @@ -163,8 +163,8 @@ export default { // 监听上传失败 handleError(e, file, fileList) { const msg = JSON.parse(e.message) - this.$notify({ - title: msg.message, + this.$message({ + message: msg.message, type: 'error', duration: 2500 }) diff --git a/src/views/tools/storage/qiniu/form.vue b/src/views/tools/storage/qiniu/form.vue index c77904e..cb7346f 100644 --- a/src/views/tools/storage/qiniu/form.vue +++ b/src/views/tools/storage/qiniu/form.vue @@ -72,8 +72,8 @@ export default { if (valid) { this.loading = true update(this.form).then(res => { - this.$notify({ - title: '修改成功', + this.$message({ + message: '修改成功', type: 'success', duration: 2500 })