From 38ac5270d6f3a703c07abfd4d1ab0f18d9d6adfd Mon Sep 17 00:00:00 2001 From: YunaiV Date: Thu, 17 Feb 2022 13:11:21 +0800 Subject: [PATCH] =?UTF-8?q?v3.8.0=20=E6=96=B0=E5=A2=9E=E9=80=9A=E7=94=A8?= =?UTF-8?q?=E6=96=B9=E6=B3=95=E7=AE=80=E5=8C=96=E6=A8=A1=E6=80=81/?= =?UTF-8?q?=E7=BC=93=E5=AD=98=E4=BD=BF=E7=94=A8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../resources/codegen/vue/views/index.vue.vm | 18 ++-- .../main/resources/admin-ui/static/js/17.js | 8 +- .../main/resources/admin-ui/static/js/20.js | 4 +- .../main/resources/admin-ui/static/js/6.js | 6 +- .../package/designer/ProcessDesigner.vue | 2 +- .../src/layout/components/Navbar.vue | 6 +- .../src/layout/components/Settings/index.vue | 32 +++---- yudao-ui-admin/src/main.js | 14 +--- yudao-ui-admin/src/plugins/cache.js | 77 +++++++++++++++++ yudao-ui-admin/src/plugins/index.js | 11 +++ yudao-ui-admin/src/plugins/modal.js | 83 +++++++++++++++++++ .../src/views/bpm/form/formEditor.vue | 4 +- yudao-ui-admin/src/views/bpm/form/index.vue | 8 +- yudao-ui-admin/src/views/bpm/group/index.vue | 12 +-- yudao-ui-admin/src/views/bpm/model/index.vue | 26 ++---- .../src/views/bpm/model/modelEditor.vue | 4 +- .../src/views/bpm/oa/leave/create.vue | 2 +- .../src/views/bpm/oa/leave/index.vue | 2 +- .../src/views/bpm/processInstance/create.vue | 2 +- .../src/views/bpm/processInstance/detail.vue | 12 +-- .../src/views/bpm/processInstance/index.vue | 2 +- .../taskAssignRule/taskAssignRuleDialog.vue | 4 +- .../src/views/infra/apiAccessLog/index.vue | 6 +- .../src/views/infra/apiErrorLog/index.vue | 14 +--- .../src/views/infra/config/index.vue | 18 ++-- yudao-ui-admin/src/views/infra/file/index.vue | 10 +-- yudao-ui-admin/src/views/infra/job/index.vue | 34 ++------ yudao-ui-admin/src/views/infra/job/log.vue | 6 +- .../src/views/infra/redis/index.vue | 11 +-- .../pay/app/components/aliPayChannelForm.vue | 4 +- .../pay/app/components/wechatChannelForm.vue | 4 +- yudao-ui-admin/src/views/pay/app/index.vue | 26 ++---- .../src/views/pay/merchant/index.vue | 26 ++---- yudao-ui-admin/src/views/pay/order/index.vue | 6 +- yudao-ui-admin/src/views/pay/refund/index.vue | 6 +- .../src/views/system/dept/index.vue | 12 +-- yudao-ui-admin/src/views/system/dict/data.vue | 18 ++-- .../src/views/system/dict/index.vue | 18 ++-- .../src/views/system/errorCode/index.vue | 18 ++-- .../src/views/system/loginlog/index.vue | 6 +- .../src/views/system/menu/index.vue | 16 ++-- .../src/views/system/notice/index.vue | 12 +-- .../src/views/system/operatelog/index.vue | 6 +- .../src/views/system/post/index.vue | 18 ++-- .../src/views/system/role/index.vue | 30 ++----- .../src/views/system/session/index.vue | 8 +- .../src/views/system/sms/smsChannel.vue | 12 +-- .../src/views/system/sms/smsLog.vue | 6 +- .../src/views/system/sms/smsTemplate.vue | 20 ++--- .../src/views/system/tenant/index.vue | 18 ++-- .../src/views/system/user/index.vue | 32 +++---- .../views/system/user/profile/resetPwd.vue | 2 +- .../views/system/user/profile/userAvatar.vue | 4 +- .../views/system/user/profile/userInfo.vue | 2 +- .../views/system/user/profile/userSocial.vue | 4 +- .../src/views/tool/codegen/editTable.vue | 4 +- .../src/views/tool/codegen/genInfoForm.vue | 2 +- .../src/views/tool/codegen/importTable.vue | 2 +- .../src/views/tool/codegen/index.vue | 20 ++--- .../src/views/tool/testDemo/index.vue | 18 ++-- 60 files changed, 366 insertions(+), 452 deletions(-) create mode 100644 yudao-ui-admin/src/plugins/cache.js create mode 100644 yudao-ui-admin/src/plugins/index.js create mode 100644 yudao-ui-admin/src/plugins/modal.js diff --git a/yudao-module-tool/yudao-module-tool-impl/src/main/resources/codegen/vue/views/index.vue.vm b/yudao-module-tool/yudao-module-tool-impl/src/main/resources/codegen/vue/views/index.vue.vm index bbf5c9fe6..67f975c9b 100644 --- a/yudao-module-tool/yudao-module-tool-impl/src/main/resources/codegen/vue/views/index.vue.vm +++ b/yudao-module-tool/yudao-module-tool-impl/src/main/resources/codegen/vue/views/index.vue.vm @@ -347,7 +347,7 @@ export default { // 修改的提交 if (this.form.${primaryColumn.javaField} != null) { update${simpleClassName}(this.form).then(response => { - this.msgSuccess("修改成功"); + this.$modal.msgSuccess("修改成功"); this.open = false; this.getList(); }); @@ -355,7 +355,7 @@ export default { } // 添加的提交 create${simpleClassName}(this.form).then(response => { - this.msgSuccess("新增成功"); + this.$modal.msgSuccess("新增成功"); this.open = false; this.getList(); }); @@ -364,15 +364,11 @@ export default { /** 删除按钮操作 */ handleDelete(row) { const ${primaryColumn.javaField} = row.${primaryColumn.javaField}; - this.$confirm('是否确认删除${table.classComment}编号为"' + ${primaryColumn.javaField} + '"的数据项?', "警告", { - confirmButtonText: "确定", - cancelButtonText: "取消", - type: "warning" - }).then(function() { + this.$model.confirm('是否确认删除${table.classComment}编号为"' + ${primaryColumn.javaField} + '"的数据项?').then(function() { return delete${simpleClassName}(${primaryColumn.javaField}); }).then(() => { this.getList(); - this.msgSuccess("删除成功"); + this.$modal.msgSuccess("删除成功"); }).catch(() => {}); }, /** 导出按钮操作 */ @@ -390,11 +386,7 @@ export default { #end #end // 执行导出 - this.$confirm('是否确认导出所有${table.classComment}数据项?', "警告", { - confirmButtonText: "确定", - cancelButtonText: "取消", - type: "warning" - }).then(() => { + this.$model.confirm('是否确认导出所有${table.classComment}数据项?').then(() => { this.exportLoading = true; return export${simpleClassName}Excel(params); }).then(response => { diff --git a/yudao-server/src/main/resources/admin-ui/static/js/17.js b/yudao-server/src/main/resources/admin-ui/static/js/17.js index 1c4e0ec1d..0c8d6d43e 100644 --- a/yudao-server/src/main/resources/admin-ui/static/js/17.js +++ b/yudao-server/src/main/resources/admin-ui/static/js/17.js @@ -56,7 +56,7 @@ eval("\n\nvar _interopRequireDefault = __webpack_require__(/*! ./node_modules/@b /***/ (function(module, exports, __webpack_require__) { "use strict"; -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('新建模型成功!后续需要执行如下 4 个步骤:' + '
1. 点击【修改流程】按钮,配置流程的分类、表单信息
' + '
2. 点击【设计流程】按钮,绘制流程图
' + '
3. 点击【分配规则】按钮,设置每个用户任务的审批人
' + '
4. 点击【发布流程】按钮,完成流程的最终发布
' + '另外,每次流程修改后,都需要点击【发布流程】按钮,才能正式生效!!!', '重要提示', {\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"); +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('新建模型成功!后续需要执行如下 4 个步骤:' + '
1. 点击【修改流程】按钮,配置流程的分类、表单信息
' + '
2. 点击【设计流程】按钮,绘制流程图
' + '
3. 点击【分配规则】按钮,设置每个用户任务的审批人
' + '
4. 点击【发布流程】按钮,完成流程的最终发布
' + '另外,每次流程修改后,都需要点击【发布流程】按钮,才能正式生效!!!', '重要提示', {\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"); /***/ }), @@ -68,7 +68,7 @@ eval("\n\nvar _interopRequireDefault = __webpack_require__(/*! ./node_modules/@b /***/ (function(module, exports, __webpack_require__) { "use strict"; -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"); +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"); /***/ }), @@ -224,7 +224,7 @@ eval("\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n /***/ (function(module, exports, __webpack_require__) { "use strict"; -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"); +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"); /***/ }), @@ -3963,4 +3963,4 @@ eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _nod /***/ }) -}]); \ No newline at end of file +}]); diff --git a/yudao-server/src/main/resources/admin-ui/static/js/20.js b/yudao-server/src/main/resources/admin-ui/static/js/20.js index e70536637..68f60d7dd 100644 --- a/yudao-server/src/main/resources/admin-ui/static/js/20.js +++ b/yudao-server/src/main/resources/admin-ui/static/js/20.js @@ -8,7 +8,7 @@ /***/ (function(module, exports, __webpack_require__) { "use strict"; -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"); +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,4 +72,4 @@ eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _nod /***/ }) -}]); \ No newline at end of file +}]); diff --git a/yudao-server/src/main/resources/admin-ui/static/js/6.js b/yudao-server/src/main/resources/admin-ui/static/js/6.js index e57bdb753..31f47355b 100644 --- a/yudao-server/src/main/resources/admin-ui/static/js/6.js +++ b/yudao-server/src/main/resources/admin-ui/static/js/6.js @@ -44,7 +44,7 @@ eval("\n\nvar _interopRequireDefault = __webpack_require__(/*! ./node_modules/@b /***/ (function(module, exports, __webpack_require__) { "use strict"; -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"); +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"); /***/ }), @@ -56,7 +56,7 @@ eval("\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n /***/ (function(module, exports, __webpack_require__) { "use strict"; -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"); +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"); /***/ }), @@ -357,4 +357,4 @@ eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _nod /***/ }) -}]); \ No newline at end of file +}]); diff --git a/yudao-ui-admin/src/components/bpmnProcessDesigner/package/designer/ProcessDesigner.vue b/yudao-ui-admin/src/components/bpmnProcessDesigner/package/designer/ProcessDesigner.vue index ddd9a4da6..be28f850d 100644 --- a/yudao-ui-admin/src/components/bpmnProcessDesigner/package/designer/ProcessDesigner.vue +++ b/yudao-ui-admin/src/components/bpmnProcessDesigner/package/designer/ProcessDesigner.vue @@ -464,7 +464,7 @@ export default { const { err, xml } = await this.bpmnModeler.saveXML(); // 读取异常时抛出异常 if (err) { - this.msgError('保存模型失败,请重试!') + this.$modal.msgError('保存模型失败,请重试!') return } // 触发 save 事件 diff --git a/yudao-ui-admin/src/layout/components/Navbar.vue b/yudao-ui-admin/src/layout/components/Navbar.vue index 466cd981e..dc664b72f 100644 --- a/yudao-ui-admin/src/layout/components/Navbar.vue +++ b/yudao-ui-admin/src/layout/components/Navbar.vue @@ -96,11 +96,7 @@ export default { this.$store.dispatch('app/toggleSideBar') }, async logout() { - this.$confirm('确定注销并退出系统吗?', '提示', { - confirmButtonText: '确定', - cancelButtonText: '取消', - type: 'warning' - }).then(() => { + this.$modal.confirm('确定注销并退出系统吗?', '提示').then(() => { this.$store.dispatch('LogOut').then(() => { location.href = '/index'; }) diff --git a/yudao-ui-admin/src/layout/components/Settings/index.vue b/yudao-ui-admin/src/layout/components/Settings/index.vue index 04ef1feb5..eb0a83940 100644 --- a/yudao-ui-admin/src/layout/components/Settings/index.vue +++ b/yudao-ui-admin/src/layout/components/Settings/index.vue @@ -38,11 +38,6 @@ -
- 动态标题 - -
-

系统布局配置

@@ -67,6 +62,11 @@ +
+ 动态标题 + +
+ 保存配置 @@ -162,14 +162,8 @@ export default { this.sideTheme = val; }, saveSetting() { - const loading = this.$loading({ - lock: true, - fullscreen: false, - text: "正在保存到本地,请稍后...", - spinner: "el-icon-loading", - background: "rgba(0, 0, 0, 0.7)" - }); - localStorage.setItem( + this.$modal.loading("正在保存到本地,请稍后..."); + this.$cache.local.set( "layout-setting", `{ "topNav":${this.topNav}, @@ -181,17 +175,11 @@ export default { "theme":"${this.theme}" }` ); - setTimeout(loading.close(), 1000) + setTimeout(this.$modal.closeLoading(), 1000) }, resetSetting() { - this.$loading({ - lock: true, - fullscreen: false, - text: "正在清除设置缓存并刷新,请稍后...", - spinner: "el-icon-loading", - background: "rgba(0, 0, 0, 0.7)" - }); - localStorage.removeItem("layout-setting") + this.$modal.loading("正在清除设置缓存并刷新,请稍后..."); + this.$cache.local.remove("layout-setting") setTimeout("window.location.reload()", 1000) } } diff --git a/yudao-ui-admin/src/main.js b/yudao-ui-admin/src/main.js index b3628e9ff..77f671b59 100644 --- a/yudao-ui-admin/src/main.js +++ b/yudao-ui-admin/src/main.js @@ -11,6 +11,7 @@ import App from './App' import store from './store' import router from './router' import directive from './directive' // directive +import plugins from './plugins' // plugins import './assets/icons' // icon import './permission' // permission control @@ -56,18 +57,6 @@ Vue.prototype.downloadMarkdown = downloadMarkdown Vue.prototype.downloadZip = downloadZip Vue.prototype.handleTree = handleTree -Vue.prototype.msgSuccess = function (msg) { - this.$message({ showClose: true, message: msg, type: "success" }); -} - -Vue.prototype.msgError = function (msg) { - this.$message({ showClose: true, message: msg, type: "error" }); -} - -Vue.prototype.msgInfo = function (msg) { - this.$message.info(msg); -} - // 全局组件挂载 Vue.component('DictTag', DictTag) Vue.component('Pagination', Pagination) @@ -78,6 +67,7 @@ import DictTag from '@/components/DictTag' import VueMeta from 'vue-meta' Vue.use(directive) +Vue.use(plugins) Vue.use(VueMeta) // Vue.use(hljs.vuePlugin); diff --git a/yudao-ui-admin/src/plugins/cache.js b/yudao-ui-admin/src/plugins/cache.js new file mode 100644 index 000000000..6b5c00b9e --- /dev/null +++ b/yudao-ui-admin/src/plugins/cache.js @@ -0,0 +1,77 @@ +const sessionCache = { + set (key, value) { + if (!sessionStorage) { + return + } + if (key != null && value != null) { + sessionStorage.setItem(key, value) + } + }, + get (key) { + if (!sessionStorage) { + return null + } + if (key == null) { + return null + } + return sessionStorage.getItem(key) + }, + setJSON (key, jsonValue) { + if (jsonValue != null) { + this.set(key, JSON.stringify(jsonValue)) + } + }, + getJSON (key) { + const value = this.get(key) + if (value != null) { + return JSON.parse(value) + } + }, + remove (key) { + sessionStorage.removeItem(key); + } +} +const localCache = { + set (key, value) { + if (!localStorage) { + return + } + if (key != null && value != null) { + localStorage.setItem(key, value) + } + }, + get (key) { + if (!localStorage) { + return null + } + if (key == null) { + return null + } + return localStorage.getItem(key) + }, + setJSON (key, jsonValue) { + if (jsonValue != null) { + this.set(key, JSON.stringify(jsonValue)) + } + }, + getJSON (key) { + const value = this.get(key) + if (value != null) { + return JSON.parse(value) + } + }, + remove (key) { + localStorage.removeItem(key); + } +} + +export default { + /** + * 会话级缓存 + */ + session: sessionCache, + /** + * 本地缓存 + */ + local: localCache +} diff --git a/yudao-ui-admin/src/plugins/index.js b/yudao-ui-admin/src/plugins/index.js new file mode 100644 index 000000000..6eba51099 --- /dev/null +++ b/yudao-ui-admin/src/plugins/index.js @@ -0,0 +1,11 @@ +import cache from './cache' +import modal from './modal' + +export default { + install(Vue) { + // 缓存对象 + Vue.prototype.$cache = cache + // 模态框对象 + Vue.prototype.$modal = modal + } +} diff --git a/yudao-ui-admin/src/plugins/modal.js b/yudao-ui-admin/src/plugins/modal.js new file mode 100644 index 000000000..b37ca1457 --- /dev/null +++ b/yudao-ui-admin/src/plugins/modal.js @@ -0,0 +1,83 @@ +import { Message, MessageBox, Notification, Loading } from 'element-ui' + +let loadingInstance; + +export default { + // 消息提示 + msg(content) { + Message.info(content) + }, + // 错误消息 + msgError(content) { + Message.error(content) + }, + // 成功消息 + msgSuccess(content) { + Message.success(content) + }, + // 警告消息 + msgWarning(content) { + Message.warning(content) + }, + // 弹出提示 + alert(content) { + MessageBox.alert(content, "系统提示") + }, + // 错误提示 + alertError(content) { + MessageBox.alert(content, "系统提示", { type: 'error' }) + }, + // 成功提示 + alertSuccess(content) { + MessageBox.alert(content, "系统提示", { type: 'success' }) + }, + // 警告提示 + alertWarning(content) { + MessageBox.alert(content, "系统提示", { type: 'warning' }) + }, + // 通知提示 + notify(content) { + Notification.info(content) + }, + // 错误通知 + notifyError(content) { + Notification.error(content); + }, + // 成功通知 + notifySuccess(content) { + Notification.success(content) + }, + // 警告通知 + notifyWarning(content) { + Notification.warning(content) + }, + // 确认窗体 + confirm(content) { + return MessageBox.confirm(content, "系统提示", { + confirmButtonText: '确定', + cancelButtonText: '取消', + type: "warning", + }) + }, + // 提交内容 + prompt(content) { + return MessageBox.prompt(content, "系统提示", { + confirmButtonText: '确定', + cancelButtonText: '取消', + type: "warning", + }) + }, + // 打开遮罩层 + loading(content) { + loadingInstance = Loading.service({ + lock: true, + text: content, + spinner: "el-icon-loading", + background: "rgba(0, 0, 0, 0.7)", + }) + }, + // 关闭遮罩层 + closeLoading() { + loadingInstance.close(); + } +} diff --git a/yudao-ui-admin/src/views/bpm/form/formEditor.vue b/yudao-ui-admin/src/views/bpm/form/formEditor.vue index c2ec15e32..2afcd57fb 100644 --- a/yudao-ui-admin/src/views/bpm/form/formEditor.vue +++ b/yudao-ui-admin/src/views/bpm/form/formEditor.vue @@ -435,14 +435,14 @@ export default { // 修改的提交 if (this.form.id != null) { updateForm(form).then(response => { - this.msgSuccess("修改成功"); + this.$modal.msgSuccess("修改成功"); this.close() }); return; } // 添加的提交 createForm(form).then(response => { - this.msgSuccess("新增成功"); + this.$modal.msgSuccess("新增成功"); this.close() }); }); diff --git a/yudao-ui-admin/src/views/bpm/form/index.vue b/yudao-ui-admin/src/views/bpm/form/index.vue index 1e2c9488d..eef300908 100644 --- a/yudao-ui-admin/src/views/bpm/form/index.vue +++ b/yudao-ui-admin/src/views/bpm/form/index.vue @@ -150,15 +150,11 @@ export default { /** 删除按钮操作 */ handleDelete(row) { const id = row.id; - this.$confirm('是否确认删除工作流的编号为"' + id + '"的数据项?', "警告", { - confirmButtonText: "确定", - cancelButtonText: "取消", - type: "warning" - }).then(function() { + this.$modal.confirm('是否确认删除工作表单的编号为"' + id + '"的数据项?').then(function() { return deleteForm(id); }).then(() => { this.getList(); - this.msgSuccess("删除成功"); + this.$modal.msgSuccess("删除成功"); }).catch(() => {}); } } diff --git a/yudao-ui-admin/src/views/bpm/group/index.vue b/yudao-ui-admin/src/views/bpm/group/index.vue index 62527f2da..cf41aa8bd 100644 --- a/yudao-ui-admin/src/views/bpm/group/index.vue +++ b/yudao-ui-admin/src/views/bpm/group/index.vue @@ -213,7 +213,7 @@ export default { // 修改的提交 if (this.form.id != null) { updateUserGroup(this.form).then(response => { - this.msgSuccess("修改成功"); + this.$modal.msgSuccess("修改成功"); this.open = false; this.getList(); }); @@ -221,7 +221,7 @@ export default { } // 添加的提交 createUserGroup(this.form).then(response => { - this.msgSuccess("新增成功"); + this.$modal.msgSuccess("新增成功"); this.open = false; this.getList(); }); @@ -230,15 +230,11 @@ export default { /** 删除按钮操作 */ handleDelete(row) { const id = row.id; - this.$confirm('是否确认删除用户组编号为"' + id + '"的数据项?', "警告", { - confirmButtonText: "确定", - cancelButtonText: "取消", - type: "warning" - }).then(function() { + this.$modal.confirm('是否确认删除用户组编号为"' + id + '"的数据项?').then(function() { return deleteUserGroup(id); }).then(() => { this.getList(); - this.msgSuccess("删除成功"); + this.$modal.msgSuccess("删除成功"); }).catch(() => {}); }, getUserNickname(userId) { diff --git a/yudao-ui-admin/src/views/bpm/model/index.vue b/yudao-ui-admin/src/views/bpm/model/index.vue index 007d0e938..d3f157b33 100644 --- a/yudao-ui-admin/src/views/bpm/model/index.vue +++ b/yudao-ui-admin/src/views/bpm/model/index.vue @@ -399,7 +399,7 @@ export default { formCustomCreatePath: this.form.formType === 20 ? this.form.formCustomCreatePath : undefined, formCustomViewPath: this.form.formType === 20 ? this.form.formCustomViewPath : undefined, }).then(response => { - this.msgSuccess("修改模型成功"); + this.$modal.msgSuccess("修改模型成功"); this.open = false; this.getList(); }); @@ -425,11 +425,7 @@ export default { /** 删除按钮操作 */ handleDelete(row) { const that = this; - this.$confirm('是否删除该流程!!', "警告", { - confirmButtonText: "确定", - cancelButtonText: "取消", - type: "warning" - }).then(function() { + this.$modal.confirm('是否删除该流程!!').then(function() { deleteModel(row.id).then(response => { that.getList(); that.msgSuccess("删除成功"); @@ -439,11 +435,7 @@ export default { /** 部署按钮操作 */ handleDeploy(row) { const that = this; - this.$confirm('是否部署该流程!!', "提示", { - confirmButtonText: "确定", - cancelButtonText: "取消", - type: "success" - }).then(function() { + this.$modal.confirm('是否部署该流程!!').then(function() { deployModel(row.id).then(response => { that.getList(); that.msgSuccess("部署成功"); @@ -491,15 +483,11 @@ export default { const id = row.id; let state = row.processDefinition.suspensionState; let statusState = state === 1 ? '激活' : '挂起'; - this.$confirm('是否确认' + statusState + '流程名字为"' + row.name + '"的数据项?', "警告", { - confirmButtonText: "确定", - cancelButtonText: "取消", - type: "warning" - }).then(function() { + this.$modal.confirm('是否确认' + statusState + '流程名字为"' + row.name + '"的数据项?').then(function() { return updateModelState(id, state); }).then(() => { this.getList(); - this.msgSuccess(statusState + "成功"); + this.$modal.msgSuccess(statusState + "成功"); }).catch(() => {}); }, /** 导入按钮操作 */ @@ -513,13 +501,13 @@ export default { // 文件上传成功处理 handleFileSuccess(response, file, fileList) { if (response.code !== 0) { - this.msgError(response.msg) + this.$modal.msgError(response.msg) return; } // 重置表单 this.uploadClose(); // 提示,并刷新 - this.msgSuccess("导入流程成功!请点击【设计流程】按钮,进行编辑保存后,才可以进行【发布流程】"); + this.$modal.msgSuccess("导入流程成功!请点击【设计流程】按钮,进行编辑保存后,才可以进行【发布流程】"); this.getList(); }, uploadClose() { diff --git a/yudao-ui-admin/src/views/bpm/model/modelEditor.vue b/yudao-ui-admin/src/views/bpm/model/modelEditor.vue index aefa96574..c9b421a34 100644 --- a/yudao-ui-admin/src/views/bpm/model/modelEditor.vue +++ b/yudao-ui-admin/src/views/bpm/model/modelEditor.vue @@ -96,7 +96,7 @@ export default { // 修改的提交 if (data.id) { updateModel(data).then(response => { - this.msgSuccess("修改成功") + this.$modal.msgSuccess("修改成功") // 跳转回去 this.close() }) @@ -104,7 +104,7 @@ export default { } // 添加的提交 createModel(data).then(response => { - this.msgSuccess("保存成功") + this.$modal.msgSuccess("保存成功") // 跳转回去 this.close() }) diff --git a/yudao-ui-admin/src/views/bpm/oa/leave/create.vue b/yudao-ui-admin/src/views/bpm/oa/leave/create.vue index 4292fe22a..4dfca8b4f 100644 --- a/yudao-ui-admin/src/views/bpm/oa/leave/create.vue +++ b/yudao-ui-admin/src/views/bpm/oa/leave/create.vue @@ -65,7 +65,7 @@ export default { // 添加的提交 createLeave(this.form).then(response => { - this.msgSuccess("发起成功"); + this.$modal.msgSuccess("发起成功"); this.$store.dispatch("tagsView/delView", this.$route); this.$router.push({ path: "/bpm/oa/leave"}); }); diff --git a/yudao-ui-admin/src/views/bpm/oa/leave/index.vue b/yudao-ui-admin/src/views/bpm/oa/leave/index.vue index 6d2b4e2e9..9dc99762e 100644 --- a/yudao-ui-admin/src/views/bpm/oa/leave/index.vue +++ b/yudao-ui-admin/src/views/bpm/oa/leave/index.vue @@ -169,7 +169,7 @@ export default { return cancelProcessInstance(id, value); }).then(() => { this.getList(); - this.msgSuccess("取消成功"); + this.$modal.msgSuccess("取消成功"); }) } } diff --git a/yudao-ui-admin/src/views/bpm/processInstance/create.vue b/yudao-ui-admin/src/views/bpm/processInstance/create.vue index 8a8195c23..3eeb29bc3 100644 --- a/yudao-ui-admin/src/views/bpm/processInstance/create.vue +++ b/yudao-ui-admin/src/views/bpm/processInstance/create.vue @@ -144,7 +144,7 @@ export default { processDefinitionId: this.selectProcessInstance.id, variables: variables }).then(response => { - this.msgSuccess("发起流程成功"); + this.$modal.msgSuccess("发起流程成功"); // 关闭当前窗口 this.$store.dispatch("tagsView/delView", this.$route); this.$router.go(-1); diff --git a/yudao-ui-admin/src/views/bpm/processInstance/detail.vue b/yudao-ui-admin/src/views/bpm/processInstance/detail.vue index 5716de8ea..b989f1216 100644 --- a/yudao-ui-admin/src/views/bpm/processInstance/detail.vue +++ b/yudao-ui-admin/src/views/bpm/processInstance/detail.vue @@ -300,7 +300,7 @@ export default { processDefinitionId: this.selectProcessInstance.id, variables: variables }).then(response => { - this.msgSuccess("发起流程成功"); + this.$modal.msgSuccess("发起流程成功"); // 关闭当前窗口 this.$store.dispatch("tagsView/delView", this.$route); this.$router.go(-1); @@ -355,12 +355,12 @@ export default { } if (pass) { approveTask(data).then(response => { - this.msgSuccess("审批通过成功!"); + this.$modal.msgSuccess("审批通过成功!"); this.getDetail(); // 获得最新详情 }); } else { rejectTask(data).then(response => { - this.msgSuccess("审批不通过成功!"); + this.$modal.msgSuccess("审批不通过成功!"); this.getDetail(); // 获得最新详情 }); } @@ -381,7 +381,7 @@ export default { return; } updateTaskAssignee(this.updateAssignee.form).then(response => { - this.msgSuccess("转派任务成功!"); + this.$modal.msgSuccess("转派任务成功!"); this.updateAssignee.open = false; this.getDetail(); // 获得最新详情 }); @@ -402,11 +402,11 @@ export default { }, /** 处理审批退回的操作 */ handleDelegate(task) { - this.msgError("暂不支持【委派】功能,可以使用【转派】替代!"); + this.$modal.msgError("暂不支持【委派】功能,可以使用【转派】替代!"); }, /** 处理审批退回的操作 */ handleBack(task) { - this.msgError("暂不支持【退回】功能!"); + this.$modal.msgError("暂不支持【退回】功能!"); } } }; diff --git a/yudao-ui-admin/src/views/bpm/processInstance/index.vue b/yudao-ui-admin/src/views/bpm/processInstance/index.vue index 3a095045d..3cb4e2cbc 100644 --- a/yudao-ui-admin/src/views/bpm/processInstance/index.vue +++ b/yudao-ui-admin/src/views/bpm/processInstance/index.vue @@ -174,7 +174,7 @@ export default { return cancelProcessInstance(id, value); }).then(() => { this.getList(); - this.msgSuccess("取消成功"); + this.$modal.msgSuccess("取消成功"); }) }, /** 处理详情按钮 */ diff --git a/yudao-ui-admin/src/views/bpm/taskAssignRule/taskAssignRuleDialog.vue b/yudao-ui-admin/src/views/bpm/taskAssignRule/taskAssignRuleDialog.vue index 40fd94793..1bbb34d27 100644 --- a/yudao-ui-admin/src/views/bpm/taskAssignRule/taskAssignRuleDialog.vue +++ b/yudao-ui-admin/src/views/bpm/taskAssignRule/taskAssignRuleDialog.vue @@ -257,7 +257,7 @@ export default { if (!form.id) { form.modelId = this.modelId; // 模型编号 createTaskAssignRule(form).then(response => { - this.msgSuccess("修改成功"); + this.$modal.msgSuccess("修改成功"); this.open = false; this.getList(); }); @@ -265,7 +265,7 @@ export default { } else { form.taskDefinitionKey = undefined; // 无法修改 updateTaskAssignRule(form).then(response => { - this.msgSuccess("修改成功"); + this.$modal.msgSuccess("修改成功"); this.open = false; this.getList(); }); diff --git a/yudao-ui-admin/src/views/infra/apiAccessLog/index.vue b/yudao-ui-admin/src/views/infra/apiAccessLog/index.vue index 4b25faf84..0be2c5bf7 100644 --- a/yudao-ui-admin/src/views/infra/apiAccessLog/index.vue +++ b/yudao-ui-admin/src/views/infra/apiAccessLog/index.vue @@ -202,11 +202,7 @@ export default { params.pageSize = undefined; this.addBeginAndEndTime(params, this.dateRangeBeginTime, 'beginTime'); // 执行导出 - this.$confirm('是否确认导出所有API 访问日志数据项?', "警告", { - confirmButtonText: "确定", - cancelButtonText: "取消", - type: "warning" - }).then(() => { + this.$modal.confirm('是否确认导出所有API 访问日志数据项?').then(() => { this.exportLoading = true; return exportApiAccessLogExcel(params); }).then(response => { diff --git a/yudao-ui-admin/src/views/infra/apiErrorLog/index.vue b/yudao-ui-admin/src/views/infra/apiErrorLog/index.vue index e1da36618..09f685053 100644 --- a/yudao-ui-admin/src/views/infra/apiErrorLog/index.vue +++ b/yudao-ui-admin/src/views/infra/apiErrorLog/index.vue @@ -205,13 +205,9 @@ export default { /** 处理已处理 / 已忽略的操作 **/ handleProcessClick(row, processStatus) { const processStatusText = this.getDictDataLabel(this.DICT_TYPE.INFRA_API_ERROR_LOG_PROCESS_STATUS, processStatus) - this.$confirm('确认标记为' + processStatusText, '提示', { - type: 'warning', - confirmButtonText: '确定', - cancelButtonText: '取消' - }).then(() => { + this.$modal.confirm('确认标记为' + processStatusText).then(() => { updateApiErrorLogProcess(row.id, processStatus).then(() => { - this.msgSuccess("修改成功"); + this.$modal.msgSuccess("修改成功"); this.getList(); }); }).catch(() => {}); @@ -224,11 +220,7 @@ export default { params.pageSize = undefined; this.addBeginAndEndTime(params, this.dateRangeExceptionTime, 'exceptionTime'); // 执行导出 - this.$confirm('是否确认导出所有API 错误日志数据项?', "警告", { - confirmButtonText: "确定", - cancelButtonText: "取消", - type: "warning" - }).then(() => { + this.$modal.confirm('是否确认导出所有API 错误日志数据项?').then(() => { this.exportLoading = true; return exportApiErrorLogExcel(params); }).then(response => { diff --git a/yudao-ui-admin/src/views/infra/config/index.vue b/yudao-ui-admin/src/views/infra/config/index.vue index d62303960..aae43651b 100644 --- a/yudao-ui-admin/src/views/infra/config/index.vue +++ b/yudao-ui-admin/src/views/infra/config/index.vue @@ -234,13 +234,13 @@ export default { if (valid) { if (this.form.id !== undefined) { updateConfig(this.form).then(response => { - this.msgSuccess("修改成功"); + this.$modal.msgSuccess("修改成功"); this.open = false; this.getList(); }); } else { addConfig(this.form).then(response => { - this.msgSuccess("新增成功"); + this.$modal.msgSuccess("新增成功"); this.open = false; this.getList(); }); @@ -251,15 +251,11 @@ export default { /** 删除按钮操作 */ handleDelete(row) { const ids = row.id || this.ids; - this.$confirm('是否确认删除参数编号为"' + ids + '"的数据项?', "警告", { - confirmButtonText: "确定", - cancelButtonText: "取消", - type: "warning" - }).then(function() { + this.$modal.confirm('是否确认删除参数编号为"' + ids + '"的数据项?').then(function() { return delConfig(ids); }).then(() => { this.getList(); - this.msgSuccess("删除成功"); + this.$modal.msgSuccess("删除成功"); }).catch(() => {}); }, /** 导出按钮操作 */ @@ -268,11 +264,7 @@ export default { this.dateRange[0] ? this.dateRange[0] + ' 00:00:00' : undefined, this.dateRange[1] ? this.dateRange[1] + ' 23:59:59' : undefined, ]); - this.$confirm('是否确认导出所有参数数据项?', "警告", { - confirmButtonText: "确定", - cancelButtonText: "取消", - type: "warning" - }).then(() => { + this.$modal.confirm('是否确认导出所有参数数据项?').then(() => { this.exportLoading = true; return exportConfig(queryParams); }).then(response => { diff --git a/yudao-ui-admin/src/views/infra/file/index.vue b/yudao-ui-admin/src/views/infra/file/index.vue index b475a1cc5..09d6ccc2b 100644 --- a/yudao-ui-admin/src/views/infra/file/index.vue +++ b/yudao-ui-admin/src/views/infra/file/index.vue @@ -180,21 +180,17 @@ export default { this.upload.isUploading = false; this.$refs.upload.clearFiles(); // 提示成功,并刷新 - this.msgSuccess("上传成功"); + this.$modal.msgSuccess("上传成功"); this.getList(); }, /** 删除按钮操作 */ handleDelete(row) { const id = row.id; - this.$confirm('是否确认删除文件编号为"' + id + '"的数据项?', "警告", { - confirmButtonText: "确定", - cancelButtonText: "取消", - type: "warning" - }).then(function() { + this.$modal.confirm('是否确认删除文件编号为"' + id + '"的数据项?').then(function() { return deleteFile(id); }).then(() => { this.getList(); - this.msgSuccess("删除成功"); + this.$modal.msgSuccess("删除成功"); }).catch(() => {}); }, } diff --git a/yudao-ui-admin/src/views/infra/job/index.vue b/yudao-ui-admin/src/views/infra/job/index.vue index 847932f44..fa24ab358 100644 --- a/yudao-ui-admin/src/views/infra/job/index.vue +++ b/yudao-ui-admin/src/views/infra/job/index.vue @@ -247,14 +247,10 @@ export default { }, /** 立即执行一次 **/ handleRun(row) { - this.$confirm('确认要立即执行一次"' + row.name + '"任务吗?', "警告", { - confirmButtonText: "确定", - cancelButtonText: "取消", - type: "warning" - }).then(function() { + this.$modal.confirm('确认要立即执行一次"' + row.name + '"任务吗?').then(function() { return runJob(row.id); }).then(() => { - this.msgSuccess("执行成功"); + this.$modal.msgSuccess("执行成功"); }).catch(() => {}); }, /** 任务详细信息 */ @@ -312,13 +308,13 @@ export default { if (valid) { if (this.form.id !== undefined) { updateJob(this.form).then(response => { - this.msgSuccess("修改成功"); + this.$modal.msgSuccess("修改成功"); this.open = false; this.getList(); }); } else { addJob(this.form).then(response => { - this.msgSuccess("新增成功"); + this.$modal.msgSuccess("新增成功"); this.open = false; this.getList(); }); @@ -329,15 +325,11 @@ export default { /** 删除按钮操作 */ handleDelete(row) { const ids = row.id; - this.$confirm('是否确认删除定时任务编号为"' + ids + '"的数据项?', "警告", { - confirmButtonText: "确定", - cancelButtonText: "取消", - type: "warning" - }).then(function() { + this.$modal.confirm('是否确认删除定时任务编号为"' + ids + '"的数据项?').then(function() { return delJob(ids); }).then(() => { this.getList(); - this.msgSuccess("删除成功"); + this.$modal.msgSuccess("删除成功"); }).catch(() => {}); }, /** 更新状态操作 */ @@ -345,15 +337,11 @@ export default { const id = row.id; let status = open ? InfraJobStatusEnum.NORMAL : InfraJobStatusEnum.STOP; let statusStr = open ? '开启' : '关闭'; - this.$confirm('是否确认' + statusStr + '定时任务编号为"' + id + '"的数据项?', "警告", { - confirmButtonText: "确定", - cancelButtonText: "取消", - type: "warning" - }).then(function() { + this.$modal.confirm('是否确认' + statusStr + '定时任务编号为"' + id + '"的数据项?').then(function() { return updateJobStatus(id, status); }).then(() => { this.getList(); - this.msgSuccess(statusStr + "成功"); + this.$modal.msgSuccess(statusStr + "成功"); }).catch(() => {}); }, // 更多操作触发 @@ -375,11 +363,7 @@ export default { /** 导出按钮操作 */ handleExport() { const queryParams = this.queryParams; - this.$confirm("是否确认导出所有定时任务数据项?", "警告", { - confirmButtonText: "确定", - cancelButtonText: "取消", - type: "warning" - }).then(() => { + this.$modal.confirm("是否确认导出所有定时任务数据项?").then(() => { this.exportLoading = true; return exportJob(queryParams); }).then(response => { diff --git a/yudao-ui-admin/src/views/infra/job/log.vue b/yudao-ui-admin/src/views/infra/job/log.vue index 3f6a734fe..5c304f4a8 100644 --- a/yudao-ui-admin/src/views/infra/job/log.vue +++ b/yudao-ui-admin/src/views/infra/job/log.vue @@ -165,11 +165,7 @@ export default { params.pageNo = undefined; params.pageSize = undefined; // 执行导出 - this.$confirm('是否确认导出所有定时任务日志数据项?', "警告", { - confirmButtonText: "确定", - cancelButtonText: "取消", - type: "warning" - }).then(() => { + this.$modal.confirm('是否确认导出所有定时任务日志数据项?').then(() => { this.exportLoading = true; return exportJobLogExcel(params); }).then(response => { diff --git a/yudao-ui-admin/src/views/infra/redis/index.vue b/yudao-ui-admin/src/views/infra/redis/index.vue index 5699031d1..7e3f8fb51 100644 --- a/yudao-ui-admin/src/views/infra/redis/index.vue +++ b/yudao-ui-admin/src/views/infra/redis/index.vue @@ -92,8 +92,6 @@ export default { name: "Server", data() { return { - // 加载层信息 - loading: [], // 统计命令信息 commandstats: null, // 使用内存 @@ -115,7 +113,7 @@ export default { // 查询 Redis 监控信息 getCache().then((response) => { this.cache = response.data; - this.loading.close(); + this.$modal.closeLoading(); this.commandstats = echarts.init(this.$refs.commandstats, "macarons"); const commandStats = []; @@ -176,12 +174,7 @@ export default { }, // 打开加载层 openLoading() { - this.loading = this.$loading({ - lock: true, - text: "拼命读取中", - spinner: "el-icon-loading", - background: "rgba(0, 0, 0, 0.7)", - }); + this.$modal.loading("正在加载缓存监控数据,请稍后!"); }, }, }; diff --git a/yudao-ui-admin/src/views/pay/app/components/aliPayChannelForm.vue b/yudao-ui-admin/src/views/pay/app/components/aliPayChannelForm.vue index 248e07409..b395420bf 100644 --- a/yudao-ui-admin/src/views/pay/app/components/aliPayChannelForm.vue +++ b/yudao-ui-admin/src/views/pay/app/components/aliPayChannelForm.vue @@ -298,7 +298,7 @@ export default { if (this.transferParam.edit) { updateChannel(data).then(response => { if (response.code === 0) { - this.msgSuccess("修改成功"); + this.$modal.msgSuccess("修改成功"); this.close(); } @@ -307,7 +307,7 @@ export default { createChannel(data).then(response => { if (response.code === 0) { - this.msgSuccess("新增成功"); + this.$modal.msgSuccess("新增成功"); this.$parent.refreshTable(); this.close(); } diff --git a/yudao-ui-admin/src/views/pay/app/components/wechatChannelForm.vue b/yudao-ui-admin/src/views/pay/app/components/wechatChannelForm.vue index 3ec4b34f6..87bbdd907 100644 --- a/yudao-ui-admin/src/views/pay/app/components/wechatChannelForm.vue +++ b/yudao-ui-admin/src/views/pay/app/components/wechatChannelForm.vue @@ -247,7 +247,7 @@ export default { if (this.transferParam.edit) { updateChannel(data).then(response => { if (response.code === 0) { - this.msgSuccess("修改成功"); + this.$modal.msgSuccess("修改成功"); this.close(); } @@ -256,7 +256,7 @@ export default { createChannel(data).then(response => { if (response.code === 0) { - this.msgSuccess("新增成功"); + this.$modal.msgSuccess("新增成功"); this.$parent.refreshTable(); this.close(); } diff --git a/yudao-ui-admin/src/views/pay/app/index.vue b/yudao-ui-admin/src/views/pay/app/index.vue index 08f92959f..3d40b9333 100644 --- a/yudao-ui-admin/src/views/pay/app/index.vue +++ b/yudao-ui-admin/src/views/pay/app/index.vue @@ -359,14 +359,10 @@ export default { // 用户状态修改 handleStatusChange(row) { let text = row.status === CommonStatusEnum.ENABLE ? "启用" : "停用"; - this.$confirm('确认要"' + text + '""' + row.name + '"应用吗?', "警告", { - confirmButtonText: "确定", - cancelButtonText: "取消", - type: "warning" - }).then(function () { + this.$modal.confirm('确认要"' + text + '""' + row.name + '"应用吗?').then(function () { return changeAppStatus(row.id, row.status); }).then(() => { - this.msgSuccess(text + "成功"); + this.$modal.msgSuccess(text + "成功"); }).catch(function () { row.status = row.status === CommonStatusEnum.ENABLE ? CommonStatusEnum.DISABLE : CommonStatusEnum.ENABLE; @@ -381,7 +377,7 @@ export default { // 修改的提交 if (this.form.id != null) { updateApp(this.form).then(response => { - this.msgSuccess("修改成功"); + this.$modal.msgSuccess("修改成功"); this.open = false; this.getList(); }); @@ -389,7 +385,7 @@ export default { } // 添加的提交 createApp(this.form).then(response => { - this.msgSuccess("新增成功"); + this.$modal.msgSuccess("新增成功"); this.open = false; this.getList(); }); @@ -398,15 +394,11 @@ export default { /** 删除按钮操作 */ handleDelete(row) { const id = row.id; - this.$confirm('是否确认删除支付应用信息编号为"' + id + '"的数据项?', "警告", { - confirmButtonText: "确定", - cancelButtonText: "取消", - type: "warning" - }).then(function () { + this.$modal.confirm('是否确认删除支付应用信息编号为"' + id + '"的数据项?').then(function () { return deleteApp(id); }).then(() => { this.getList(); - this.msgSuccess("删除成功"); + this.$modal.msgSuccess("删除成功"); }).catch(() => { this.$message({ type: 'info', @@ -422,11 +414,7 @@ export default { params.pageSize = undefined; this.addBeginAndEndTime(params, this.dateRangeCreateTime, 'createTime'); // 执行导出 - this.$confirm('是否确认导出所有支付应用信息数据项?', "警告", { - confirmButtonText: "确定", - cancelButtonText: "取消", - type: "warning" - }).then(function () { + this.$modal.confirm('是否确认导出所有支付应用信息数据项?').then(function () { return exportAppExcel(params); }).then(response => { this.downloadExcel(response, '支付应用信息.xls'); diff --git a/yudao-ui-admin/src/views/pay/merchant/index.vue b/yudao-ui-admin/src/views/pay/merchant/index.vue index b3ee9c868..fa8813241 100644 --- a/yudao-ui-admin/src/views/pay/merchant/index.vue +++ b/yudao-ui-admin/src/views/pay/merchant/index.vue @@ -225,14 +225,10 @@ export default { // 用户状态修改 handleStatusChange(row) { let text = row.status === CommonStatusEnum.ENABLE ? "启用" : "停用"; - this.$confirm('确认要"' + text + '""' + row.name + '"商户吗?', "警告", { - confirmButtonText: "确定", - cancelButtonText: "取消", - type: "warning" - }).then(function() { + this.$modal.confirm('确认要"' + text + '""' + row.name + '"商户吗?').then(function() { return changeMerchantStatus(row.id, row.status); }).then(() => { - this.msgSuccess(text + "成功"); + this.$modal.msgSuccess(text + "成功"); }).catch(function() { row.status = row.status === CommonStatusEnum.ENABLE ? CommonStatusEnum.DISABLE : CommonStatusEnum.ENABLE; @@ -247,7 +243,7 @@ export default { // 修改的提交 if (this.form.id != null) { updateMerchant(this.form).then(response => { - this.msgSuccess("修改成功"); + this.$modal.msgSuccess("修改成功"); this.open = false; this.getList(); }); @@ -255,7 +251,7 @@ export default { } // 添加的提交 createMerchant(this.form).then(response => { - this.msgSuccess("新增成功"); + this.$modal.msgSuccess("新增成功"); this.open = false; this.getList(); }); @@ -264,15 +260,11 @@ export default { /** 删除按钮操作 */ handleDelete(row) { const id = row.id; - this.$confirm('是否确认删除支付商户信息编号为"' + id + '"的数据项?', "警告", { - confirmButtonText: "确定", - cancelButtonText: "取消", - type: "warning" - }).then(function() { + this.$modal.confirm('是否确认删除支付商户信息编号为"' + id + '"的数据项?').then(function() { return deleteMerchant(id); }).then(() => { this.getList(); - this.msgSuccess("删除成功"); + this.$modal.msgSuccess("删除成功"); }).catch(() => {}); }, /** 导出按钮操作 */ @@ -283,11 +275,7 @@ export default { params.pageSize = undefined; this.addBeginAndEndTime(params, this.dateRangeCreateTime, 'createTime'); // 执行导出 - this.$confirm('是否确认导出所有支付商户信息数据项?', "警告", { - confirmButtonText: "确定", - cancelButtonText: "取消", - type: "warning" - }).then(() => { + this.$modal.confirm('是否确认导出所有支付商户信息数据项?').then(() => { this.exportLoading = true; return exportMerchantExcel(params); }).then(response => { diff --git a/yudao-ui-admin/src/views/pay/order/index.vue b/yudao-ui-admin/src/views/pay/order/index.vue index 50aeb26e2..26357830c 100755 --- a/yudao-ui-admin/src/views/pay/order/index.vue +++ b/yudao-ui-admin/src/views/pay/order/index.vue @@ -420,11 +420,7 @@ export default { this.addBeginAndEndTime(params, this.dateRangeNotifyTime, 'notifyTime'); this.addDateRange(params, this.dateRangeCreateTime, 'CreateTime'); // 执行导出 - this.$confirm('是否确认导出所有支付订单数据项?', "警告", { - confirmButtonText: "确定", - cancelButtonText: "取消", - type: "warning" - }).then(function () { + this.$modal.confirm('是否确认导出所有支付订单数据项?').then(function () { return exportOrderExcel(params); }).then(response => { this.downloadExcel(response, '支付订单.xls'); diff --git a/yudao-ui-admin/src/views/pay/refund/index.vue b/yudao-ui-admin/src/views/pay/refund/index.vue index e2c6097e3..082b8089d 100755 --- a/yudao-ui-admin/src/views/pay/refund/index.vue +++ b/yudao-ui-admin/src/views/pay/refund/index.vue @@ -424,11 +424,7 @@ export default { this.addBeginAndEndTime(params, this.dateRangeNotifyTime, 'notifyTime'); this.addDateRange(params, this.dateRangeCreateTime, 'CreateTime'); // 执行导出 - this.$confirm('是否确认导出所有退款订单数据项?', "警告", { - confirmButtonText: "确定", - cancelButtonText: "取消", - type: "warning" - }).then(function () { + this.$modal.confirm('是否确认导出所有退款订单数据项?').then(function () { return exportRefundExcel(params); }).then(response => { this.downloadExcel(response, '退款订单.xls'); diff --git a/yudao-ui-admin/src/views/system/dept/index.vue b/yudao-ui-admin/src/views/system/dept/index.vue index 71fdbb789..fc77dc56f 100644 --- a/yudao-ui-admin/src/views/system/dept/index.vue +++ b/yudao-ui-admin/src/views/system/dept/index.vue @@ -291,13 +291,13 @@ export default { if (valid) { if (this.form.id !== undefined) { updateDept(this.form).then(response => { - this.msgSuccess("修改成功"); + this.$modal.msgSuccess("修改成功"); this.open = false; this.getList(); }); } else { addDept(this.form).then(response => { - this.msgSuccess("新增成功"); + this.$modal.msgSuccess("新增成功"); this.open = false; this.getList(); }); @@ -307,15 +307,11 @@ export default { }, /** 删除按钮操作 */ handleDelete(row) { - this.$confirm('是否确认删除名称为"' + row.name + '"的数据项?', "警告", { - confirmButtonText: "确定", - cancelButtonText: "取消", - type: "warning" - }).then(function() { + this.$modal.confirm('是否确认删除名称为"' + row.name + '"的数据项?').then(function() { return delDept(row.id); }).then(() => { this.getList(); - this.msgSuccess("删除成功"); + this.$modal.msgSuccess("删除成功"); }).catch(() => {}); } } diff --git a/yudao-ui-admin/src/views/system/dict/data.vue b/yudao-ui-admin/src/views/system/dict/data.vue index 9309b5a4a..388b60a45 100644 --- a/yudao-ui-admin/src/views/system/dict/data.vue +++ b/yudao-ui-admin/src/views/system/dict/data.vue @@ -266,13 +266,13 @@ export default { if (valid) { if (this.form.id !== undefined) { updateData(this.form).then(response => { - this.msgSuccess("修改成功"); + this.$modal.msgSuccess("修改成功"); this.open = false; this.getList(); }); } else { addData(this.form).then(response => { - this.msgSuccess("新增成功"); + this.$modal.msgSuccess("新增成功"); this.open = false; this.getList(); }); @@ -283,25 +283,17 @@ export default { /** 删除按钮操作 */ handleDelete(row) { const ids = row.id; - this.$confirm('是否确认删除字典编码为"' + ids + '"的数据项?', "警告", { - confirmButtonText: "确定", - cancelButtonText: "取消", - type: "warning" - }).then(function() { + this.$modal.confirm('是否确认删除字典编码为"' + ids + '"的数据项?').then(function() { return delData(ids); }).then(() => { this.getList(); - this.msgSuccess("删除成功"); + this.$modal.msgSuccess("删除成功"); }).catch(() => {}); }, /** 导出按钮操作 */ handleExport() { const queryParams = this.queryParams; - this.$confirm('是否确认导出所有数据项?', "警告", { - confirmButtonText: "确定", - cancelButtonText: "取消", - type: "warning" - }).then(() => { + this.$modal.confirm('是否确认导出所有数据项?').then(() => { this.exportLoading = true; return exportData(queryParams); }).then(response => { diff --git a/yudao-ui-admin/src/views/system/dict/index.vue b/yudao-ui-admin/src/views/system/dict/index.vue index 7af5c218f..3f865ee77 100644 --- a/yudao-ui-admin/src/views/system/dict/index.vue +++ b/yudao-ui-admin/src/views/system/dict/index.vue @@ -214,13 +214,13 @@ export default { if (valid) { if (this.form.id !== undefined) { updateType(this.form).then(response => { - this.msgSuccess("修改成功"); + this.$modal.msgSuccess("修改成功"); this.open = false; this.getList(); }); } else { addType(this.form).then(response => { - this.msgSuccess("新增成功"); + this.$modal.msgSuccess("新增成功"); this.open = false; this.getList(); }); @@ -231,15 +231,11 @@ export default { /** 删除按钮操作 */ handleDelete(row) { const ids = row.id || this.ids; - this.$confirm('是否确认删除字典编号为"' + ids + '"的数据项?', "警告", { - confirmButtonText: "确定", - cancelButtonText: "取消", - type: "warning" - }).then(function() { + this.$modal.confirm('是否确认删除字典编号为"' + ids + '"的数据项?').then(function() { return delType(ids); }).then(() => { this.getList(); - this.msgSuccess("删除成功"); + this.$modal.msgSuccess("删除成功"); }).catch(() => {}); }, /** 导出按钮操作 */ @@ -250,11 +246,7 @@ export default { params.pageSize = undefined; this.addBeginAndEndTime(params, this.dateRangeCreateTime, 'createTime'); // 执行导出 - this.$confirm('是否确认导出所有字典类型数据项?', "警告", { - confirmButtonText: "确定", - cancelButtonText: "取消", - type: "warning" - }).then(() => { + this.$modal.confirm('是否确认导出所有字典类型数据项?').then(() => { this.exportLoading = true; return exportType(params); }).then(response => { diff --git a/yudao-ui-admin/src/views/system/errorCode/index.vue b/yudao-ui-admin/src/views/system/errorCode/index.vue index 25443d7ee..0aa263883 100644 --- a/yudao-ui-admin/src/views/system/errorCode/index.vue +++ b/yudao-ui-admin/src/views/system/errorCode/index.vue @@ -207,7 +207,7 @@ export default { // 修改的提交 if (this.form.id != null) { updateErrorCode(this.form).then(response => { - this.msgSuccess("修改成功"); + this.$modal.msgSuccess("修改成功"); this.open = false; this.getList(); }); @@ -215,7 +215,7 @@ export default { } // 添加的提交 createErrorCode(this.form).then(response => { - this.msgSuccess("新增成功"); + this.$modal.msgSuccess("新增成功"); this.open = false; this.getList(); }); @@ -224,15 +224,11 @@ export default { /** 删除按钮操作 */ handleDelete(row) { const id = row.id; - this.$confirm('是否确认删除错误码编号为"' + id + '"的数据项?', "警告", { - confirmButtonText: "确定", - cancelButtonText: "取消", - type: "warning" - }).then(function() { + this.$modal.confirm('是否确认删除错误码编号为"' + id + '"的数据项?').then(function() { return deleteErrorCode(id); }).then(() => { this.getList(); - this.msgSuccess("删除成功"); + this.$modal.msgSuccess("删除成功"); }).catch(() => {}); }, /** 导出按钮操作 */ @@ -243,11 +239,7 @@ export default { params.pageSize = undefined; this.addBeginAndEndTime(params, this.dateRangeCreateTime, 'createTime'); // 执行导出 - this.$confirm('是否确认导出所有错误码数据项?', "警告", { - confirmButtonText: "确定", - cancelButtonText: "取消", - type: "warning" - }).then(() => { + this.$modal.confirm('是否确认导出所有错误码数据项?').then(() => { this.exportLoading = true; return exportErrorCodeExcel(params); }).then(response => { diff --git a/yudao-ui-admin/src/views/system/loginlog/index.vue b/yudao-ui-admin/src/views/system/loginlog/index.vue index 8c6192721..37edefa7a 100644 --- a/yudao-ui-admin/src/views/system/loginlog/index.vue +++ b/yudao-ui-admin/src/views/system/loginlog/index.vue @@ -122,11 +122,7 @@ export default { /** 导出按钮操作 */ handleExport() { const queryParams = this.queryParams; - this.$confirm('是否确认导出所有操作日志数据项?', "警告", { - confirmButtonText: "确定", - cancelButtonText: "取消", - type: "warning" - }).then(() => { + this.$modal.confirm('是否确认导出所有操作日志数据项?').then(() => { this.exportLoading = true; return exportLoginLog(queryParams); }).then(response => { diff --git a/yudao-ui-admin/src/views/system/menu/index.vue b/yudao-ui-admin/src/views/system/menu/index.vue index afc4de9ab..db5a9184d 100644 --- a/yudao-ui-admin/src/views/system/menu/index.vue +++ b/yudao-ui-admin/src/views/system/menu/index.vue @@ -298,10 +298,10 @@ export default { if (path.indexOf('http://') === -1 || path.indexOf('https://') === -1) { // 父权限为根节点,path 必须以 / 开头 if (this.form.parentId === 0 && path.charAt(0) !== '/') { - this.msgSuccess('前端必须以 / 开头') + this.$modal.msgSuccess('前端必须以 / 开头') return } else if (this.form.parentId !== 0 && path.charAt(0) === '/') { - this.msgSuccess('前端不能以 / 开头') + this.$modal.msgSuccess('前端不能以 / 开头') return } } @@ -310,13 +310,13 @@ export default { // 提交 if (this.form.id !== undefined) { updateMenu(this.form).then(response => { - this.msgSuccess("修改成功"); + this.$modal.msgSuccess("修改成功"); this.open = false; this.getList(); }); } else { addMenu(this.form).then(response => { - this.msgSuccess("新增成功"); + this.$modal.msgSuccess("新增成功"); this.open = false; this.getList(); }); @@ -326,15 +326,11 @@ export default { }, /** 删除按钮操作 */ handleDelete(row) { - this.$confirm('是否确认删除名称为"' + row.name + '"的数据项?', "警告", { - confirmButtonText: "确定", - cancelButtonText: "取消", - type: "warning" - }).then(function() { + this.$modal.confirm('是否确认删除名称为"' + row.name + '"的数据项?').then(function() { return delMenu(row.id); }).then(() => { this.getList(); - this.msgSuccess("删除成功"); + this.$modal.msgSuccess("删除成功"); }).catch(() => {}); } } diff --git a/yudao-ui-admin/src/views/system/notice/index.vue b/yudao-ui-admin/src/views/system/notice/index.vue index 797d205ed..69dd09b5f 100644 --- a/yudao-ui-admin/src/views/system/notice/index.vue +++ b/yudao-ui-admin/src/views/system/notice/index.vue @@ -219,13 +219,13 @@ export default { if (valid) { if (this.form.id !== undefined) { updateNotice(this.form).then(response => { - this.msgSuccess("修改成功"); + this.$modal.msgSuccess("修改成功"); this.open = false; this.getList(); }); } else { addNotice(this.form).then(response => { - this.msgSuccess("新增成功"); + this.$modal.msgSuccess("新增成功"); this.open = false; this.getList(); }); @@ -236,15 +236,11 @@ export default { /** 删除按钮操作 */ handleDelete(row) { const ids = row.id || this.ids - this.$confirm('是否确认删除公告编号为"' + ids + '"的数据项?', "警告", { - confirmButtonText: "确定", - cancelButtonText: "取消", - type: "warning" - }).then(function() { + this.$modal.confirm('是否确认删除公告编号为"' + ids + '"的数据项?').then(function() { return delNotice(ids); }).then(() => { this.getList(); - this.msgSuccess("删除成功"); + this.$modal.msgSuccess("删除成功"); }).catch(() => {}); } } diff --git a/yudao-ui-admin/src/views/system/operatelog/index.vue b/yudao-ui-admin/src/views/system/operatelog/index.vue index 6fb1bca54..7bf69115f 100644 --- a/yudao-ui-admin/src/views/system/operatelog/index.vue +++ b/yudao-ui-admin/src/views/system/operatelog/index.vue @@ -202,11 +202,7 @@ export default { this.dateRange[0] ? this.dateRange[0] + ' 00:00:00' : undefined, this.dateRange[1] ? this.dateRange[1] + ' 23:59:59' : undefined, ]) - this.$confirm('是否确认导出所有操作日志数据项?', "警告", { - confirmButtonText: "确定", - cancelButtonText: "取消", - type: "warning" - }).then(() => { + this.$modal.confirm('是否确认导出所有操作日志数据项?').then(() => { this.exportLoading = true; return exportOperateLog(queryParams); }).then(response => { diff --git a/yudao-ui-admin/src/views/system/post/index.vue b/yudao-ui-admin/src/views/system/post/index.vue index ef409f035..86b1ee04d 100644 --- a/yudao-ui-admin/src/views/system/post/index.vue +++ b/yudao-ui-admin/src/views/system/post/index.vue @@ -205,13 +205,13 @@ export default { if (valid) { if (this.form.id !== undefined) { updatePost(this.form).then(response => { - this.msgSuccess("修改成功"); + this.$modal.msgSuccess("修改成功"); this.open = false; this.getList(); }); } else { addPost(this.form).then(response => { - this.msgSuccess("新增成功"); + this.$modal.msgSuccess("新增成功"); this.open = false; this.getList(); }); @@ -222,25 +222,17 @@ export default { /** 删除按钮操作 */ handleDelete(row) { const ids = row.id; - this.$confirm('是否确认删除岗位编号为"' + ids + '"的数据项?', "警告", { - confirmButtonText: "确定", - cancelButtonText: "取消", - type: "warning" - }).then(function() { + this.$modal.confirm('是否确认删除岗位编号为"' + ids + '"的数据项?').then(function() { return delPost(ids); }).then(() => { this.getList(); - this.msgSuccess("删除成功"); + this.$modal.msgSuccess("删除成功"); }).catch(() => {}); }, /** 导出按钮操作 */ handleExport() { const queryParams = this.queryParams; - this.$confirm('是否确认导出所有岗位数据项?', "警告", { - confirmButtonText: "确定", - cancelButtonText: "取消", - type: "warning" - }).then(() => { + this.$modal.confirm('是否确认导出所有岗位数据项?').then(() => { this.exportLoading = true; return exportPost(queryParams); }).then(response => { diff --git a/yudao-ui-admin/src/views/system/role/index.vue b/yudao-ui-admin/src/views/system/role/index.vue index 9eada2f12..9ccd755d5 100644 --- a/yudao-ui-admin/src/views/system/role/index.vue +++ b/yudao-ui-admin/src/views/system/role/index.vue @@ -277,14 +277,10 @@ export default { handleStatusChange(row) { // 此时,row 已经变成目标状态了,所以可以直接提交请求和提示 let text = row.status === CommonStatusEnum.ENABLE ? "启用" : "停用"; - this.$confirm('确认要"' + text + '""' + row.name + '"角色吗?', "警告", { - confirmButtonText: "确定", - cancelButtonText: "取消", - type: "warning" - }).then(function() { + this.$modal.confirm('确认要"' + text + '""' + row.name + '"角色吗?').then(function() { return changeRoleStatus(row.id, row.status); }).then(() => { - this.msgSuccess(text + "成功"); + this.$modal.msgSuccess(text + "成功"); }).catch(function() { // 异常时,需要将 row.status 状态重置回之前的 row.status = row.status === CommonStatusEnum.ENABLE ? CommonStatusEnum.DISABLE @@ -442,13 +438,13 @@ export default { if (valid) { if (this.form.id !== undefined) { updateRole(this.form).then(response => { - this.msgSuccess("修改成功"); + this.$modal.msgSuccess("修改成功"); this.open = false; this.getList(); }); } else { addRole(this.form).then(response => { - this.msgSuccess("新增成功"); + this.$modal.msgSuccess("新增成功"); this.open = false; this.getList(); }); @@ -465,7 +461,7 @@ export default { dataScopeDeptIds: this.form.dataScope !== SystemDataScopeEnum.DEPT_CUSTOM ? [] : this.$refs.dept.getCheckedKeys() }).then(response => { - this.msgSuccess("修改成功"); + this.$modal.msgSuccess("修改成功"); this.openDataScope = false; this.getList(); }); @@ -478,7 +474,7 @@ export default { roleId: this.form.id, menuIds: [...this.$refs.menu.getCheckedKeys(), ...this.$refs.menu.getHalfCheckedKeys()] }).then(response => { - this.msgSuccess("修改成功"); + this.$modal.msgSuccess("修改成功"); this.openMenu = false; this.getList(); }); @@ -487,25 +483,17 @@ export default { /** 删除按钮操作 */ handleDelete(row) { const ids = row.id || this.ids; - this.$confirm('是否确认删除角色编号为"' + ids + '"的数据项?', "警告", { - confirmButtonText: "确定", - cancelButtonText: "取消", - type: "warning" - }).then(function() { + this.$modal.confirm('是否确认删除角色编号为"' + ids + '"的数据项?').then(function() { return delRole(ids); }).then(() => { this.getList(); - this.msgSuccess("删除成功"); + this.$modal.msgSuccess("删除成功"); }).catch(() => {}); }, /** 导出按钮操作 */ handleExport() { const queryParams = this.queryParams; - this.$confirm('是否确认导出所有角色数据项?', "警告", { - confirmButtonText: "确定", - cancelButtonText: "取消", - type: "warning" - }).then(function() { + this.$modal.confirm('是否确认导出所有角色数据项?').then(function() { this.exportLoading = true; return exportRole(queryParams); }).then(response => { diff --git a/yudao-ui-admin/src/views/system/session/index.vue b/yudao-ui-admin/src/views/system/session/index.vue index 87ceb64c6..c96e81597 100644 --- a/yudao-ui-admin/src/views/system/session/index.vue +++ b/yudao-ui-admin/src/views/system/session/index.vue @@ -83,15 +83,11 @@ export default { }, /** 强退按钮操作 */ handleForceLogout(row) { - this.$confirm('是否确认强退名称为"' + row.username + '"的数据项?', "警告", { - confirmButtonText: "确定", - cancelButtonText: "取消", - type: "warning" - }).then(function() { + this.$modal.confirm('是否确认强退名称为"' + row.username + '"的数据项?').then(function() { return forceLogout(row.id); }).then(() => { this.getList(); - this.msgSuccess("强退成功"); + this.$modal.msgSuccess("强退成功"); }).catch(() => {}); } } diff --git a/yudao-ui-admin/src/views/system/sms/smsChannel.vue b/yudao-ui-admin/src/views/system/sms/smsChannel.vue index b96cd8d35..1799b91f7 100644 --- a/yudao-ui-admin/src/views/system/sms/smsChannel.vue +++ b/yudao-ui-admin/src/views/system/sms/smsChannel.vue @@ -216,7 +216,7 @@ export default { // 修改的提交 if (this.form.id != null) { updateSmsChannel(this.form).then(response => { - this.msgSuccess("修改成功"); + this.$modal.msgSuccess("修改成功"); this.open = false; this.getList(); }); @@ -224,7 +224,7 @@ export default { } // 添加的提交 createSmsChannel(this.form).then(response => { - this.msgSuccess("新增成功"); + this.$modal.msgSuccess("新增成功"); this.open = false; this.getList(); }); @@ -233,15 +233,11 @@ export default { /** 删除按钮操作 */ handleDelete(row) { const id = row.id; - this.$confirm('是否确认删除短信渠道编号为"' + id + '"的数据项?', "警告", { - confirmButtonText: "确定", - cancelButtonText: "取消", - type: "warning" - }).then(function() { + this.$modal.confirm('是否确认删除短信渠道编号为"' + id + '"的数据项?').then(function() { return deleteSmsChannel(id); }).then(() => { this.getList(); - this.msgSuccess("删除成功"); + this.$modal.msgSuccess("删除成功"); }).catch(() => {}); } } diff --git a/yudao-ui-admin/src/views/system/sms/smsLog.vue b/yudao-ui-admin/src/views/system/sms/smsLog.vue index ebc3a89bd..e78a8f00a 100644 --- a/yudao-ui-admin/src/views/system/sms/smsLog.vue +++ b/yudao-ui-admin/src/views/system/sms/smsLog.vue @@ -278,11 +278,7 @@ export default { this.addBeginAndEndTime(params, this.dateRangeSendTime, 'sendTime'); this.addBeginAndEndTime(params, this.dateRangeReceiveTime, 'receiveTime'); // 执行导出 - this.$confirm('是否确认导出所有短信日志数据项?', "警告", { - confirmButtonText: "确定", - cancelButtonText: "取消", - type: "warning" - }).then(() => { + this.$modal.confirm('是否确认导出所有短信日志数据项?').then(() => { this.exportLoading = true; return exportSmsLogExcel(params); }).then(response => { diff --git a/yudao-ui-admin/src/views/system/sms/smsTemplate.vue b/yudao-ui-admin/src/views/system/sms/smsTemplate.vue index ad1e8d88d..9e7b71167 100644 --- a/yudao-ui-admin/src/views/system/sms/smsTemplate.vue +++ b/yudao-ui-admin/src/views/system/sms/smsTemplate.vue @@ -298,7 +298,7 @@ export default { // 修改的提交 if (this.form.id != null) { updateSmsTemplate(this.form).then(response => { - this.msgSuccess("修改成功"); + this.$modal.msgSuccess("修改成功"); this.open = false; this.getList(); }); @@ -306,7 +306,7 @@ export default { } // 添加的提交 createSmsTemplate(this.form).then(response => { - this.msgSuccess("新增成功"); + this.$modal.msgSuccess("新增成功"); this.open = false; this.getList(); }); @@ -315,15 +315,11 @@ export default { /** 删除按钮操作 */ handleDelete(row) { const id = row.id; - this.$confirm('是否确认删除短信模板编号为"' + id + '"的数据项?', "警告", { - confirmButtonText: "确定", - cancelButtonText: "取消", - type: "warning" - }).then(function() { + this.$modal.confirm('是否确认删除短信模板编号为"' + id + '"的数据项?').then(function() { return deleteSmsTemplate(id); }).then(() => { this.getList(); - this.msgSuccess("删除成功"); + this.$modal.msgSuccess("删除成功"); }).catch(() => {}); }, /** 导出按钮操作 */ @@ -334,11 +330,7 @@ export default { params.pageSize = undefined; this.addBeginAndEndTime(params, this.dateRangeCreateTime, 'createTime'); // 执行导出 - this.$confirm('是否确认导出所有短信模板数据项?', "警告", { - confirmButtonText: "确定", - cancelButtonText: "取消", - type: "warning" - }).then(() => { + this.$modal.confirm('是否确认导出所有短信模板数据项?', "警告").then(() => { this.exportLoading = true; return exportSmsTemplateExcel(params); }).then(response => { @@ -390,7 +382,7 @@ export default { } // 添加的提交 sendSms(this.sendSmsForm).then(response => { - this.msgSuccess("提交发送成功!发送结果,见发送日志编号:" + response.data); + this.$modal.msgSuccess("提交发送成功!发送结果,见发送日志编号:" + response.data); this.sendSmsOpen = false; }); }); diff --git a/yudao-ui-admin/src/views/system/tenant/index.vue b/yudao-ui-admin/src/views/system/tenant/index.vue index 64874ebd5..5edbe7b39 100755 --- a/yudao-ui-admin/src/views/system/tenant/index.vue +++ b/yudao-ui-admin/src/views/system/tenant/index.vue @@ -210,7 +210,7 @@ export default { // 修改的提交 if (this.form.id != null) { updateTenant(this.form).then(response => { - this.msgSuccess("修改成功"); + this.$modal.msgSuccess("修改成功"); this.open = false; this.getList(); }); @@ -218,7 +218,7 @@ export default { } // 添加的提交 createTenant(this.form).then(response => { - this.msgSuccess("新增成功"); + this.$modal.msgSuccess("新增成功"); this.open = false; this.getList(); }); @@ -227,15 +227,11 @@ export default { /** 删除按钮操作 */ handleDelete(row) { const id = row.id; - this.$confirm('是否确认删除租户编号为"' + id + '"的数据项?', "警告", { - confirmButtonText: "确定", - cancelButtonText: "取消", - type: "warning" - }).then(function() { + this.$modal.confirm('是否确认删除租户编号为"' + id + '"的数据项?').then(function() { return deleteTenant(id); }).then(() => { this.getList(); - this.msgSuccess("删除成功"); + this.$modal.msgSuccess("删除成功"); }).catch(() => {}); }, /** 导出按钮操作 */ @@ -246,11 +242,7 @@ export default { params.pageSize = undefined; this.addBeginAndEndTime(params, this.dateRangeCreateTime, 'createTime'); // 执行导出 - this.$confirm('是否确认导出所有租户数据项?', "警告", { - confirmButtonText: "确定", - cancelButtonText: "取消", - type: "warning" - }).then(() => { + this.$modal.confirm('是否确认导出所有租户数据项?').then(() => { this.exportLoading = true; return exportTenantExcel(params); }).then(response => { diff --git a/yudao-ui-admin/src/views/system/user/index.vue b/yudao-ui-admin/src/views/system/user/index.vue index a30fd73b5..be12d1625 100644 --- a/yudao-ui-admin/src/views/system/user/index.vue +++ b/yudao-ui-admin/src/views/system/user/index.vue @@ -429,14 +429,10 @@ export default { // 用户状态修改 handleStatusChange(row) { let text = row.status === CommonStatusEnum.ENABLE ? "启用" : "停用"; - this.$confirm('确认要"' + text + '""' + row.username + '"用户吗?', "警告", { - confirmButtonText: "确定", - cancelButtonText: "取消", - type: "warning" - }).then(function() { + this.$modal.confirm('确认要"' + text + '""' + row.username + '"用户吗?').then(function() { return changeUserStatus(row.id, row.status); }).then(() => { - this.msgSuccess(text + "成功"); + this.$modal.msgSuccess(text + "成功"); }).catch(function() { row.status = row.status === CommonStatusEnum.ENABLE ? CommonStatusEnum.DISABLE : CommonStatusEnum.ENABLE; @@ -510,7 +506,7 @@ export default { cancelButtonText: "取消" }).then(({ value }) => { resetUserPwd(row.id, value).then(response => { - this.msgSuccess("修改成功,新密码是:" + value); + this.$modal.msgSuccess("修改成功,新密码是:" + value); }); }).catch(() => {}); }, @@ -542,13 +538,13 @@ export default { if (valid) { if (this.form.id !== undefined) { updateUser(this.form).then(response => { - this.msgSuccess("修改成功"); + this.$modal.msgSuccess("修改成功"); this.open = false; this.getList(); }); } else { addUser(this.form).then(response => { - this.msgSuccess("新增成功"); + this.$modal.msgSuccess("新增成功"); this.open = false; this.getList(); }); @@ -563,7 +559,7 @@ export default { userId: this.form.id, roleIds: this.form.roleIds, }).then(response => { - this.msgSuccess("分配角色成功"); + this.$modal.msgSuccess("分配角色成功"); this.openRole = false; this.getList(); }); @@ -572,15 +568,11 @@ export default { /** 删除按钮操作 */ handleDelete(row) { const ids = row.id || this.ids; - this.$confirm('是否确认删除用户编号为"' + ids + '"的数据项?', "警告", { - confirmButtonText: "确定", - cancelButtonText: "取消", - type: "warning" - }).then(function() { + this.$modal.confirm('是否确认删除用户编号为"' + ids + '"的数据项?').then(function() { return delUser(ids); }).then(() => { this.getList(); - this.msgSuccess("删除成功"); + this.$modal.msgSuccess("删除成功"); }).catch(() => {}); }, /** 导出按钮操作 */ @@ -589,11 +581,7 @@ export default { this.dateRange[0] ? this.dateRange[0] + ' 00:00:00' : undefined, this.dateRange[1] ? this.dateRange[1] + ' 23:59:59' : undefined, ]); - this.$confirm('是否确认导出所有用户数据项?', "警告", { - confirmButtonText: "确定", - cancelButtonText: "取消", - type: "warning" - }).then(() => { + this.$modal.confirm('是否确认导出所有用户数据项?').then(() => { this.exportLoading = true; return exportUser(queryParams); }).then(response => { @@ -619,7 +607,7 @@ export default { // 文件上传成功处理 handleFileSuccess(response, file, fileList) { if (response.code !== 0) { - this.msgError(response.msg) + this.$modal.msgError(response.msg) return; } this.upload.open = false; diff --git a/yudao-ui-admin/src/views/system/user/profile/resetPwd.vue b/yudao-ui-admin/src/views/system/user/profile/resetPwd.vue index c2c0f0344..5870ff1cd 100644 --- a/yudao-ui-admin/src/views/system/user/profile/resetPwd.vue +++ b/yudao-ui-admin/src/views/system/user/profile/resetPwd.vue @@ -57,7 +57,7 @@ export default { if (valid) { updateUserPwd(this.user.oldPassword, this.user.newPassword).then( response => { - this.msgSuccess("修改成功"); + this.$modal.msgSuccess("修改成功"); } ); } diff --git a/yudao-ui-admin/src/views/system/user/profile/userAvatar.vue b/yudao-ui-admin/src/views/system/user/profile/userAvatar.vue index 2c0362f9b..af04119c7 100644 --- a/yudao-ui-admin/src/views/system/user/profile/userAvatar.vue +++ b/yudao-ui-admin/src/views/system/user/profile/userAvatar.vue @@ -110,7 +110,7 @@ export default { // 上传预处理 beforeUpload(file) { if (file.type.indexOf("image/") == -1) { - this.msgError("文件格式错误,请上传图片类型,如:JPG,PNG后缀的文件。"); + this.$modal.msgError("文件格式错误,请上传图片类型,如:JPG,PNG后缀的文件。"); } else { const reader = new FileReader(); reader.readAsDataURL(file); @@ -128,7 +128,7 @@ export default { this.open = false; // this.options.img = process.env.VUE_APP_BASE_API + response.imgUrl; store.commit('SET_AVATAR', resp.data); - this.msgSuccess("修改成功"); + this.$modal.msgSuccess("修改成功"); this.visible = false; }); }); diff --git a/yudao-ui-admin/src/views/system/user/profile/userInfo.vue b/yudao-ui-admin/src/views/system/user/profile/userInfo.vue index 058a1130f..86ae6ac48 100644 --- a/yudao-ui-admin/src/views/system/user/profile/userInfo.vue +++ b/yudao-ui-admin/src/views/system/user/profile/userInfo.vue @@ -62,7 +62,7 @@ export default { this.$refs["form"].validate(valid => { if (valid) { updateUserProfile(this.user).then(response => { - this.msgSuccess("修改成功"); + this.$modal.msgSuccess("修改成功"); }); } }); diff --git a/yudao-ui-admin/src/views/system/user/profile/userSocial.vue b/yudao-ui-admin/src/views/system/user/profile/userSocial.vue index 59febe152..2855fa99c 100644 --- a/yudao-ui-admin/src/views/system/user/profile/userSocial.vue +++ b/yudao-ui-admin/src/views/system/user/profile/userSocial.vue @@ -68,7 +68,7 @@ export default { return; } socialBind(type, code, state).then(resp => { - this.msgSuccess("绑定成功"); + this.$modal.msgSuccess("绑定成功"); this.$router.replace('/user/profile'); // 调用父组件, 刷新 this.getUser(); @@ -87,7 +87,7 @@ export default { }, unbind(socialUser) { socialUnbind(socialUser.type, socialUser.unionId).then(resp => { - this.msgSuccess("解绑成功"); + this.$modal.msgSuccess("解绑成功"); socialUser.unionId = undefined; }); }, diff --git a/yudao-ui-admin/src/views/tool/codegen/editTable.vue b/yudao-ui-admin/src/views/tool/codegen/editTable.vue index dcc3ca03a..e9093166d 100644 --- a/yudao-ui-admin/src/views/tool/codegen/editTable.vue +++ b/yudao-ui-admin/src/views/tool/codegen/editTable.vue @@ -194,11 +194,11 @@ export default { parentMenuId: genTable.parentMenuId }; updateCodegen(genTable).then(res => { - this.msgSuccess("修改成功!"); + this.$modal.msgSuccess("修改成功!"); this.close(); }); } else { - this.msgError("表单校验未通过,请重新检查提交内容"); + this.$modal.msgError("表单校验未通过,请重新检查提交内容"); } }); }, diff --git a/yudao-ui-admin/src/views/tool/codegen/genInfoForm.vue b/yudao-ui-admin/src/views/tool/codegen/genInfoForm.vue index 7e50404d1..a5014f0e3 100644 --- a/yudao-ui-admin/src/views/tool/codegen/genInfoForm.vue +++ b/yudao-ui-admin/src/views/tool/codegen/genInfoForm.vue @@ -304,7 +304,7 @@ export default { tplSelectChange(value) { if (value !== 1) { // TODO 芋艿:暂时不考虑支持树形结构 - this.msgError('暂时不考虑支持【树形】和【主子表】的代码生成。原因是:导致 vm 模板过于复杂,不利于胖友二次开发'); + this.$modal.msgError('暂时不考虑支持【树形】和【主子表】的代码生成。原因是:导致 vm 模板过于复杂,不利于胖友二次开发'); return false; } if(value !== 'sub') { diff --git a/yudao-ui-admin/src/views/tool/codegen/importTable.vue b/yudao-ui-admin/src/views/tool/codegen/importTable.vue index 3c05685b3..7fad1ee40 100644 --- a/yudao-ui-admin/src/views/tool/codegen/importTable.vue +++ b/yudao-ui-admin/src/views/tool/codegen/importTable.vue @@ -96,7 +96,7 @@ export default { /** 导入按钮操作 */ handleImportTable() { createCodegenListFromDB(this.tables.join(",")).then(res => { - this.msgSuccess("导入成功"); + this.$modal.msgSuccess("导入成功"); this.visible = false; this.$emit("ok"); }); diff --git a/yudao-ui-admin/src/views/tool/codegen/index.vue b/yudao-ui-admin/src/views/tool/codegen/index.vue index b061aefea..97e08e95c 100644 --- a/yudao-ui-admin/src/views/tool/codegen/index.vue +++ b/yudao-ui-admin/src/views/tool/codegen/index.vue @@ -205,14 +205,10 @@ export default { } // 基于 DB 同步 const tableName = row.tableName; - this.$confirm('确认要强制同步"' + tableName + '"表结构吗?', "警告", { - confirmButtonText: "确定", - cancelButtonText: "取消", - type: "warning" - }).then(function() { + this.$modal.confirm('确认要强制同步"' + tableName + '"表结构吗?').then(function() { return syncCodegenFromDB(row.id); }).then(() => { - this.msgSuccess("同步成功"); + this.$modal.msgSuccess("同步成功"); }).catch(() => {}); }, /** 打开导入表弹窗 */ @@ -326,15 +322,11 @@ export default { /** 删除按钮操作 */ handleDelete(row) { const tableIds = row.id; - this.$confirm('是否确认删除表名称为"' + row.tableName + '"的数据项?', "警告", { - confirmButtonText: "确定", - cancelButtonText: "取消", - type: "warning" - }).then(function() { + this.$modal.confirm('是否确认删除表名称为"' + row.tableName + '"的数据项?').then(function() { return deleteCodegen(tableIds); }).then(() => { this.getList(); - this.msgSuccess("删除成功"); + this.$modal.msgSuccess("删除成功"); }).catch(() => {}); }, // 取消按钮 @@ -360,7 +352,7 @@ export default { let form = this.importSQL.form; if (form.tableId != null) { syncCodegenFromSQL(form.tableId, form.sql).then(response => { - this.msgSuccess("同步成功"); + this.$modal.msgSuccess("同步成功"); this.importSQL.open = false; this.getList(); }); @@ -368,7 +360,7 @@ export default { } // 添加的提交 createCodegenListFromSQL(form).then(response => { - this.msgSuccess("导入成功"); + this.$modal.msgSuccess("导入成功"); this.importSQL.open = false; this.getList(); }); diff --git a/yudao-ui-admin/src/views/tool/testDemo/index.vue b/yudao-ui-admin/src/views/tool/testDemo/index.vue index 47b639a64..ae2dbfdaf 100755 --- a/yudao-ui-admin/src/views/tool/testDemo/index.vue +++ b/yudao-ui-admin/src/views/tool/testDemo/index.vue @@ -217,7 +217,7 @@ export default { // 修改的提交 if (this.form.id != null) { updateTestDemo(this.form).then(response => { - this.msgSuccess("修改成功"); + this.$modal.msgSuccess("修改成功"); this.open = false; this.getList(); }); @@ -225,7 +225,7 @@ export default { } // 添加的提交 createTestDemo(this.form).then(response => { - this.msgSuccess("新增成功"); + this.$modal.msgSuccess("新增成功"); this.open = false; this.getList(); }); @@ -234,15 +234,11 @@ export default { /** 删除按钮操作 */ handleDelete(row) { const id = row.id; - this.$confirm('是否确认删除字典类型编号为"' + id + '"的数据项?', "警告", { - confirmButtonText: "确定", - cancelButtonText: "取消", - type: "warning" - }).then(function() { + this.$modal.confirm('是否确认删除字典类型编号为"' + id + '"的数据项?').then(function() { return deleteTestDemo(id); }).then(() => { this.getList(); - this.msgSuccess("删除成功"); + this.$modal.msgSuccess("删除成功"); }).catch(() => {}); }, /** 导出按钮操作 */ @@ -253,11 +249,7 @@ export default { params.pageSize = undefined; this.addBeginAndEndTime(params, this.dateRangeCreateTime, 'createTime'); // 执行导出 - this.$confirm('是否确认导出所有字典类型数据项?', "警告", { - confirmButtonText: "确定", - cancelButtonText: "取消", - type: "warning" - }).then(() => { + this.$modal.confirm('是否确认导出所有字典类型数据项?').then(() => { this.exportLoading = true; return exportTestDemoExcel(params); }).then(response => {