Răsfoiți Sursa

v3.8.0 新增通用方法简化模态/缓存使用

YunaiV 3 ani în urmă
părinte
comite
38ac5270d6
60 a modificat fișierele cu 358 adăugiri și 444 ștergeri
  1. 5 13
      yudao-module-tool/yudao-module-tool-impl/src/main/resources/codegen/vue/views/index.vue.vm
  2. 0 0
      yudao-server/src/main/resources/admin-ui/static/js/17.js
  3. 0 0
      yudao-server/src/main/resources/admin-ui/static/js/20.js
  4. 1 1
      yudao-server/src/main/resources/admin-ui/static/js/6.js
  5. 1 1
      yudao-ui-admin/src/components/bpmnProcessDesigner/package/designer/ProcessDesigner.vue
  6. 1 5
      yudao-ui-admin/src/layout/components/Navbar.vue
  7. 10 22
      yudao-ui-admin/src/layout/components/Settings/index.vue
  8. 2 12
      yudao-ui-admin/src/main.js
  9. 77 0
      yudao-ui-admin/src/plugins/cache.js
  10. 11 0
      yudao-ui-admin/src/plugins/index.js
  11. 83 0
      yudao-ui-admin/src/plugins/modal.js
  12. 2 2
      yudao-ui-admin/src/views/bpm/form/formEditor.vue
  13. 2 6
      yudao-ui-admin/src/views/bpm/form/index.vue
  14. 4 8
      yudao-ui-admin/src/views/bpm/group/index.vue
  15. 7 19
      yudao-ui-admin/src/views/bpm/model/index.vue
  16. 2 2
      yudao-ui-admin/src/views/bpm/model/modelEditor.vue
  17. 1 1
      yudao-ui-admin/src/views/bpm/oa/leave/create.vue
  18. 1 1
      yudao-ui-admin/src/views/bpm/oa/leave/index.vue
  19. 1 1
      yudao-ui-admin/src/views/bpm/processInstance/create.vue
  20. 6 6
      yudao-ui-admin/src/views/bpm/processInstance/detail.vue
  21. 1 1
      yudao-ui-admin/src/views/bpm/processInstance/index.vue
  22. 2 2
      yudao-ui-admin/src/views/bpm/taskAssignRule/taskAssignRuleDialog.vue
  23. 1 5
      yudao-ui-admin/src/views/infra/apiAccessLog/index.vue
  24. 3 11
      yudao-ui-admin/src/views/infra/apiErrorLog/index.vue
  25. 5 13
      yudao-ui-admin/src/views/infra/config/index.vue
  26. 3 7
      yudao-ui-admin/src/views/infra/file/index.vue
  27. 9 25
      yudao-ui-admin/src/views/infra/job/index.vue
  28. 1 5
      yudao-ui-admin/src/views/infra/job/log.vue
  29. 2 9
      yudao-ui-admin/src/views/infra/redis/index.vue
  30. 2 2
      yudao-ui-admin/src/views/pay/app/components/aliPayChannelForm.vue
  31. 2 2
      yudao-ui-admin/src/views/pay/app/components/wechatChannelForm.vue
  32. 7 19
      yudao-ui-admin/src/views/pay/app/index.vue
  33. 7 19
      yudao-ui-admin/src/views/pay/merchant/index.vue
  34. 1 5
      yudao-ui-admin/src/views/pay/order/index.vue
  35. 1 5
      yudao-ui-admin/src/views/pay/refund/index.vue
  36. 4 8
      yudao-ui-admin/src/views/system/dept/index.vue
  37. 5 13
      yudao-ui-admin/src/views/system/dict/data.vue
  38. 5 13
      yudao-ui-admin/src/views/system/dict/index.vue
  39. 5 13
      yudao-ui-admin/src/views/system/errorCode/index.vue
  40. 1 5
      yudao-ui-admin/src/views/system/loginlog/index.vue
  41. 6 10
      yudao-ui-admin/src/views/system/menu/index.vue
  42. 4 8
      yudao-ui-admin/src/views/system/notice/index.vue
  43. 1 5
      yudao-ui-admin/src/views/system/operatelog/index.vue
  44. 5 13
      yudao-ui-admin/src/views/system/post/index.vue
  45. 9 21
      yudao-ui-admin/src/views/system/role/index.vue
  46. 2 6
      yudao-ui-admin/src/views/system/session/index.vue
  47. 4 8
      yudao-ui-admin/src/views/system/sms/smsChannel.vue
  48. 1 5
      yudao-ui-admin/src/views/system/sms/smsLog.vue
  49. 6 14
      yudao-ui-admin/src/views/system/sms/smsTemplate.vue
  50. 5 13
      yudao-ui-admin/src/views/system/tenant/index.vue
  51. 10 22
      yudao-ui-admin/src/views/system/user/index.vue
  52. 1 1
      yudao-ui-admin/src/views/system/user/profile/resetPwd.vue
  53. 2 2
      yudao-ui-admin/src/views/system/user/profile/userAvatar.vue
  54. 1 1
      yudao-ui-admin/src/views/system/user/profile/userInfo.vue
  55. 2 2
      yudao-ui-admin/src/views/system/user/profile/userSocial.vue
  56. 2 2
      yudao-ui-admin/src/views/tool/codegen/editTable.vue
  57. 1 1
      yudao-ui-admin/src/views/tool/codegen/genInfoForm.vue
  58. 1 1
      yudao-ui-admin/src/views/tool/codegen/importTable.vue
  59. 6 14
      yudao-ui-admin/src/views/tool/codegen/index.vue
  60. 5 13
      yudao-ui-admin/src/views/tool/testDemo/index.vue

+ 5 - 13
yudao-module-tool/yudao-module-tool-impl/src/main/resources/codegen/vue/views/index.vue.vm

