Commit 38ac5270d6f3a703c07abfd4d1ab0f18d9d6adfd

Authored by YunaiV
1 parent 433056d5

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

Showing 60 changed files with 366 additions and 452 deletions
yudao-module-tool/yudao-module-tool-impl/src/main/resources/codegen/vue/views/index.vue.vm
... ... @@ -347,7 +347,7 @@ export default {
347 347 // 修改的提交
348 348 if (this.form.${primaryColumn.javaField} != null) {
349 349 update${simpleClassName}(this.form).then(response => {
350   - this.msgSuccess("修改成功");
  350 + this.$modal.msgSuccess("修改成功");
351 351 this.open = false;
352 352 this.getList();
353 353 });
... ... @@ -355,7 +355,7 @@ export default {
355 355 }
356 356 // 添加的提交
357 357 create${simpleClassName}(this.form).then(response => {
358   - this.msgSuccess("新增成功");
  358 + this.$modal.msgSuccess("新增成功");
359 359 this.open = false;
360 360 this.getList();
361 361 });
... ... @@ -364,15 +364,11 @@ export default {
364 364 /** 删除按钮操作 */
365 365 handleDelete(row) {
366 366 const ${primaryColumn.javaField} = row.${primaryColumn.javaField};
367   - this.$confirm('是否确认删除${table.classComment}编号为"' + ${primaryColumn.javaField} + '"的数据项?', "警告", {
368   - confirmButtonText: "确定",
369   - cancelButtonText: "取消",
370   - type: "warning"
371   - }).then(function() {
  367 + this.$model.confirm('是否确认删除${table.classComment}编号为"' + ${primaryColumn.javaField} + '"的数据项?').then(function() {
372 368 return delete${simpleClassName}(${primaryColumn.javaField});
373 369 }).then(() => {
374 370 this.getList();
375   - this.msgSuccess("删除成功");
  371 + this.$modal.msgSuccess("删除成功");
376 372 }).catch(() => {});
377 373 },
378 374 /** 导出按钮操作 */
... ... @@ -390,11 +386,7 @@ export default {
390 386 #end
391 387 #end
392 388 // 执行导出
393   - this.$confirm('是否确认导出所有${table.classComment}数据项?', "警告", {
394   - confirmButtonText: "确定",
395   - cancelButtonText: "取消",
396   - type: "warning"
397   - }).then(() => {
  389 + this.$model.confirm('是否确认导出所有${table.classComment}数据项?').then(() => {
398 390 this.exportLoading = true;
399 391 return export${simpleClassName}Excel(params);
400 392 }).then(response => {
... ...
yudao-server/src/main/resources/admin-ui/static/js/17.js
... ... @@ -56,7 +56,7 @@ eval("\n\nvar _interopRequireDefault = __webpack_require__(/*! ./node_modules/@b
56 56 /***/ (function(module, exports, __webpack_require__) {
57 57  
58 58 "use strict";
59   -eval("\n\nvar _interopRequireDefault = __webpack_require__(/*! ./node_modules/@babel/runtime/helpers/interopRequireDefault.js */ \"./node_modules/@babel/runtime/helpers/interopRequireDefault.js\").default;\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\n\n__webpack_require__(/*! core-js/modules/es.function.name.js */ \"./node_modules/core-js/modules/es.function.name.js\");\n\nvar _objectSpread2 = _interopRequireDefault(__webpack_require__(/*! ./node_modules/@babel/runtime/helpers/objectSpread2.js */ \"./node_modules/@babel/runtime/helpers/objectSpread2.js\"));\n\nvar _model = __webpack_require__(/*! @/api/bpm/model */ \"./src/api/bpm/model.js\");\n\nvar _dict = __webpack_require__(/*! @/utils/dict */ \"./src/utils/dict.js\");\n\nvar _form = __webpack_require__(/*! @/api/bpm/form */ \"./src/api/bpm/form.js\");\n\nvar _formGenerator = __webpack_require__(/*! @/utils/formGenerator */ \"./src/utils/formGenerator.js\");\n\nvar _Parser = _interopRequireDefault(__webpack_require__(/*! @/components/parser/Parser */ \"./src/components/parser/Parser.vue\"));\n\nvar _request = __webpack_require__(/*! @/utils/request */ \"./src/utils/request.js\");\n\nvar _taskAssignRuleDialog = _interopRequireDefault(__webpack_require__(/*! ../taskAssignRule/taskAssignRuleDialog */ \"./src/views/bpm/taskAssignRule/taskAssignRuleDialog.vue\"));\n\nvar _vueTreeselect = _interopRequireDefault(__webpack_require__(/*! @riophae/vue-treeselect */ \"./node_modules/@riophae/vue-treeselect/dist/vue-treeselect.cjs.js\"));\n\n__webpack_require__(/*! @riophae/vue-treeselect/dist/vue-treeselect.css */ \"./node_modules/@riophae/vue-treeselect/dist/vue-treeselect.css\");\n\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\nvar _default = {\n name: \"model\",\n components: {\n Parser: _Parser.default,\n Treeselect: _vueTreeselect.default,\n taskAssignRuleDialog: _taskAssignRuleDialog.default\n },\n data: function data() {\n return {\n // 遮罩层\n loading: true,\n // 显示搜索条件\n showSearch: true,\n // 总条数\n total: 0,\n // 表格数据\n list: [],\n // 查询参数\n queryParams: {\n pageNo: 1,\n pageSize: 10\n },\n // BPMN 数据\n showBpmnOpen: false,\n bpmnXML: null,\n bpmnControlForm: {\n prefix: \"activiti\"\n },\n // 流程表单详情\n detailOpen: false,\n detailForm: {\n fields: []\n },\n // 流程表单\n title: \"\",\n open: false,\n form: {},\n // 表单校验\n rules: {\n key: [{\n required: true,\n message: \"流程标识不能为空\",\n trigger: \"blur\"\n }],\n name: [{\n required: true,\n message: \"流程名称不能为空\",\n trigger: \"blur\"\n }],\n formType: [{\n required: true,\n message: \"流程名称不能为空\",\n trigger: \"blur\"\n }],\n formId: [{\n required: true,\n message: \"业务表单不能为空\",\n trigger: \"blur\"\n }],\n category: [{\n required: true,\n message: \"流程分类不能为空\",\n trigger: \"blur\"\n }],\n formCustomCreatePath: [{\n required: true,\n message: \"表单提交路由不能为空\",\n trigger: \"blur\"\n }],\n formCustomViewPath: [{\n required: true,\n message: \"表单查看路由不能为空\",\n trigger: \"blur\"\n }]\n },\n // 流程导入参数\n upload: {\n // 是否显示弹出层(用户导入)\n open: false,\n // 是否禁用上传\n isUploading: false,\n // 设置上传的请求头部\n headers: (0, _request.getBaseHeader)(),\n // 上传的地址\n url: \"http://127.0.0.1:48080\" + '/api/' + \"/bpm/model/import\",\n // 表单\n form: {},\n // 校验规则\n rules: {\n key: [{\n required: true,\n message: \"流程标识不能为空\",\n trigger: \"blur\"\n }],\n name: [{\n required: true,\n message: \"流程名称不能为空\",\n trigger: \"blur\"\n }]\n }\n },\n // 流程表单的下拉框的数据\n forms: [],\n // 数据字典\n categoryDictDatas: (0, _dict.getDictDatas)(_dict.DICT_TYPE.BPM_MODEL_CATEGORY),\n modelFormTypeDictDatas: (0, _dict.getDictDatas)(_dict.DICT_TYPE.BPM_MODEL_FORM_TYPE),\n taskAssignRuleDictDatas: (0, _dict.getDictDatas)(_dict.DICT_TYPE.BPM_TASK_ASSIGN_RULE_TYPE)\n };\n },\n created: function created() {\n var _this = this;\n\n this.getList(); // 获得流程表单的下拉框的数据\n\n (0, _form.getSimpleForms)().then(function (response) {\n _this.forms = response.data;\n });\n },\n methods: {\n /** 查询流程模型列表 */\n getList: function getList() {\n var _this2 = this;\n\n this.loading = true;\n (0, _model.getModelPage)(this.queryParams).then(function (response) {\n _this2.list = response.data.list;\n _this2.total = response.data.total;\n _this2.loading = false;\n });\n },\n\n /** 取消按钮 */\n cancel: function cancel() {\n this.open = false;\n this.reset();\n },\n // 表单重置\n reset: function reset() {\n this.form = {\n id: undefined,\n key: undefined,\n name: undefined,\n description: undefined,\n category: undefined,\n formType: undefined,\n formId: undefined,\n formCustomCreatePath: undefined,\n formCustomViewPath: undefined\n };\n this.resetForm(\"form\");\n },\n\n /** 搜索按钮操作 */\n handleQuery: function handleQuery() {\n this.queryParams.pageNo = 1;\n this.getList();\n },\n\n /** 重置按钮操作 */\n resetQuery: function resetQuery() {\n this.dateRange = [];\n this.resetForm(\"queryForm\");\n this.handleQuery();\n },\n\n /** 新增按钮操作 */\n handleAdd: function handleAdd() {\n this.reset();\n this.title = \"新建模型\";\n this.open = true;\n },\n\n /** 修改按钮操作 */\n handleUpdate: function handleUpdate(row) {\n this.reset();\n this.title = \"修改模型\";\n this.open = true; // 设置 form\n\n this.form = (0, _objectSpread2.default)({}, row); // 触发一次校验\n // this.$refs[\"form\"].validate();\n },\n\n /** 设计按钮操作 */\n handleDesign: function handleDesign(row) {\n this.$router.push({\n path: \"/bpm/manager/model/design\",\n query: {\n modelId: row.id\n }\n });\n },\n\n /** 提交按钮 */\n submitForm: function submitForm() {\n var _this3 = this;\n\n this.$refs[\"form\"].validate(function (valid) {\n if (!valid) {\n return;\n } // 更新\n\n\n if (_this3.form.id) {\n (0, _model.updateModel)((0, _objectSpread2.default)((0, _objectSpread2.default)({}, _this3.form), {}, {\n formId: _this3.form.formType === 10 ? _this3.form.formId : undefined,\n formCustomCreatePath: _this3.form.formType === 20 ? _this3.form.formCustomCreatePath : undefined,\n formCustomViewPath: _this3.form.formType === 20 ? _this3.form.formCustomViewPath : undefined\n })).then(function (response) {\n _this3.msgSuccess(\"修改模型成功\");\n\n _this3.open = false;\n\n _this3.getList();\n });\n return;\n } // 创建\n\n\n (0, _model.createModel)(_this3.form).then(function (response) {\n _this3.open = false;\n\n _this3.getList();\n\n _this3.$alert('<strong>新建模型成功!</strong>后续需要执行如下 4 个步骤:' + '<div>1. 点击【修改流程】按钮,配置流程的分类、表单信息</div>' + '<div>2. 点击【设计流程】按钮,绘制流程图</div>' + '<div>3. 点击【分配规则】按钮,设置每个用户任务的审批人</div>' + '<div>4. 点击【发布流程】按钮,完成流程的最终发布</div>' + '另外,每次流程修改后,都需要点击【发布流程】按钮,才能正式生效!!!', '重要提示', {\n dangerouslyUseHTMLString: true,\n type: 'success'\n });\n });\n });\n },\n\n /** 删除按钮操作 */\n handleDelete: function handleDelete(row) {\n var that = this;\n this.$confirm('是否删除该流程!!', \"警告\", {\n confirmButtonText: \"确定\",\n cancelButtonText: \"取消\",\n type: \"warning\"\n }).then(function () {\n (0, _model.deleteModel)(row.id).then(function (response) {\n that.getList();\n that.msgSuccess(\"删除成功\");\n });\n });\n },\n\n /** 部署按钮操作 */\n handleDeploy: function handleDeploy(row) {\n var that = this;\n this.$confirm('是否部署该流程!!', \"提示\", {\n confirmButtonText: \"确定\",\n cancelButtonText: \"取消\",\n type: \"success\"\n }).then(function () {\n (0, _model.deployModel)(row.id).then(function (response) {\n that.getList();\n that.msgSuccess(\"部署成功\");\n });\n });\n },\n\n /** 流程表单的详情按钮操作 */\n handleFormDetail: function handleFormDetail(row) {\n var _this4 = this;\n\n // 流程表单\n if (row.formId) {\n (0, _form.getForm)(row.formId).then(function (response) {\n // 设置值\n var data = response.data;\n _this4.detailForm = (0, _objectSpread2.default)((0, _objectSpread2.default)({}, JSON.parse(data.conf)), {}, {\n fields: (0, _formGenerator.decodeFields)(data.fields)\n }); // 弹窗打开\n\n _this4.detailOpen = true;\n }); // 业务表单\n } else if (row.formCustomCreatePath) {\n this.$router.push({\n path: row.formCustomCreatePath\n });\n }\n },\n\n /** 流程图的详情按钮操作 */\n handleBpmnDetail: function handleBpmnDetail(row) {\n var _this5 = this;\n\n (0, _model.getModel)(row.id).then(function (response) {\n _this5.bpmnXML = response.data.bpmnXml; // 弹窗打开\n\n _this5.showBpmnOpen = true;\n });\n },\n\n /** 跳转流程定义的列表 */\n handleDefinitionList: function handleDefinitionList(row) {\n this.$router.push({\n path: \"/bpm/manager/definition\",\n query: {\n key: row.key\n }\n });\n },\n\n /** 更新状态操作 */\n handleChangeState: function handleChangeState(row) {\n var _this6 = this;\n\n var id = row.id;\n var state = row.processDefinition.suspensionState;\n var statusState = state === 1 ? '激活' : '挂起';\n this.$confirm('是否确认' + statusState + '流程名字为\"' + row.name + '\"的数据项?', \"警告\", {\n confirmButtonText: \"确定\",\n cancelButtonText: \"取消\",\n type: \"warning\"\n }).then(function () {\n return (0, _model.updateModelState)(id, state);\n }).then(function () {\n _this6.getList();\n\n _this6.msgSuccess(statusState + \"成功\");\n });\n },\n\n /** 导入按钮操作 */\n handleImport: function handleImport() {\n this.upload.open = true;\n },\n // 文件上传中处理\n handleFileUploadProgress: function handleFileUploadProgress(event, file, fileList) {\n this.upload.isUploading = true;\n },\n // 文件上传成功处理\n handleFileSuccess: function handleFileSuccess(response, file, fileList) {\n if (response.code !== 0) {\n this.msgError(response.msg);\n return;\n } // 重置表单\n\n\n this.uploadClose(); // 提示,并刷新\n\n this.msgSuccess(\"导入流程成功!请点击【设计流程】按钮,进行编辑保存后,才可以进行【发布流程】\");\n this.getList();\n },\n uploadClose: function uploadClose() {\n // 关闭弹窗\n this.upload.open = false; // 重置上传状态和文件\n\n this.upload.isUploading = false;\n this.$refs.upload.clearFiles(); // 重置表单\n\n this.upload.form = {};\n this.resetForm(\"uploadForm\");\n },\n\n /** 提交上传文件 */\n submitFileForm: function submitFileForm() {\n var _this7 = this;\n\n this.$refs[\"uploadForm\"].validate(function (valid) {\n if (!valid) {\n return;\n }\n\n _this7.$refs.upload.submit();\n });\n },\n\n /** 处理任务分配规则列表的按钮操作 */\n handleAssignRule: function handleAssignRule(row) {\n this.$refs['taskAssignRuleDialog'].initModel(row.id);\n }\n }\n};\nexports.default = _default;\n\n//# sourceURL=webpack:///./src/views/bpm/model/index.vue?./node_modules/cache-loader/dist/cjs.js??ref--12-0!./node_modules/babel-loader/lib!./node_modules/cache-loader/dist/cjs.js??ref--0-0!./node_modules/vue-loader/lib??vue-loader-options");
  59 +eval("\n\nvar _interopRequireDefault = __webpack_require__(/*! ./node_modules/@babel/runtime/helpers/interopRequireDefault.js */ \"./node_modules/@babel/runtime/helpers/interopRequireDefault.js\").default;\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\n\n__webpack_require__(/*! core-js/modules/es.function.name.js */ \"./node_modules/core-js/modules/es.function.name.js\");\n\nvar _objectSpread2 = _interopRequireDefault(__webpack_require__(/*! ./node_modules/@babel/runtime/helpers/objectSpread2.js */ \"./node_modules/@babel/runtime/helpers/objectSpread2.js\"));\n\nvar _model = __webpack_require__(/*! @/api/bpm/model */ \"./src/api/bpm/model.js\");\n\nvar _dict = __webpack_require__(/*! @/utils/dict */ \"./src/utils/dict.js\");\n\nvar _form = __webpack_require__(/*! @/api/bpm/form */ \"./src/api/bpm/form.js\");\n\nvar _formGenerator = __webpack_require__(/*! @/utils/formGenerator */ \"./src/utils/formGenerator.js\");\n\nvar _Parser = _interopRequireDefault(__webpack_require__(/*! @/components/parser/Parser */ \"./src/components/parser/Parser.vue\"));\n\nvar _request = __webpack_require__(/*! @/utils/request */ \"./src/utils/request.js\");\n\nvar _taskAssignRuleDialog = _interopRequireDefault(__webpack_require__(/*! ../taskAssignRule/taskAssignRuleDialog */ \"./src/views/bpm/taskAssignRule/taskAssignRuleDialog.vue\"));\n\nvar _vueTreeselect = _interopRequireDefault(__webpack_require__(/*! @riophae/vue-treeselect */ \"./node_modules/@riophae/vue-treeselect/dist/vue-treeselect.cjs.js\"));\n\n__webpack_require__(/*! @riophae/vue-treeselect/dist/vue-treeselect.css */ \"./node_modules/@riophae/vue-treeselect/dist/vue-treeselect.css\");\n\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\nvar _default = {\n name: \"model\",\n components: {\n Parser: _Parser.default,\n Treeselect: _vueTreeselect.default,\n taskAssignRuleDialog: _taskAssignRuleDialog.default\n },\n data: function data() {\n return {\n // 遮罩层\n loading: true,\n // 显示搜索条件\n showSearch: true,\n // 总条数\n total: 0,\n // 表格数据\n list: [],\n // 查询参数\n queryParams: {\n pageNo: 1,\n pageSize: 10\n },\n // BPMN 数据\n showBpmnOpen: false,\n bpmnXML: null,\n bpmnControlForm: {\n prefix: \"activiti\"\n },\n // 流程表单详情\n detailOpen: false,\n detailForm: {\n fields: []\n },\n // 流程表单\n title: \"\",\n open: false,\n form: {},\n // 表单校验\n rules: {\n key: [{\n required: true,\n message: \"流程标识不能为空\",\n trigger: \"blur\"\n }],\n name: [{\n required: true,\n message: \"流程名称不能为空\",\n trigger: \"blur\"\n }],\n formType: [{\n required: true,\n message: \"流程名称不能为空\",\n trigger: \"blur\"\n }],\n formId: [{\n required: true,\n message: \"业务表单不能为空\",\n trigger: \"blur\"\n }],\n category: [{\n required: true,\n message: \"流程分类不能为空\",\n trigger: \"blur\"\n }],\n formCustomCreatePath: [{\n required: true,\n message: \"表单提交路由不能为空\",\n trigger: \"blur\"\n }],\n formCustomViewPath: [{\n required: true,\n message: \"表单查看路由不能为空\",\n trigger: \"blur\"\n }]\n },\n // 流程导入参数\n upload: {\n // 是否显示弹出层(用户导入)\n open: false,\n // 是否禁用上传\n isUploading: false,\n // 设置上传的请求头部\n headers: (0, _request.getBaseHeader)(),\n // 上传的地址\n url: \"http://127.0.0.1:48080\" + '/api/' + \"/bpm/model/import\",\n // 表单\n form: {},\n // 校验规则\n rules: {\n key: [{\n required: true,\n message: \"流程标识不能为空\",\n trigger: \"blur\"\n }],\n name: [{\n required: true,\n message: \"流程名称不能为空\",\n trigger: \"blur\"\n }]\n }\n },\n // 流程表单的下拉框的数据\n forms: [],\n // 数据字典\n categoryDictDatas: (0, _dict.getDictDatas)(_dict.DICT_TYPE.BPM_MODEL_CATEGORY),\n modelFormTypeDictDatas: (0, _dict.getDictDatas)(_dict.DICT_TYPE.BPM_MODEL_FORM_TYPE),\n taskAssignRuleDictDatas: (0, _dict.getDictDatas)(_dict.DICT_TYPE.BPM_TASK_ASSIGN_RULE_TYPE)\n };\n },\n created: function created() {\n var _this = this;\n\n this.getList(); // 获得流程表单的下拉框的数据\n\n (0, _form.getSimpleForms)().then(function (response) {\n _this.forms = response.data;\n });\n },\n methods: {\n /** 查询流程模型列表 */\n getList: function getList() {\n var _this2 = this;\n\n this.loading = true;\n (0, _model.getModelPage)(this.queryParams).then(function (response) {\n _this2.list = response.data.list;\n _this2.total = response.data.total;\n _this2.loading = false;\n });\n },\n\n /** 取消按钮 */\n cancel: function cancel() {\n this.open = false;\n this.reset();\n },\n // 表单重置\n reset: function reset() {\n this.form = {\n id: undefined,\n key: undefined,\n name: undefined,\n description: undefined,\n category: undefined,\n formType: undefined,\n formId: undefined,\n formCustomCreatePath: undefined,\n formCustomViewPath: undefined\n };\n this.resetForm(\"form\");\n },\n\n /** 搜索按钮操作 */\n handleQuery: function handleQuery() {\n this.queryParams.pageNo = 1;\n this.getList();\n },\n\n /** 重置按钮操作 */\n resetQuery: function resetQuery() {\n this.dateRange = [];\n this.resetForm(\"queryForm\");\n this.handleQuery();\n },\n\n /** 新增按钮操作 */\n handleAdd: function handleAdd() {\n this.reset();\n this.title = \"新建模型\";\n this.open = true;\n },\n\n /** 修改按钮操作 */\n handleUpdate: function handleUpdate(row) {\n this.reset();\n this.title = \"修改模型\";\n this.open = true; // 设置 form\n\n this.form = (0, _objectSpread2.default)({}, row); // 触发一次校验\n // this.$refs[\"form\"].validate();\n },\n\n /** 设计按钮操作 */\n handleDesign: function handleDesign(row) {\n this.$router.push({\n path: \"/bpm/manager/model/design\",\n query: {\n modelId: row.id\n }\n });\n },\n\n /** 提交按钮 */\n submitForm: function submitForm() {\n var _this3 = this;\n\n this.$refs[\"form\"].validate(function (valid) {\n if (!valid) {\n return;\n } // 更新\n\n\n if (_this3.form.id) {\n (0, _model.updateModel)((0, _objectSpread2.default)((0, _objectSpread2.default)({}, _this3.form), {}, {\n formId: _this3.form.formType === 10 ? _this3.form.formId : undefined,\n formCustomCreatePath: _this3.form.formType === 20 ? _this3.form.formCustomCreatePath : undefined,\n formCustomViewPath: _this3.form.formType === 20 ? _this3.form.formCustomViewPath : undefined\n })).then(function (response) {\n _this3.msgSuccess(\"修改模型成功\");\n\n _this3.open = false;\n\n _this3.getList();\n });\n return;\n } // 创建\n\n\n (0, _model.createModel)(_this3.form).then(function (response) {\n _this3.open = false;\n\n _this3.getList();\n\n _this3.$alert('<strong>新建模型成功!</strong>后续需要执行如下 4 个步骤:' + '<div>1. 点击【修改流程】按钮,配置流程的分类、表单信息</div>' + '<div>2. 点击【设计流程】按钮,绘制流程图</div>' + '<div>3. 点击【分配规则】按钮,设置每个用户任务的审批人</div>' + '<div>4. 点击【发布流程】按钮,完成流程的最终发布</div>' + '另外,每次流程修改后,都需要点击【发布流程】按钮,才能正式生效!!!', '重要提示', {\n dangerouslyUseHTMLString: true,\n type: 'success'\n });\n });\n });\n },\n\n /** 删除按钮操作 */\n handleDelete: function handleDelete(row) {\n var that = this;\n this.$confirm('是否删除该流程!!', \"警告\", {\n confirmButtonText: \"确定\",\n cancelButtonText: \"取消\",\n type: \"warning\"\n }).then(function () {\n (0, _model.deleteModel)(row.id).then(function (response) {\n that.getList();\n that.msgSuccess(\"删除成功\");\n });\n });\n },\n\n /** 部署按钮操作 */\n handleDeploy: function handleDeploy(row) {\n var that = this;\n this.$confirm('是否部署该流程!!', \"提示\", {\n confirmButtonText: \"确定\",\n cancelButtonText: \"取消\",\n type: \"success\"\n }).then(function () {\n (0, _model.deployModel)(row.id).then(function (response) {\n that.getList();\n that.msgSuccess(\"部署成功\");\n });\n });\n },\n\n /** 流程表单的详情按钮操作 */\n handleFormDetail: function handleFormDetail(row) {\n var _this4 = this;\n\n // 流程表单\n if (row.formId) {\n (0, _form.getForm)(row.formId).then(function (response) {\n // 设置值\n var data = response.data;\n _this4.detailForm = (0, _objectSpread2.default)((0, _objectSpread2.default)({}, JSON.parse(data.conf)), {}, {\n fields: (0, _formGenerator.decodeFields)(data.fields)\n }); // 弹窗打开\n\n _this4.detailOpen = true;\n }); // 业务表单\n } else if (row.formCustomCreatePath) {\n this.$router.push({\n path: row.formCustomCreatePath\n });\n }\n },\n\n /** 流程图的详情按钮操作 */\n handleBpmnDetail: function handleBpmnDetail(row) {\n var _this5 = this;\n\n (0, _model.getModel)(row.id).then(function (response) {\n _this5.bpmnXML = response.data.bpmnXml; // 弹窗打开\n\n _this5.showBpmnOpen = true;\n });\n },\n\n /** 跳转流程定义的列表 */\n handleDefinitionList: function handleDefinitionList(row) {\n this.$router.push({\n path: \"/bpm/manager/definition\",\n query: {\n key: row.key\n }\n });\n },\n\n /** 更新状态操作 */\n handleChangeState: function handleChangeState(row) {\n var _this6 = this;\n\n var id = row.id;\n var state = row.processDefinition.suspensionState;\n var statusState = state === 1 ? '激活' : '挂起';\n this.$confirm('是否确认' + statusState + '流程名字为\"' + row.name + '\"的数据项?', \"警告\", {\n confirmButtonText: \"确定\",\n cancelButtonText: \"取消\",\n type: \"warning\"\n }).then(function () {\n return (0, _model.updateModelState)(id, state);\n }).then(function () {\n _this6.getList();\n\n _this6.msgSuccess(statusState + \"成功\");\n });\n },\n\n /** 导入按钮操作 */\n handleImport: function handleImport() {\n this.upload.open = true;\n },\n // 文件上传中处理\n handleFileUploadProgress: function handleFileUploadProgress(event, file, fileList) {\n this.upload.isUploading = true;\n },\n // 文件上传成功处理\n handleFileSuccess: function handleFileSuccess(response, file, fileList) {\n if (response.code !== 0) {\n this.msgError(response.msg);\n return;\n } // 重置表单\n\n\n this.uploadClose(); // 提示,并刷新\n\n this.$modal.msgSuccess(\"导入流程成功!请点击【设计流程】按钮,进行编辑保存后,才可以进行【发布流程】\");\n this.getList();\n },\n uploadClose: function uploadClose() {\n // 关闭弹窗\n this.upload.open = false; // 重置上传状态和文件\n\n this.upload.isUploading = false;\n this.$refs.upload.clearFiles(); // 重置表单\n\n this.upload.form = {};\n this.resetForm(\"uploadForm\");\n },\n\n /** 提交上传文件 */\n submitFileForm: function submitFileForm() {\n var _this7 = this;\n\n this.$refs[\"uploadForm\"].validate(function (valid) {\n if (!valid) {\n return;\n }\n\n _this7.$refs.upload.submit();\n });\n },\n\n /** 处理任务分配规则列表的按钮操作 */\n handleAssignRule: function handleAssignRule(row) {\n this.$refs['taskAssignRuleDialog'].initModel(row.id);\n }\n }\n};\nexports.default = _default;\n\n//# sourceURL=webpack:///./src/views/bpm/model/index.vue?./node_modules/cache-loader/dist/cjs.js??ref--12-0!./node_modules/babel-loader/lib!./node_modules/cache-loader/dist/cjs.js??ref--0-0!./node_modules/vue-loader/lib??vue-loader-options");
60 60  
61 61 /***/ }),
62 62  
... ... @@ -68,7 +68,7 @@ eval(&quot;\n\nvar _interopRequireDefault = __webpack_require__(/*! ./node_modules/@b
68 68 /***/ (function(module, exports, __webpack_require__) {
69 69  
70 70 "use strict";
71   -eval("\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\n\nvar _leave = __webpack_require__(/*! @/api/bpm/leave */ \"./src/api/bpm/leave.js\");\n\nvar _dict = __webpack_require__(/*! @/utils/dict */ \"./src/utils/dict.js\");\n\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\nvar _default = {\n name: \"LeaveCreate\",\n components: {},\n data: function data() {\n return {\n // 表单参数\n form: {\n startTime: undefined,\n endTime: undefined,\n type: undefined,\n reason: undefined\n },\n // 表单校验\n rules: {\n startTime: [{\n required: true,\n message: \"开始时间不能为空\",\n trigger: \"blur\"\n }],\n endTime: [{\n required: true,\n message: \"结束时间不能为空\",\n trigger: \"blur\"\n }],\n type: [{\n required: true,\n message: \"请假类型不能为空\",\n trigger: \"change\"\n }],\n reason: [{\n required: true,\n message: \"请假原因不能为空\",\n trigger: \"change\"\n }]\n },\n typeDictData: (0, _dict.getDictDatas)(_dict.DICT_TYPE.BPM_OA_LEAVE_TYPE)\n };\n },\n created: function created() {},\n methods: {\n /** 提交按钮 */\n submitForm: function submitForm() {\n var _this = this;\n\n this.$refs[\"form\"].validate(function (valid) {\n if (!valid) {\n return;\n } // 添加的提交\n\n\n (0, _leave.createLeave)(_this.form).then(function (response) {\n _this.msgSuccess(\"发起成功\");\n\n _this.$store.dispatch(\"tagsView/delView\", _this.$route);\n\n _this.$router.push({\n path: \"/bpm/oa/leave\"\n });\n });\n });\n }\n }\n};\nexports.default = _default;\n\n//# sourceURL=webpack:///./src/views/bpm/oa/leave/create.vue?./node_modules/cache-loader/dist/cjs.js??ref--12-0!./node_modules/babel-loader/lib!./node_modules/cache-loader/dist/cjs.js??ref--0-0!./node_modules/vue-loader/lib??vue-loader-options");
  71 +eval("\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\n\nvar _leave = __webpack_require__(/*! @/api/bpm/leave */ \"./src/api/bpm/leave.js\");\n\nvar _dict = __webpack_require__(/*! @/utils/dict */ \"./src/utils/dict.js\");\n\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\nvar _default = {\n name: \"LeaveCreate\",\n components: {},\n data: function data() {\n return {\n // 表单参数\n form: {\n startTime: undefined,\n endTime: undefined,\n type: undefined,\n reason: undefined\n },\n // 表单校验\n rules: {\n startTime: [{\n required: true,\n message: \"开始时间不能为空\",\n trigger: \"blur\"\n }],\n endTime: [{\n required: true,\n message: \"结束时间不能为空\",\n trigger: \"blur\"\n }],\n type: [{\n required: true,\n message: \"请假类型不能为空\",\n trigger: \"change\"\n }],\n reason: [{\n required: true,\n message: \"请假原因不能为空\",\n trigger: \"change\"\n }]\n },\n typeDictData: (0, _dict.getDictDatas)(_dict.DICT_TYPE.BPM_OA_LEAVE_TYPE)\n };\n },\n created: function created() {},\n methods: {\n /** 提交按钮 */\n submitForm: function submitForm() {\n var _this = this;\n\n this.$refs[\"form\"].validate(function (valid) {\n if (!valid) {\n return;\n } // 添加的提交\n\n\n (0, _leave.createLeave)(_this.form).then(function (response) {\n _this.$modal.msgSuccess(\"发起成功\");\n\n _this.$store.dispatch(\"tagsView/delView\", _this.$route);\n\n _this.$router.push({\n path: \"/bpm/oa/leave\"\n });\n });\n });\n }\n }\n};\nexports.default = _default;\n\n//# sourceURL=webpack:///./src/views/bpm/oa/leave/create.vue?./node_modules/cache-loader/dist/cjs.js??ref--12-0!./node_modules/babel-loader/lib!./node_modules/cache-loader/dist/cjs.js??ref--0-0!./node_modules/vue-loader/lib??vue-loader-options");
72 72  
73 73 /***/ }),
74 74  
... ... @@ -224,7 +224,7 @@ eval(&quot;\n\nObject.defineProperty(exports, \&quot;__esModule\&quot;, {\n value: true\n});\n
224 224 /***/ (function(module, exports, __webpack_require__) {
225 225  
226 226 "use strict";
227   -eval("\n\nvar _interopRequireDefault = __webpack_require__(/*! ./node_modules/@babel/runtime/helpers/interopRequireDefault.js */ \"./node_modules/@babel/runtime/helpers/interopRequireDefault.js\").default;\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\n\n__webpack_require__(/*! core-js/modules/es.function.name.js */ \"./node_modules/core-js/modules/es.function.name.js\");\n\nvar _objectSpread2 = _interopRequireDefault(__webpack_require__(/*! ./node_modules/@babel/runtime/helpers/objectSpread2.js */ \"./node_modules/@babel/runtime/helpers/objectSpread2.js\"));\n\nvar _file = __webpack_require__(/*! @/api/infra/file */ \"./src/api/infra/file.js\");\n\nvar _auth = __webpack_require__(/*! @/utils/auth */ \"./src/utils/auth.js\");\n\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\nvar _default = {\n name: \"File\",\n data: function data() {\n return {\n getFileUrl: \"http://127.0.0.1:48080\" + '/api/infra/file/get/',\n // 遮罩层\n loading: true,\n // 显示搜索条件\n showSearch: true,\n // 总条数\n total: 0,\n // 文件列表\n list: [],\n // 弹出层标题\n title: \"\",\n dateRangeCreateTime: [],\n // 查询参数\n queryParams: {\n pageNo: 1,\n pageSize: 10,\n id: null,\n type: null\n },\n // 用户导入参数\n upload: {\n open: false,\n // 是否显示弹出层\n title: \"\",\n // 弹出层标题\n isUploading: false,\n // 是否禁用上传\n url: \"http://127.0.0.1:48080\" + '/api/' + \"/infra/file/upload\",\n // 请求地址\n headers: {\n Authorization: \"Bearer \" + (0, _auth.getToken)()\n },\n // 设置上传的请求头部\n data: {} // 上传的额外数据,用于文件名\n\n }\n };\n },\n created: function created() {\n this.getList();\n },\n methods: {\n /** 查询列表 */\n getList: function getList() {\n var _this = this;\n\n this.loading = true; // 处理查询参数\n\n var params = (0, _objectSpread2.default)({}, this.queryParams);\n this.addBeginAndEndTime(params, this.dateRangeCreateTime, 'createTime'); // 执行查询\n\n (0, _file.getFilePage)(params).then(function (response) {\n _this.list = response.data.list;\n _this.total = response.data.total;\n _this.loading = false;\n });\n },\n\n /** 取消按钮 */\n cancel: function cancel() {\n this.open = false;\n this.reset();\n },\n\n /** 表单重置 */\n reset: function reset() {\n this.form = {\n content: undefined\n };\n this.resetForm(\"form\");\n },\n\n /** 搜索按钮操作 */\n handleQuery: function handleQuery() {\n this.queryParams.pageNo = 1;\n this.getList();\n },\n\n /** 重置按钮操作 */\n resetQuery: function resetQuery() {\n this.dateRangeCreateTime = [];\n this.resetForm(\"queryForm\");\n this.handleQuery();\n },\n\n /** 新增按钮操作 */\n handleAdd: function handleAdd() {\n this.upload.open = true;\n this.upload.title = \"上传文件\";\n },\n\n /** 处理上传的文件发生变化 */\n handleFileChange: function handleFileChange(file, fileList) {\n this.upload.data.path = file.name;\n },\n\n /** 处理文件上传中 */\n handleFileUploadProgress: function handleFileUploadProgress(event, file, fileList) {\n this.upload.isUploading = true; // 禁止修改\n },\n\n /** 发起文件上传 */\n submitFileForm: function submitFileForm() {\n this.$refs.upload.submit();\n },\n\n /** 文件上传成功处理 */\n handleFileSuccess: function handleFileSuccess(response, file, fileList) {\n // 清理\n this.upload.open = false;\n this.upload.isUploading = false;\n this.$refs.upload.clearFiles(); // 提示成功,并刷新\n\n this.msgSuccess(\"上传成功\");\n this.getList();\n },\n\n /** 删除按钮操作 */\n handleDelete: function handleDelete(row) {\n var _this2 = this;\n\n var id = row.id;\n this.$confirm('是否确认删除文件编号为\"' + id + '\"的数据项?', \"警告\", {\n confirmButtonText: \"确定\",\n cancelButtonText: \"取消\",\n type: \"warning\"\n }).then(function () {\n return (0, _file.deleteFile)(id);\n }).then(function () {\n _this2.getList();\n\n _this2.msgSuccess(\"删除成功\");\n });\n }\n }\n};\nexports.default = _default;\n\n//# sourceURL=webpack:///./src/views/infra/file/index.vue?./node_modules/cache-loader/dist/cjs.js??ref--12-0!./node_modules/babel-loader/lib!./node_modules/cache-loader/dist/cjs.js??ref--0-0!./node_modules/vue-loader/lib??vue-loader-options");
  227 +eval("\n\nvar _interopRequireDefault = __webpack_require__(/*! ./node_modules/@babel/runtime/helpers/interopRequireDefault.js */ \"./node_modules/@babel/runtime/helpers/interopRequireDefault.js\").default;\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\n\n__webpack_require__(/*! core-js/modules/es.function.name.js */ \"./node_modules/core-js/modules/es.function.name.js\");\n\nvar _objectSpread2 = _interopRequireDefault(__webpack_require__(/*! ./node_modules/@babel/runtime/helpers/objectSpread2.js */ \"./node_modules/@babel/runtime/helpers/objectSpread2.js\"));\n\nvar _file = __webpack_require__(/*! @/api/infra/file */ \"./src/api/infra/file.js\");\n\nvar _auth = __webpack_require__(/*! @/utils/auth */ \"./src/utils/auth.js\");\n\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\nvar _default = {\n name: \"File\",\n data: function data() {\n return {\n getFileUrl: \"http://127.0.0.1:48080\" + '/api/infra/file/get/',\n // 遮罩层\n loading: true,\n // 显示搜索条件\n showSearch: true,\n // 总条数\n total: 0,\n // 文件列表\n list: [],\n // 弹出层标题\n title: \"\",\n dateRangeCreateTime: [],\n // 查询参数\n queryParams: {\n pageNo: 1,\n pageSize: 10,\n id: null,\n type: null\n },\n // 用户导入参数\n upload: {\n open: false,\n // 是否显示弹出层\n title: \"\",\n // 弹出层标题\n isUploading: false,\n // 是否禁用上传\n url: \"http://127.0.0.1:48080\" + '/api/' + \"/infra/file/upload\",\n // 请求地址\n headers: {\n Authorization: \"Bearer \" + (0, _auth.getToken)()\n },\n // 设置上传的请求头部\n data: {} // 上传的额外数据,用于文件名\n\n }\n };\n },\n created: function created() {\n this.getList();\n },\n methods: {\n /** 查询列表 */\n getList: function getList() {\n var _this = this;\n\n this.loading = true; // 处理查询参数\n\n var params = (0, _objectSpread2.default)({}, this.queryParams);\n this.addBeginAndEndTime(params, this.dateRangeCreateTime, 'createTime'); // 执行查询\n\n (0, _file.getFilePage)(params).then(function (response) {\n _this.list = response.data.list;\n _this.total = response.data.total;\n _this.loading = false;\n });\n },\n\n /** 取消按钮 */\n cancel: function cancel() {\n this.open = false;\n this.reset();\n },\n\n /** 表单重置 */\n reset: function reset() {\n this.form = {\n content: undefined\n };\n this.resetForm(\"form\");\n },\n\n /** 搜索按钮操作 */\n handleQuery: function handleQuery() {\n this.queryParams.pageNo = 1;\n this.getList();\n },\n\n /** 重置按钮操作 */\n resetQuery: function resetQuery() {\n this.dateRangeCreateTime = [];\n this.resetForm(\"queryForm\");\n this.handleQuery();\n },\n\n /** 新增按钮操作 */\n handleAdd: function handleAdd() {\n this.upload.open = true;\n this.upload.title = \"上传文件\";\n },\n\n /** 处理上传的文件发生变化 */\n handleFileChange: function handleFileChange(file, fileList) {\n this.upload.data.path = file.name;\n },\n\n /** 处理文件上传中 */\n handleFileUploadProgress: function handleFileUploadProgress(event, file, fileList) {\n this.upload.isUploading = true; // 禁止修改\n },\n\n /** 发起文件上传 */\n submitFileForm: function submitFileForm() {\n this.$refs.upload.submit();\n },\n\n /** 文件上传成功处理 */\n handleFileSuccess: function handleFileSuccess(response, file, fileList) {\n // 清理\n this.upload.open = false;\n this.upload.isUploading = false;\n this.$refs.upload.clearFiles(); // 提示成功,并刷新\n\n this.$modal.msgSuccess(\"上传成功\");\n this.getList();\n },\n\n /** 删除按钮操作 */\n handleDelete: function handleDelete(row) {\n var _this2 = this;\n\n var id = row.id;\n this.$confirm('是否确认删除文件编号为\"' + id + '\"的数据项?', \"警告\", {\n confirmButtonText: \"确定\",\n cancelButtonText: \"取消\",\n type: \"warning\"\n }).then(function () {\n return (0, _file.deleteFile)(id);\n }).then(function () {\n _this2.getList();\n\n _this2.msgSuccess(\"删除成功\");\n });\n }\n }\n};\nexports.default = _default;\n\n//# sourceURL=webpack:///./src/views/infra/file/index.vue?./node_modules/cache-loader/dist/cjs.js??ref--12-0!./node_modules/babel-loader/lib!./node_modules/cache-loader/dist/cjs.js??ref--0-0!./node_modules/vue-loader/lib??vue-loader-options");
228 228  
229 229 /***/ }),
230 230  
... ... @@ -3963,4 +3963,4 @@ eval(&quot;__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _nod
3963 3963  
3964 3964 /***/ })
3965 3965  
3966   -}]);
3967 3966 \ No newline at end of file
  3967 +}]);
... ...
yudao-server/src/main/resources/admin-ui/static/js/20.js
... ... @@ -8,7 +8,7 @@
8 8 /***/ (function(module, exports, __webpack_require__) {
9 9  
10 10 "use strict";
11   -eval("\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\n\nvar _leave = __webpack_require__(/*! @/api/bpm/leave */ \"./src/api/bpm/leave.js\");\n\nvar _dict = __webpack_require__(/*! @/utils/dict */ \"./src/utils/dict.js\");\n\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\nvar _default = {\n name: \"LeaveCreate\",\n components: {},\n data: function data() {\n return {\n // 表单参数\n form: {\n startTime: undefined,\n endTime: undefined,\n type: undefined,\n reason: undefined\n },\n // 表单校验\n rules: {\n startTime: [{\n required: true,\n message: \"开始时间不能为空\",\n trigger: \"blur\"\n }],\n endTime: [{\n required: true,\n message: \"结束时间不能为空\",\n trigger: \"blur\"\n }],\n type: [{\n required: true,\n message: \"请假类型不能为空\",\n trigger: \"change\"\n }],\n reason: [{\n required: true,\n message: \"请假原因不能为空\",\n trigger: \"change\"\n }]\n },\n typeDictData: (0, _dict.getDictDatas)(_dict.DICT_TYPE.BPM_OA_LEAVE_TYPE)\n };\n },\n created: function created() {},\n methods: {\n /** 提交按钮 */\n submitForm: function submitForm() {\n var _this = this;\n\n this.$refs[\"form\"].validate(function (valid) {\n if (!valid) {\n return;\n } // 添加的提交\n\n\n (0, _leave.createLeave)(_this.form).then(function (response) {\n _this.msgSuccess(\"发起成功\");\n\n _this.$store.dispatch(\"tagsView/delView\", _this.$route);\n\n _this.$router.push({\n path: \"/bpm/oa/leave\"\n });\n });\n });\n }\n }\n};\nexports.default = _default;\n\n//# sourceURL=webpack:///./src/views/bpm/oa/leave/create.vue?./node_modules/cache-loader/dist/cjs.js??ref--12-0!./node_modules/babel-loader/lib!./node_modules/cache-loader/dist/cjs.js??ref--0-0!./node_modules/vue-loader/lib??vue-loader-options");
  11 +eval("\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\n\nvar _leave = __webpack_require__(/*! @/api/bpm/leave */ \"./src/api/bpm/leave.js\");\n\nvar _dict = __webpack_require__(/*! @/utils/dict */ \"./src/utils/dict.js\");\n\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\nvar _default = {\n name: \"LeaveCreate\",\n components: {},\n data: function data() {\n return {\n // 表单参数\n form: {\n startTime: undefined,\n endTime: undefined,\n type: undefined,\n reason: undefined\n },\n // 表单校验\n rules: {\n startTime: [{\n required: true,\n message: \"开始时间不能为空\",\n trigger: \"blur\"\n }],\n endTime: [{\n required: true,\n message: \"结束时间不能为空\",\n trigger: \"blur\"\n }],\n type: [{\n required: true,\n message: \"请假类型不能为空\",\n trigger: \"change\"\n }],\n reason: [{\n required: true,\n message: \"请假原因不能为空\",\n trigger: \"change\"\n }]\n },\n typeDictData: (0, _dict.getDictDatas)(_dict.DICT_TYPE.BPM_OA_LEAVE_TYPE)\n };\n },\n created: function created() {},\n methods: {\n /** 提交按钮 */\n submitForm: function submitForm() {\n var _this = this;\n\n this.$refs[\"form\"].validate(function (valid) {\n if (!valid) {\n return;\n } // 添加的提交\n\n\n (0, _leave.createLeave)(_this.form).then(function (response) {\n _this.$modal.msgSuccess(\"发起成功\");\n\n _this.$store.dispatch(\"tagsView/delView\", _this.$route);\n\n _this.$router.push({\n path: \"/bpm/oa/leave\"\n });\n });\n });\n }\n }\n};\nexports.default = _default;\n\n//# sourceURL=webpack:///./src/views/bpm/oa/leave/create.vue?./node_modules/cache-loader/dist/cjs.js??ref--12-0!./node_modules/babel-loader/lib!./node_modules/cache-loader/dist/cjs.js??ref--0-0!./node_modules/vue-loader/lib??vue-loader-options");
12 12  
13 13 /***/ }),
14 14  
... ... @@ -72,4 +72,4 @@ eval(&quot;__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _nod
72 72  
73 73 /***/ })
74 74  
75   -}]);
76 75 \ No newline at end of file
  76 +}]);
