From 071c4c1412fa8baa4b5ec11e5825554a7868f7fa Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=96=AF=E7=8B=82=E7=9A=84=E7=8B=AE=E5=AD=90li?= <15040126243@163.com> Date: Thu, 23 Sep 2021 19:04:09 +0800 Subject: [PATCH] =?UTF-8?q?update=20=E5=90=8C=E6=AD=A5ruoyi=E9=80=82?= =?UTF-8?q?=E9=85=8D=E6=94=B9=E5=8A=A8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ruoyi-ui/src/views/demo/demo/index.vue | 16 +++++++--------- ruoyi-ui/src/views/demo/tree/index.vue | 16 +++++++--------- ruoyi-ui/src/views/system/oss/config.vue | 21 ++++++--------------- ruoyi-ui/src/views/system/oss/index.vue | 17 ++++------------- 4 files changed, 24 insertions(+), 46 deletions(-) diff --git a/ruoyi-ui/src/views/demo/demo/index.vue b/ruoyi-ui/src/views/demo/demo/index.vue index 791ab7e62..6f952ec4b 100644 --- a/ruoyi-ui/src/views/demo/demo/index.vue +++ b/ruoyi-ui/src/views/demo/demo/index.vue @@ -324,7 +324,7 @@ export default { this.buttonLoading = true; if (this.form.id != null) { updateDemo(this.form).then(response => { - this.msgSuccess("修改成功"); + this.$modal.msgSuccess("修改成功"); this.open = false; this.getList(); }).finally(() => { @@ -332,7 +332,7 @@ export default { }); } else { addDemo(this.form).then(response => { - this.msgSuccess("新增成功"); + this.$modal.msgSuccess("新增成功"); this.open = false; this.getList(); }).finally(() => { @@ -345,18 +345,16 @@ export default { /** 删除按钮操作 */ handleDelete(row) { const ids = row.id || this.ids; - this.$confirm('是否确认删除测试单表编号为"' + ids + '"的数据项?', "警告", { - confirmButtonText: "确定", - cancelButtonText: "取消", - type: "warning" - }).then(() => { + this.$modal.confirm('是否确认删除测试单表编号为"' + ids + '"的数据项?').then(() => { this.loading = true; return delDemo(ids); }).then(() => { this.loading = false; this.getList(); - this.msgSuccess("删除成功"); - }) + this.$modal.msgSuccess("删除成功"); + }).finally(() => { + this.loading = false; + }); }, /** 导出按钮操作 */ handleExport() { diff --git a/ruoyi-ui/src/views/demo/tree/index.vue b/ruoyi-ui/src/views/demo/tree/index.vue index ea54195e6..072786e28 100644 --- a/ruoyi-ui/src/views/demo/tree/index.vue +++ b/ruoyi-ui/src/views/demo/tree/index.vue @@ -255,7 +255,7 @@ export default { this.buttonLoading = true; if (this.form.id != null) { updateTree(this.form).then(response => { - this.msgSuccess("修改成功"); + this.$modal.msgSuccess("修改成功"); this.open = false; this.getList(); }).finally(() => { @@ -263,7 +263,7 @@ export default { }); } else { addTree(this.form).then(response => { - this.msgSuccess("新增成功"); + this.$modal.msgSuccess("新增成功"); this.open = false; this.getList(); }).finally(() => { @@ -275,18 +275,16 @@ export default { }, /** 删除按钮操作 */ handleDelete(row) { - this.$confirm('是否确认删除测试树表编号为"' + row.id + '"的数据项?', "警告", { - confirmButtonText: "确定", - cancelButtonText: "取消", - type: "warning" - }).then(() => { + this.$modal.confirm('是否确认删除测试树表编号为"' + row.id + '"的数据项?').then(() => { this.loading = true; return delTree(row.id); }).then(() => { this.loading = false; this.getList(); - this.msgSuccess("删除成功"); - }) + this.$modal.msgSuccess("删除成功"); + }).finally(() => { + this.loading = false; + }); } } }; diff --git a/ruoyi-ui/src/views/system/oss/config.vue b/ruoyi-ui/src/views/system/oss/config.vue index 04363f9d4..152727efd 100644 --- a/ruoyi-ui/src/views/system/oss/config.vue +++ b/ruoyi-ui/src/views/system/oss/config.vue @@ -351,7 +351,7 @@ export default { this.buttonLoading = true; if (this.form.ossConfigId != null) { updateOssConfig(this.form).then(response => { - this.msgSuccess("修改成功"); + this.$modal.msgSuccess("修改成功"); this.open = false; this.getList(); }).finally(() => { @@ -359,7 +359,7 @@ export default { }); } else { addOssConfig(this.form).then(response => { - this.msgSuccess("新增成功"); + this.$modal.msgSuccess("新增成功"); this.open = false; this.getList(); }).finally(() => { @@ -372,17 +372,13 @@ export default { /** 删除按钮操作 */ handleDelete(row) { const ossConfigIds = row.ossConfigId || this.ids; - this.$confirm('是否确认删除对象存储配置编号为"' + ossConfigIds + '"的数据项?', "警告", { - confirmButtonText: "确定", - cancelButtonText: "取消", - type: "warning" - }).then(() => { + this.$modal.confirm('是否确认删除对象存储配置编号为"' + ossConfigIds + '"的数据项?').then(() => { this.loading = true; return delOssConfig(ossConfigIds); }).then(() => { this.loading = false; this.getList(); - this.msgSuccess("删除成功"); + this.$modal.msgSuccess("删除成功"); }).finally(() => { this.loading = false; }); @@ -390,16 +386,11 @@ export default { // 对象存储配置状态修改 handleStatusChange(row) { let text = row.status === "0" ? "启用" : "停用"; - this.$confirm( - '确认要"' + text + '""' + row.configKey + '"配置吗?', "警告", { - confirmButtonText: "确定", - cancelButtonText: "取消", - type: "warning", - }).then(() => { + this.$modal.confirm('确认要"' + text + '""' + row.configKey + '"配置吗?').then(() => { return changeOssConfigStatus(row.ossConfigId, row.status, row.configKey); }).then(() => { this.getList() - this.msgSuccess(text + "成功"); + this.$modal.msgSuccess(text + "成功"); }).catch(() => { row.status = row.status === "0" ? "1" : "0"; }) diff --git a/ruoyi-ui/src/views/system/oss/index.vue b/ruoyi-ui/src/views/system/oss/index.vue index b4c5a462b..5b6719197 100644 --- a/ruoyi-ui/src/views/system/oss/index.vue +++ b/ruoyi-ui/src/views/system/oss/index.vue @@ -330,17 +330,13 @@ export default { /** 删除按钮操作 */ handleDelete(row) { const ossIds = row.ossId || this.ids; - this.$confirm('是否确认删除OSS对象存储编号为"' + ossIds + '"的数据项?', "警告", { - confirmButtonText: "确定", - cancelButtonText: "取消", - type: "warning" - }).then(() => { + this.$modal.confirm('是否确认删除OSS对象存储编号为"' + ossIds + '"的数据项?').then(() => { this.loading = true; return delOss(ossIds); }).then(() => { this.loading = false; this.getList(); - this.msgSuccess("删除成功"); + this.$modal.msgSuccess("删除成功"); }).finally(() => { this.loading = false; }); @@ -348,16 +344,11 @@ export default { // 预览列表图片状态修改 handlePreviewListResource(previewListResource) { let text = previewListResource ? "启用" : "停用"; - this.$confirm( - '确认要"' + text + '""预览列表图片"配置吗?', "警告", { - confirmButtonText: "确定", - cancelButtonText: "取消", - type: "warning", - }).then(() => { + this.$modal.confirm('确认要"' + text + '""预览列表图片"配置吗?').then(() => { return changePreviewListResource(previewListResource); }).then(() => { this.getList() - this.msgSuccess(text + "成功"); + this.$modal.msgSuccess(text + "成功"); }).catch(() => { this.previewListResource = previewListResource !== true; })