@@ -347,7 +347,7 @@ export default {
         // 修改的提交
         if (this.form.${primaryColumn.javaField} != null) {
           update${simpleClassName}(this.form).then(response => {
-            this.msgSuccess("修改成功");
+            this.$modal.msgSuccess("修改成功");
             this.open = false;
             this.getList();
           });
@@ -355,7 +355,7 @@ export default {
         }
         // 添加的提交
         create${simpleClassName}(this.form).then(response => {
-          this.msgSuccess("新增成功");
+          this.$modal.msgSuccess("新增成功");
           this.open = false;
           this.getList();
         });
@@ -364,15 +364,11 @@ export default {
     /** 删除按钮操作 */
     handleDelete(row) {
       const ${primaryColumn.javaField} = row.${primaryColumn.javaField};
-      this.$confirm('是否确认删除${table.classComment}编号为"' + ${primaryColumn.javaField} + '"的数据项?', "警告", {
-          confirmButtonText: "确定",
-          cancelButtonText: "取消",
-          type: "warning"
-        }).then(function() {
+      this.$model.confirm('是否确认删除${table.classComment}编号为"' + ${primaryColumn.javaField} + '"的数据项?').then(function() {
           return delete${simpleClassName}(${primaryColumn.javaField});
         }).then(() => {
           this.getList();
-          this.msgSuccess("删除成功");
+          this.$modal.msgSuccess("删除成功");
         }).catch(() => {});
     },
     /** 导出按钮操作 */
@@ -390,11 +386,7 @@ export default {
       #end
       #end
       // 执行导出
-      this.$confirm('是否确认导出所有${table.classComment}数据项?', "警告", {
-          confirmButtonText: "确定",
-          cancelButtonText: "取消",
-          type: "warning"
-        }).then(() => {
+      this.$model.confirm('是否确认导出所有${table.classComment}数据项?').then(() => {
           this.exportLoading = true;
           return export${simpleClassName}Excel(params);
         }).then(response => {

Fișier diff suprimat deoarece este prea mare
+ 0 - 0
yudao-server/src/main/resources/admin-ui/static/js/17.js


Fișier diff suprimat deoarece este prea mare
+ 0 - 0
yudao-server/src/main/resources/admin-ui/static/js/20.js


Fișier diff suprimat deoarece este prea mare
+ 1 - 1
yudao-server/src/main/resources/admin-ui/static/js/6.js


+ 1 - 1
yudao-ui-admin/src/components/bpmnProcessDesigner/package/designer/ProcessDesigner.vue

@@ -464,7 +464,7 @@ export default {
       const { err, xml } = await this.bpmnModeler.saveXML();
       // 读取异常时抛出异常
       if (err) {
-        this.msgError('保存模型失败,请重试!')
+        this.$modal.msgError('保存模型失败,请重试!')
         return
       }
       // 触发 save 事件

+ 1 - 5
yudao-ui-admin/src/layout/components/Navbar.vue

@@ -96,11 +96,7 @@ export default {
       this.$store.dispatch('app/toggleSideBar')
     },
     async logout() {
-      this.$confirm('确定注销并退出系统吗?', '提示', {
-        confirmButtonText: '确定',
-        cancelButtonText: '取消',
-        type: 'warning'
-      }).then(() => {
+      this.$modal.confirm('确定注销并退出系统吗?', '提示').then(() => {
         this.$store.dispatch('LogOut').then(() => {
           location.href = '/index';
         })

+ 10 - 22
yudao-ui-admin/src/layout/components/Settings/index.vue

@@ -38,11 +38,6 @@
         </div>
       </div>
 
-      <div class="drawer-item">
-        <span>动态标题</span>
-        <el-switch v-model="dynamicTitle" class="drawer-switch" />
-      </div>
-
       <el-divider/>
 
       <h3 class="drawer-title">系统布局配置</h3>
@@ -67,6 +62,11 @@
         <el-switch v-model="sidebarLogo" class="drawer-switch" />
       </div>
 
+      <div class="drawer-item">
+        <span>动态标题</span>
+        <el-switch v-model="dynamicTitle" class="drawer-switch" />
+      </div>
+
       <el-divider/>
 
       <el-button size="small" type="primary" plain icon="el-icon-document-add" @click="saveSetting">保存配置</el-button>
@@ -162,14 +162,8 @@ export default {
       this.sideTheme = val;
     },
     saveSetting() {
-      const loading = this.$loading({
-        lock: true,
-        fullscreen: false,
-        text: "正在保存到本地,请稍后...",
-        spinner: "el-icon-loading",
-        background: "rgba(0, 0, 0, 0.7)"
-      });
-      localStorage.setItem(
+      this.$modal.loading("正在保存到本地,请稍后...");
+      this.$cache.local.set(
         "layout-setting",
         `{
             "topNav":${this.topNav},
@@ -181,17 +175,11 @@ export default {
             "theme":"${this.theme}"
           }`
       );
-      setTimeout(loading.close(), 1000)
+      setTimeout(this.$modal.closeLoading(), 1000)
     },
     resetSetting() {
-      this.$loading({
-        lock: true,
-        fullscreen: false,
-        text: "正在清除设置缓存并刷新,请稍后...",
-        spinner: "el-icon-loading",
-        background: "rgba(0, 0, 0, 0.7)"
-      });
-      localStorage.removeItem("layout-setting")
+      this.$modal.loading("正在清除设置缓存并刷新,请稍后...");
+      this.$cache.local.remove("layout-setting")
       setTimeout("window.location.reload()", 1000)
     }
   }

+ 2 - 12
yudao-ui-admin/src/main.js

@@ -11,6 +11,7 @@ import App from './App'
 import store from './store'
 import router from './router'
 import directive from './directive' // directive
+import plugins from './plugins' // plugins
 
 import './assets/icons' // icon
 import './permission' // permission control
@@ -56,18 +57,6 @@ Vue.prototype.downloadMarkdown = downloadMarkdown
 Vue.prototype.downloadZip = downloadZip
 Vue.prototype.handleTree = handleTree
 
-Vue.prototype.msgSuccess = function (msg) {
-  this.$message({ showClose: true, message: msg, type: "success" });
-}
-
-Vue.prototype.msgError = function (msg) {
-  this.$message({ showClose: true, message: msg, type: "error" });
-}
-
-Vue.prototype.msgInfo = function (msg) {
-  this.$message.info(msg);
-}
-
 // 全局组件挂载
 Vue.component('DictTag', DictTag)
 Vue.component('Pagination', Pagination)
@@ -78,6 +67,7 @@ import DictTag from '@/components/DictTag'
 import VueMeta from 'vue-meta'
 
 Vue.use(directive)
+Vue.use(plugins)
 Vue.use(VueMeta)
 // Vue.use(hljs.vuePlugin);
 

+ 77 - 0
yudao-ui-admin/src/plugins/cache.js

@@ -0,0 +1,77 @@
+const sessionCache = {
+  set (key, value) {
+    if (!sessionStorage) {
+      return
+    }
+    if (key != null && value != null) {
+      sessionStorage.setItem(key, value)
+    }
+  },
+  get (key) {
+    if (!sessionStorage) {
+      return null
+    }
+    if (key == null) {
+      return null
+    }
+    return sessionStorage.getItem(key)
+  },
+  setJSON (key, jsonValue) {
+    if (jsonValue != null) {
+      this.set(key, JSON.stringify(jsonValue))
+    }
+  },
+  getJSON (key) {
+    const value = this.get(key)
+    if (value != null) {
+      return JSON.parse(value)
+    }
+  },
+  remove (key) {
+    sessionStorage.removeItem(key);
+  }
+}
+const localCache = {
+  set (key, value) {
+    if (!localStorage) {
+      return
+    }
+    if (key != null && value != null) {
+      localStorage.setItem(key, value)
+    }
+  },
+  get (key) {
+    if (!localStorage) {
+      return null
+    }
+    if (key == null) {
+      return null
+    }
+    return localStorage.getItem(key)
+  },
+  setJSON (key, jsonValue) {
+    if (jsonValue != null) {
+      this.set(key, JSON.stringify(jsonValue))
+    }
+  },
+  getJSON (key) {
+    const value = this.get(key)
+    if (value != null) {
+      return JSON.parse(value)
+    }
+  },
+  remove (key) {
+    localStorage.removeItem(key);
+  }
+}
+
+export default {
+  /**
+   * 会话级缓存
+   */
+  session: sessionCache,
+  /**
+   * 本地缓存
+   */
+  local: localCache
+}

+ 11 - 0
yudao-ui-admin/src/plugins/index.js

@@ -0,0 +1,11 @@
+import cache from './cache'
+import modal from './modal'
+
+export default {
+  install(Vue) {
+    // 缓存对象
+    Vue.prototype.$cache = cache
+    // 模态框对象
+    Vue.prototype.$modal = modal
+  }
+}

+ 83 - 0
yudao-ui-admin/src/plugins/modal.js

@@ -0,0 +1,83 @@
+import { Message, MessageBox, Notification, Loading } from 'element-ui'
+
+let loadingInstance;
+
+export default {
+  // 消息提示
+  msg(content) {
+    Message.info(content)
+  },
+  // 错误消息
+  msgError(content) {
+    Message.error(content)
+  },
+  // 成功消息
+  msgSuccess(content) {
+    Message.success(content)
+  },
+  // 警告消息
+  msgWarning(content) {
+    Message.warning(content)
+  },
+  // 弹出提示
+  alert(content) {
+    MessageBox.alert(content, "系统提示")
+  },
+  // 错误提示
+  alertError(content) {
+    MessageBox.alert(content, "系统提示", { type: 'error' })
+  },
+  // 成功提示
+  alertSuccess(content) {
+    MessageBox.alert(content, "系统提示", { type: 'success' })
+  },
+  // 警告提示
+  alertWarning(content) {
+    MessageBox.alert(content, "系统提示", { type: 'warning' })
+  },
+  // 通知提示
+  notify(content) {
+    Notification.info(content)
+  },
+  // 错误通知
+  notifyError(content) {
+    Notification.error(content);
+  },
+  // 成功通知
+  notifySuccess(content) {
+    Notification.success(content)
+  },
+  // 警告通知
+  notifyWarning(content) {
+    Notification.warning(content)
+  },
+  // 确认窗体
+  confirm(content) {
+    return MessageBox.confirm(content, "系统提示", {
+      confirmButtonText: '确定',
+      cancelButtonText: '取消',
+      type: "warning",
+    })
+  },
+  // 提交内容
+  prompt(content) {
+    return MessageBox.prompt(content, "系统提示", {
+      confirmButtonText: '确定',
+      cancelButtonText: '取消',
+      type: "warning",
+    })
+  },
+  // 打开遮罩层
+  loading(content) {
+    loadingInstance = Loading.service({
+      lock: true,
+      text: content,
+      spinner: "el-icon-loading",
+      background: "rgba(0, 0, 0, 0.7)",
+    })
+  },
+  // 关闭遮罩层
+  closeLoading() {
+    loadingInstance.close();
+  }
+}

+ 2 - 2
yudao-ui-admin/src/views/bpm/form/formEditor.vue

@@ -435,14 +435,14 @@ export default {
         // 修改的提交
         if (this.form.id != null) {
           updateForm(form).then(response => {
-            this.msgSuccess("修改成功");
+            this.$modal.msgSuccess("修改成功");
             this.close()
           });
           return;
         }
         // 添加的提交
         createForm(form).then(response => {
-          this.msgSuccess("新增成功");
+          this.$modal.msgSuccess("新增成功");
           this.close()
         });
       });

+ 2 - 6
yudao-ui-admin/src/views/bpm/form/index.vue

@@ -150,15 +150,11 @@ export default {
     /** 删除按钮操作 */
     handleDelete(row) {
       const id = row.id;
-      this.$confirm('是否确认删除工作流的编号为"' + id + '"的数据项?', "警告", {
-        confirmButtonText: "确定",
-        cancelButtonText: "取消",
-        type: "warning"
-      }).then(function() {
+      this.$modal.confirm('是否确认删除工作表单的编号为"' + id + '"的数据项?').then(function() {
         return deleteForm(id);
       }).then(() => {
         this.getList();
-        this.msgSuccess("删除成功");
+        this.$modal.msgSuccess("删除成功");
       }).catch(() => {});
     }
   }

+ 4 - 8
yudao-ui-admin/src/views/bpm/group/index.vue

@@ -213,7 +213,7 @@ export default {
         // 修改的提交
         if (this.form.id != null) {
           updateUserGroup(this.form).then(response => {
-            this.msgSuccess("修改成功");
+            this.$modal.msgSuccess("修改成功");
             this.open = false;
             this.getList();
           });
@@ -221,7 +221,7 @@ export default {
         }
         // 添加的提交
         createUserGroup(this.form).then(response => {
-          this.msgSuccess("新增成功");
+          this.$modal.msgSuccess("新增成功");
           this.open = false;
           this.getList();
         });
@@ -230,15 +230,11 @@ export default {
     /** 删除按钮操作 */
     handleDelete(row) {
       const id = row.id;
-      this.$confirm('是否确认删除用户组编号为"' + id + '"的数据项?', "警告", {
-        confirmButtonText: "确定",
-        cancelButtonText: "取消",
-        type: "warning"
-      }).then(function() {
+      this.$modal.confirm('是否确认删除用户组编号为"' + id + '"的数据项?').then(function() {
         return deleteUserGroup(id);
       }).then(() => {
         this.getList();
-        this.msgSuccess("删除成功");
+        this.$modal.msgSuccess("删除成功");
       }).catch(() => {});
     },
     getUserNickname(userId) {

+ 7 - 19
yudao-ui-admin/src/views/bpm/model/index.vue

@@ -399,7 +399,7 @@ export default {
             formCustomCreatePath: this.form.formType === 20 ? this.form.formCustomCreatePath : undefined,
             formCustomViewPath: this.form.formType === 20 ? this.form.formCustomViewPath : undefined,
           }).then(response => {
-            this.msgSuccess("修改模型成功");
+            this.$modal.msgSuccess("修改模型成功");
             this.open = false;
             this.getList();
           });
@@ -425,11 +425,7 @@ export default {
     /** 删除按钮操作 */
     handleDelete(row) {
       const that = this;
-      this.$confirm('是否删除该流程!!', "警告", {
-        confirmButtonText: "确定",
-        cancelButtonText: "取消",
-        type: "warning"
-      }).then(function() {
+      this.$modal.confirm('是否删除该流程!!').then(function() {
         deleteModel(row.id).then(response => {
           that.getList();
           that.msgSuccess("删除成功");
@@ -439,11 +435,7 @@ export default {
     /** 部署按钮操作 */
     handleDeploy(row) {
       const that = this;
-      this.$confirm('是否部署该流程!!', "提示", {
-        confirmButtonText: "确定",
-        cancelButtonText: "取消",
-        type: "success"
-      }).then(function() {
+      this.$modal.confirm('是否部署该流程!!').then(function() {
         deployModel(row.id).then(response => {
           that.getList();
           that.msgSuccess("部署成功");
@@ -491,15 +483,11 @@ export default {
       const id = row.id;
       let state = row.processDefinition.suspensionState;
       let statusState = state === 1 ? '激活' : '挂起';
-      this.$confirm('是否确认' + statusState + '流程名字为"' + row.name + '"的数据项?', "警告", {
-        confirmButtonText: "确定",
-        cancelButtonText: "取消",
-        type: "warning"
-      }).then(function() {
+      this.$modal.confirm('是否确认' + statusState + '流程名字为"' + row.name + '"的数据项?').then(function() {
         return updateModelState(id, state);
       }).then(() => {
         this.getList();
-        this.msgSuccess(statusState + "成功");
+        this.$modal.msgSuccess(statusState + "成功");
       }).catch(() => {});
     },
     /** 导入按钮操作 */
@@ -513,13 +501,13 @@ export default {
     // 文件上传成功处理
     handleFileSuccess(response, file, fileList) {
       if (response.code !== 0) {
-        this.msgError(response.msg)
+        this.$modal.msgError(response.msg)
         return;
       }
       // 重置表单
       this.uploadClose();
       // 提示,并刷新
-      this.msgSuccess("导入流程成功!请点击【设计流程】按钮,进行编辑保存后,才可以进行【发布流程】");
+      this.$modal.msgSuccess("导入流程成功!请点击【设计流程】按钮,进行编辑保存后,才可以进行【发布流程】");
       this.getList();
     },
     uploadClose() {

+ 2 - 2
yudao-ui-admin/src/views/bpm/model/modelEditor.vue

@@ -96,7 +96,7 @@ export default {
       // 修改的提交
       if (data.id) {
         updateModel(data).then(response => {
-          this.msgSuccess("修改成功")
+          this.$modal.msgSuccess("修改成功")
           // 跳转回去
           this.close()
         })
@@ -104,7 +104,7 @@ export default {
       }
       // 添加的提交
       createModel(data).then(response => {
-        this.msgSuccess("保存成功")
+        this.$modal.msgSuccess("保存成功")
         // 跳转回去
         this.close()
       })

+ 1 - 1
yudao-ui-admin/src/views/bpm/oa/leave/create.vue

@@ -65,7 +65,7 @@ export default {
 
         // 添加的提交
         createLeave(this.form).then(response => {
-          this.msgSuccess("发起成功");
+          this.$modal.msgSuccess("发起成功");
           this.$store.dispatch("tagsView/delView", this.$route);
           this.$router.push({ path: "/bpm/oa/leave"});
         });

+ 1 - 1
yudao-ui-admin/src/views/bpm/oa/leave/index.vue

@@ -169,7 +169,7 @@ export default {
         return cancelProcessInstance(id, value);
       }).then(() => {
         this.getList();
-        this.msgSuccess("取消成功");
+        this.$modal.msgSuccess("取消成功");
       })
     }
   }

+ 1 - 1
yudao-ui-admin/src/views/bpm/processInstance/create.vue

@@ -144,7 +144,7 @@ export default {
         processDefinitionId: this.selectProcessInstance.id,
         variables: variables
       }).then(response => {
-        this.msgSuccess("发起流程成功");
+        this.$modal.msgSuccess("发起流程成功");
         // 关闭当前窗口
         this.$store.dispatch("tagsView/delView", this.$route);
         this.$router.go(-1);

+ 6 - 6
yudao-ui-admin/src/views/bpm/processInstance/detail.vue

@@ -300,7 +300,7 @@ export default {
         processDefinitionId: this.selectProcessInstance.id,
         variables: variables
       }).then(response => {
-        this.msgSuccess("发起流程成功");
+        this.$modal.msgSuccess("发起流程成功");
         // 关闭当前窗口
         this.$store.dispatch("tagsView/delView", this.$route);
         this.$router.go(-1);
@@ -355,12 +355,12 @@ export default {
         }
         if (pass) {
           approveTask(data).then(response => {
-            this.msgSuccess("审批通过成功!");
+            this.$modal.msgSuccess("审批通过成功!");
             this.getDetail(); // 获得最新详情
           });
         } else {
           rejectTask(data).then(response => {
-            this.msgSuccess("审批不通过成功!");
+            this.$modal.msgSuccess("审批不通过成功!");
             this.getDetail(); // 获得最新详情
           });
         }
@@ -381,7 +381,7 @@ export default {
           return;
         }
         updateTaskAssignee(this.updateAssignee.form).then(response => {
-          this.msgSuccess("转派任务成功!");
+          this.$modal.msgSuccess("转派任务成功!");
           this.updateAssignee.open = false;
           this.getDetail(); // 获得最新详情
         });
@@ -402,11 +402,11 @@ export default {
     },
     /** 处理审批退回的操作 */
     handleDelegate(task) {
-      this.msgError("暂不支持【委派】功能,可以使用【转派】替代!");
+      this.$modal.msgError("暂不支持【委派】功能,可以使用【转派】替代!");
     },
     /** 处理审批退回的操作 */
     handleBack(task) {
-      this.msgError("暂不支持【退回】功能!");
+      this.$modal.msgError("暂不支持【退回】功能!");
     }
   }
 };

+ 1 - 1
yudao-ui-admin/src/views/bpm/processInstance/index.vue

@@ -174,7 +174,7 @@ export default {
         return cancelProcessInstance(id, value);
       }).then(() => {
         this.getList();
-        this.msgSuccess("取消成功");
+        this.$modal.msgSuccess("取消成功");
       })
     },
     /** 处理详情按钮 */

+ 2 - 2
yudao-ui-admin/src/views/bpm/taskAssignRule/taskAssignRuleDialog.vue

@@ -257,7 +257,7 @@ export default {
           if (!form.id) {
             form.modelId = this.modelId; // 模型编号
             createTaskAssignRule(form).then(response => {
-              this.msgSuccess("修改成功");
+              this.$modal.msgSuccess("修改成功");
               this.open = false;
               this.getList();
             });
@@ -265,7 +265,7 @@ export default {
           } else {
             form.taskDefinitionKey = undefined; // 无法修改
             updateTaskAssignRule(form).then(response => {
-              this.msgSuccess("修改成功");
+              this.$modal.msgSuccess("修改成功");
               this.open = false;
               this.getList();
             });

+ 1 - 5
yudao-ui-admin/src/views/infra/apiAccessLog/index.vue

@@ -202,11 +202,7 @@ export default {
       params.pageSize = undefined;
       this.addBeginAndEndTime(params, this.dateRangeBeginTime, 'beginTime');
       // 执行导出
-      this.$confirm('是否确认导出所有API 访问日志数据项?', "警告", {
-        confirmButtonText: "确定",
-        cancelButtonText: "取消",
-        type: "warning"
-      }).then(() => {
+      this.$modal.confirm('是否确认导出所有API 访问日志数据项?').then(() => {
         this.exportLoading = true;
         return exportApiAccessLogExcel(params);
       }).then(response => {

+ 3 - 11
yudao-ui-admin/src/views/infra/apiErrorLog/index.vue

@@ -205,13 +205,9 @@ export default {
     /** 处理已处理 / 已忽略的操作 **/
     handleProcessClick(row, processStatus) {
       const processStatusText = this.getDictDataLabel(this.DICT_TYPE.INFRA_API_ERROR_LOG_PROCESS_STATUS, processStatus)
-      this.$confirm('确认标记为' + processStatusText, '提示', {
-        type: 'warning',
-        confirmButtonText: '确定',
-        cancelButtonText: '取消'
-      }).then(() => {
+      this.$modal.confirm('确认标记为' + processStatusText).then(() => {
         updateApiErrorLogProcess(row.id, processStatus).then(() => {
-          this.msgSuccess("修改成功");
+          this.$modal.msgSuccess("修改成功");
           this.getList();
         });
       }).catch(() => {});
@@ -224,11 +220,7 @@ export default {
       params.pageSize = undefined;
       this.addBeginAndEndTime(params, this.dateRangeExceptionTime, 'exceptionTime');
       // 执行导出
-      this.$confirm('是否确认导出所有API 错误日志数据项?', "警告", {
-        confirmButtonText: "确定",
-        cancelButtonText: "取消",
-        type: "warning"
-      }).then(() => {
+      this.$modal.confirm('是否确认导出所有API 错误日志数据项?').then(() => {
         this.exportLoading = true;
         return exportApiErrorLogExcel(params);
       }).then(response => {

+ 5 - 13
yudao-ui-admin/src/views/infra/config/index.vue

@@ -234,13 +234,13 @@ export default {
         if (valid) {
           if (this.form.id !== undefined) {
             updateConfig(this.form).then(response => {
-              this.msgSuccess("修改成功");
+              this.$modal.msgSuccess("修改成功");
               this.open = false;
               this.getList();
             });
           } else {
             addConfig(this.form).then(response => {
-              this.msgSuccess("新增成功");
+              this.$modal.msgSuccess("新增成功");
               this.open = false;
               this.getList();
             });
@@ -251,15 +251,11 @@ export default {
     /** 删除按钮操作 */
     handleDelete(row) {
       const ids = row.id || this.ids;
-      this.$confirm('是否确认删除参数编号为"' + ids + '"的数据项?', "警告", {
-          confirmButtonText: "确定",
-          cancelButtonText: "取消",
-          type: "warning"
-        }).then(function() {
+      this.$modal.confirm('是否确认删除参数编号为"' + ids + '"的数据项?').then(function() {
           return delConfig(ids);
         }).then(() => {
           this.getList();
-          this.msgSuccess("删除成功");
+          this.$modal.msgSuccess("删除成功");
       }).catch(() => {});
     },
     /** 导出按钮操作 */
@@ -268,11 +264,7 @@ export default {
         this.dateRange[0] ? this.dateRange[0] + ' 00:00:00' : undefined,
         this.dateRange[1] ? this.dateRange[1] + ' 23:59:59' : undefined,
       ]);
-      this.$confirm('是否确认导出所有参数数据项?', "警告", {
-          confirmButtonText: "确定",
-          cancelButtonText: "取消",
-          type: "warning"
-        }).then(() => {
+      this.$modal.confirm('是否确认导出所有参数数据项?').then(() => {
           this.exportLoading = true;
           return exportConfig(queryParams);
         }).then(response => {

+ 3 - 7
yudao-ui-admin/src/views/infra/file/index.vue

@@ -180,21 +180,17 @@ export default {
       this.upload.isUploading = false;
       this.$refs.upload.clearFiles();
       // 提示成功,并刷新
-      this.msgSuccess("上传成功");
+      this.$modal.msgSuccess("上传成功");
       this.getList();
     },
     /** 删除按钮操作 */
     handleDelete(row) {
       const id = row.id;
-      this.$confirm('是否确认删除文件编号为"' + id + '"的数据项?', "警告", {
-        confirmButtonText: "确定",
-        cancelButtonText: "取消",
-        type: "warning"
-      }).then(function() {
+      this.$modal.confirm('是否确认删除文件编号为"' + id + '"的数据项?').then(function() {
         return deleteFile(id);
       }).then(() => {
         this.getList();
-        this.msgSuccess("删除成功");
+        this.$modal.msgSuccess("删除成功");
       }).catch(() => {});
     },
   }

+ 9 - 25
yudao-ui-admin/src/views/infra/job/index.vue

@@ -247,14 +247,10 @@ export default {
     },
     /** 立即执行一次 **/
     handleRun(row) {
-      this.$confirm('确认要立即执行一次"' + row.name + '"任务吗?', "警告", {
-          confirmButtonText: "确定",
-          cancelButtonText: "取消",
-          type: "warning"
-        }).then(function() {
+      this.$modal.confirm('确认要立即执行一次"' + row.name + '"任务吗?').then(function() {
           return runJob(row.id);
         }).then(() => {
-          this.msgSuccess("执行成功");
+          this.$modal.msgSuccess("执行成功");
       }).catch(() => {});
     },
     /** 任务详细信息 */
@@ -312,13 +308,13 @@ export default {
         if (valid) {
           if (this.form.id !== undefined) {
             updateJob(this.form).then(response => {
-              this.msgSuccess("修改成功");
+              this.$modal.msgSuccess("修改成功");
               this.open = false;
               this.getList();
             });
           } else {
             addJob(this.form).then(response => {
-              this.msgSuccess("新增成功");
+              this.$modal.msgSuccess("新增成功");
               this.open = false;
               this.getList();
             });
@@ -329,15 +325,11 @@ export default {
     /** 删除按钮操作 */
     handleDelete(row) {
       const ids = row.id;
-      this.$confirm('是否确认删除定时任务编号为"' + ids + '"的数据项?', "警告", {
-          confirmButtonText: "确定",
-          cancelButtonText: "取消",
-          type: "warning"
-        }).then(function() {
+      this.$modal.confirm('是否确认删除定时任务编号为"' + ids + '"的数据项?').then(function() {
           return delJob(ids);
         }).then(() => {
           this.getList();
-          this.msgSuccess("删除成功");
+          this.$modal.msgSuccess("删除成功");
       }).catch(() => {});
     },
     /** 更新状态操作 */
@@ -345,15 +337,11 @@ export default {
       const id = row.id;
       let status = open ? InfraJobStatusEnum.NORMAL : InfraJobStatusEnum.STOP;
       let statusStr = open ? '开启' : '关闭';
-      this.$confirm('是否确认' + statusStr + '定时任务编号为"' + id + '"的数据项?', "警告", {
-        confirmButtonText: "确定",
-        cancelButtonText: "取消",
-        type: "warning"
-      }).then(function() {
+      this.$modal.confirm('是否确认' + statusStr + '定时任务编号为"' + id + '"的数据项?').then(function() {
         return updateJobStatus(id, status);
       }).then(() => {
         this.getList();
-        this.msgSuccess(statusStr + "成功");
+        this.$modal.msgSuccess(statusStr + "成功");
       }).catch(() => {});
     },
     // 更多操作触发
@@ -375,11 +363,7 @@ export default {
     /** 导出按钮操作 */
     handleExport() {
       const queryParams = this.queryParams;
-      this.$confirm("是否确认导出所有定时任务数据项?", "警告", {
-          confirmButtonText: "确定",
-          cancelButtonText: "取消",
-          type: "warning"
-        }).then(() => {
+      this.$modal.confirm("是否确认导出所有定时任务数据项?").then(() => {
           this.exportLoading = true;
           return exportJob(queryParams);
         }).then(response => {

+ 1 - 5
yudao-ui-admin/src/views/infra/job/log.vue

@@ -165,11 +165,7 @@ export default {
       params.pageNo = undefined;
       params.pageSize = undefined;
       // 执行导出
-      this.$confirm('是否确认导出所有定时任务日志数据项?', "警告", {
-        confirmButtonText: "确定",
-        cancelButtonText: "取消",
-        type: "warning"
-      }).then(() => {
+      this.$modal.confirm('是否确认导出所有定时任务日志数据项?').then(() => {
         this.exportLoading = true;
         return exportJobLogExcel(params);
       }).then(response => {

+ 2 - 9
yudao-ui-admin/src/views/infra/redis/index.vue

@@ -92,8 +92,6 @@ export default {
   name: "Server",
   data() {
     return {
-      // 加载层信息
-      loading: [],
       // 统计命令信息
       commandstats: null,
       // 使用内存
@@ -115,7 +113,7 @@ export default {
       // 查询 Redis 监控信息
       getCache().then((response) => {
         this.cache = response.data;
-        this.loading.close();
+        this.$modal.closeLoading();
 
         this.commandstats = echarts.init(this.$refs.commandstats, "macarons");
         const commandStats = [];
@@ -176,12 +174,7 @@ export default {
     },
     // 打开加载层
     openLoading() {
-      this.loading = this.$loading({
-        lock: true,
-        text: "拼命读取中",
-        spinner: "el-icon-loading",
-        background: "rgba(0, 0, 0, 0.7)",
-      });
+      this.$modal.loading("正在加载缓存监控数据,请稍后!");
     },
   },
 };

+ 2 - 2
yudao-ui-admin/src/views/pay/app/components/aliPayChannelForm.vue

@@ -298,7 +298,7 @@ export default {
         if (this.transferParam.edit) {
           updateChannel(data).then(response => {
             if (response.code === 0) {
-              this.msgSuccess("修改成功");
+              this.$modal.msgSuccess("修改成功");
               this.close();
             }
 
@@ -307,7 +307,7 @@ export default {
 
           createChannel(data).then(response => {
             if (response.code === 0) {
-              this.msgSuccess("新增成功");
+              this.$modal.msgSuccess("新增成功");
               this.$parent.refreshTable();
               this.close();
             }

+ 2 - 2
yudao-ui-admin/src/views/pay/app/components/wechatChannelForm.vue

@@ -247,7 +247,7 @@ export default {
         if (this.transferParam.edit) {
           updateChannel(data).then(response => {
             if (response.code === 0) {
-              this.msgSuccess("修改成功");
+              this.$modal.msgSuccess("修改成功");
               this.close();
             }
 
@@ -256,7 +256,7 @@ export default {
 
           createChannel(data).then(response => {
             if (response.code === 0) {
-              this.msgSuccess("新增成功");
+              this.$modal.msgSuccess("新增成功");
               this.$parent.refreshTable();
               this.close();
             }

+ 7 - 19
yudao-ui-admin/src/views/pay/app/index.vue

@@ -359,14 +359,10 @@ export default {
     // 用户状态修改
     handleStatusChange(row) {
       let text = row.status === CommonStatusEnum.ENABLE ? "启用" : "停用";
-      this.$confirm('确认要"' + text + '""' + row.name + '"应用吗?', "警告", {
-        confirmButtonText: "确定",
-        cancelButtonText: "取消",
-        type: "warning"
-      }).then(function () {
+      this.$modal.confirm('确认要"' + text + '""' + row.name + '"应用吗?').then(function () {
         return changeAppStatus(row.id, row.status);
       }).then(() => {
-        this.msgSuccess(text + "成功");
+        this.$modal.msgSuccess(text + "成功");
       }).catch(function () {
         row.status = row.status === CommonStatusEnum.ENABLE ? CommonStatusEnum.DISABLE
           : CommonStatusEnum.ENABLE;
@@ -381,7 +377,7 @@ export default {
         // 修改的提交
         if (this.form.id != null) {
           updateApp(this.form).then(response => {
-            this.msgSuccess("修改成功");
+            this.$modal.msgSuccess("修改成功");
             this.open = false;
             this.getList();
           });
@@ -389,7 +385,7 @@ export default {
         }
         // 添加的提交
         createApp(this.form).then(response => {
-          this.msgSuccess("新增成功");
+          this.$modal.msgSuccess("新增成功");
           this.open = false;
           this.getList();
         });
@@ -398,15 +394,11 @@ export default {
     /** 删除按钮操作 */
     handleDelete(row) {
       const id = row.id;
-      this.$confirm('是否确认删除支付应用信息编号为"' + id + '"的数据项?', "警告", {
-        confirmButtonText: "确定",
-        cancelButtonText: "取消",
-        type: "warning"
-      }).then(function () {
+      this.$modal.confirm('是否确认删除支付应用信息编号为"' + id + '"的数据项?').then(function () {
         return deleteApp(id);
       }).then(() => {
         this.getList();
-        this.msgSuccess("删除成功");
+        this.$modal.msgSuccess("删除成功");
       }).catch(() => {
         this.$message({
           type: 'info',
@@ -422,11 +414,7 @@ export default {
       params.pageSize = undefined;
       this.addBeginAndEndTime(params, this.dateRangeCreateTime, 'createTime');
       // 执行导出
-      this.$confirm('是否确认导出所有支付应用信息数据项?', "警告", {
-        confirmButtonText: "确定",
-        cancelButtonText: "取消",
-        type: "warning"
-      }).then(function () {
+      this.$modal.confirm('是否确认导出所有支付应用信息数据项?').then(function () {
         return exportAppExcel(params);
       }).then(response => {
         this.downloadExcel(response, '支付应用信息.xls');

+ 7 - 19
yudao-ui-admin/src/views/pay/merchant/index.vue

@@ -225,14 +225,10 @@ export default {
     // 用户状态修改
     handleStatusChange(row) {
       let text = row.status === CommonStatusEnum.ENABLE ? "启用" : "停用";
-      this.$confirm('确认要"' + text + '""' + row.name + '"商户吗?', "警告", {
-        confirmButtonText: "确定",
-        cancelButtonText: "取消",
-        type: "warning"
-      }).then(function() {
+      this.$modal.confirm('确认要"' + text + '""' + row.name + '"商户吗?').then(function() {
         return changeMerchantStatus(row.id, row.status);
       }).then(() => {
-        this.msgSuccess(text + "成功");
+        this.$modal.msgSuccess(text + "成功");
       }).catch(function() {
         row.status = row.status === CommonStatusEnum.ENABLE ? CommonStatusEnum.DISABLE
           : CommonStatusEnum.ENABLE;
@@ -247,7 +243,7 @@ export default {
         // 修改的提交
         if (this.form.id != null) {
           updateMerchant(this.form).then(response => {
-            this.msgSuccess("修改成功");
+            this.$modal.msgSuccess("修改成功");
             this.open = false;
             this.getList();
           });
@@ -255,7 +251,7 @@ export default {
         }
         // 添加的提交
         createMerchant(this.form).then(response => {
-          this.msgSuccess("新增成功");
+          this.$modal.msgSuccess("新增成功");
           this.open = false;
           this.getList();
         });
@@ -264,15 +260,11 @@ export default {
     /** 删除按钮操作 */
     handleDelete(row) {
       const id = row.id;
-      this.$confirm('是否确认删除支付商户信息编号为"' + id + '"的数据项?', "警告", {
-          confirmButtonText: "确定",
-          cancelButtonText: "取消",
-          type: "warning"
-        }).then(function() {
+      this.$modal.confirm('是否确认删除支付商户信息编号为"' + id + '"的数据项?').then(function() {
           return deleteMerchant(id);
         }).then(() => {
           this.getList();
-          this.msgSuccess("删除成功");
+          this.$modal.msgSuccess("删除成功");
       }).catch(() => {});
     },
     /** 导出按钮操作 */
@@ -283,11 +275,7 @@ export default {
       params.pageSize = undefined;
       this.addBeginAndEndTime(params, this.dateRangeCreateTime, 'createTime');
       // 执行导出
-      this.$confirm('是否确认导出所有支付商户信息数据项?', "警告", {
-          confirmButtonText: "确定",
-          cancelButtonText: "取消",
-          type: "warning"
-        }).then(() => {
+      this.$modal.confirm('是否确认导出所有支付商户信息数据项?').then(() => {
           this.exportLoading = true;
           return exportMerchantExcel(params);
         }).then(response => {

+ 1 - 5
yudao-ui-admin/src/views/pay/order/index.vue

@@ -420,11 +420,7 @@ export default {
       this.addBeginAndEndTime(params, this.dateRangeNotifyTime, 'notifyTime');
       this.addDateRange(params, this.dateRangeCreateTime, 'CreateTime');
       // 执行导出
-      this.$confirm('是否确认导出所有支付订单数据项?', "警告", {
-        confirmButtonText: "确定",
-        cancelButtonText: "取消",
-        type: "warning"
-      }).then(function () {
+      this.$modal.confirm('是否确认导出所有支付订单数据项?').then(function () {
         return exportOrderExcel(params);
       }).then(response => {
         this.downloadExcel(response, '支付订单.xls');

+ 1 - 5
yudao-ui-admin/src/views/pay/refund/index.vue

@@ -424,11 +424,7 @@ export default {
       this.addBeginAndEndTime(params, this.dateRangeNotifyTime, 'notifyTime');
       this.addDateRange(params, this.dateRangeCreateTime, 'CreateTime');
       // 执行导出
-      this.$confirm('是否确认导出所有退款订单数据项?', "警告", {
-        confirmButtonText: "确定",
-        cancelButtonText: "取消",
-        type: "warning"
-      }).then(function () {
+      this.$modal.confirm('是否确认导出所有退款订单数据项?').then(function () {
         return exportRefundExcel(params);
       }).then(response => {
         this.downloadExcel(response, '退款订单.xls');

+ 4 - 8
yudao-ui-admin/src/views/system/dept/index.vue

@@ -291,13 +291,13 @@ export default {
         if (valid) {
           if (this.form.id !== undefined) {
             updateDept(this.form).then(response => {
-              this.msgSuccess("修改成功");
+              this.$modal.msgSuccess("修改成功");
               this.open = false;
               this.getList();
             });
           } else {
             addDept(this.form).then(response => {
-              this.msgSuccess("新增成功");
+              this.$modal.msgSuccess("新增成功");
               this.open = false;
               this.getList();
             });
@@ -307,15 +307,11 @@ export default {
     },
     /** 删除按钮操作 */
     handleDelete(row) {
-      this.$confirm('是否确认删除名称为"' + row.name + '"的数据项?', "警告", {
-          confirmButtonText: "确定",
-          cancelButtonText: "取消",
-          type: "warning"
-        }).then(function() {
+      this.$modal.confirm('是否确认删除名称为"' + row.name + '"的数据项?').then(function() {
           return delDept(row.id);
         }).then(() => {
           this.getList();
-          this.msgSuccess("删除成功");
+          this.$modal.msgSuccess("删除成功");
       }).catch(() => {});
     }
   }

+ 5 - 13
yudao-ui-admin/src/views/system/dict/data.vue

@@ -266,13 +266,13 @@ export default {
         if (valid) {
           if (this.form.id !== undefined) {
             updateData(this.form).then(response => {
-              this.msgSuccess("修改成功");
+              this.$modal.msgSuccess("修改成功");
               this.open = false;
               this.getList();
             });
           } else {
             addData(this.form).then(response => {
-              this.msgSuccess("新增成功");
+              this.$modal.msgSuccess("新增成功");
               this.open = false;
               this.getList();
             });
@@ -283,25 +283,17 @@ export default {
     /** 删除按钮操作 */
     handleDelete(row) {
       const ids = row.id;
-      this.$confirm('是否确认删除字典编码为"' + ids + '"的数据项?', "警告", {
-          confirmButtonText: "确定",
-          cancelButtonText: "取消",
-          type: "warning"
-        }).then(function() {
+      this.$modal.confirm('是否确认删除字典编码为"' + ids + '"的数据项?').then(function() {
           return delData(ids);
         }).then(() => {
           this.getList();
-          this.msgSuccess("删除成功");
+          this.$modal.msgSuccess("删除成功");
       }).catch(() => {});
     },
     /** 导出按钮操作 */
     handleExport() {
       const queryParams = this.queryParams;
-      this.$confirm('是否确认导出所有数据项?', "警告", {
-          confirmButtonText: "确定",
-          cancelButtonText: "取消",
-          type: "warning"
-        }).then(() => {
+      this.$modal.confirm('是否确认导出所有数据项?').then(() => {
           this.exportLoading = true;
           return exportData(queryParams);
         }).then(response => {

+ 5 - 13
yudao-ui-admin/src/views/system/dict/index.vue

@@ -214,13 +214,13 @@ export default {
         if (valid) {
           if (this.form.id !== undefined) {
             updateType(this.form).then(response => {
-              this.msgSuccess("修改成功");
+              this.$modal.msgSuccess("修改成功");
               this.open = false;
               this.getList();
             });
           } else {
             addType(this.form).then(response => {
-              this.msgSuccess("新增成功");
+              this.$modal.msgSuccess("新增成功");
               this.open = false;
               this.getList();
             });
@@ -231,15 +231,11 @@ export default {
     /** 删除按钮操作 */
     handleDelete(row) {
       const ids = row.id || this.ids;
-      this.$confirm('是否确认删除字典编号为"' + ids + '"的数据项?', "警告", {
-          confirmButtonText: "确定",
-          cancelButtonText: "取消",
-          type: "warning"
-        }).then(function() {
+      this.$modal.confirm('是否确认删除字典编号为"' + ids + '"的数据项?').then(function() {
           return delType(ids);
         }).then(() => {
           this.getList();
-          this.msgSuccess("删除成功");
+          this.$modal.msgSuccess("删除成功");
       }).catch(() => {});
     },
     /** 导出按钮操作 */
@@ -250,11 +246,7 @@ export default {
       params.pageSize = undefined;
       this.addBeginAndEndTime(params, this.dateRangeCreateTime, 'createTime');
       // 执行导出
-      this.$confirm('是否确认导出所有字典类型数据项?', "警告", {
-        confirmButtonText: "确定",
-        cancelButtonText: "取消",
-        type: "warning"
-      }).then(() => {
+      this.$modal.confirm('是否确认导出所有字典类型数据项?').then(() => {
         this.exportLoading = true;
         return exportType(params);
       }).then(response => {

+ 5 - 13
yudao-ui-admin/src/views/system/errorCode/index.vue

@@ -207,7 +207,7 @@ export default {
         // 修改的提交
         if (this.form.id != null) {
           updateErrorCode(this.form).then(response => {
-            this.msgSuccess("修改成功");
+            this.$modal.msgSuccess("修改成功");
             this.open = false;
             this.getList();
           });
@@ -215,7 +215,7 @@ export default {
         }
         // 添加的提交
         createErrorCode(this.form).then(response => {
-          this.msgSuccess("新增成功");
+          this.$modal.msgSuccess("新增成功");
           this.open = false;
           this.getList();
         });
@@ -224,15 +224,11 @@ export default {
     /** 删除按钮操作 */
     handleDelete(row) {
       const id = row.id;
-      this.$confirm('是否确认删除错误码编号为"' + id + '"的数据项?', "警告", {
-        confirmButtonText: "确定",
-        cancelButtonText: "取消",
-        type: "warning"
-      }).then(function() {
+      this.$modal.confirm('是否确认删除错误码编号为"' + id + '"的数据项?').then(function() {
         return deleteErrorCode(id);
       }).then(() => {
         this.getList();
-        this.msgSuccess("删除成功");
+        this.$modal.msgSuccess("删除成功");
       }).catch(() => {});
     },
     /** 导出按钮操作 */
@@ -243,11 +239,7 @@ export default {
       params.pageSize = undefined;
       this.addBeginAndEndTime(params, this.dateRangeCreateTime, 'createTime');
       // 执行导出
-      this.$confirm('是否确认导出所有错误码数据项?', "警告", {
-        confirmButtonText: "确定",
-        cancelButtonText: "取消",
-        type: "warning"
-      }).then(() => {
+      this.$modal.confirm('是否确认导出所有错误码数据项?').then(() => {
         this.exportLoading = true;
         return exportErrorCodeExcel(params);
       }).then(response => {

+ 1 - 5
yudao-ui-admin/src/views/system/loginlog/index.vue

@@ -122,11 +122,7 @@ export default {
     /** 导出按钮操作 */
     handleExport() {
       const queryParams = this.queryParams;
-      this.$confirm('是否确认导出所有操作日志数据项?', "警告", {
-          confirmButtonText: "确定",
-          cancelButtonText: "取消",
-          type: "warning"
-        }).then(() => {
+      this.$modal.confirm('是否确认导出所有操作日志数据项?').then(() => {
           this.exportLoading = true;
           return exportLoginLog(queryParams);
         }).then(response => {

+ 6 - 10
yudao-ui-admin/src/views/system/menu/index.vue

@@ -298,10 +298,10 @@ export default {
             if (path.indexOf('http://') === -1 || path.indexOf('https://') === -1) {
               // 父权限为根节点,path 必须以 / 开头
               if (this.form.parentId === 0 && path.charAt(0) !== '/') {
-                this.msgSuccess('前端必须以 / 开头')
+                this.$modal.msgSuccess('前端必须以 / 开头')
                 return
               } else if (this.form.parentId !== 0 && path.charAt(0) === '/') {
-                this.msgSuccess('前端不能以 / 开头')
+                this.$modal.msgSuccess('前端不能以 / 开头')
                 return
               }
             }
@@ -310,13 +310,13 @@ export default {
           // 提交
           if (this.form.id !== undefined) {
             updateMenu(this.form).then(response => {
-              this.msgSuccess("修改成功");
+              this.$modal.msgSuccess("修改成功");
               this.open = false;
               this.getList();
             });
           } else {
             addMenu(this.form).then(response => {
-              this.msgSuccess("新增成功");
+              this.$modal.msgSuccess("新增成功");
               this.open = false;
               this.getList();
             });
@@ -326,15 +326,11 @@ export default {
     },
     /** 删除按钮操作 */
     handleDelete(row) {
-      this.$confirm('是否确认删除名称为"' + row.name + '"的数据项?', "警告", {
-          confirmButtonText: "确定",
-          cancelButtonText: "取消",
-          type: "warning"
-        }).then(function() {
+      this.$modal.confirm('是否确认删除名称为"' + row.name + '"的数据项?').then(function() {
           return delMenu(row.id);
         }).then(() => {
           this.getList();
-          this.msgSuccess("删除成功");
+          this.$modal.msgSuccess("删除成功");
       }).catch(() => {});
     }
   }

+ 4 - 8
yudao-ui-admin/src/views/system/notice/index.vue

@@ -219,13 +219,13 @@ export default {
         if (valid) {
           if (this.form.id !== undefined) {
             updateNotice(this.form).then(response => {
-              this.msgSuccess("修改成功");
+              this.$modal.msgSuccess("修改成功");
               this.open = false;
               this.getList();
             });
           } else {
             addNotice(this.form).then(response => {
-              this.msgSuccess("新增成功");
+              this.$modal.msgSuccess("新增成功");
               this.open = false;
               this.getList();
             });
@@ -236,15 +236,11 @@ export default {
     /** 删除按钮操作 */
     handleDelete(row) {
       const ids = row.id || this.ids
-      this.$confirm('是否确认删除公告编号为"' + ids + '"的数据项?', "警告", {
-          confirmButtonText: "确定",
-          cancelButtonText: "取消",
-          type: "warning"
-        }).then(function() {
+      this.$modal.confirm('是否确认删除公告编号为"' + ids + '"的数据项?').then(function() {
           return delNotice(ids);
         }).then(() => {
           this.getList();
-          this.msgSuccess("删除成功");
+          this.$modal.msgSuccess("删除成功");
       }).catch(() => {});
     }
   }

+ 1 - 5
yudao-ui-admin/src/views/system/operatelog/index.vue

@@ -202,11 +202,7 @@ export default {
         this.dateRange[0] ? this.dateRange[0] + ' 00:00:00' : undefined,
         this.dateRange[1] ? this.dateRange[1] + ' 23:59:59' : undefined,
       ])
-      this.$confirm('是否确认导出所有操作日志数据项?', "警告", {
-          confirmButtonText: "确定",
-          cancelButtonText: "取消",
-          type: "warning"
-        }).then(() => {
+      this.$modal.confirm('是否确认导出所有操作日志数据项?').then(() => {
           this.exportLoading = true;
           return exportOperateLog(queryParams);
         }).then(response => {

+ 5 - 13
yudao-ui-admin/src/views/system/post/index.vue

@@ -205,13 +205,13 @@ export default {
         if (valid) {
           if (this.form.id !== undefined) {
             updatePost(this.form).then(response => {
-              this.msgSuccess("修改成功");
+              this.$modal.msgSuccess("修改成功");
               this.open = false;
               this.getList();
             });
           } else {
             addPost(this.form).then(response => {
-              this.msgSuccess("新增成功");
+              this.$modal.msgSuccess("新增成功");
               this.open = false;
               this.getList();
             });
@@ -222,25 +222,17 @@ export default {
     /** 删除按钮操作 */
     handleDelete(row) {
       const ids = row.id;
-      this.$confirm('是否确认删除岗位编号为"' + ids + '"的数据项?', "警告", {
-          confirmButtonText: "确定",
-          cancelButtonText: "取消",
-          type: "warning"
-        }).then(function() {
+      this.$modal.confirm('是否确认删除岗位编号为"' + ids + '"的数据项?').then(function() {
           return delPost(ids);
         }).then(() => {
           this.getList();
-          this.msgSuccess("删除成功");
+          this.$modal.msgSuccess("删除成功");
       }).catch(() => {});
     },
     /** 导出按钮操作 */
     handleExport() {
       const queryParams = this.queryParams;
-      this.$confirm('是否确认导出所有岗位数据项?', "警告", {
-          confirmButtonText: "确定",
-          cancelButtonText: "取消",
-          type: "warning"
-        }).then(() => {
+      this.$modal.confirm('是否确认导出所有岗位数据项?').then(() => {
           this.exportLoading = true;
           return exportPost(queryParams);
         }).then(response => {

+ 9 - 21
yudao-ui-admin/src/views/system/role/index.vue

@@ -277,14 +277,10 @@ export default {
     handleStatusChange(row) {
       // 此时,row 已经变成目标状态了,所以可以直接提交请求和提示
       let text = row.status === CommonStatusEnum.ENABLE ? "启用" : "停用";
-      this.$confirm('确认要"' + text + '""' + row.name + '"角色吗?', "警告", {
-          confirmButtonText: "确定",
-          cancelButtonText: "取消",
-          type: "warning"
-        }).then(function() {
+      this.$modal.confirm('确认要"' + text + '""' + row.name + '"角色吗?').then(function() {
           return changeRoleStatus(row.id, row.status);
         }).then(() => {
-          this.msgSuccess(text + "成功");
+          this.$modal.msgSuccess(text + "成功");
         }).catch(function() {
           // 异常时,需要将 row.status 状态重置回之前的
           row.status = row.status === CommonStatusEnum.ENABLE ? CommonStatusEnum.DISABLE
@@ -442,13 +438,13 @@ export default {
         if (valid) {
           if (this.form.id !== undefined) {
             updateRole(this.form).then(response => {
-              this.msgSuccess("修改成功");
+              this.$modal.msgSuccess("修改成功");
               this.open = false;
               this.getList();
             });
           } else {
             addRole(this.form).then(response => {
-              this.msgSuccess("新增成功");
+              this.$modal.msgSuccess("新增成功");
               this.open = false;
               this.getList();
             });
@@ -465,7 +461,7 @@ export default {
           dataScopeDeptIds: this.form.dataScope !== SystemDataScopeEnum.DEPT_CUSTOM ? [] :
               this.$refs.dept.getCheckedKeys()
         }).then(response => {
-          this.msgSuccess("修改成功");
+          this.$modal.msgSuccess("修改成功");
           this.openDataScope = false;
           this.getList();
         });
@@ -478,7 +474,7 @@ export default {
           roleId: this.form.id,
           menuIds: [...this.$refs.menu.getCheckedKeys(), ...this.$refs.menu.getHalfCheckedKeys()]
         }).then(response => {
-          this.msgSuccess("修改成功");
+          this.$modal.msgSuccess("修改成功");
           this.openMenu = false;
           this.getList();
         });
@@ -487,25 +483,17 @@ export default {
     /** 删除按钮操作 */
     handleDelete(row) {
       const ids = row.id || this.ids;
-      this.$confirm('是否确认删除角色编号为"' + ids + '"的数据项?', "警告", {
-          confirmButtonText: "确定",
-          cancelButtonText: "取消",
-          type: "warning"
-        }).then(function() {
+      this.$modal.confirm('是否确认删除角色编号为"' + ids + '"的数据项?').then(function() {
           return delRole(ids);
         }).then(() => {
           this.getList();
-          this.msgSuccess("删除成功");
+          this.$modal.msgSuccess("删除成功");
       }).catch(() => {});
     },
     /** 导出按钮操作 */
     handleExport() {
       const queryParams = this.queryParams;
-      this.$confirm('是否确认导出所有角色数据项?', "警告", {
-          confirmButtonText: "确定",
-          cancelButtonText: "取消",
-          type: "warning"
-        }).then(function() {
+      this.$modal.confirm('是否确认导出所有角色数据项?').then(function() {
           this.exportLoading = true;
           return exportRole(queryParams);
         }).then(response => {

+ 2 - 6
yudao-ui-admin/src/views/system/session/index.vue

@@ -83,15 +83,11 @@ export default {
     },
     /** 强退按钮操作 */
     handleForceLogout(row) {
-      this.$confirm('是否确认强退名称为"' + row.username + '"的数据项?', "警告", {
-          confirmButtonText: "确定",
-          cancelButtonText: "取消",
-          type: "warning"
-        }).then(function() {
+      this.$modal.confirm('是否确认强退名称为"' + row.username + '"的数据项?').then(function() {
           return forceLogout(row.id);
         }).then(() => {
           this.getList();
-          this.msgSuccess("强退成功");
+          this.$modal.msgSuccess("强退成功");
       }).catch(() => {});
     }
   }

+ 4 - 8
yudao-ui-admin/src/views/system/sms/smsChannel.vue

@@ -216,7 +216,7 @@ export default {
         // 修改的提交
         if (this.form.id != null) {
           updateSmsChannel(this.form).then(response => {
-            this.msgSuccess("修改成功");
+            this.$modal.msgSuccess("修改成功");
             this.open = false;
             this.getList();
           });
@@ -224,7 +224,7 @@ export default {
         }
         // 添加的提交
         createSmsChannel(this.form).then(response => {
-          this.msgSuccess("新增成功");
+          this.$modal.msgSuccess("新增成功");
           this.open = false;
           this.getList();
         });
@@ -233,15 +233,11 @@ export default {
     /** 删除按钮操作 */
     handleDelete(row) {
       const id = row.id;
-      this.$confirm('是否确认删除短信渠道编号为"' + id + '"的数据项?', "警告", {
-        confirmButtonText: "确定",
-        cancelButtonText: "取消",
-        type: "warning"
-      }).then(function() {
+      this.$modal.confirm('是否确认删除短信渠道编号为"' + id + '"的数据项?').then(function() {
         return deleteSmsChannel(id);
       }).then(() => {
         this.getList();
-        this.msgSuccess("删除成功");
+        this.$modal.msgSuccess("删除成功");
       }).catch(() => {});
     }
   }

+ 1 - 5
yudao-ui-admin/src/views/system/sms/smsLog.vue

@@ -278,11 +278,7 @@ export default {
       this.addBeginAndEndTime(params, this.dateRangeSendTime, 'sendTime');
       this.addBeginAndEndTime(params, this.dateRangeReceiveTime, 'receiveTime');
       // 执行导出
-      this.$confirm('是否确认导出所有短信日志数据项?', "警告", {
-        confirmButtonText: "确定",
-        cancelButtonText: "取消",
-        type: "warning"
-      }).then(() => {
+      this.$modal.confirm('是否确认导出所有短信日志数据项?').then(() => {
         this.exportLoading = true;
         return exportSmsLogExcel(params);
       }).then(response => {

+ 6 - 14
yudao-ui-admin/src/views/system/sms/smsTemplate.vue

@@ -298,7 +298,7 @@ export default {
         // 修改的提交
         if (this.form.id != null) {
           updateSmsTemplate(this.form).then(response => {
-            this.msgSuccess("修改成功");
+            this.$modal.msgSuccess("修改成功");
             this.open = false;
             this.getList();
           });
@@ -306,7 +306,7 @@ export default {
         }
         // 添加的提交
         createSmsTemplate(this.form).then(response => {
-          this.msgSuccess("新增成功");
+          this.$modal.msgSuccess("新增成功");
           this.open = false;
           this.getList();
         });
@@ -315,15 +315,11 @@ export default {
     /** 删除按钮操作 */
     handleDelete(row) {
       const id = row.id;
-      this.$confirm('是否确认删除短信模板编号为"' + id + '"的数据项?', "警告", {
-        confirmButtonText: "确定",
-        cancelButtonText: "取消",
-        type: "warning"
-      }).then(function() {
+      this.$modal.confirm('是否确认删除短信模板编号为"' + id + '"的数据项?').then(function() {
         return deleteSmsTemplate(id);
       }).then(() => {
         this.getList();
-        this.msgSuccess("删除成功");
+        this.$modal.msgSuccess("删除成功");
       }).catch(() => {});
     },
     /** 导出按钮操作 */
@@ -334,11 +330,7 @@ export default {
       params.pageSize = undefined;
       this.addBeginAndEndTime(params, this.dateRangeCreateTime, 'createTime');
       // 执行导出
-      this.$confirm('是否确认导出所有短信模板数据项?', "警告", {
-        confirmButtonText: "确定",
-        cancelButtonText: "取消",
-        type: "warning"
-      }).then(() => {
+      this.$modal.confirm('是否确认导出所有短信模板数据项?', "警告").then(() => {
         this.exportLoading = true;
         return exportSmsTemplateExcel(params);
       }).then(response => {
@@ -390,7 +382,7 @@ export default {
         }
         // 添加的提交
         sendSms(this.sendSmsForm).then(response => {
-          this.msgSuccess("提交发送成功!发送结果,见发送日志编号:" + response.data);
+          this.$modal.msgSuccess("提交发送成功!发送结果,见发送日志编号:" + response.data);
           this.sendSmsOpen = false;
         });
       });

+ 5 - 13
yudao-ui-admin/src/views/system/tenant/index.vue

@@ -210,7 +210,7 @@ export default {
         // 修改的提交
         if (this.form.id != null) {
           updateTenant(this.form).then(response => {
-            this.msgSuccess("修改成功");
+            this.$modal.msgSuccess("修改成功");
             this.open = false;
             this.getList();
           });
@@ -218,7 +218,7 @@ export default {
         }
         // 添加的提交
         createTenant(this.form).then(response => {
-          this.msgSuccess("新增成功");
+          this.$modal.msgSuccess("新增成功");
           this.open = false;
           this.getList();
         });
@@ -227,15 +227,11 @@ export default {
     /** 删除按钮操作 */
     handleDelete(row) {
       const id = row.id;
-      this.$confirm('是否确认删除租户编号为"' + id + '"的数据项?', "警告", {
-          confirmButtonText: "确定",
-          cancelButtonText: "取消",
-          type: "warning"
-        }).then(function() {
+      this.$modal.confirm('是否确认删除租户编号为"' + id + '"的数据项?').then(function() {
           return deleteTenant(id);
         }).then(() => {
           this.getList();
-          this.msgSuccess("删除成功");
+          this.$modal.msgSuccess("删除成功");
       }).catch(() => {});
     },
     /** 导出按钮操作 */
@@ -246,11 +242,7 @@ export default {
       params.pageSize = undefined;
       this.addBeginAndEndTime(params, this.dateRangeCreateTime, 'createTime');
       // 执行导出
-      this.$confirm('是否确认导出所有租户数据项?', "警告", {
-          confirmButtonText: "确定",
-          cancelButtonText: "取消",
-          type: "warning"
-        }).then(() => {
+      this.$modal.confirm('是否确认导出所有租户数据项?').then(() => {
           this.exportLoading = true;
           return exportTenantExcel(params);
         }).then(response => {

+ 10 - 22
yudao-ui-admin/src/views/system/user/index.vue

@@ -429,14 +429,10 @@ export default {
     // 用户状态修改
     handleStatusChange(row) {
       let text = row.status === CommonStatusEnum.ENABLE ? "启用" : "停用";
-      this.$confirm('确认要"' + text + '""' + row.username + '"用户吗?', "警告", {
-          confirmButtonText: "确定",
-          cancelButtonText: "取消",
-          type: "warning"
-        }).then(function() {
+      this.$modal.confirm('确认要"' + text + '""' + row.username + '"用户吗?').then(function() {
           return changeUserStatus(row.id, row.status);
         }).then(() => {
-          this.msgSuccess(text + "成功");
+          this.$modal.msgSuccess(text + "成功");
         }).catch(function() {
           row.status = row.status === CommonStatusEnum.ENABLE ? CommonStatusEnum.DISABLE
               : CommonStatusEnum.ENABLE;
@@ -510,7 +506,7 @@ export default {
         cancelButtonText: "取消"
       }).then(({ value }) => {
           resetUserPwd(row.id, value).then(response => {
-            this.msgSuccess("修改成功,新密码是:" + value);
+            this.$modal.msgSuccess("修改成功,新密码是:" + value);
           });
         }).catch(() => {});
     },
@@ -542,13 +538,13 @@ export default {
         if (valid) {
           if (this.form.id !== undefined) {
             updateUser(this.form).then(response => {
-              this.msgSuccess("修改成功");
+              this.$modal.msgSuccess("修改成功");
               this.open = false;
               this.getList();
             });
           } else {
             addUser(this.form).then(response => {
-              this.msgSuccess("新增成功");
+              this.$modal.msgSuccess("新增成功");
               this.open = false;
               this.getList();
             });
@@ -563,7 +559,7 @@ export default {
           userId: this.form.id,
           roleIds: this.form.roleIds,
         }).then(response => {
-          this.msgSuccess("分配角色成功");
+          this.$modal.msgSuccess("分配角色成功");
           this.openRole = false;
           this.getList();
         });
@@ -572,15 +568,11 @@ export default {
     /** 删除按钮操作 */
     handleDelete(row) {
       const ids = row.id || this.ids;
-      this.$confirm('是否确认删除用户编号为"' + ids + '"的数据项?', "警告", {
-          confirmButtonText: "确定",
-          cancelButtonText: "取消",
-          type: "warning"
-        }).then(function() {
+      this.$modal.confirm('是否确认删除用户编号为"' + ids + '"的数据项?').then(function() {
           return delUser(ids);
         }).then(() => {
           this.getList();
-          this.msgSuccess("删除成功");
+          this.$modal.msgSuccess("删除成功");
       }).catch(() => {});
     },
     /** 导出按钮操作 */
@@ -589,11 +581,7 @@ export default {
         this.dateRange[0] ? this.dateRange[0] + ' 00:00:00' : undefined,
         this.dateRange[1] ? this.dateRange[1] + ' 23:59:59' : undefined,
       ]);
-      this.$confirm('是否确认导出所有用户数据项?', "警告", {
-          confirmButtonText: "确定",
-          cancelButtonText: "取消",
-          type: "warning"
-        }).then(() => {
+      this.$modal.confirm('是否确认导出所有用户数据项?').then(() => {
           this.exportLoading = true;
           return exportUser(queryParams);
         }).then(response => {
@@ -619,7 +607,7 @@ export default {
     // 文件上传成功处理
     handleFileSuccess(response, file, fileList) {
       if (response.code !== 0) {
-        this.msgError(response.msg)
+        this.$modal.msgError(response.msg)
         return;
       }
       this.upload.open = false;

+ 1 - 1
yudao-ui-admin/src/views/system/user/profile/resetPwd.vue

@@ -57,7 +57,7 @@ export default {
         if (valid) {
           updateUserPwd(this.user.oldPassword, this.user.newPassword).then(
             response => {
-              this.msgSuccess("修改成功");
+              this.$modal.msgSuccess("修改成功");
             }
           );
         }

+ 2 - 2
yudao-ui-admin/src/views/system/user/profile/userAvatar.vue

@@ -110,7 +110,7 @@ export default {
     // 上传预处理
     beforeUpload(file) {
       if (file.type.indexOf("image/") == -1) {
-        this.msgError("文件格式错误,请上传图片类型,如:JPG,PNG后缀的文件。");
+        this.$modal.msgError("文件格式错误,请上传图片类型,如:JPG,PNG后缀的文件。");
       } else {
         const reader = new FileReader();
         reader.readAsDataURL(file);
@@ -128,7 +128,7 @@ export default {
           this.open = false;
           // this.options.img = process.env.VUE_APP_BASE_API + response.imgUrl;
           store.commit('SET_AVATAR', resp.data);
-          this.msgSuccess("修改成功");
+          this.$modal.msgSuccess("修改成功");
           this.visible = false;
         });
       });

+ 1 - 1
yudao-ui-admin/src/views/system/user/profile/userInfo.vue

@@ -62,7 +62,7 @@ export default {
       this.$refs["form"].validate(valid => {
         if (valid) {
           updateUserProfile(this.user).then(response => {
-            this.msgSuccess("修改成功");
+            this.$modal.msgSuccess("修改成功");
           });
         }
       });

+ 2 - 2
yudao-ui-admin/src/views/system/user/profile/userSocial.vue

@@ -68,7 +68,7 @@ export default {
       return;
     }
     socialBind(type, code, state).then(resp => {
-      this.msgSuccess("绑定成功");
+      this.$modal.msgSuccess("绑定成功");
       this.$router.replace('/user/profile');
       // 调用父组件, 刷新
       this.getUser();
@@ -87,7 +87,7 @@ export default {
     },
     unbind(socialUser) {
       socialUnbind(socialUser.type, socialUser.unionId).then(resp => {
-        this.msgSuccess("解绑成功");
+        this.$modal.msgSuccess("解绑成功");
         socialUser.unionId = undefined;
       });
     },

+ 2 - 2
yudao-ui-admin/src/views/tool/codegen/editTable.vue

@@ -194,11 +194,11 @@ export default {
             parentMenuId: genTable.parentMenuId
           };
           updateCodegen(genTable).then(res => {
-            this.msgSuccess("修改成功!");
+            this.$modal.msgSuccess("修改成功!");
             this.close();
           });
         } else {
-          this.msgError("表单校验未通过,请重新检查提交内容");
+          this.$modal.msgError("表单校验未通过,请重新检查提交内容");
         }
       });
     },

+ 1 - 1
yudao-ui-admin/src/views/tool/codegen/genInfoForm.vue

@@ -304,7 +304,7 @@ export default {
     tplSelectChange(value) {
       if (value !== 1) {
         // TODO 芋艿:暂时不考虑支持树形结构
-        this.msgError('暂时不考虑支持【树形】和【主子表】的代码生成。原因是:导致 vm 模板过于复杂,不利于胖友二次开发');
+        this.$modal.msgError('暂时不考虑支持【树形】和【主子表】的代码生成。原因是:导致 vm 模板过于复杂,不利于胖友二次开发');
         return false;
       }
       if(value !== 'sub') {

+ 1 - 1
yudao-ui-admin/src/views/tool/codegen/importTable.vue

@@ -96,7 +96,7 @@ export default {
     /** 导入按钮操作 */
     handleImportTable() {
       createCodegenListFromDB(this.tables.join(",")).then(res => {
-        this.msgSuccess("导入成功");
+        this.$modal.msgSuccess("导入成功");
         this.visible = false;
         this.$emit("ok");
       });

+ 6 - 14
yudao-ui-admin/src/views/tool/codegen/index.vue

@@ -205,14 +205,10 @@ export default {
       }
       // 基于 DB 同步
       const tableName = row.tableName;
-      this.$confirm('确认要强制同步"' + tableName + '"表结构吗?', "警告", {
-        confirmButtonText: "确定",
-        cancelButtonText: "取消",
-        type: "warning"
-      }).then(function() {
+      this.$modal.confirm('确认要强制同步"' + tableName + '"表结构吗?').then(function() {
           return syncCodegenFromDB(row.id);
       }).then(() => {
-          this.msgSuccess("同步成功");
+          this.$modal.msgSuccess("同步成功");
       }).catch(() => {});
     },
     /** 打开导入表弹窗 */
@@ -326,15 +322,11 @@ export default {
     /** 删除按钮操作 */
     handleDelete(row) {
       const tableIds = row.id;
-      this.$confirm('是否确认删除表名称为"' + row.tableName + '"的数据项?', "警告", {
-        confirmButtonText: "确定",
-        cancelButtonText: "取消",
-        type: "warning"
-      }).then(function() {
+      this.$modal.confirm('是否确认删除表名称为"' + row.tableName + '"的数据项?').then(function() {
           return deleteCodegen(tableIds);
       }).then(() => {
           this.getList();
-          this.msgSuccess("删除成功");
+          this.$modal.msgSuccess("删除成功");
       }).catch(() => {});
     },
     // 取消按钮
@@ -360,7 +352,7 @@ export default {
         let form = this.importSQL.form;
         if (form.tableId != null) {
           syncCodegenFromSQL(form.tableId, form.sql).then(response => {
-            this.msgSuccess("同步成功");
+            this.$modal.msgSuccess("同步成功");
             this.importSQL.open = false;
             this.getList();
           });
@@ -368,7 +360,7 @@ export default {
         }
         // 添加的提交
         createCodegenListFromSQL(form).then(response => {
-          this.msgSuccess("导入成功");
+          this.$modal.msgSuccess("导入成功");
           this.importSQL.open = false;
           this.getList();
         });

+ 5 - 13
yudao-ui-admin/src/views/tool/testDemo/index.vue

@@ -217,7 +217,7 @@ export default {
         // 修改的提交
         if (this.form.id != null) {
           updateTestDemo(this.form).then(response => {
-            this.msgSuccess("修改成功");
+            this.$modal.msgSuccess("修改成功");
             this.open = false;
             this.getList();
           });
@@ -225,7 +225,7 @@ export default {
         }
         // 添加的提交
         createTestDemo(this.form).then(response => {
-          this.msgSuccess("新增成功");
+          this.$modal.msgSuccess("新增成功");
           this.open = false;
           this.getList();
         });
@@ -234,15 +234,11 @@ export default {
     /** 删除按钮操作 */
     handleDelete(row) {
       const id = row.id;
-      this.$confirm('是否确认删除字典类型编号为"' + id + '"的数据项?', "警告", {
-          confirmButtonText: "确定",
-          cancelButtonText: "取消",
-          type: "warning"
-        }).then(function() {
+      this.$modal.confirm('是否确认删除字典类型编号为"' + id + '"的数据项?').then(function() {
           return deleteTestDemo(id);
         }).then(() => {
           this.getList();
-          this.msgSuccess("删除成功");
+          this.$modal.msgSuccess("删除成功");
       }).catch(() => {});
     },
     /** 导出按钮操作 */
@@ -253,11 +249,7 @@ export default {
       params.pageSize = undefined;
       this.addBeginAndEndTime(params, this.dateRangeCreateTime, 'createTime');
       // 执行导出
-      this.$confirm('是否确认导出所有字典类型数据项?', "警告", {
-          confirmButtonText: "确定",
-          cancelButtonText: "取消",
-          type: "warning"
-        }).then(() => {
+      this.$modal.confirm('是否确认导出所有字典类型数据项?').then(() => {
           this.exportLoading = true;
           return exportTestDemoExcel(params);
         }).then(response => {

Unele fișiere nu au fost afișate deoarece prea multe fișiere au fost modificate în acest diff