... ...
yudao-server/src/main/resources/admin-ui/static/js/6.js
... ... @@ -44,7 +44,7 @@ eval(&quot;\n\nvar _interopRequireDefault = __webpack_require__(/*! ./node_modules/@b
44 44 /***/ (function(module, exports, __webpack_require__) {
45 45  
46 46 "use strict";
47   -eval("\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\n\nvar _user = __webpack_require__(/*! @/api/system/user */ \"./src/api/system/user.js\");\n\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\nvar _default = {\n props: {\n user: {\n type: Object\n }\n },\n data: function data() {\n return {\n // 表单校验\n rules: {\n nickname: [{\n required: true,\n message: \"用户昵称不能为空\",\n trigger: \"blur\"\n }],\n email: [{\n required: true,\n message: \"邮箱地址不能为空\",\n trigger: \"blur\"\n }, {\n type: \"email\",\n message: \"'请输入正确的邮箱地址\",\n trigger: [\"blur\", \"change\"]\n }],\n mobile: [{\n required: true,\n message: \"手机号码不能为空\",\n trigger: \"blur\"\n }, {\n pattern: /^1[3|4|5|6|7|8|9][0-9]\\d{8}$/,\n message: \"请输入正确的手机号码\",\n trigger: \"blur\"\n }]\n }\n };\n },\n methods: {\n submit: function submit() {\n var _this = this;\n\n this.$refs[\"form\"].validate(function (valid) {\n if (valid) {\n (0, _user.updateUserProfile)(_this.user).then(function (response) {\n _this.msgSuccess(\"修改成功\");\n });\n }\n });\n },\n close: function close() {\n this.$store.dispatch(\"tagsView/delView\", this.$route);\n this.$router.push({\n path: \"/index\"\n });\n }\n }\n};\nexports.default = _default;\n\n//# sourceURL=webpack:///./src/views/system/user/profile/userInfo.vue?./node_modules/cache-loader/dist/cjs.js??ref--12-0!./node_modules/babel-loader/lib!./node_modules/cache-loader/dist/cjs.js??ref--0-0!./node_modules/vue-loader/lib??vue-loader-options");
  47 +eval("\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\n\nvar _user = __webpack_require__(/*! @/api/system/user */ \"./src/api/system/user.js\");\n\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\nvar _default = {\n props: {\n user: {\n type: Object\n }\n },\n data: function data() {\n return {\n // 表单校验\n rules: {\n nickname: [{\n required: true,\n message: \"用户昵称不能为空\",\n trigger: \"blur\"\n }],\n email: [{\n required: true,\n message: \"邮箱地址不能为空\",\n trigger: \"blur\"\n }, {\n type: \"email\",\n message: \"'请输入正确的邮箱地址\",\n trigger: [\"blur\", \"change\"]\n }],\n mobile: [{\n required: true,\n message: \"手机号码不能为空\",\n trigger: \"blur\"\n }, {\n pattern: /^1[3|4|5|6|7|8|9][0-9]\\d{8}$/,\n message: \"请输入正确的手机号码\",\n trigger: \"blur\"\n }]\n }\n };\n },\n methods: {\n submit: function submit() {\n var _this = this;\n\n this.$refs[\"form\"].validate(function (valid) {\n if (valid) {\n (0, _user.updateUserProfile)(_this.user).then(function (response) {\n _this.$modal.msgSuccess(\"修改成功\");\n });\n }\n });\n },\n close: function close() {\n this.$store.dispatch(\"tagsView/delView\", this.$route);\n this.$router.push({\n path: \"/index\"\n });\n }\n }\n};\nexports.default = _default;\n\n//# sourceURL=webpack:///./src/views/system/user/profile/userInfo.vue?./node_modules/cache-loader/dist/cjs.js??ref--12-0!./node_modules/babel-loader/lib!./node_modules/cache-loader/dist/cjs.js??ref--0-0!./node_modules/vue-loader/lib??vue-loader-options");
48 48  
49 49 /***/ }),
50 50  
... ... @@ -56,7 +56,7 @@ eval(&quot;\n\nObject.defineProperty(exports, \&quot;__esModule\&quot;, {\n value: true\n});\n
56 56 /***/ (function(module, exports, __webpack_require__) {
57 57  
58 58 "use strict";
59   -eval("\n\nvar _interopRequireDefault = __webpack_require__(/*! ./node_modules/@babel/runtime/helpers/interopRequireDefault.js */ \"./node_modules/@babel/runtime/helpers/interopRequireDefault.js\").default;\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\n\n__webpack_require__(/*! core-js/modules/es.regexp.exec.js */ \"./node_modules/core-js/modules/es.regexp.exec.js\");\n\n__webpack_require__(/*! core-js/modules/es.string.replace.js */ \"./node_modules/core-js/modules/es.string.replace.js\");\n\nvar _objectSpread2 = _interopRequireDefault(__webpack_require__(/*! ./node_modules/@babel/runtime/helpers/objectSpread2.js */ \"./node_modules/@babel/runtime/helpers/objectSpread2.js\"));\n\nvar _constants = __webpack_require__(/*! @/utils/constants */ \"./src/utils/constants.js\");\n\nvar _login = __webpack_require__(/*! @/api/login */ \"./src/api/login.js\");\n\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\nvar _default = {\n props: {\n user: {\n type: Object\n },\n getUser: {\n // 刷新用户\n type: Function\n },\n setActiveTab: {\n // 设置激活的\n type: Function\n }\n },\n data: function data() {\n return {};\n },\n computed: {\n socialUsers: function socialUsers() {\n var socialUsers = [];\n\n for (var i in _constants.SystemUserSocialTypeEnum) {\n var socialUser = (0, _objectSpread2.default)({}, _constants.SystemUserSocialTypeEnum[i]);\n socialUsers.push(socialUser);\n\n if (this.user.socialUsers) {\n for (var j in this.user.socialUsers) {\n if (socialUser.type === this.user.socialUsers[j].type) {\n socialUser.unionId = this.user.socialUsers[j].unionId;\n break;\n }\n }\n }\n }\n\n return socialUsers;\n }\n },\n created: function created() {\n var _this = this;\n\n // 社交绑定\n var type = this.$route.query.type;\n var code = this.$route.query.code;\n var state = this.$route.query.state;\n\n if (!code) {\n return;\n }\n\n (0, _login.socialBind)(type, code, state).then(function (resp) {\n _this.msgSuccess(\"绑定成功\");\n\n _this.$router.replace('/user/profile'); // 调用父组件, 刷新\n\n\n _this.getUser();\n\n _this.setActiveTab('userSocial');\n });\n },\n methods: {\n bind: function bind(socialUser) {\n // 计算 redirectUri\n var redirectUri = location.origin + '/user/profile?type=' + socialUser.type; // 进行跳转\n\n (0, _login.socialAuthRedirect)(socialUser.type, encodeURIComponent(redirectUri)).then(function (res) {\n // console.log(res.url);\n window.location.href = res.data;\n });\n },\n unbind: function unbind(socialUser) {\n var _this2 = this;\n\n (0, _login.socialUnbind)(socialUser.type, socialUser.unionId).then(function (resp) {\n _this2.msgSuccess(\"解绑成功\");\n\n socialUser.unionId = undefined;\n });\n },\n close: function close() {\n this.$store.dispatch(\"tagsView/delView\", this.$route);\n this.$router.push({\n path: \"/index\"\n });\n }\n }\n};\nexports.default = _default;\n\n//# sourceURL=webpack:///./src/views/system/user/profile/userSocial.vue?./node_modules/cache-loader/dist/cjs.js??ref--12-0!./node_modules/babel-loader/lib!./node_modules/cache-loader/dist/cjs.js??ref--0-0!./node_modules/vue-loader/lib??vue-loader-options");
  59 +eval("\n\nvar _interopRequireDefault = __webpack_require__(/*! ./node_modules/@babel/runtime/helpers/interopRequireDefault.js */ \"./node_modules/@babel/runtime/helpers/interopRequireDefault.js\").default;\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\n\n__webpack_require__(/*! core-js/modules/es.regexp.exec.js */ \"./node_modules/core-js/modules/es.regexp.exec.js\");\n\n__webpack_require__(/*! core-js/modules/es.string.replace.js */ \"./node_modules/core-js/modules/es.string.replace.js\");\n\nvar _objectSpread2 = _interopRequireDefault(__webpack_require__(/*! ./node_modules/@babel/runtime/helpers/objectSpread2.js */ \"./node_modules/@babel/runtime/helpers/objectSpread2.js\"));\n\nvar _constants = __webpack_require__(/*! @/utils/constants */ \"./src/utils/constants.js\");\n\nvar _login = __webpack_require__(/*! @/api/login */ \"./src/api/login.js\");\n\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\nvar _default = {\n props: {\n user: {\n type: Object\n },\n getUser: {\n // 刷新用户\n type: Function\n },\n setActiveTab: {\n // 设置激活的\n type: Function\n }\n },\n data: function data() {\n return {};\n },\n computed: {\n socialUsers: function socialUsers() {\n var socialUsers = [];\n\n for (var i in _constants.SystemUserSocialTypeEnum) {\n var socialUser = (0, _objectSpread2.default)({}, _constants.SystemUserSocialTypeEnum[i]);\n socialUsers.push(socialUser);\n\n if (this.user.socialUsers) {\n for (var j in this.user.socialUsers) {\n if (socialUser.type === this.user.socialUsers[j].type) {\n socialUser.unionId = this.user.socialUsers[j].unionId;\n break;\n }\n }\n }\n }\n\n return socialUsers;\n }\n },\n created: function created() {\n var _this = this;\n\n // 社交绑定\n var type = this.$route.query.type;\n var code = this.$route.query.code;\n var state = this.$route.query.state;\n\n if (!code) {\n return;\n }\n\n (0, _login.socialBind)(type, code, state).then(function (resp) {\n _this.$modal.msgSuccess(\"绑定成功\");\n\n _this.$router.replace('/user/profile'); // 调用父组件, 刷新\n\n\n _this.getUser();\n\n _this.setActiveTab('userSocial');\n });\n },\n methods: {\n bind: function bind(socialUser) {\n // 计算 redirectUri\n var redirectUri = location.origin + '/user/profile?type=' + socialUser.type; // 进行跳转\n\n (0, _login.socialAuthRedirect)(socialUser.type, encodeURIComponent(redirectUri)).then(function (res) {\n // console.log(res.url);\n window.location.href = res.data;\n });\n },\n unbind: function unbind(socialUser) {\n var _this2 = this;\n\n (0, _login.socialUnbind)(socialUser.type, socialUser.unionId).then(function (resp) {\n _this2.msgSuccess(\"解绑成功\");\n\n socialUser.unionId = undefined;\n });\n },\n close: function close() {\n this.$store.dispatch(\"tagsView/delView\", this.$route);\n this.$router.push({\n path: \"/index\"\n });\n }\n }\n};\nexports.default = _default;\n\n//# sourceURL=webpack:///./src/views/system/user/profile/userSocial.vue?./node_modules/cache-loader/dist/cjs.js??ref--12-0!./node_modules/babel-loader/lib!./node_modules/cache-loader/dist/cjs.js??ref--0-0!./node_modules/vue-loader/lib??vue-loader-options");
60 60  
61 61 /***/ }),
62 62  
... ... @@ -357,4 +357,4 @@ eval(&quot;__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _nod
357 357  
358 358 /***/ })
359 359  
360   -}]);
361 360 \ No newline at end of file
  361 +}]);
... ...
yudao-ui-admin/src/components/bpmnProcessDesigner/package/designer/ProcessDesigner.vue
... ... @@ -464,7 +464,7 @@ export default {
464 464 const { err, xml } = await this.bpmnModeler.saveXML();
465 465 // 读取异常时抛出异常
466 466 if (err) {
467   - this.msgError('保存模型失败,请重试!')
  467 + this.$modal.msgError('保存模型失败,请重试!')
468 468 return
469 469 }
470 470 // 触发 save 事件
... ...
yudao-ui-admin/src/layout/components/Navbar.vue
... ... @@ -96,11 +96,7 @@ export default {
96 96 this.$store.dispatch('app/toggleSideBar')
97 97 },
98 98 async logout() {
99   - this.$confirm('确定注销并退出系统吗?', '提示', {
100   - confirmButtonText: '确定',
101   - cancelButtonText: '取消',
102   - type: 'warning'
103   - }).then(() => {
  99 + this.$modal.confirm('确定注销并退出系统吗?', '提示').then(() => {
104 100 this.$store.dispatch('LogOut').then(() => {
105 101 location.href = '/index';
106 102 })
... ...
yudao-ui-admin/src/layout/components/Settings/index.vue
... ... @@ -38,11 +38,6 @@
38 38 </div>
39 39 </div>
40 40  
41   - <div class="drawer-item">
42   - <span>动态标题</span>
43   - <el-switch v-model="dynamicTitle" class="drawer-switch" />
44   - </div>
45   -
46 41 <el-divider/>
47 42  
48 43 <h3 class="drawer-title">系统布局配置</h3>
... ... @@ -67,6 +62,11 @@
67 62 <el-switch v-model="sidebarLogo" class="drawer-switch" />
68 63 </div>
69 64  
  65 + <div class="drawer-item">
  66 + <span>动态标题</span>
  67 + <el-switch v-model="dynamicTitle" class="drawer-switch" />
  68 + </div>
  69 +
70 70 <el-divider/>
71 71  
72 72 <el-button size="small" type="primary" plain icon="el-icon-document-add" @click="saveSetting">保存配置</el-button>
... ... @@ -162,14 +162,8 @@ export default {
162 162 this.sideTheme = val;
163 163 },
164 164 saveSetting() {
165   - const loading = this.$loading({
166   - lock: true,
167   - fullscreen: false,
168   - text: "正在保存到本地,请稍后...",
169   - spinner: "el-icon-loading",
170   - background: "rgba(0, 0, 0, 0.7)"
171   - });
172   - localStorage.setItem(
  165 + this.$modal.loading("正在保存到本地,请稍后...");
  166 + this.$cache.local.set(
173 167 "layout-setting",
174 168 `{
175 169 "topNav":${this.topNav},
... ... @@ -181,17 +175,11 @@ export default {
181 175 "theme":"${this.theme}"
182 176 }`
183 177 );
184   - setTimeout(loading.close(), 1000)
  178 + setTimeout(this.$modal.closeLoading(), 1000)
185 179 },
186 180 resetSetting() {
187   - this.$loading({
188   - lock: true,
189   - fullscreen: false,
190   - text: "正在清除设置缓存并刷新,请稍后...",
191   - spinner: "el-icon-loading",
192   - background: "rgba(0, 0, 0, 0.7)"
193   - });
194   - localStorage.removeItem("layout-setting")
  181 + this.$modal.loading("正在清除设置缓存并刷新,请稍后...");
  182 + this.$cache.local.remove("layout-setting")
195 183 setTimeout("window.location.reload()", 1000)
196 184 }
197 185 }
... ...
yudao-ui-admin/src/main.js
... ... @@ -11,6 +11,7 @@ import App from &#39;./App&#39;
11 11 import store from './store'
12 12 import router from './router'
13 13 import directive from './directive' // directive
  14 +import plugins from './plugins' // plugins
14 15  
15 16 import './assets/icons' // icon
16 17 import './permission' // permission control
... ... @@ -56,18 +57,6 @@ Vue.prototype.downloadMarkdown = downloadMarkdown
56 57 Vue.prototype.downloadZip = downloadZip
57 58 Vue.prototype.handleTree = handleTree
58 59  
59   -Vue.prototype.msgSuccess = function (msg) {
60   - this.$message({ showClose: true, message: msg, type: "success" });
61   -}
62   -
63   -Vue.prototype.msgError = function (msg) {
64   - this.$message({ showClose: true, message: msg, type: "error" });
65   -}
66   -
67   -Vue.prototype.msgInfo = function (msg) {
68   - this.$message.info(msg);
69   -}
70   -
71 60 // 全局组件挂载
72 61 Vue.component('DictTag', DictTag)
73 62 Vue.component('Pagination', Pagination)
... ... @@ -78,6 +67,7 @@ import DictTag from &#39;@/components/DictTag&#39;
78 67 import VueMeta from 'vue-meta'
79 68  
80 69 Vue.use(directive)
  70 +Vue.use(plugins)
81 71 Vue.use(VueMeta)
82 72 // Vue.use(hljs.vuePlugin);
83 73  
... ...
yudao-ui-admin/src/plugins/cache.js 0 → 100644
  1 +const sessionCache = {
  2 + set (key, value) {
  3 + if (!sessionStorage) {
  4 + return
  5 + }
  6 + if (key != null && value != null) {
  7 + sessionStorage.setItem(key, value)
  8 + }
  9 + },
  10 + get (key) {
  11 + if (!sessionStorage) {
  12 + return null
  13 + }
  14 + if (key == null) {
  15 + return null
  16 + }
  17 + return sessionStorage.getItem(key)
  18 + },
  19 + setJSON (key, jsonValue) {
  20 + if (jsonValue != null) {
  21 + this.set(key, JSON.stringify(jsonValue))
  22 + }
  23 + },
  24 + getJSON (key) {
  25 + const value = this.get(key)
  26 + if (value != null) {
  27 + return JSON.parse(value)
  28 + }
  29 + },
  30 + remove (key) {
  31 + sessionStorage.removeItem(key);
  32 + }
  33 +}
  34 +const localCache = {
  35 + set (key, value) {
  36 + if (!localStorage) {
  37 + return
  38 + }
  39 + if (key != null && value != null) {
  40 + localStorage.setItem(key, value)
  41 + }
  42 + },
  43 + get (key) {
  44 + if (!localStorage) {
  45 + return null
  46 + }
  47 + if (key == null) {
  48 + return null
  49 + }
  50 + return localStorage.getItem(key)
  51 + },
  52 + setJSON (key, jsonValue) {
  53 + if (jsonValue != null) {
  54 + this.set(key, JSON.stringify(jsonValue))
  55 + }
  56 + },
  57 + getJSON (key) {
  58 + const value = this.get(key)
  59 + if (value != null) {
  60 + return JSON.parse(value)
  61 + }
  62 + },
  63 + remove (key) {
  64 + localStorage.removeItem(key);
  65 + }
  66 +}
  67 +
  68 +export default {
  69 + /**
  70 + * 会话级缓存
  71 + */
  72 + session: sessionCache,
  73 + /**
  74 + * 本地缓存
  75 + */
  76 + local: localCache
  77 +}
... ...
yudao-ui-admin/src/plugins/index.js 0 → 100644
  1 +import cache from './cache'
  2 +import modal from './modal'
  3 +
  4 +export default {
  5 + install(Vue) {
  6 + // 缓存对象
  7 + Vue.prototype.$cache = cache
  8 + // 模态框对象
  9 + Vue.prototype.$modal = modal
  10 + }
  11 +}
... ...
yudao-ui-admin/src/plugins/modal.js 0 → 100644
  1 +import { Message, MessageBox, Notification, Loading } from 'element-ui'
  2 +
  3 +let loadingInstance;
  4 +
  5 +export default {
  6 + // 消息提示
  7 + msg(content) {
  8 + Message.info(content)
  9 + },
  10 + // 错误消息
  11 + msgError(content) {
  12 + Message.error(content)
  13 + },
  14 + // 成功消息
  15 + msgSuccess(content) {
  16 + Message.success(content)
  17 + },
  18 + // 警告消息
  19 + msgWarning(content) {
  20 + Message.warning(content)
  21 + },
  22 + // 弹出提示
  23 + alert(content) {
  24 + MessageBox.alert(content, "系统提示")
  25 + },
  26 + // 错误提示
  27 + alertError(content) {
  28 + MessageBox.alert(content, "系统提示", { type: 'error' })
  29 + },
  30 + // 成功提示
  31 + alertSuccess(content) {
  32 + MessageBox.alert(content, "系统提示", { type: 'success' })
  33 + },
  34 + // 警告提示
  35 + alertWarning(content) {
  36 + MessageBox.alert(content, "系统提示", { type: 'warning' })
  37 + },
  38 + // 通知提示
  39 + notify(content) {
  40 + Notification.info(content)
  41 + },
  42 + // 错误通知
  43 + notifyError(content) {
  44 + Notification.error(content);
  45 + },
  46 + // 成功通知
  47 + notifySuccess(content) {
  48 + Notification.success(content)
  49 + },
  50 + // 警告通知
  51 + notifyWarning(content) {
  52 + Notification.warning(content)
  53 + },
  54 + // 确认窗体
  55 + confirm(content) {
  56 + return MessageBox.confirm(content, "系统提示", {
  57 + confirmButtonText: '确定',
  58 + cancelButtonText: '取消',
  59 + type: "warning",
  60 + })
  61 + },
  62 + // 提交内容
  63 + prompt(content) {
  64 + return MessageBox.prompt(content, "系统提示", {
  65 + confirmButtonText: '确定',
  66 + cancelButtonText: '取消',
  67 + type: "warning",
  68 + })
  69 + },
  70 + // 打开遮罩层
  71 + loading(content) {
  72 + loadingInstance = Loading.service({
  73 + lock: true,
  74 + text: content,
  75 + spinner: "el-icon-loading",
  76 + background: "rgba(0, 0, 0, 0.7)",
  77 + })
  78 + },
  79 + // 关闭遮罩层
  80 + closeLoading() {
  81 + loadingInstance.close();
  82 + }
  83 +}
... ...
yudao-ui-admin/src/views/bpm/form/formEditor.vue
... ... @@ -435,14 +435,14 @@ export default {
435 435 // 修改的提交
436 436 if (this.form.id != null) {
437 437 updateForm(form).then(response => {
438   - this.msgSuccess("修改成功");
  438 + this.$modal.msgSuccess("修改成功");
439 439 this.close()
440 440 });
441 441 return;
442 442 }
443 443 // 添加的提交
444 444 createForm(form).then(response => {
445   - this.msgSuccess("新增成功");
  445 + this.$modal.msgSuccess("新增成功");
446 446 this.close()
447 447 });
448 448 });
... ...
yudao-ui-admin/src/views/bpm/form/index.vue
... ... @@ -150,15 +150,11 @@ export default {
150 150 /** 删除按钮操作 */
151 151 handleDelete(row) {
152 152 const id = row.id;
153   - this.$confirm('是否确认删除工作流的编号为"' + id + '"的数据项?', "警告", {
154   - confirmButtonText: "确定",
155   - cancelButtonText: "取消",
156   - type: "warning"
157   - }).then(function() {
  153 + this.$modal.confirm('是否确认删除工作表单的编号为"' + id + '"的数据项?').then(function() {
158 154 return deleteForm(id);
159 155 }).then(() => {
160 156 this.getList();
161   - this.msgSuccess("删除成功");
  157 + this.$modal.msgSuccess("删除成功");
162 158 }).catch(() => {});
163 159 }
164 160 }
... ...
yudao-ui-admin/src/views/bpm/group/index.vue
... ... @@ -213,7 +213,7 @@ export default {
213 213 // 修改的提交
214 214 if (this.form.id != null) {
215 215 updateUserGroup(this.form).then(response => {
216   - this.msgSuccess("修改成功");
  216 + this.$modal.msgSuccess("修改成功");
217 217 this.open = false;
218 218 this.getList();
219 219 });
... ... @@ -221,7 +221,7 @@ export default {
221 221 }
222 222 // 添加的提交
223 223 createUserGroup(this.form).then(response => {
224   - this.msgSuccess("新增成功");
  224 + this.$modal.msgSuccess("新增成功");
225 225 this.open = false;
226 226 this.getList();
227 227 });
... ... @@ -230,15 +230,11 @@ export default {
230 230 /** 删除按钮操作 */
231 231 handleDelete(row) {
232 232 const id = row.id;
233   - this.$confirm('是否确认删除用户组编号为"' + id + '"的数据项?', "警告", {
234   - confirmButtonText: "确定",
235   - cancelButtonText: "取消",
236   - type: "warning"
237   - }).then(function() {
  233 + this.$modal.confirm('是否确认删除用户组编号为"' + id + '"的数据项?').then(function() {
238 234 return deleteUserGroup(id);
239 235 }).then(() => {
240 236 this.getList();
241   - this.msgSuccess("删除成功");
  237 + this.$modal.msgSuccess("删除成功");
242 238 }).catch(() => {});
243 239 },
244 240 getUserNickname(userId) {
... ...
yudao-ui-admin/src/views/bpm/model/index.vue
... ... @@ -399,7 +399,7 @@ export default {
399 399 formCustomCreatePath: this.form.formType === 20 ? this.form.formCustomCreatePath : undefined,
400 400 formCustomViewPath: this.form.formType === 20 ? this.form.formCustomViewPath : undefined,
401 401 }).then(response => {
402   - this.msgSuccess("修改模型成功");
  402 + this.$modal.msgSuccess("修改模型成功");
403 403 this.open = false;
404 404 this.getList();
405 405 });
... ... @@ -425,11 +425,7 @@ export default {
425 425 /** 删除按钮操作 */
426 426 handleDelete(row) {
427 427 const that = this;
428   - this.$confirm('是否删除该流程!!', "警告", {
429   - confirmButtonText: "确定",
430   - cancelButtonText: "取消",
431   - type: "warning"
432   - }).then(function() {
  428 + this.$modal.confirm('是否删除该流程!!').then(function() {
433 429 deleteModel(row.id).then(response => {
434 430 that.getList();
435 431 that.msgSuccess("删除成功");
... ... @@ -439,11 +435,7 @@ export default {
439 435 /** 部署按钮操作 */
440 436 handleDeploy(row) {
441 437 const that = this;
442   - this.$confirm('是否部署该流程!!', "提示", {
443   - confirmButtonText: "确定",
444   - cancelButtonText: "取消",
445   - type: "success"
446   - }).then(function() {
  438 + this.$modal.confirm('是否部署该流程!!').then(function() {
447 439 deployModel(row.id).then(response => {
448 440 that.getList();
449 441 that.msgSuccess("部署成功");
... ... @@ -491,15 +483,11 @@ export default {
491 483 const id = row.id;
492 484 let state = row.processDefinition.suspensionState;
493 485 let statusState = state === 1 ? '激活' : '挂起';
494   - this.$confirm('是否确认' + statusState + '流程名字为"' + row.name + '"的数据项?', "警告", {
495   - confirmButtonText: "确定",
496   - cancelButtonText: "取消",
497   - type: "warning"
498   - }).then(function() {
  486 + this.$modal.confirm('是否确认' + statusState + '流程名字为"' + row.name + '"的数据项?').then(function() {
499 487 return updateModelState(id, state);
500 488 }).then(() => {
501 489 this.getList();
502   - this.msgSuccess(statusState + "成功");
  490 + this.$modal.msgSuccess(statusState + "成功");
503 491 }).catch(() => {});
504 492 },
505 493 /** 导入按钮操作 */
... ... @@ -513,13 +501,13 @@ export default {
513 501 // 文件上传成功处理
514 502 handleFileSuccess(response, file, fileList) {
515 503 if (response.code !== 0) {
516   - this.msgError(response.msg)
  504 + this.$modal.msgError(response.msg)
517 505 return;
518 506 }
519 507 // 重置表单
520 508 this.uploadClose();
521 509 // 提示,并刷新
522   - this.msgSuccess("导入流程成功!请点击【设计流程】按钮,进行编辑保存后,才可以进行【发布流程】");
  510 + this.$modal.msgSuccess("导入流程成功!请点击【设计流程】按钮,进行编辑保存后,才可以进行【发布流程】");
523 511 this.getList();
524 512 },
525 513 uploadClose() {
... ...
yudao-ui-admin/src/views/bpm/model/modelEditor.vue
... ... @@ -96,7 +96,7 @@ export default {
96 96 // 修改的提交
97 97 if (data.id) {
98 98 updateModel(data).then(response => {
99   - this.msgSuccess("修改成功")
  99 + this.$modal.msgSuccess("修改成功")
100 100 // 跳转回去
101 101 this.close()
102 102 })
... ... @@ -104,7 +104,7 @@ export default {
104 104 }
105 105 // 添加的提交
106 106 createModel(data).then(response => {
107   - this.msgSuccess("保存成功")
  107 + this.$modal.msgSuccess("保存成功")
108 108 // 跳转回去
109 109 this.close()
110 110 })
... ...
yudao-ui-admin/src/views/bpm/oa/leave/create.vue
... ... @@ -65,7 +65,7 @@ export default {
65 65  
66 66 // 添加的提交
67 67 createLeave(this.form).then(response => {
68   - this.msgSuccess("发起成功");
  68 + this.$modal.msgSuccess("发起成功");
69 69 this.$store.dispatch("tagsView/delView", this.$route);
70 70 this.$router.push({ path: "/bpm/oa/leave"});
71 71 });
... ...
yudao-ui-admin/src/views/bpm/oa/leave/index.vue
... ... @@ -169,7 +169,7 @@ export default {
169 169 return cancelProcessInstance(id, value);
170 170 }).then(() => {
171 171 this.getList();
172   - this.msgSuccess("取消成功");
  172 + this.$modal.msgSuccess("取消成功");
173 173 })
174 174 }
175 175 }
... ...
yudao-ui-admin/src/views/bpm/processInstance/create.vue
... ... @@ -144,7 +144,7 @@ export default {
144 144 processDefinitionId: this.selectProcessInstance.id,
145 145 variables: variables
146 146 }).then(response => {
147   - this.msgSuccess("发起流程成功");
  147 + this.$modal.msgSuccess("发起流程成功");
148 148 // 关闭当前窗口
149 149 this.$store.dispatch("tagsView/delView", this.$route);
150 150 this.$router.go(-1);
... ...
yudao-ui-admin/src/views/bpm/processInstance/detail.vue
... ... @@ -300,7 +300,7 @@ export default {
300 300 processDefinitionId: this.selectProcessInstance.id,
301 301 variables: variables
302 302 }).then(response => {
303   - this.msgSuccess("发起流程成功");
  303 + this.$modal.msgSuccess("发起流程成功");
304 304 // 关闭当前窗口
305 305 this.$store.dispatch("tagsView/delView", this.$route);
306 306 this.$router.go(-1);
... ... @@ -355,12 +355,12 @@ export default {
355 355 }
356 356 if (pass) {
357 357 approveTask(data).then(response => {
358   - this.msgSuccess("审批通过成功!");
  358 + this.$modal.msgSuccess("审批通过成功!");
359 359 this.getDetail(); // 获得最新详情
360 360 });
361 361 } else {
362 362 rejectTask(data).then(response => {
363   - this.msgSuccess("审批不通过成功!");
  363 + this.$modal.msgSuccess("审批不通过成功!");
364 364 this.getDetail(); // 获得最新详情
365 365 });
366 366 }
... ... @@ -381,7 +381,7 @@ export default {
381 381 return;
382 382 }
383 383 updateTaskAssignee(this.updateAssignee.form).then(response => {
384   - this.msgSuccess("转派任务成功!");
  384 + this.$modal.msgSuccess("转派任务成功!");
385 385 this.updateAssignee.open = false;
386 386 this.getDetail(); // 获得最新详情
387 387 });
... ... @@ -402,11 +402,11 @@ export default {
402 402 },
403 403 /** 处理审批退回的操作 */
404 404 handleDelegate(task) {
405   - this.msgError("暂不支持【委派】功能,可以使用【转派】替代!");
  405 + this.$modal.msgError("暂不支持【委派】功能,可以使用【转派】替代!");
406 406 },
407 407 /** 处理审批退回的操作 */
408 408 handleBack(task) {
409   - this.msgError("暂不支持【退回】功能!");
  409 + this.$modal.msgError("暂不支持【退回】功能!");
410 410 }
411 411 }
412 412 };
... ...
yudao-ui-admin/src/views/bpm/processInstance/index.vue
... ... @@ -174,7 +174,7 @@ export default {
174 174 return cancelProcessInstance(id, value);
175 175 }).then(() => {
176 176 this.getList();
177   - this.msgSuccess("取消成功");
  177 + this.$modal.msgSuccess("取消成功");
178 178 })
179 179 },
180 180 /** 处理详情按钮 */
... ...
yudao-ui-admin/src/views/bpm/taskAssignRule/taskAssignRuleDialog.vue
... ... @@ -257,7 +257,7 @@ export default {
257 257 if (!form.id) {
258 258 form.modelId = this.modelId; // 模型编号
259 259 createTaskAssignRule(form).then(response => {
260   - this.msgSuccess("修改成功");
  260 + this.$modal.msgSuccess("修改成功");
261 261 this.open = false;
262 262 this.getList();
263 263 });
... ... @@ -265,7 +265,7 @@ export default {
265 265 } else {
266 266 form.taskDefinitionKey = undefined; // 无法修改
267 267 updateTaskAssignRule(form).then(response => {
268   - this.msgSuccess("修改成功");
  268 + this.$modal.msgSuccess("修改成功");
269 269 this.open = false;
270 270 this.getList();
271 271 });
... ...
yudao-ui-admin/src/views/infra/apiAccessLog/index.vue
... ... @@ -202,11 +202,7 @@ export default {
202 202 params.pageSize = undefined;
203 203 this.addBeginAndEndTime(params, this.dateRangeBeginTime, 'beginTime');
204 204 // 执行导出
205   - this.$confirm('是否确认导出所有API 访问日志数据项?', "警告", {
206   - confirmButtonText: "确定",
207   - cancelButtonText: "取消",
208   - type: "warning"
209   - }).then(() => {
  205 + this.$modal.confirm('是否确认导出所有API 访问日志数据项?').then(() => {
210 206 this.exportLoading = true;
211 207 return exportApiAccessLogExcel(params);
212 208 }).then(response => {
... ...
yudao-ui-admin/src/views/infra/apiErrorLog/index.vue
... ... @@ -205,13 +205,9 @@ export default {
205 205 /** 处理已处理 / 已忽略的操作 **/
206 206 handleProcessClick(row, processStatus) {
207 207 const processStatusText = this.getDictDataLabel(this.DICT_TYPE.INFRA_API_ERROR_LOG_PROCESS_STATUS, processStatus)
208   - this.$confirm('确认标记为' + processStatusText, '提示', {
209   - type: 'warning',
210   - confirmButtonText: '确定',
211   - cancelButtonText: '取消'
212   - }).then(() => {
  208 + this.$modal.confirm('确认标记为' + processStatusText).then(() => {
213 209 updateApiErrorLogProcess(row.id, processStatus).then(() => {
214   - this.msgSuccess("修改成功");
  210 + this.$modal.msgSuccess("修改成功");
215 211 this.getList();
216 212 });
217 213 }).catch(() => {});
... ... @@ -224,11 +220,7 @@ export default {
224 220 params.pageSize = undefined;
225 221 this.addBeginAndEndTime(params, this.dateRangeExceptionTime, 'exceptionTime');
226 222 // 执行导出
227   - this.$confirm('是否确认导出所有API 错误日志数据项?', "警告", {
228   - confirmButtonText: "确定",
229   - cancelButtonText: "取消",
230   - type: "warning"
231   - }).then(() => {
  223 + this.$modal.confirm('是否确认导出所有API 错误日志数据项?').then(() => {
232 224 this.exportLoading = true;
233 225 return exportApiErrorLogExcel(params);
234 226 }).then(response => {
... ...
yudao-ui-admin/src/views/infra/config/index.vue
... ... @@ -234,13 +234,13 @@ export default {
234 234 if (valid) {
235 235 if (this.form.id !== undefined) {
236 236 updateConfig(this.form).then(response => {
237   - this.msgSuccess("修改成功");
  237 + this.$modal.msgSuccess("修改成功");
238 238 this.open = false;
239 239 this.getList();
240 240 });
241 241 } else {
242 242 addConfig(this.form).then(response => {
243   - this.msgSuccess("新增成功");
  243 + this.$modal.msgSuccess("新增成功");
244 244 this.open = false;
245 245 this.getList();
246 246 });
... ... @@ -251,15 +251,11 @@ export default {
251 251 /** 删除按钮操作 */
252 252 handleDelete(row) {
253 253 const ids = row.id || this.ids;
254   - this.$confirm('是否确认删除参数编号为"' + ids + '"的数据项?', "警告", {
255   - confirmButtonText: "确定",
256   - cancelButtonText: "取消",
257   - type: "warning"
258   - }).then(function() {
  254 + this.$modal.confirm('是否确认删除参数编号为"' + ids + '"的数据项?').then(function() {
259 255 return delConfig(ids);
260 256 }).then(() => {
261 257 this.getList();
262   - this.msgSuccess("删除成功");
  258 + this.$modal.msgSuccess("删除成功");
263 259 }).catch(() => {});
264 260 },
265 261 /** 导出按钮操作 */
... ... @@ -268,11 +264,7 @@ export default {
268 264 this.dateRange[0] ? this.dateRange[0] + ' 00:00:00' : undefined,
269 265 this.dateRange[1] ? this.dateRange[1] + ' 23:59:59' : undefined,
270 266 ]);
271   - this.$confirm('是否确认导出所有参数数据项?', "警告", {
272   - confirmButtonText: "确定",
273   - cancelButtonText: "取消",
274   - type: "warning"
275   - }).then(() => {
  267 + this.$modal.confirm('是否确认导出所有参数数据项?').then(() => {
276 268 this.exportLoading = true;
277 269 return exportConfig(queryParams);
278 270 }).then(response => {
... ...
yudao-ui-admin/src/views/infra/file/index.vue
... ... @@ -180,21 +180,17 @@ export default {
180 180 this.upload.isUploading = false;
181 181 this.$refs.upload.clearFiles();
182 182 // 提示成功,并刷新
183   - this.msgSuccess("上传成功");
  183 + this.$modal.msgSuccess("上传成功");
184 184 this.getList();
185 185 },
186 186 /** 删除按钮操作 */
187 187 handleDelete(row) {
188 188 const id = row.id;
189   - this.$confirm('是否确认删除文件编号为"' + id + '"的数据项?', "警告", {
190   - confirmButtonText: "确定",
191   - cancelButtonText: "取消",
192   - type: "warning"
193   - }).then(function() {
  189 + this.$modal.confirm('是否确认删除文件编号为"' + id + '"的数据项?').then(function() {
194 190 return deleteFile(id);
195 191 }).then(() => {
196 192 this.getList();
197   - this.msgSuccess("删除成功");
  193 + this.$modal.msgSuccess("删除成功");
198 194 }).catch(() => {});
199 195 },
200 196 }
... ...
yudao-ui-admin/src/views/infra/job/index.vue
... ... @@ -247,14 +247,10 @@ export default {
247 247 },
248 248 /** 立即执行一次 **/
249 249 handleRun(row) {
250   - this.$confirm('确认要立即执行一次"' + row.name + '"任务吗?', "警告", {
251   - confirmButtonText: "确定",
252   - cancelButtonText: "取消",
253   - type: "warning"
254   - }).then(function() {
  250 + this.$modal.confirm('确认要立即执行一次"' + row.name + '"任务吗?').then(function() {
255 251 return runJob(row.id);
256 252 }).then(() => {
257   - this.msgSuccess("执行成功");
  253 + this.$modal.msgSuccess("执行成功");
258 254 }).catch(() => {});
259 255 },
260 256 /** 任务详细信息 */
... ... @@ -312,13 +308,13 @@ export default {
312 308 if (valid) {
313 309 if (this.form.id !== undefined) {
314 310 updateJob(this.form).then(response => {
315   - this.msgSuccess("修改成功");
  311 + this.$modal.msgSuccess("修改成功");
316 312 this.open = false;
317 313 this.getList();
318 314 });
319 315 } else {
320 316 addJob(this.form).then(response => {
321   - this.msgSuccess("新增成功");
  317 + this.$modal.msgSuccess("新增成功");
322 318 this.open = false;
323 319 this.getList();
324 320 });
... ... @@ -329,15 +325,11 @@ export default {
329 325 /** 删除按钮操作 */
330 326 handleDelete(row) {
331 327 const ids = row.id;
332   - this.$confirm('是否确认删除定时任务编号为"' + ids + '"的数据项?', "警告", {
333   - confirmButtonText: "确定",
334   - cancelButtonText: "取消",
335   - type: "warning"
336   - }).then(function() {
  328 + this.$modal.confirm('是否确认删除定时任务编号为"' + ids + '"的数据项?').then(function() {
337 329 return delJob(ids);
338 330 }).then(() => {
339 331 this.getList();
340   - this.msgSuccess("删除成功");
  332 + this.$modal.msgSuccess("删除成功");
341 333 }).catch(() => {});
342 334 },
343 335 /** 更新状态操作 */
... ... @@ -345,15 +337,11 @@ export default {
345 337 const id = row.id;
346 338 let status = open ? InfraJobStatusEnum.NORMAL : InfraJobStatusEnum.STOP;
347 339 let statusStr = open ? '开启' : '关闭';
348   - this.$confirm('是否确认' + statusStr + '定时任务编号为"' + id + '"的数据项?', "警告", {
349   - confirmButtonText: "确定",
350   - cancelButtonText: "取消",
351   - type: "warning"
352   - }).then(function() {
  340 + this.$modal.confirm('是否确认' + statusStr + '定时任务编号为"' + id + '"的数据项?').then(function() {
353 341 return updateJobStatus(id, status);
354 342 }).then(() => {
355 343 this.getList();
356   - this.msgSuccess(statusStr + "成功");
  344 + this.$modal.msgSuccess(statusStr + "成功");
357 345 }).catch(() => {});
358 346 },
359 347 // 更多操作触发
... ... @@ -375,11 +363,7 @@ export default {
375 363 /** 导出按钮操作 */
376 364 handleExport() {
377 365 const queryParams = this.queryParams;
378   - this.$confirm("是否确认导出所有定时任务数据项?", "警告", {
379   - confirmButtonText: "确定",
380   - cancelButtonText: "取消",
381   - type: "warning"
382   - }).then(() => {
  366 + this.$modal.confirm("是否确认导出所有定时任务数据项?").then(() => {
383 367 this.exportLoading = true;
384 368 return exportJob(queryParams);
385 369 }).then(response => {
... ...
yudao-ui-admin/src/views/infra/job/log.vue
... ... @@ -165,11 +165,7 @@ export default {
165 165 params.pageNo = undefined;
166 166 params.pageSize = undefined;
167 167 // 执行导出
168   - this.$confirm('是否确认导出所有定时任务日志数据项?', "警告", {
169   - confirmButtonText: "确定",
170   - cancelButtonText: "取消",
171   - type: "warning"
172   - }).then(() => {
  168 + this.$modal.confirm('是否确认导出所有定时任务日志数据项?').then(() => {
173 169 this.exportLoading = true;
174 170 return exportJobLogExcel(params);
175 171 }).then(response => {
... ...
yudao-ui-admin/src/views/infra/redis/index.vue
... ... @@ -92,8 +92,6 @@ export default {
92 92 name: "Server",
93 93 data() {
94 94 return {
95   - // 加载层信息
96   - loading: [],
97 95 // 统计命令信息
98 96 commandstats: null,
99 97 // 使用内存
... ... @@ -115,7 +113,7 @@ export default {
115 113 // 查询 Redis 监控信息
116 114 getCache().then((response) => {
117 115 this.cache = response.data;
118   - this.loading.close();
  116 + this.$modal.closeLoading();
119 117  
120 118 this.commandstats = echarts.init(this.$refs.commandstats, "macarons");
121 119 const commandStats = [];
... ... @@ -176,12 +174,7 @@ export default {
176 174 },
177 175 // 打开加载层
178 176 openLoading() {
179   - this.loading = this.$loading({
180   - lock: true,
181   - text: "拼命读取中",
182   - spinner: "el-icon-loading",
183   - background: "rgba(0, 0, 0, 0.7)",
184   - });
  177 + this.$modal.loading("正在加载缓存监控数据,请稍后!");
185 178 },
186 179 },
187 180 };
... ...
yudao-ui-admin/src/views/pay/app/components/aliPayChannelForm.vue
... ... @@ -298,7 +298,7 @@ export default {
298 298 if (this.transferParam.edit) {
299 299 updateChannel(data).then(response => {
300 300 if (response.code === 0) {
301   - this.msgSuccess("修改成功");
  301 + this.$modal.msgSuccess("修改成功");
302 302 this.close();
303 303 }
304 304  
... ... @@ -307,7 +307,7 @@ export default {
307 307  
308 308 createChannel(data).then(response => {
309 309 if (response.code === 0) {
310   - this.msgSuccess("新增成功");
  310 + this.$modal.msgSuccess("新增成功");
311 311 this.$parent.refreshTable();
312 312 this.close();
313 313 }
... ...
yudao-ui-admin/src/views/pay/app/components/wechatChannelForm.vue
... ... @@ -247,7 +247,7 @@ export default {
247 247 if (this.transferParam.edit) {
248 248 updateChannel(data).then(response => {
249 249 if (response.code === 0) {
250   - this.msgSuccess("修改成功");
  250 + this.$modal.msgSuccess("修改成功");
251 251 this.close();
252 252 }
253 253  
... ... @@ -256,7 +256,7 @@ export default {
256 256  
257 257 createChannel(data).then(response => {
258 258 if (response.code === 0) {
259   - this.msgSuccess("新增成功");
  259 + this.$modal.msgSuccess("新增成功");
260 260 this.$parent.refreshTable();
261 261 this.close();
262 262 }
... ...
yudao-ui-admin/src/views/pay/app/index.vue
... ... @@ -359,14 +359,10 @@ export default {
359 359 // 用户状态修改
360 360 handleStatusChange(row) {
361 361 let text = row.status === CommonStatusEnum.ENABLE ? "启用" : "停用";
362   - this.$confirm('确认要"' + text + '""' + row.name + '"应用吗?', "警告", {
363   - confirmButtonText: "确定",
364   - cancelButtonText: "取消",
365   - type: "warning"
366   - }).then(function () {
  362 + this.$modal.confirm('确认要"' + text + '""' + row.name + '"应用吗?').then(function () {
367 363 return changeAppStatus(row.id, row.status);
368 364 }).then(() => {
369   - this.msgSuccess(text + "成功");
  365 + this.$modal.msgSuccess(text + "成功");
370 366 }).catch(function () {
371 367 row.status = row.status === CommonStatusEnum.ENABLE ? CommonStatusEnum.DISABLE
372 368 : CommonStatusEnum.ENABLE;
... ... @@ -381,7 +377,7 @@ export default {
381 377 // 修改的提交
382 378 if (this.form.id != null) {
383 379 updateApp(this.form).then(response => {
384   - this.msgSuccess("修改成功");
  380 + this.$modal.msgSuccess("修改成功");
385 381 this.open = false;
386 382 this.getList();
387 383 });
... ... @@ -389,7 +385,7 @@ export default {
389 385 }
390 386 // 添加的提交
391 387 createApp(this.form).then(response => {
392   - this.msgSuccess("新增成功");
  388 + this.$modal.msgSuccess("新增成功");
393 389 this.open = false;
394 390 this.getList();
395 391 });
... ... @@ -398,15 +394,11 @@ export default {
398 394 /** 删除按钮操作 */
399 395 handleDelete(row) {
400 396 const id = row.id;
401   - this.$confirm('是否确认删除支付应用信息编号为"' + id + '"的数据项?', "警告", {
402   - confirmButtonText: "确定",
403   - cancelButtonText: "取消",
404   - type: "warning"
405   - }).then(function () {
  397 + this.$modal.confirm('是否确认删除支付应用信息编号为"' + id + '"的数据项?').then(function () {
406 398 return deleteApp(id);
407 399 }).then(() => {
408 400 this.getList();
409   - this.msgSuccess("删除成功");
  401 + this.$modal.msgSuccess("删除成功");
410 402 }).catch(() => {
411 403 this.$message({
412 404 type: 'info',
... ... @@ -422,11 +414,7 @@ export default {
422 414 params.pageSize = undefined;
423 415 this.addBeginAndEndTime(params, this.dateRangeCreateTime, 'createTime');
424 416 // 执行导出
425   - this.$confirm('是否确认导出所有支付应用信息数据项?', "警告", {
426   - confirmButtonText: "确定",
427   - cancelButtonText: "取消",
428   - type: "warning"
429   - }).then(function () {
  417 + this.$modal.confirm('是否确认导出所有支付应用信息数据项?').then(function () {
430 418 return exportAppExcel(params);
431 419 }).then(response => {
432 420 this.downloadExcel(response, '支付应用信息.xls');
... ...
yudao-ui-admin/src/views/pay/merchant/index.vue
... ... @@ -225,14 +225,10 @@ export default {
225 225 // 用户状态修改
226 226 handleStatusChange(row) {
227 227 let text = row.status === CommonStatusEnum.ENABLE ? "启用" : "停用";
228   - this.$confirm('确认要"' + text + '""' + row.name + '"商户吗?', "警告", {
229   - confirmButtonText: "确定",
230   - cancelButtonText: "取消",
231   - type: "warning"
232   - }).then(function() {
  228 + this.$modal.confirm('确认要"' + text + '""' + row.name + '"商户吗?').then(function() {
233 229 return changeMerchantStatus(row.id, row.status);
234 230 }).then(() => {
235   - this.msgSuccess(text + "成功");
  231 + this.$modal.msgSuccess(text + "成功");
236 232 }).catch(function() {
237 233 row.status = row.status === CommonStatusEnum.ENABLE ? CommonStatusEnum.DISABLE
238 234 : CommonStatusEnum.ENABLE;
... ... @@ -247,7 +243,7 @@ export default {
247 243 // 修改的提交
248 244 if (this.form.id != null) {
249 245 updateMerchant(this.form).then(response => {
250   - this.msgSuccess("修改成功");
  246 + this.$modal.msgSuccess("修改成功");
251 247 this.open = false;
252 248 this.getList();
253 249 });
... ... @@ -255,7 +251,7 @@ export default {
255 251 }
256 252 // 添加的提交
257 253 createMerchant(this.form).then(response => {
258   - this.msgSuccess("新增成功");
  254 + this.$modal.msgSuccess("新增成功");
259 255 this.open = false;
260 256 this.getList();
261 257 });
... ... @@ -264,15 +260,11 @@ export default {
264 260 /** 删除按钮操作 */
265 261 handleDelete(row) {
266 262 const id = row.id;
267   - this.$confirm('是否确认删除支付商户信息编号为"' + id + '"的数据项?', "警告", {
268   - confirmButtonText: "确定",
269   - cancelButtonText: "取消",
270   - type: "warning"
271   - }).then(function() {
  263 + this.$modal.confirm('是否确认删除支付商户信息编号为"' + id + '"的数据项?').then(function() {
272 264 return deleteMerchant(id);
273 265 }).then(() => {
274 266 this.getList();
275   - this.msgSuccess("删除成功");
  267 + this.$modal.msgSuccess("删除成功");
276 268 }).catch(() => {});
277 269 },
278 270 /** 导出按钮操作 */
... ... @@ -283,11 +275,7 @@ export default {
283 275 params.pageSize = undefined;
284 276 this.addBeginAndEndTime(params, this.dateRangeCreateTime, 'createTime');
285 277 // 执行导出
286   - this.$confirm('是否确认导出所有支付商户信息数据项?', "警告", {
287   - confirmButtonText: "确定",
288   - cancelButtonText: "取消",
289   - type: "warning"
290   - }).then(() => {
  278 + this.$modal.confirm('是否确认导出所有支付商户信息数据项?').then(() => {
291 279 this.exportLoading = true;
292 280 return exportMerchantExcel(params);
293 281 }).then(response => {
... ...
yudao-ui-admin/src/views/pay/order/index.vue
... ... @@ -420,11 +420,7 @@ export default {
420 420 this.addBeginAndEndTime(params, this.dateRangeNotifyTime, 'notifyTime');
421 421 this.addDateRange(params, this.dateRangeCreateTime, 'CreateTime');
422 422 // 执行导出
423   - this.$confirm('是否确认导出所有支付订单数据项?', "警告", {
424   - confirmButtonText: "确定",
425   - cancelButtonText: "取消",
426   - type: "warning"
427   - }).then(function () {
  423 + this.$modal.confirm('是否确认导出所有支付订单数据项?').then(function () {
428 424 return exportOrderExcel(params);
429 425 }).then(response => {
430 426 this.downloadExcel(response, '支付订单.xls');
... ...
yudao-ui-admin/src/views/pay/refund/index.vue
... ... @@ -424,11 +424,7 @@ export default {
424 424 this.addBeginAndEndTime(params, this.dateRangeNotifyTime, 'notifyTime');
425 425 this.addDateRange(params, this.dateRangeCreateTime, 'CreateTime');
426 426 // 执行导出
427   - this.$confirm('是否确认导出所有退款订单数据项?', "警告", {
428   - confirmButtonText: "确定",
429   - cancelButtonText: "取消",
430   - type: "warning"
431   - }).then(function () {
  427 + this.$modal.confirm('是否确认导出所有退款订单数据项?').then(function () {
432 428 return exportRefundExcel(params);
433 429 }).then(response => {
434 430 this.downloadExcel(response, '退款订单.xls');
... ...
yudao-ui-admin/src/views/system/dept/index.vue
... ... @@ -291,13 +291,13 @@ export default {
291 291 if (valid) {
292 292 if (this.form.id !== undefined) {
293 293 updateDept(this.form).then(response => {
294   - this.msgSuccess("修改成功");
  294 + this.$modal.msgSuccess("修改成功");
295 295 this.open = false;
296 296 this.getList();
297 297 });
298 298 } else {
299 299 addDept(this.form).then(response => {
300   - this.msgSuccess("新增成功");
  300 + this.$modal.msgSuccess("新增成功");
301 301 this.open = false;
302 302 this.getList();
303 303 });
... ... @@ -307,15 +307,11 @@ export default {
307 307 },
308 308 /** 删除按钮操作 */
309 309 handleDelete(row) {
310   - this.$confirm('是否确认删除名称为"' + row.name + '"的数据项?', "警告", {
311   - confirmButtonText: "确定",
312   - cancelButtonText: "取消",
313   - type: "warning"
314   - }).then(function() {
  310 + this.$modal.confirm('是否确认删除名称为"' + row.name + '"的数据项?').then(function() {
315 311 return delDept(row.id);
316 312 }).then(() => {
317 313 this.getList();
318   - this.msgSuccess("删除成功");
  314 + this.$modal.msgSuccess("删除成功");
319 315 }).catch(() => {});
320 316 }
321 317 }
... ...
yudao-ui-admin/src/views/system/dict/data.vue
... ... @@ -266,13 +266,13 @@ export default {
266 266 if (valid) {
267 267 if (this.form.id !== undefined) {
268 268 updateData(this.form).then(response => {
269   - this.msgSuccess("修改成功");
  269 + this.$modal.msgSuccess("修改成功");
270 270 this.open = false;
271 271 this.getList();
272 272 });
273 273 } else {
274 274 addData(this.form).then(response => {
275   - this.msgSuccess("新增成功");
  275 + this.$modal.msgSuccess("新增成功");
276 276 this.open = false;
277 277 this.getList();
278 278 });
... ... @@ -283,25 +283,17 @@ export default {
283 283 /** 删除按钮操作 */
284 284 handleDelete(row) {
285 285 const ids = row.id;
286   - this.$confirm('是否确认删除字典编码为"' + ids + '"的数据项?', "警告", {
287   - confirmButtonText: "确定",
288   - cancelButtonText: "取消",
289   - type: "warning"
290   - }).then(function() {
  286 + this.$modal.confirm('是否确认删除字典编码为"' + ids + '"的数据项?').then(function() {
291 287 return delData(ids);
292 288 }).then(() => {
293 289 this.getList();
294   - this.msgSuccess("删除成功");
  290 + this.$modal.msgSuccess("删除成功");
295 291 }).catch(() => {});
296 292 },
297 293 /** 导出按钮操作 */
298 294 handleExport() {
299 295 const queryParams = this.queryParams;
300   - this.$confirm('是否确认导出所有数据项?', "警告", {
301   - confirmButtonText: "确定",
302   - cancelButtonText: "取消",
303   - type: "warning"
304   - }).then(() => {
  296 + this.$modal.confirm('是否确认导出所有数据项?').then(() => {
305 297 this.exportLoading = true;
306 298 return exportData(queryParams);
307 299 }).then(response => {
... ...
yudao-ui-admin/src/views/system/dict/index.vue
... ... @@ -214,13 +214,13 @@ export default {
214 214 if (valid) {
215 215 if (this.form.id !== undefined) {
216 216 updateType(this.form).then(response => {
217   - this.msgSuccess("修改成功");
  217 + this.$modal.msgSuccess("修改成功");
218 218 this.open = false;
219 219 this.getList();
220 220 });
221 221 } else {
222 222 addType(this.form).then(response => {
223   - this.msgSuccess("新增成功");
  223 + this.$modal.msgSuccess("新增成功");
224 224 this.open = false;
225 225 this.getList();
226 226 });
... ... @@ -231,15 +231,11 @@ export default {
231 231 /** 删除按钮操作 */
232 232 handleDelete(row) {
233 233 const ids = row.id || this.ids;
234   - this.$confirm('是否确认删除字典编号为"' + ids + '"的数据项?', "警告", {
235   - confirmButtonText: "确定",
236   - cancelButtonText: "取消",
237   - type: "warning"
238   - }).then(function() {
  234 + this.$modal.confirm('是否确认删除字典编号为"' + ids + '"的数据项?').then(function() {
239 235 return delType(ids);
240 236 }).then(() => {
241 237 this.getList();
242   - this.msgSuccess("删除成功");
  238 + this.$modal.msgSuccess("删除成功");
243 239 }).catch(() => {});
244 240 },
245 241 /** 导出按钮操作 */
... ... @@ -250,11 +246,7 @@ export default {
250 246 params.pageSize = undefined;
251 247 this.addBeginAndEndTime(params, this.dateRangeCreateTime, 'createTime');
252 248 // 执行导出
253   - this.$confirm('是否确认导出所有字典类型数据项?', "警告", {
254   - confirmButtonText: "确定",
255   - cancelButtonText: "取消",
256   - type: "warning"
257   - }).then(() => {
  249 + this.$modal.confirm('是否确认导出所有字典类型数据项?').then(() => {
258 250 this.exportLoading = true;
259 251 return exportType(params);
260 252 }).then(response => {
... ...
yudao-ui-admin/src/views/system/errorCode/index.vue
... ... @@ -207,7 +207,7 @@ export default {
207 207 // 修改的提交
208 208 if (this.form.id != null) {
209 209 updateErrorCode(this.form).then(response => {
210   - this.msgSuccess("修改成功");
  210 + this.$modal.msgSuccess("修改成功");
211 211 this.open = false;
212 212 this.getList();
213 213 });
... ... @@ -215,7 +215,7 @@ export default {
215 215 }
216 216 // 添加的提交
217 217 createErrorCode(this.form).then(response => {
218   - this.msgSuccess("新增成功");
  218 + this.$modal.msgSuccess("新增成功");
219 219 this.open = false;
220 220 this.getList();
221 221 });
... ... @@ -224,15 +224,11 @@ export default {
224 224 /** 删除按钮操作 */
225 225 handleDelete(row) {
226 226 const id = row.id;
227   - this.$confirm('是否确认删除错误码编号为"' + id + '"的数据项?', "警告", {
228   - confirmButtonText: "确定",
229   - cancelButtonText: "取消",
230   - type: "warning"
231   - }).then(function() {
  227 + this.$modal.confirm('是否确认删除错误码编号为"' + id + '"的数据项?').then(function() {
232 228 return deleteErrorCode(id);
233 229 }).then(() => {
234 230 this.getList();
235   - this.msgSuccess("删除成功");
  231 + this.$modal.msgSuccess("删除成功");
236 232 }).catch(() => {});
237 233 },
238 234 /** 导出按钮操作 */
... ... @@ -243,11 +239,7 @@ export default {
243 239 params.pageSize = undefined;
244 240 this.addBeginAndEndTime(params, this.dateRangeCreateTime, 'createTime');
245 241 // 执行导出
246   - this.$confirm('是否确认导出所有错误码数据项?', "警告", {
247   - confirmButtonText: "确定",
248   - cancelButtonText: "取消",
249   - type: "warning"
250   - }).then(() => {
  242 + this.$modal.confirm('是否确认导出所有错误码数据项?').then(() => {
251 243 this.exportLoading = true;
252 244 return exportErrorCodeExcel(params);
253 245 }).then(response => {
... ...
yudao-ui-admin/src/views/system/loginlog/index.vue
... ... @@ -122,11 +122,7 @@ export default {
122 122 /** 导出按钮操作 */
123 123 handleExport() {
124 124 const queryParams = this.queryParams;
125   - this.$confirm('是否确认导出所有操作日志数据项?', "警告", {
126   - confirmButtonText: "确定",
127   - cancelButtonText: "取消",
128   - type: "warning"
129   - }).then(() => {
  125 + this.$modal.confirm('是否确认导出所有操作日志数据项?').then(() => {
130 126 this.exportLoading = true;
131 127 return exportLoginLog(queryParams);
132 128 }).then(response => {
... ...
yudao-ui-admin/src/views/system/menu/index.vue
... ... @@ -298,10 +298,10 @@ export default {
298 298 if (path.indexOf('http://') === -1 || path.indexOf('https://') === -1) {
299 299 // 父权限为根节点,path 必须以 / 开头
300 300 if (this.form.parentId === 0 && path.charAt(0) !== '/') {
301   - this.msgSuccess('前端必须以 / 开头')
  301 + this.$modal.msgSuccess('前端必须以 / 开头')
302 302 return
303 303 } else if (this.form.parentId !== 0 && path.charAt(0) === '/') {
304   - this.msgSuccess('前端不能以 / 开头')
  304 + this.$modal.msgSuccess('前端不能以 / 开头')
305 305 return
306 306 }
307 307 }
... ... @@ -310,13 +310,13 @@ export default {
310 310 // 提交
311 311 if (this.form.id !== undefined) {
312 312 updateMenu(this.form).then(response => {
313   - this.msgSuccess("修改成功");
  313 + this.$modal.msgSuccess("修改成功");
314 314 this.open = false;
315 315 this.getList();
316 316 });
317 317 } else {
318 318 addMenu(this.form).then(response => {
319   - this.msgSuccess("新增成功");
  319 + this.$modal.msgSuccess("新增成功");
320 320 this.open = false;
321 321 this.getList();
322 322 });
... ... @@ -326,15 +326,11 @@ export default {
326 326 },
327 327 /** 删除按钮操作 */
328 328 handleDelete(row) {
329   - this.$confirm('是否确认删除名称为"' + row.name + '"的数据项?', "警告", {
330   - confirmButtonText: "确定",
331   - cancelButtonText: "取消",
332   - type: "warning"
333   - }).then(function() {
  329 + this.$modal.confirm('是否确认删除名称为"' + row.name + '"的数据项?').then(function() {
334 330 return delMenu(row.id);
335 331 }).then(() => {
336 332 this.getList();
337   - this.msgSuccess("删除成功");
  333 + this.$modal.msgSuccess("删除成功");
338 334 }).catch(() => {});
339 335 }
340 336 }
... ...
yudao-ui-admin/src/views/system/notice/index.vue
... ... @@ -219,13 +219,13 @@ export default {
219 219 if (valid) {
220 220 if (this.form.id !== undefined) {
221 221 updateNotice(this.form).then(response => {
222   - this.msgSuccess("修改成功");
  222 + this.$modal.msgSuccess("修改成功");
223 223 this.open = false;
224 224 this.getList();
225 225 });
226 226 } else {
227 227 addNotice(this.form).then(response => {
228   - this.msgSuccess("新增成功");
  228 + this.$modal.msgSuccess("新增成功");
229 229 this.open = false;
230 230 this.getList();
231 231 });
... ... @@ -236,15 +236,11 @@ export default {
236 236 /** 删除按钮操作 */
237 237 handleDelete(row) {
238 238 const ids = row.id || this.ids
239   - this.$confirm('是否确认删除公告编号为"' + ids + '"的数据项?', "警告", {
240   - confirmButtonText: "确定",
241   - cancelButtonText: "取消",
242   - type: "warning"
243   - }).then(function() {
  239 + this.$modal.confirm('是否确认删除公告编号为"' + ids + '"的数据项?').then(function() {
244 240 return delNotice(ids);
245 241 }).then(() => {
246 242 this.getList();
247   - this.msgSuccess("删除成功");
  243 + this.$modal.msgSuccess("删除成功");
248 244 }).catch(() => {});
249 245 }
250 246 }
... ...
yudao-ui-admin/src/views/system/operatelog/index.vue
... ... @@ -202,11 +202,7 @@ export default {
202 202 this.dateRange[0] ? this.dateRange[0] + ' 00:00:00' : undefined,
203 203 this.dateRange[1] ? this.dateRange[1] + ' 23:59:59' : undefined,
204 204 ])
205   - this.$confirm('是否确认导出所有操作日志数据项?', "警告", {
206   - confirmButtonText: "确定",
207   - cancelButtonText: "取消",
208   - type: "warning"
209   - }).then(() => {
  205 + this.$modal.confirm('是否确认导出所有操作日志数据项?').then(() => {
210 206 this.exportLoading = true;
211 207 return exportOperateLog(queryParams);
212 208 }).then(response => {
... ...
yudao-ui-admin/src/views/system/post/index.vue
... ... @@ -205,13 +205,13 @@ export default {
205 205 if (valid) {
206 206 if (this.form.id !== undefined) {
207 207 updatePost(this.form).then(response => {
208   - this.msgSuccess("修改成功");
  208 + this.$modal.msgSuccess("修改成功");
209 209 this.open = false;
210 210 this.getList();
211 211 });
212 212 } else {
213 213 addPost(this.form).then(response => {
214   - this.msgSuccess("新增成功");
  214 + this.$modal.msgSuccess("新增成功");
215 215 this.open = false;
216 216 this.getList();
217 217 });
... ... @@ -222,25 +222,17 @@ export default {
222 222 /** 删除按钮操作 */
223 223 handleDelete(row) {
224 224 const ids = row.id;
225   - this.$confirm('是否确认删除岗位编号为"' + ids + '"的数据项?', "警告", {
226   - confirmButtonText: "确定",
227   - cancelButtonText: "取消",
228   - type: "warning"
229   - }).then(function() {
  225 + this.$modal.confirm('是否确认删除岗位编号为"' + ids + '"的数据项?').then(function() {
230 226 return delPost(ids);
231 227 }).then(() => {
232 228 this.getList();
233   - this.msgSuccess("删除成功");
  229 + this.$modal.msgSuccess("删除成功");
234 230 }).catch(() => {});
235 231 },
236 232 /** 导出按钮操作 */
237 233 handleExport() {
238 234 const queryParams = this.queryParams;
239   - this.$confirm('是否确认导出所有岗位数据项?', "警告", {
240   - confirmButtonText: "确定",
241   - cancelButtonText: "取消",
242   - type: "warning"
243   - }).then(() => {
  235 + this.$modal.confirm('是否确认导出所有岗位数据项?').then(() => {
244 236 this.exportLoading = true;
245 237 return exportPost(queryParams);
246 238 }).then(response => {
... ...
yudao-ui-admin/src/views/system/role/index.vue
... ... @@ -277,14 +277,10 @@ export default {
277 277 handleStatusChange(row) {
278 278 // 此时,row 已经变成目标状态了,所以可以直接提交请求和提示
279 279 let text = row.status === CommonStatusEnum.ENABLE ? "启用" : "停用";
280   - this.$confirm('确认要"' + text + '""' + row.name + '"角色吗?', "警告", {
281   - confirmButtonText: "确定",
282   - cancelButtonText: "取消",
283   - type: "warning"
284   - }).then(function() {
  280 + this.$modal.confirm('确认要"' + text + '""' + row.name + '"角色吗?').then(function() {
285 281 return changeRoleStatus(row.id, row.status);
286 282 }).then(() => {
287   - this.msgSuccess(text + "成功");
  283 + this.$modal.msgSuccess(text + "成功");
288 284 }).catch(function() {
289 285 // 异常时,需要将 row.status 状态重置回之前的
290 286 row.status = row.status === CommonStatusEnum.ENABLE ? CommonStatusEnum.DISABLE
... ... @@ -442,13 +438,13 @@ export default {
442 438 if (valid) {
443 439 if (this.form.id !== undefined) {
444 440 updateRole(this.form).then(response => {
445   - this.msgSuccess("修改成功");
  441 + this.$modal.msgSuccess("修改成功");
446 442 this.open = false;
447 443 this.getList();
448 444 });
449 445 } else {
450 446 addRole(this.form).then(response => {
451   - this.msgSuccess("新增成功");
  447 + this.$modal.msgSuccess("新增成功");
452 448 this.open = false;
453 449 this.getList();
454 450 });
... ... @@ -465,7 +461,7 @@ export default {
465 461 dataScopeDeptIds: this.form.dataScope !== SystemDataScopeEnum.DEPT_CUSTOM ? [] :
466 462 this.$refs.dept.getCheckedKeys()
467 463 }).then(response => {
468   - this.msgSuccess("修改成功");
  464 + this.$modal.msgSuccess("修改成功");
469 465 this.openDataScope = false;
470 466 this.getList();
471 467 });
... ... @@ -478,7 +474,7 @@ export default {
478 474 roleId: this.form.id,
479 475 menuIds: [...this.$refs.menu.getCheckedKeys(), ...this.$refs.menu.getHalfCheckedKeys()]
480 476 }).then(response => {
481   - this.msgSuccess("修改成功");
  477 + this.$modal.msgSuccess("修改成功");
482 478 this.openMenu = false;
483 479 this.getList();
484 480 });
... ... @@ -487,25 +483,17 @@ export default {
487 483 /** 删除按钮操作 */
488 484 handleDelete(row) {
489 485 const ids = row.id || this.ids;
490   - this.$confirm('是否确认删除角色编号为"' + ids + '"的数据项?', "警告", {
491   - confirmButtonText: "确定",
492   - cancelButtonText: "取消",
493   - type: "warning"
494   - }).then(function() {
  486 + this.$modal.confirm('是否确认删除角色编号为"' + ids + '"的数据项?').then(function() {
495 487 return delRole(ids);
496 488 }).then(() => {
497 489 this.getList();
498   - this.msgSuccess("删除成功");
  490 + this.$modal.msgSuccess("删除成功");
499 491 }).catch(() => {});
500 492 },
501 493 /** 导出按钮操作 */
502 494 handleExport() {
503 495 const queryParams = this.queryParams;
504   - this.$confirm('是否确认导出所有角色数据项?', "警告", {
505   - confirmButtonText: "确定",
506   - cancelButtonText: "取消",
507   - type: "warning"
508   - }).then(function() {
  496 + this.$modal.confirm('是否确认导出所有角色数据项?').then(function() {
509 497 this.exportLoading = true;
510 498 return exportRole(queryParams);
511 499 }).then(response => {
... ...
yudao-ui-admin/src/views/system/session/index.vue
... ... @@ -83,15 +83,11 @@ export default {
83 83 },
84 84 /** 强退按钮操作 */
85 85 handleForceLogout(row) {
86   - this.$confirm('是否确认强退名称为"' + row.username + '"的数据项?', "警告", {
87   - confirmButtonText: "确定",
88   - cancelButtonText: "取消",
89   - type: "warning"
90   - }).then(function() {
  86 + this.$modal.confirm('是否确认强退名称为"' + row.username + '"的数据项?').then(function() {
91 87 return forceLogout(row.id);
92 88 }).then(() => {
93 89 this.getList();
94   - this.msgSuccess("强退成功");
  90 + this.$modal.msgSuccess("强退成功");
95 91 }).catch(() => {});
96 92 }
97 93 }
... ...
yudao-ui-admin/src/views/system/sms/smsChannel.vue
... ... @@ -216,7 +216,7 @@ export default {
216 216 // 修改的提交
217 217 if (this.form.id != null) {
218 218 updateSmsChannel(this.form).then(response => {
219   - this.msgSuccess("修改成功");
  219 + this.$modal.msgSuccess("修改成功");
220 220 this.open = false;
221 221 this.getList();
222 222 });
... ... @@ -224,7 +224,7 @@ export default {
224 224 }
225 225 // 添加的提交
226 226 createSmsChannel(this.form).then(response => {
227   - this.msgSuccess("新增成功");
  227 + this.$modal.msgSuccess("新增成功");
228 228 this.open = false;
229 229 this.getList();
230 230 });
... ... @@ -233,15 +233,11 @@ export default {
233 233 /** 删除按钮操作 */
234 234 handleDelete(row) {
235 235 const id = row.id;
236   - this.$confirm('是否确认删除短信渠道编号为"' + id + '"的数据项?', "警告", {
237   - confirmButtonText: "确定",
238   - cancelButtonText: "取消",
239   - type: "warning"
240   - }).then(function() {
  236 + this.$modal.confirm('是否确认删除短信渠道编号为"' + id + '"的数据项?').then(function() {
241 237 return deleteSmsChannel(id);
242 238 }).then(() => {
243 239 this.getList();
244   - this.msgSuccess("删除成功");
  240 + this.$modal.msgSuccess("删除成功");
245 241 }).catch(() => {});
246 242 }
247 243 }
... ...
yudao-ui-admin/src/views/system/sms/smsLog.vue
... ... @@ -278,11 +278,7 @@ export default {
278 278 this.addBeginAndEndTime(params, this.dateRangeSendTime, 'sendTime');
279 279 this.addBeginAndEndTime(params, this.dateRangeReceiveTime, 'receiveTime');
280 280 // 执行导出
281   - this.$confirm('是否确认导出所有短信日志数据项?', "警告", {
282   - confirmButtonText: "确定",
283   - cancelButtonText: "取消",
284   - type: "warning"
285   - }).then(() => {
  281 + this.$modal.confirm('是否确认导出所有短信日志数据项?').then(() => {
286 282 this.exportLoading = true;
287 283 return exportSmsLogExcel(params);
288 284 }).then(response => {
... ...
yudao-ui-admin/src/views/system/sms/smsTemplate.vue
... ... @@ -298,7 +298,7 @@ export default {
298 298 // 修改的提交
299 299 if (this.form.id != null) {
300 300 updateSmsTemplate(this.form).then(response => {
301   - this.msgSuccess("修改成功");
  301 + this.$modal.msgSuccess("修改成功");
302 302 this.open = false;
303 303 this.getList();
304 304 });
... ... @@ -306,7 +306,7 @@ export default {
306 306 }
307 307 // 添加的提交
308 308 createSmsTemplate(this.form).then(response => {
309   - this.msgSuccess("新增成功");
  309 + this.$modal.msgSuccess("新增成功");
310 310 this.open = false;
311 311 this.getList();
312 312 });
... ... @@ -315,15 +315,11 @@ export default {
315 315 /** 删除按钮操作 */
316 316 handleDelete(row) {
317 317 const id = row.id;
318   - this.$confirm('是否确认删除短信模板编号为"' + id + '"的数据项?', "警告", {
319   - confirmButtonText: "确定",
320   - cancelButtonText: "取消",
321   - type: "warning"
322   - }).then(function() {
  318 + this.$modal.confirm('是否确认删除短信模板编号为"' + id + '"的数据项?').then(function() {
323 319 return deleteSmsTemplate(id);
324 320 }).then(() => {
325 321 this.getList();
326   - this.msgSuccess("删除成功");
  322 + this.$modal.msgSuccess("删除成功");
327 323 }).catch(() => {});
328 324 },
329 325 /** 导出按钮操作 */
... ... @@ -334,11 +330,7 @@ export default {
334 330 params.pageSize = undefined;
335 331 this.addBeginAndEndTime(params, this.dateRangeCreateTime, 'createTime');
336 332 // 执行导出
337   - this.$confirm('是否确认导出所有短信模板数据项?', "警告", {
338   - confirmButtonText: "确定",
339   - cancelButtonText: "取消",
340   - type: "warning"
341   - }).then(() => {
  333 + this.$modal.confirm('是否确认导出所有短信模板数据项?', "警告").then(() => {
342 334 this.exportLoading = true;
343 335 return exportSmsTemplateExcel(params);
344 336 }).then(response => {
... ... @@ -390,7 +382,7 @@ export default {
390 382 }
391 383 // 添加的提交
392 384 sendSms(this.sendSmsForm).then(response => {
393   - this.msgSuccess("提交发送成功!发送结果,见发送日志编号:" + response.data);
  385 + this.$modal.msgSuccess("提交发送成功!发送结果,见发送日志编号:" + response.data);
394 386 this.sendSmsOpen = false;
395 387 });
396 388 });
... ...
yudao-ui-admin/src/views/system/tenant/index.vue
... ... @@ -210,7 +210,7 @@ export default {
210 210 // 修改的提交
211 211 if (this.form.id != null) {
212 212 updateTenant(this.form).then(response => {
213   - this.msgSuccess("修改成功");
  213 + this.$modal.msgSuccess("修改成功");
214 214 this.open = false;
215 215 this.getList();
216 216 });
... ... @@ -218,7 +218,7 @@ export default {
218 218 }
219 219 // 添加的提交
220 220 createTenant(this.form).then(response => {
221   - this.msgSuccess("新增成功");
  221 + this.$modal.msgSuccess("新增成功");
222 222 this.open = false;
223 223 this.getList();
224 224 });
... ... @@ -227,15 +227,11 @@ export default {
227 227 /** 删除按钮操作 */
228 228 handleDelete(row) {
229 229 const id = row.id;
230   - this.$confirm('是否确认删除租户编号为"' + id + '"的数据项?', "警告", {
231   - confirmButtonText: "确定",
232   - cancelButtonText: "取消",
233   - type: "warning"
234   - }).then(function() {
  230 + this.$modal.confirm('是否确认删除租户编号为"' + id + '"的数据项?').then(function() {
235 231 return deleteTenant(id);
236 232 }).then(() => {
237 233 this.getList();
238   - this.msgSuccess("删除成功");
  234 + this.$modal.msgSuccess("删除成功");
239 235 }).catch(() => {});
240 236 },
241 237 /** 导出按钮操作 */
... ... @@ -246,11 +242,7 @@ export default {
246 242 params.pageSize = undefined;
247 243 this.addBeginAndEndTime(params, this.dateRangeCreateTime, 'createTime');
248 244 // 执行导出
249   - this.$confirm('是否确认导出所有租户数据项?', "警告", {
250   - confirmButtonText: "确定",
251   - cancelButtonText: "取消",
252   - type: "warning"
253   - }).then(() => {
  245 + this.$modal.confirm('是否确认导出所有租户数据项?').then(() => {
254 246 this.exportLoading = true;
255 247 return exportTenantExcel(params);
256 248 }).then(response => {
... ...
yudao-ui-admin/src/views/system/user/index.vue
... ... @@ -429,14 +429,10 @@ export default {
429 429 // 用户状态修改
430 430 handleStatusChange(row) {
431 431 let text = row.status === CommonStatusEnum.ENABLE ? "启用" : "停用";
432   - this.$confirm('确认要"' + text + '""' + row.username + '"用户吗?', "警告", {
433   - confirmButtonText: "确定",
434   - cancelButtonText: "取消",
435   - type: "warning"
436   - }).then(function() {
  432 + this.$modal.confirm('确认要"' + text + '""' + row.username + '"用户吗?').then(function() {
437 433 return changeUserStatus(row.id, row.status);
438 434 }).then(() => {
439   - this.msgSuccess(text + "成功");
  435 + this.$modal.msgSuccess(text + "成功");
440 436 }).catch(function() {
441 437 row.status = row.status === CommonStatusEnum.ENABLE ? CommonStatusEnum.DISABLE
442 438 : CommonStatusEnum.ENABLE;
... ... @@ -510,7 +506,7 @@ export default {
510 506 cancelButtonText: "取消"
511 507 }).then(({ value }) => {
512 508 resetUserPwd(row.id, value).then(response => {
513   - this.msgSuccess("修改成功,新密码是:" + value);
  509 + this.$modal.msgSuccess("修改成功,新密码是:" + value);
514 510 });
515 511 }).catch(() => {});
516 512 },
... ... @@ -542,13 +538,13 @@ export default {
542 538 if (valid) {
543 539 if (this.form.id !== undefined) {
544 540 updateUser(this.form).then(response => {
545   - this.msgSuccess("修改成功");
  541 + this.$modal.msgSuccess("修改成功");
546 542 this.open = false;
547 543 this.getList();
548 544 });
549 545 } else {
550 546 addUser(this.form).then(response => {
551   - this.msgSuccess("新增成功");
  547 + this.$modal.msgSuccess("新增成功");
552 548 this.open = false;
553 549 this.getList();
554 550 });
... ... @@ -563,7 +559,7 @@ export default {
563 559 userId: this.form.id,
564 560 roleIds: this.form.roleIds,
565 561 }).then(response => {
566   - this.msgSuccess("分配角色成功");
  562 + this.$modal.msgSuccess("分配角色成功");
567 563 this.openRole = false;
568 564 this.getList();
569 565 });
... ... @@ -572,15 +568,11 @@ export default {
572 568 /** 删除按钮操作 */
573 569 handleDelete(row) {
574 570 const ids = row.id || this.ids;
575   - this.$confirm('是否确认删除用户编号为"' + ids + '"的数据项?', "警告", {
576   - confirmButtonText: "确定",
577   - cancelButtonText: "取消",
578   - type: "warning"
579   - }).then(function() {
  571 + this.$modal.confirm('是否确认删除用户编号为"' + ids + '"的数据项?').then(function() {
580 572 return delUser(ids);
581 573 }).then(() => {
582 574 this.getList();
583   - this.msgSuccess("删除成功");
  575 + this.$modal.msgSuccess("删除成功");
584 576 }).catch(() => {});
585 577 },
586 578 /** 导出按钮操作 */
... ... @@ -589,11 +581,7 @@ export default {
589 581 this.dateRange[0] ? this.dateRange[0] + ' 00:00:00' : undefined,
590 582 this.dateRange[1] ? this.dateRange[1] + ' 23:59:59' : undefined,
591 583 ]);
592   - this.$confirm('是否确认导出所有用户数据项?', "警告", {
593   - confirmButtonText: "确定",
594   - cancelButtonText: "取消",
595   - type: "warning"
596   - }).then(() => {
  584 + this.$modal.confirm('是否确认导出所有用户数据项?').then(() => {
597 585 this.exportLoading = true;
598 586 return exportUser(queryParams);
599 587 }).then(response => {
... ... @@ -619,7 +607,7 @@ export default {
619 607 // 文件上传成功处理
620 608 handleFileSuccess(response, file, fileList) {
621 609 if (response.code !== 0) {
622   - this.msgError(response.msg)
  610 + this.$modal.msgError(response.msg)
623 611 return;
624 612 }
625 613 this.upload.open = false;
... ...
yudao-ui-admin/src/views/system/user/profile/resetPwd.vue
... ... @@ -57,7 +57,7 @@ export default {
57 57 if (valid) {
58 58 updateUserPwd(this.user.oldPassword, this.user.newPassword).then(
59 59 response => {
60   - this.msgSuccess("修改成功");
  60 + this.$modal.msgSuccess("修改成功");
61 61 }
62 62 );
63 63 }
... ...
yudao-ui-admin/src/views/system/user/profile/userAvatar.vue
... ... @@ -110,7 +110,7 @@ export default {
110 110 // 上传预处理
111 111 beforeUpload(file) {
112 112 if (file.type.indexOf("image/") == -1) {
113   - this.msgError("文件格式错误,请上传图片类型,如:JPG,PNG后缀的文件。");
  113 + this.$modal.msgError("文件格式错误,请上传图片类型,如:JPG,PNG后缀的文件。");
114 114 } else {
115 115 const reader = new FileReader();
116 116 reader.readAsDataURL(file);
... ... @@ -128,7 +128,7 @@ export default {
128 128 this.open = false;
129 129 // this.options.img = process.env.VUE_APP_BASE_API + response.imgUrl;
130 130 store.commit('SET_AVATAR', resp.data);
131   - this.msgSuccess("修改成功");
  131 + this.$modal.msgSuccess("修改成功");
132 132 this.visible = false;
133 133 });
134 134 });
... ...
yudao-ui-admin/src/views/system/user/profile/userInfo.vue
... ... @@ -62,7 +62,7 @@ export default {
62 62 this.$refs["form"].validate(valid => {
63 63 if (valid) {
64 64 updateUserProfile(this.user).then(response => {
65   - this.msgSuccess("修改成功");
  65 + this.$modal.msgSuccess("修改成功");
66 66 });
67 67 }
68 68 });
... ...
yudao-ui-admin/src/views/system/user/profile/userSocial.vue
... ... @@ -68,7 +68,7 @@ export default {
68 68 return;
69 69 }
70 70 socialBind(type, code, state).then(resp => {
71   - this.msgSuccess("绑定成功");
  71 + this.$modal.msgSuccess("绑定成功");
72 72 this.$router.replace('/user/profile');
73 73 // 调用父组件, 刷新
74 74 this.getUser();
... ... @@ -87,7 +87,7 @@ export default {
87 87 },
88 88 unbind(socialUser) {
89 89 socialUnbind(socialUser.type, socialUser.unionId).then(resp => {
90   - this.msgSuccess("解绑成功");
  90 + this.$modal.msgSuccess("解绑成功");
91 91 socialUser.unionId = undefined;
92 92 });
93 93 },
... ...
yudao-ui-admin/src/views/tool/codegen/editTable.vue
... ... @@ -194,11 +194,11 @@ export default {
194 194 parentMenuId: genTable.parentMenuId
195 195 };
196 196 updateCodegen(genTable).then(res => {
197   - this.msgSuccess("修改成功!");
  197 + this.$modal.msgSuccess("修改成功!");
198 198 this.close();
199 199 });
200 200 } else {
201   - this.msgError("表单校验未通过,请重新检查提交内容");
  201 + this.$modal.msgError("表单校验未通过,请重新检查提交内容");
202 202 }
203 203 });
204 204 },
... ...
yudao-ui-admin/src/views/tool/codegen/genInfoForm.vue
... ... @@ -304,7 +304,7 @@ export default {
304 304 tplSelectChange(value) {
305 305 if (value !== 1) {
306 306 // TODO 芋艿:暂时不考虑支持树形结构
307   - this.msgError('暂时不考虑支持【树形】和【主子表】的代码生成。原因是:导致 vm 模板过于复杂,不利于胖友二次开发');
  307 + this.$modal.msgError('暂时不考虑支持【树形】和【主子表】的代码生成。原因是:导致 vm 模板过于复杂,不利于胖友二次开发');
308 308 return false;
309 309 }
310 310 if(value !== 'sub') {
... ...
yudao-ui-admin/src/views/tool/codegen/importTable.vue
... ... @@ -96,7 +96,7 @@ export default {
96 96 /** 导入按钮操作 */
97 97 handleImportTable() {
98 98 createCodegenListFromDB(this.tables.join(",")).then(res => {
99   - this.msgSuccess("导入成功");
  99 + this.$modal.msgSuccess("导入成功");
100 100 this.visible = false;
101 101 this.$emit("ok");
102 102 });
... ...
yudao-ui-admin/src/views/tool/codegen/index.vue
... ... @@ -205,14 +205,10 @@ export default {
205 205 }
206 206 // 基于 DB 同步
207 207 const tableName = row.tableName;
208   - this.$confirm('确认要强制同步"' + tableName + '"表结构吗?', "警告", {
209   - confirmButtonText: "确定",
210   - cancelButtonText: "取消",
211   - type: "warning"
212   - }).then(function() {
  208 + this.$modal.confirm('确认要强制同步"' + tableName + '"表结构吗?').then(function() {
213 209 return syncCodegenFromDB(row.id);
214 210 }).then(() => {
215   - this.msgSuccess("同步成功");
  211 + this.$modal.msgSuccess("同步成功");
216 212 }).catch(() => {});
217 213 },
218 214 /** 打开导入表弹窗 */
... ... @@ -326,15 +322,11 @@ export default {
326 322 /** 删除按钮操作 */
327 323 handleDelete(row) {
328 324 const tableIds = row.id;
329   - this.$confirm('是否确认删除表名称为"' + row.tableName + '"的数据项?', "警告", {
330   - confirmButtonText: "确定",
331   - cancelButtonText: "取消",
332   - type: "warning"
333   - }).then(function() {
  325 + this.$modal.confirm('是否确认删除表名称为"' + row.tableName + '"的数据项?').then(function() {
334 326 return deleteCodegen(tableIds);
335 327 }).then(() => {
336 328 this.getList();
337   - this.msgSuccess("删除成功");
  329 + this.$modal.msgSuccess("删除成功");
338 330 }).catch(() => {});
339 331 },
340 332 // 取消按钮
... ... @@ -360,7 +352,7 @@ export default {
360 352 let form = this.importSQL.form;
361 353 if (form.tableId != null) {
362 354 syncCodegenFromSQL(form.tableId, form.sql).then(response => {
363   - this.msgSuccess("同步成功");
  355 + this.$modal.msgSuccess("同步成功");
364 356 this.importSQL.open = false;
365 357 this.getList();
366 358 });
... ... @@ -368,7 +360,7 @@ export default {
368 360 }
369 361 // 添加的提交
370 362 createCodegenListFromSQL(form).then(response => {
371   - this.msgSuccess("导入成功");
  363 + this.$modal.msgSuccess("导入成功");
372 364 this.importSQL.open = false;
373 365 this.getList();
374 366 });
... ...
yudao-ui-admin/src/views/tool/testDemo/index.vue
... ... @@ -217,7 +217,7 @@ export default {
217 217 // 修改的提交
218 218 if (this.form.id != null) {
219 219 updateTestDemo(this.form).then(response => {
220   - this.msgSuccess("修改成功");
  220 + this.$modal.msgSuccess("修改成功");
221 221 this.open = false;
222 222 this.getList();
223 223 });
... ... @@ -225,7 +225,7 @@ export default {
225 225 }
226 226 // 添加的提交
227 227 createTestDemo(this.form).then(response => {
228   - this.msgSuccess("新增成功");
  228 + this.$modal.msgSuccess("新增成功");
229 229 this.open = false;
230 230 this.getList();
231 231 });
... ... @@ -234,15 +234,11 @@ export default {
234 234 /** 删除按钮操作 */
235 235 handleDelete(row) {
236 236 const id = row.id;
237   - this.$confirm('是否确认删除字典类型编号为"' + id + '"的数据项?', "警告", {
238   - confirmButtonText: "确定",
239   - cancelButtonText: "取消",
240   - type: "warning"
241   - }).then(function() {
  237 + this.$modal.confirm('是否确认删除字典类型编号为"' + id + '"的数据项?').then(function() {
242 238 return deleteTestDemo(id);
243 239 }).then(() => {
244 240 this.getList();
245   - this.msgSuccess("删除成功");
  241 + this.$modal.msgSuccess("删除成功");
246 242 }).catch(() => {});
247 243 },
248 244 /** 导出按钮操作 */
... ... @@ -253,11 +249,7 @@ export default {
253 249 params.pageSize = undefined;
254 250 this.addBeginAndEndTime(params, this.dateRangeCreateTime, 'createTime');
255 251 // 执行导出
256   - this.$confirm('是否确认导出所有字典类型数据项?', "警告", {
257   - confirmButtonText: "确定",
258   - cancelButtonText: "取消",
259   - type: "warning"
260   - }).then(() => {
  252 + this.$modal.confirm('是否确认导出所有字典类型数据项?').then(() => {
261 253 this.exportLoading = true;
262 254 return exportTestDemoExcel(params);
263 255 }).then(response => {
... ...