mirror of
https://gitee.com/huangge1199_admin/vue-pro.git
synced 2024-11-30 03:01:53 +08:00
v3.8.0 新增通用方法简化模态/缓存使用
This commit is contained in:
parent
433056d5ea
commit
38ac5270d6
@ -347,7 +347,7 @@ export default {
|
|||||||
// 修改的提交
|
// 修改的提交
|
||||||
if (this.form.${primaryColumn.javaField} != null) {
|
if (this.form.${primaryColumn.javaField} != null) {
|
||||||
update${simpleClassName}(this.form).then(response => {
|
update${simpleClassName}(this.form).then(response => {
|
||||||
this.msgSuccess("修改成功");
|
this.$modal.msgSuccess("修改成功");
|
||||||
this.open = false;
|
this.open = false;
|
||||||
this.getList();
|
this.getList();
|
||||||
});
|
});
|
||||||
@ -355,7 +355,7 @@ export default {
|
|||||||
}
|
}
|
||||||
// 添加的提交
|
// 添加的提交
|
||||||
create${simpleClassName}(this.form).then(response => {
|
create${simpleClassName}(this.form).then(response => {
|
||||||
this.msgSuccess("新增成功");
|
this.$modal.msgSuccess("新增成功");
|
||||||
this.open = false;
|
this.open = false;
|
||||||
this.getList();
|
this.getList();
|
||||||
});
|
});
|
||||||
@ -364,15 +364,11 @@ export default {
|
|||||||
/** 删除按钮操作 */
|
/** 删除按钮操作 */
|
||||||
handleDelete(row) {
|
handleDelete(row) {
|
||||||
const ${primaryColumn.javaField} = row.${primaryColumn.javaField};
|
const ${primaryColumn.javaField} = row.${primaryColumn.javaField};
|
||||||
this.$confirm('是否确认删除${table.classComment}编号为"' + ${primaryColumn.javaField} + '"的数据项?', "警告", {
|
this.$model.confirm('是否确认删除${table.classComment}编号为"' + ${primaryColumn.javaField} + '"的数据项?').then(function() {
|
||||||
confirmButtonText: "确定",
|
|
||||||
cancelButtonText: "取消",
|
|
||||||
type: "warning"
|
|
||||||
}).then(function() {
|
|
||||||
return delete${simpleClassName}(${primaryColumn.javaField});
|
return delete${simpleClassName}(${primaryColumn.javaField});
|
||||||
}).then(() => {
|
}).then(() => {
|
||||||
this.getList();
|
this.getList();
|
||||||
this.msgSuccess("删除成功");
|
this.$modal.msgSuccess("删除成功");
|
||||||
}).catch(() => {});
|
}).catch(() => {});
|
||||||
},
|
},
|
||||||
/** 导出按钮操作 */
|
/** 导出按钮操作 */
|
||||||
@ -390,11 +386,7 @@ export default {
|
|||||||
#end
|
#end
|
||||||
#end
|
#end
|
||||||
// 执行导出
|
// 执行导出
|
||||||
this.$confirm('是否确认导出所有${table.classComment}数据项?', "警告", {
|
this.$model.confirm('是否确认导出所有${table.classComment}数据项?').then(() => {
|
||||||
confirmButtonText: "确定",
|
|
||||||
cancelButtonText: "取消",
|
|
||||||
type: "warning"
|
|
||||||
}).then(() => {
|
|
||||||
this.exportLoading = true;
|
this.exportLoading = true;
|
||||||
return export${simpleClassName}Excel(params);
|
return export${simpleClassName}Excel(params);
|
||||||
}).then(response => {
|
}).then(response => {
|
||||||
|
File diff suppressed because one or more lines are too long
@ -8,7 +8,7 @@
|
|||||||
/***/ (function(module, exports, __webpack_require__) {
|
/***/ (function(module, exports, __webpack_require__) {
|
||||||
|
|
||||||
"use strict";
|
"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");
|
||||||
|
|
||||||
/***/ }),
|
/***/ }),
|
||||||
|
|
||||||
|
@ -44,7 +44,7 @@ eval("\n\nvar _interopRequireDefault = __webpack_require__(/*! ./node_modules/@b
|
|||||||
/***/ (function(module, exports, __webpack_require__) {
|
/***/ (function(module, exports, __webpack_require__) {
|
||||||
|
|
||||||
"use strict";
|
"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__) {
|
/***/ (function(module, exports, __webpack_require__) {
|
||||||
|
|
||||||
"use strict";
|
"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");
|
||||||
|
|
||||||
/***/ }),
|
/***/ }),
|
||||||
|
|
||||||
|
@ -464,7 +464,7 @@ export default {
|
|||||||
const { err, xml } = await this.bpmnModeler.saveXML();
|
const { err, xml } = await this.bpmnModeler.saveXML();
|
||||||
// 读取异常时抛出异常
|
// 读取异常时抛出异常
|
||||||
if (err) {
|
if (err) {
|
||||||
this.msgError('保存模型失败,请重试!')
|
this.$modal.msgError('保存模型失败,请重试!')
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
// 触发 save 事件
|
// 触发 save 事件
|
||||||
|
@ -96,11 +96,7 @@ export default {
|
|||||||
this.$store.dispatch('app/toggleSideBar')
|
this.$store.dispatch('app/toggleSideBar')
|
||||||
},
|
},
|
||||||
async logout() {
|
async logout() {
|
||||||
this.$confirm('确定注销并退出系统吗?', '提示', {
|
this.$modal.confirm('确定注销并退出系统吗?', '提示').then(() => {
|
||||||
confirmButtonText: '确定',
|
|
||||||
cancelButtonText: '取消',
|
|
||||||
type: 'warning'
|
|
||||||
}).then(() => {
|
|
||||||
this.$store.dispatch('LogOut').then(() => {
|
this.$store.dispatch('LogOut').then(() => {
|
||||||
location.href = '/index';
|
location.href = '/index';
|
||||||
})
|
})
|
||||||
|
@ -38,11 +38,6 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="drawer-item">
|
|
||||||
<span>动态标题</span>
|
|
||||||
<el-switch v-model="dynamicTitle" class="drawer-switch" />
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<el-divider/>
|
<el-divider/>
|
||||||
|
|
||||||
<h3 class="drawer-title">系统布局配置</h3>
|
<h3 class="drawer-title">系统布局配置</h3>
|
||||||
@ -67,6 +62,11 @@
|
|||||||
<el-switch v-model="sidebarLogo" class="drawer-switch" />
|
<el-switch v-model="sidebarLogo" class="drawer-switch" />
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
<div class="drawer-item">
|
||||||
|
<span>动态标题</span>
|
||||||
|
<el-switch v-model="dynamicTitle" class="drawer-switch" />
|
||||||
|
</div>
|
||||||
|
|
||||||
<el-divider/>
|
<el-divider/>
|
||||||
|
|
||||||
<el-button size="small" type="primary" plain icon="el-icon-document-add" @click="saveSetting">保存配置</el-button>
|
<el-button size="small" type="primary" plain icon="el-icon-document-add" @click="saveSetting">保存配置</el-button>
|
||||||
@ -162,14 +162,8 @@ export default {
|
|||||||
this.sideTheme = val;
|
this.sideTheme = val;
|
||||||
},
|
},
|
||||||
saveSetting() {
|
saveSetting() {
|
||||||
const loading = this.$loading({
|
this.$modal.loading("正在保存到本地,请稍后...");
|
||||||
lock: true,
|
this.$cache.local.set(
|
||||||
fullscreen: false,
|
|
||||||
text: "正在保存到本地,请稍后...",
|
|
||||||
spinner: "el-icon-loading",
|
|
||||||
background: "rgba(0, 0, 0, 0.7)"
|
|
||||||
});
|
|
||||||
localStorage.setItem(
|
|
||||||
"layout-setting",
|
"layout-setting",
|
||||||
`{
|
`{
|
||||||
"topNav":${this.topNav},
|
"topNav":${this.topNav},
|
||||||
@ -181,17 +175,11 @@ export default {
|
|||||||
"theme":"${this.theme}"
|
"theme":"${this.theme}"
|
||||||
}`
|
}`
|
||||||
);
|
);
|
||||||
setTimeout(loading.close(), 1000)
|
setTimeout(this.$modal.closeLoading(), 1000)
|
||||||
},
|
},
|
||||||
resetSetting() {
|
resetSetting() {
|
||||||
this.$loading({
|
this.$modal.loading("正在清除设置缓存并刷新,请稍后...");
|
||||||
lock: true,
|
this.$cache.local.remove("layout-setting")
|
||||||
fullscreen: false,
|
|
||||||
text: "正在清除设置缓存并刷新,请稍后...",
|
|
||||||
spinner: "el-icon-loading",
|
|
||||||
background: "rgba(0, 0, 0, 0.7)"
|
|
||||||
});
|
|
||||||
localStorage.removeItem("layout-setting")
|
|
||||||
setTimeout("window.location.reload()", 1000)
|
setTimeout("window.location.reload()", 1000)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -11,6 +11,7 @@ import App from './App'
|
|||||||
import store from './store'
|
import store from './store'
|
||||||
import router from './router'
|
import router from './router'
|
||||||
import directive from './directive' // directive
|
import directive from './directive' // directive
|
||||||
|
import plugins from './plugins' // plugins
|
||||||
|
|
||||||
import './assets/icons' // icon
|
import './assets/icons' // icon
|
||||||
import './permission' // permission control
|
import './permission' // permission control
|
||||||
@ -56,18 +57,6 @@ Vue.prototype.downloadMarkdown = downloadMarkdown
|
|||||||
Vue.prototype.downloadZip = downloadZip
|
Vue.prototype.downloadZip = downloadZip
|
||||||
Vue.prototype.handleTree = handleTree
|
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('DictTag', DictTag)
|
||||||
Vue.component('Pagination', Pagination)
|
Vue.component('Pagination', Pagination)
|
||||||
@ -78,6 +67,7 @@ import DictTag from '@/components/DictTag'
|
|||||||
import VueMeta from 'vue-meta'
|
import VueMeta from 'vue-meta'
|
||||||
|
|
||||||
Vue.use(directive)
|
Vue.use(directive)
|
||||||
|
Vue.use(plugins)
|
||||||
Vue.use(VueMeta)
|
Vue.use(VueMeta)
|
||||||
// Vue.use(hljs.vuePlugin);
|
// Vue.use(hljs.vuePlugin);
|
||||||
|
|
||||||
|
77
yudao-ui-admin/src/plugins/cache.js
Normal file
77
yudao-ui-admin/src/plugins/cache.js
Normal file
@ -0,0 +1,77 @@
|
|||||||
|
const sessionCache = {
|
||||||
|
set (key, value) {
|
||||||
|
if (!sessionStorage) {
|
||||||
|
return
|
||||||
|
}
|
||||||
|
if (key != null && value != null) {
|
||||||
|
sessionStorage.setItem(key, value)
|
||||||
|
}
|
||||||
|
},
|
||||||
|
get (key) {
|
||||||
|
if (!sessionStorage) {
|
||||||
|
return null
|
||||||
|
}
|
||||||
|
if (key == null) {
|
||||||
|
return null
|
||||||
|
}
|
||||||
|
return sessionStorage.getItem(key)
|
||||||
|
},
|
||||||
|
setJSON (key, jsonValue) {
|
||||||
|
if (jsonValue != null) {
|
||||||
|
this.set(key, JSON.stringify(jsonValue))
|
||||||
|
}
|
||||||
|
},
|
||||||
|
getJSON (key) {
|
||||||
|
const value = this.get(key)
|
||||||
|
if (value != null) {
|
||||||
|
return JSON.parse(value)
|
||||||
|
}
|
||||||
|
},
|
||||||
|
remove (key) {
|
||||||
|
sessionStorage.removeItem(key);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
const localCache = {
|
||||||
|
set (key, value) {
|
||||||
|
if (!localStorage) {
|
||||||
|
return
|
||||||
|
}
|
||||||
|
if (key != null && value != null) {
|
||||||
|
localStorage.setItem(key, value)
|
||||||
|
}
|
||||||
|
},
|
||||||
|
get (key) {
|
||||||
|
if (!localStorage) {
|
||||||
|
return null
|
||||||
|
}
|
||||||
|
if (key == null) {
|
||||||
|
return null
|
||||||
|
}
|
||||||
|
return localStorage.getItem(key)
|
||||||
|
},
|
||||||
|
setJSON (key, jsonValue) {
|
||||||
|
if (jsonValue != null) {
|
||||||
|
this.set(key, JSON.stringify(jsonValue))
|
||||||
|
}
|
||||||
|
},
|
||||||
|
getJSON (key) {
|
||||||
|
const value = this.get(key)
|
||||||
|
if (value != null) {
|
||||||
|
return JSON.parse(value)
|
||||||
|
}
|
||||||
|
},
|
||||||
|
remove (key) {
|
||||||
|
localStorage.removeItem(key);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
export default {
|
||||||
|
/**
|
||||||
|
* 会话级缓存
|
||||||
|
*/
|
||||||
|
session: sessionCache,
|
||||||
|
/**
|
||||||
|
* 本地缓存
|
||||||
|
*/
|
||||||
|
local: localCache
|
||||||
|
}
|
11
yudao-ui-admin/src/plugins/index.js
Normal file
11
yudao-ui-admin/src/plugins/index.js
Normal file
@ -0,0 +1,11 @@
|
|||||||
|
import cache from './cache'
|
||||||
|
import modal from './modal'
|
||||||
|
|
||||||
|
export default {
|
||||||
|
install(Vue) {
|
||||||
|
// 缓存对象
|
||||||
|
Vue.prototype.$cache = cache
|
||||||
|
// 模态框对象
|
||||||
|
Vue.prototype.$modal = modal
|
||||||
|
}
|
||||||
|
}
|
83
yudao-ui-admin/src/plugins/modal.js
Normal file
83
yudao-ui-admin/src/plugins/modal.js
Normal file
@ -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();
|
||||||
|
}
|
||||||
|
}
|
@ -435,14 +435,14 @@ export default {
|
|||||||
// 修改的提交
|
// 修改的提交
|
||||||
if (this.form.id != null) {
|
if (this.form.id != null) {
|
||||||
updateForm(form).then(response => {
|
updateForm(form).then(response => {
|
||||||
this.msgSuccess("修改成功");
|
this.$modal.msgSuccess("修改成功");
|
||||||
this.close()
|
this.close()
|
||||||
});
|
});
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
// 添加的提交
|
// 添加的提交
|
||||||
createForm(form).then(response => {
|
createForm(form).then(response => {
|
||||||
this.msgSuccess("新增成功");
|
this.$modal.msgSuccess("新增成功");
|
||||||
this.close()
|
this.close()
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
@ -150,15 +150,11 @@ export default {
|
|||||||
/** 删除按钮操作 */
|
/** 删除按钮操作 */
|
||||||
handleDelete(row) {
|
handleDelete(row) {
|
||||||
const id = row.id;
|
const id = row.id;
|
||||||
this.$confirm('是否确认删除工作流的编号为"' + id + '"的数据项?', "警告", {
|
this.$modal.confirm('是否确认删除工作表单的编号为"' + id + '"的数据项?').then(function() {
|
||||||
confirmButtonText: "确定",
|
|
||||||
cancelButtonText: "取消",
|
|
||||||
type: "warning"
|
|
||||||
}).then(function() {
|
|
||||||
return deleteForm(id);
|
return deleteForm(id);
|
||||||
}).then(() => {
|
}).then(() => {
|
||||||
this.getList();
|
this.getList();
|
||||||
this.msgSuccess("删除成功");
|
this.$modal.msgSuccess("删除成功");
|
||||||
}).catch(() => {});
|
}).catch(() => {});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -213,7 +213,7 @@ export default {
|
|||||||
// 修改的提交
|
// 修改的提交
|
||||||
if (this.form.id != null) {
|
if (this.form.id != null) {
|
||||||
updateUserGroup(this.form).then(response => {
|
updateUserGroup(this.form).then(response => {
|
||||||
this.msgSuccess("修改成功");
|
this.$modal.msgSuccess("修改成功");
|
||||||
this.open = false;
|
this.open = false;
|
||||||
this.getList();
|
this.getList();
|
||||||
});
|
});
|
||||||
@ -221,7 +221,7 @@ export default {
|
|||||||
}
|
}
|
||||||
// 添加的提交
|
// 添加的提交
|
||||||
createUserGroup(this.form).then(response => {
|
createUserGroup(this.form).then(response => {
|
||||||
this.msgSuccess("新增成功");
|
this.$modal.msgSuccess("新增成功");
|
||||||
this.open = false;
|
this.open = false;
|
||||||
this.getList();
|
this.getList();
|
||||||
});
|
});
|
||||||
@ -230,15 +230,11 @@ export default {
|
|||||||
/** 删除按钮操作 */
|
/** 删除按钮操作 */
|
||||||
handleDelete(row) {
|
handleDelete(row) {
|
||||||
const id = row.id;
|
const id = row.id;
|
||||||
this.$confirm('是否确认删除用户组编号为"' + id + '"的数据项?', "警告", {
|
this.$modal.confirm('是否确认删除用户组编号为"' + id + '"的数据项?').then(function() {
|
||||||
confirmButtonText: "确定",
|
|
||||||
cancelButtonText: "取消",
|
|
||||||
type: "warning"
|
|
||||||
}).then(function() {
|
|
||||||
return deleteUserGroup(id);
|
return deleteUserGroup(id);
|
||||||
}).then(() => {
|
}).then(() => {
|
||||||
this.getList();
|
this.getList();
|
||||||
this.msgSuccess("删除成功");
|
this.$modal.msgSuccess("删除成功");
|
||||||
}).catch(() => {});
|
}).catch(() => {});
|
||||||
},
|
},
|
||||||
getUserNickname(userId) {
|
getUserNickname(userId) {
|
||||||
|
@ -399,7 +399,7 @@ export default {
|
|||||||
formCustomCreatePath: this.form.formType === 20 ? this.form.formCustomCreatePath : undefined,
|
formCustomCreatePath: this.form.formType === 20 ? this.form.formCustomCreatePath : undefined,
|
||||||
formCustomViewPath: this.form.formType === 20 ? this.form.formCustomViewPath : undefined,
|
formCustomViewPath: this.form.formType === 20 ? this.form.formCustomViewPath : undefined,
|
||||||
}).then(response => {
|
}).then(response => {
|
||||||
this.msgSuccess("修改模型成功");
|
this.$modal.msgSuccess("修改模型成功");
|
||||||
this.open = false;
|
this.open = false;
|
||||||
this.getList();
|
this.getList();
|
||||||
});
|
});
|
||||||
@ -425,11 +425,7 @@ export default {
|
|||||||
/** 删除按钮操作 */
|
/** 删除按钮操作 */
|
||||||
handleDelete(row) {
|
handleDelete(row) {
|
||||||
const that = this;
|
const that = this;
|
||||||
this.$confirm('是否删除该流程!!', "警告", {
|
this.$modal.confirm('是否删除该流程!!').then(function() {
|
||||||
confirmButtonText: "确定",
|
|
||||||
cancelButtonText: "取消",
|
|
||||||
type: "warning"
|
|
||||||
}).then(function() {
|
|
||||||
deleteModel(row.id).then(response => {
|
deleteModel(row.id).then(response => {
|
||||||
that.getList();
|
that.getList();
|
||||||
that.msgSuccess("删除成功");
|
that.msgSuccess("删除成功");
|
||||||
@ -439,11 +435,7 @@ export default {
|
|||||||
/** 部署按钮操作 */
|
/** 部署按钮操作 */
|
||||||
handleDeploy(row) {
|
handleDeploy(row) {
|
||||||
const that = this;
|
const that = this;
|
||||||
this.$confirm('是否部署该流程!!', "提示", {
|
this.$modal.confirm('是否部署该流程!!').then(function() {
|
||||||
confirmButtonText: "确定",
|
|
||||||
cancelButtonText: "取消",
|
|
||||||
type: "success"
|
|
||||||
}).then(function() {
|
|
||||||
deployModel(row.id).then(response => {
|
deployModel(row.id).then(response => {
|
||||||
that.getList();
|
that.getList();
|
||||||
that.msgSuccess("部署成功");
|
that.msgSuccess("部署成功");
|
||||||
@ -491,15 +483,11 @@ export default {
|
|||||||
const id = row.id;
|
const id = row.id;
|
||||||
let state = row.processDefinition.suspensionState;
|
let state = row.processDefinition.suspensionState;
|
||||||
let statusState = state === 1 ? '激活' : '挂起';
|
let statusState = state === 1 ? '激活' : '挂起';
|
||||||
this.$confirm('是否确认' + statusState + '流程名字为"' + row.name + '"的数据项?', "警告", {
|
this.$modal.confirm('是否确认' + statusState + '流程名字为"' + row.name + '"的数据项?').then(function() {
|
||||||
confirmButtonText: "确定",
|
|
||||||
cancelButtonText: "取消",
|
|
||||||
type: "warning"
|
|
||||||
}).then(function() {
|
|
||||||
return updateModelState(id, state);
|
return updateModelState(id, state);
|
||||||
}).then(() => {
|
}).then(() => {
|
||||||
this.getList();
|
this.getList();
|
||||||
this.msgSuccess(statusState + "成功");
|
this.$modal.msgSuccess(statusState + "成功");
|
||||||
}).catch(() => {});
|
}).catch(() => {});
|
||||||
},
|
},
|
||||||
/** 导入按钮操作 */
|
/** 导入按钮操作 */
|
||||||
@ -513,13 +501,13 @@ export default {
|
|||||||
// 文件上传成功处理
|
// 文件上传成功处理
|
||||||
handleFileSuccess(response, file, fileList) {
|
handleFileSuccess(response, file, fileList) {
|
||||||
if (response.code !== 0) {
|
if (response.code !== 0) {
|
||||||
this.msgError(response.msg)
|
this.$modal.msgError(response.msg)
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
// 重置表单
|
// 重置表单
|
||||||
this.uploadClose();
|
this.uploadClose();
|
||||||
// 提示,并刷新
|
// 提示,并刷新
|
||||||
this.msgSuccess("导入流程成功!请点击【设计流程】按钮,进行编辑保存后,才可以进行【发布流程】");
|
this.$modal.msgSuccess("导入流程成功!请点击【设计流程】按钮,进行编辑保存后,才可以进行【发布流程】");
|
||||||
this.getList();
|
this.getList();
|
||||||
},
|
},
|
||||||
uploadClose() {
|
uploadClose() {
|
||||||
|
@ -96,7 +96,7 @@ export default {
|
|||||||
// 修改的提交
|
// 修改的提交
|
||||||
if (data.id) {
|
if (data.id) {
|
||||||
updateModel(data).then(response => {
|
updateModel(data).then(response => {
|
||||||
this.msgSuccess("修改成功")
|
this.$modal.msgSuccess("修改成功")
|
||||||
// 跳转回去
|
// 跳转回去
|
||||||
this.close()
|
this.close()
|
||||||
})
|
})
|
||||||
@ -104,7 +104,7 @@ export default {
|
|||||||
}
|
}
|
||||||
// 添加的提交
|
// 添加的提交
|
||||||
createModel(data).then(response => {
|
createModel(data).then(response => {
|
||||||
this.msgSuccess("保存成功")
|
this.$modal.msgSuccess("保存成功")
|
||||||
// 跳转回去
|
// 跳转回去
|
||||||
this.close()
|
this.close()
|
||||||
})
|
})
|
||||||
|
@ -65,7 +65,7 @@ export default {
|
|||||||
|
|
||||||
// 添加的提交
|
// 添加的提交
|
||||||
createLeave(this.form).then(response => {
|
createLeave(this.form).then(response => {
|
||||||
this.msgSuccess("发起成功");
|
this.$modal.msgSuccess("发起成功");
|
||||||
this.$store.dispatch("tagsView/delView", this.$route);
|
this.$store.dispatch("tagsView/delView", this.$route);
|
||||||
this.$router.push({ path: "/bpm/oa/leave"});
|
this.$router.push({ path: "/bpm/oa/leave"});
|
||||||
});
|
});
|
||||||
|
@ -169,7 +169,7 @@ export default {
|
|||||||
return cancelProcessInstance(id, value);
|
return cancelProcessInstance(id, value);
|
||||||
}).then(() => {
|
}).then(() => {
|
||||||
this.getList();
|
this.getList();
|
||||||
this.msgSuccess("取消成功");
|
this.$modal.msgSuccess("取消成功");
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -144,7 +144,7 @@ export default {
|
|||||||
processDefinitionId: this.selectProcessInstance.id,
|
processDefinitionId: this.selectProcessInstance.id,
|
||||||
variables: variables
|
variables: variables
|
||||||
}).then(response => {
|
}).then(response => {
|
||||||
this.msgSuccess("发起流程成功");
|
this.$modal.msgSuccess("发起流程成功");
|
||||||
// 关闭当前窗口
|
// 关闭当前窗口
|
||||||
this.$store.dispatch("tagsView/delView", this.$route);
|
this.$store.dispatch("tagsView/delView", this.$route);
|
||||||
this.$router.go(-1);
|
this.$router.go(-1);
|
||||||
|
@ -300,7 +300,7 @@ export default {
|
|||||||
processDefinitionId: this.selectProcessInstance.id,
|
processDefinitionId: this.selectProcessInstance.id,
|
||||||
variables: variables
|
variables: variables
|
||||||
}).then(response => {
|
}).then(response => {
|
||||||
this.msgSuccess("发起流程成功");
|
this.$modal.msgSuccess("发起流程成功");
|
||||||
// 关闭当前窗口
|
// 关闭当前窗口
|
||||||
this.$store.dispatch("tagsView/delView", this.$route);
|
this.$store.dispatch("tagsView/delView", this.$route);
|
||||||
this.$router.go(-1);
|
this.$router.go(-1);
|
||||||
@ -355,12 +355,12 @@ export default {
|
|||||||
}
|
}
|
||||||
if (pass) {
|
if (pass) {
|
||||||
approveTask(data).then(response => {
|
approveTask(data).then(response => {
|
||||||
this.msgSuccess("审批通过成功!");
|
this.$modal.msgSuccess("审批通过成功!");
|
||||||
this.getDetail(); // 获得最新详情
|
this.getDetail(); // 获得最新详情
|
||||||
});
|
});
|
||||||
} else {
|
} else {
|
||||||
rejectTask(data).then(response => {
|
rejectTask(data).then(response => {
|
||||||
this.msgSuccess("审批不通过成功!");
|
this.$modal.msgSuccess("审批不通过成功!");
|
||||||
this.getDetail(); // 获得最新详情
|
this.getDetail(); // 获得最新详情
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
@ -381,7 +381,7 @@ export default {
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
updateTaskAssignee(this.updateAssignee.form).then(response => {
|
updateTaskAssignee(this.updateAssignee.form).then(response => {
|
||||||
this.msgSuccess("转派任务成功!");
|
this.$modal.msgSuccess("转派任务成功!");
|
||||||
this.updateAssignee.open = false;
|
this.updateAssignee.open = false;
|
||||||
this.getDetail(); // 获得最新详情
|
this.getDetail(); // 获得最新详情
|
||||||
});
|
});
|
||||||
@ -402,11 +402,11 @@ export default {
|
|||||||
},
|
},
|
||||||
/** 处理审批退回的操作 */
|
/** 处理审批退回的操作 */
|
||||||
handleDelegate(task) {
|
handleDelegate(task) {
|
||||||
this.msgError("暂不支持【委派】功能,可以使用【转派】替代!");
|
this.$modal.msgError("暂不支持【委派】功能,可以使用【转派】替代!");
|
||||||
},
|
},
|
||||||
/** 处理审批退回的操作 */
|
/** 处理审批退回的操作 */
|
||||||
handleBack(task) {
|
handleBack(task) {
|
||||||
this.msgError("暂不支持【退回】功能!");
|
this.$modal.msgError("暂不支持【退回】功能!");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
@ -174,7 +174,7 @@ export default {
|
|||||||
return cancelProcessInstance(id, value);
|
return cancelProcessInstance(id, value);
|
||||||
}).then(() => {
|
}).then(() => {
|
||||||
this.getList();
|
this.getList();
|
||||||
this.msgSuccess("取消成功");
|
this.$modal.msgSuccess("取消成功");
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
/** 处理详情按钮 */
|
/** 处理详情按钮 */
|
||||||
|
@ -257,7 +257,7 @@ export default {
|
|||||||
if (!form.id) {
|
if (!form.id) {
|
||||||
form.modelId = this.modelId; // 模型编号
|
form.modelId = this.modelId; // 模型编号
|
||||||
createTaskAssignRule(form).then(response => {
|
createTaskAssignRule(form).then(response => {
|
||||||
this.msgSuccess("修改成功");
|
this.$modal.msgSuccess("修改成功");
|
||||||
this.open = false;
|
this.open = false;
|
||||||
this.getList();
|
this.getList();
|
||||||
});
|
});
|
||||||
@ -265,7 +265,7 @@ export default {
|
|||||||
} else {
|
} else {
|
||||||
form.taskDefinitionKey = undefined; // 无法修改
|
form.taskDefinitionKey = undefined; // 无法修改
|
||||||
updateTaskAssignRule(form).then(response => {
|
updateTaskAssignRule(form).then(response => {
|
||||||
this.msgSuccess("修改成功");
|
this.$modal.msgSuccess("修改成功");
|
||||||
this.open = false;
|
this.open = false;
|
||||||
this.getList();
|
this.getList();
|
||||||
});
|
});
|
||||||
|
@ -202,11 +202,7 @@ export default {
|
|||||||
params.pageSize = undefined;
|
params.pageSize = undefined;
|
||||||
this.addBeginAndEndTime(params, this.dateRangeBeginTime, 'beginTime');
|
this.addBeginAndEndTime(params, this.dateRangeBeginTime, 'beginTime');
|
||||||
// 执行导出
|
// 执行导出
|
||||||
this.$confirm('是否确认导出所有API 访问日志数据项?', "警告", {
|
this.$modal.confirm('是否确认导出所有API 访问日志数据项?').then(() => {
|
||||||
confirmButtonText: "确定",
|
|
||||||
cancelButtonText: "取消",
|
|
||||||
type: "warning"
|
|
||||||
}).then(() => {
|
|
||||||
this.exportLoading = true;
|
this.exportLoading = true;
|
||||||
return exportApiAccessLogExcel(params);
|
return exportApiAccessLogExcel(params);
|
||||||
}).then(response => {
|
}).then(response => {
|
||||||
|
@ -205,13 +205,9 @@ export default {
|
|||||||
/** 处理已处理 / 已忽略的操作 **/
|
/** 处理已处理 / 已忽略的操作 **/
|
||||||
handleProcessClick(row, processStatus) {
|
handleProcessClick(row, processStatus) {
|
||||||
const processStatusText = this.getDictDataLabel(this.DICT_TYPE.INFRA_API_ERROR_LOG_PROCESS_STATUS, processStatus)
|
const processStatusText = this.getDictDataLabel(this.DICT_TYPE.INFRA_API_ERROR_LOG_PROCESS_STATUS, processStatus)
|
||||||
this.$confirm('确认标记为' + processStatusText, '提示', {
|
this.$modal.confirm('确认标记为' + processStatusText).then(() => {
|
||||||
type: 'warning',
|
|
||||||
confirmButtonText: '确定',
|
|
||||||
cancelButtonText: '取消'
|
|
||||||
}).then(() => {
|
|
||||||
updateApiErrorLogProcess(row.id, processStatus).then(() => {
|
updateApiErrorLogProcess(row.id, processStatus).then(() => {
|
||||||
this.msgSuccess("修改成功");
|
this.$modal.msgSuccess("修改成功");
|
||||||
this.getList();
|
this.getList();
|
||||||
});
|
});
|
||||||
}).catch(() => {});
|
}).catch(() => {});
|
||||||
@ -224,11 +220,7 @@ export default {
|
|||||||
params.pageSize = undefined;
|
params.pageSize = undefined;
|
||||||
this.addBeginAndEndTime(params, this.dateRangeExceptionTime, 'exceptionTime');
|
this.addBeginAndEndTime(params, this.dateRangeExceptionTime, 'exceptionTime');
|
||||||
// 执行导出
|
// 执行导出
|
||||||
this.$confirm('是否确认导出所有API 错误日志数据项?', "警告", {
|
this.$modal.confirm('是否确认导出所有API 错误日志数据项?').then(() => {
|
||||||
confirmButtonText: "确定",
|
|
||||||
cancelButtonText: "取消",
|
|
||||||
type: "warning"
|
|
||||||
}).then(() => {
|
|
||||||
this.exportLoading = true;
|
this.exportLoading = true;
|
||||||
return exportApiErrorLogExcel(params);
|
return exportApiErrorLogExcel(params);
|
||||||
}).then(response => {
|
}).then(response => {
|
||||||
|
@ -234,13 +234,13 @@ export default {
|
|||||||
if (valid) {
|
if (valid) {
|
||||||
if (this.form.id !== undefined) {
|
if (this.form.id !== undefined) {
|
||||||
updateConfig(this.form).then(response => {
|
updateConfig(this.form).then(response => {
|
||||||
this.msgSuccess("修改成功");
|
this.$modal.msgSuccess("修改成功");
|
||||||
this.open = false;
|
this.open = false;
|
||||||
this.getList();
|
this.getList();
|
||||||
});
|
});
|
||||||
} else {
|
} else {
|
||||||
addConfig(this.form).then(response => {
|
addConfig(this.form).then(response => {
|
||||||
this.msgSuccess("新增成功");
|
this.$modal.msgSuccess("新增成功");
|
||||||
this.open = false;
|
this.open = false;
|
||||||
this.getList();
|
this.getList();
|
||||||
});
|
});
|
||||||
@ -251,15 +251,11 @@ export default {
|
|||||||
/** 删除按钮操作 */
|
/** 删除按钮操作 */
|
||||||
handleDelete(row) {
|
handleDelete(row) {
|
||||||
const ids = row.id || this.ids;
|
const ids = row.id || this.ids;
|
||||||
this.$confirm('是否确认删除参数编号为"' + ids + '"的数据项?', "警告", {
|
this.$modal.confirm('是否确认删除参数编号为"' + ids + '"的数据项?').then(function() {
|
||||||
confirmButtonText: "确定",
|
|
||||||
cancelButtonText: "取消",
|
|
||||||
type: "warning"
|
|
||||||
}).then(function() {
|
|
||||||
return delConfig(ids);
|
return delConfig(ids);
|
||||||
}).then(() => {
|
}).then(() => {
|
||||||
this.getList();
|
this.getList();
|
||||||
this.msgSuccess("删除成功");
|
this.$modal.msgSuccess("删除成功");
|
||||||
}).catch(() => {});
|
}).catch(() => {});
|
||||||
},
|
},
|
||||||
/** 导出按钮操作 */
|
/** 导出按钮操作 */
|
||||||
@ -268,11 +264,7 @@ export default {
|
|||||||
this.dateRange[0] ? this.dateRange[0] + ' 00:00:00' : undefined,
|
this.dateRange[0] ? this.dateRange[0] + ' 00:00:00' : undefined,
|
||||||
this.dateRange[1] ? this.dateRange[1] + ' 23:59:59' : undefined,
|
this.dateRange[1] ? this.dateRange[1] + ' 23:59:59' : undefined,
|
||||||
]);
|
]);
|
||||||
this.$confirm('是否确认导出所有参数数据项?', "警告", {
|
this.$modal.confirm('是否确认导出所有参数数据项?').then(() => {
|
||||||
confirmButtonText: "确定",
|
|
||||||
cancelButtonText: "取消",
|
|
||||||
type: "warning"
|
|
||||||
}).then(() => {
|
|
||||||
this.exportLoading = true;
|
this.exportLoading = true;
|
||||||
return exportConfig(queryParams);
|
return exportConfig(queryParams);
|
||||||
}).then(response => {
|
}).then(response => {
|
||||||
|
@ -180,21 +180,17 @@ export default {
|
|||||||
this.upload.isUploading = false;
|
this.upload.isUploading = false;
|
||||||
this.$refs.upload.clearFiles();
|
this.$refs.upload.clearFiles();
|
||||||
// 提示成功,并刷新
|
// 提示成功,并刷新
|
||||||
this.msgSuccess("上传成功");
|
this.$modal.msgSuccess("上传成功");
|
||||||
this.getList();
|
this.getList();
|
||||||
},
|
},
|
||||||
/** 删除按钮操作 */
|
/** 删除按钮操作 */
|
||||||
handleDelete(row) {
|
handleDelete(row) {
|
||||||
const id = row.id;
|
const id = row.id;
|
||||||
this.$confirm('是否确认删除文件编号为"' + id + '"的数据项?', "警告", {
|
this.$modal.confirm('是否确认删除文件编号为"' + id + '"的数据项?').then(function() {
|
||||||
confirmButtonText: "确定",
|
|
||||||
cancelButtonText: "取消",
|
|
||||||
type: "warning"
|
|
||||||
}).then(function() {
|
|
||||||
return deleteFile(id);
|
return deleteFile(id);
|
||||||
}).then(() => {
|
}).then(() => {
|
||||||
this.getList();
|
this.getList();
|
||||||
this.msgSuccess("删除成功");
|
this.$modal.msgSuccess("删除成功");
|
||||||
}).catch(() => {});
|
}).catch(() => {});
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
|
@ -247,14 +247,10 @@ export default {
|
|||||||
},
|
},
|
||||||
/** 立即执行一次 **/
|
/** 立即执行一次 **/
|
||||||
handleRun(row) {
|
handleRun(row) {
|
||||||
this.$confirm('确认要立即执行一次"' + row.name + '"任务吗?', "警告", {
|
this.$modal.confirm('确认要立即执行一次"' + row.name + '"任务吗?').then(function() {
|
||||||
confirmButtonText: "确定",
|
|
||||||
cancelButtonText: "取消",
|
|
||||||
type: "warning"
|
|
||||||
}).then(function() {
|
|
||||||
return runJob(row.id);
|
return runJob(row.id);
|
||||||
}).then(() => {
|
}).then(() => {
|
||||||
this.msgSuccess("执行成功");
|
this.$modal.msgSuccess("执行成功");
|
||||||
}).catch(() => {});
|
}).catch(() => {});
|
||||||
},
|
},
|
||||||
/** 任务详细信息 */
|
/** 任务详细信息 */
|
||||||
@ -312,13 +308,13 @@ export default {
|
|||||||
if (valid) {
|
if (valid) {
|
||||||
if (this.form.id !== undefined) {
|
if (this.form.id !== undefined) {
|
||||||
updateJob(this.form).then(response => {
|
updateJob(this.form).then(response => {
|
||||||
this.msgSuccess("修改成功");
|
this.$modal.msgSuccess("修改成功");
|
||||||
this.open = false;
|
this.open = false;
|
||||||
this.getList();
|
this.getList();
|
||||||
});
|
});
|
||||||
} else {
|
} else {
|
||||||
addJob(this.form).then(response => {
|
addJob(this.form).then(response => {
|
||||||
this.msgSuccess("新增成功");
|
this.$modal.msgSuccess("新增成功");
|
||||||
this.open = false;
|
this.open = false;
|
||||||
this.getList();
|
this.getList();
|
||||||
});
|
});
|
||||||
@ -329,15 +325,11 @@ export default {
|
|||||||
/** 删除按钮操作 */
|
/** 删除按钮操作 */
|
||||||
handleDelete(row) {
|
handleDelete(row) {
|
||||||
const ids = row.id;
|
const ids = row.id;
|
||||||
this.$confirm('是否确认删除定时任务编号为"' + ids + '"的数据项?', "警告", {
|
this.$modal.confirm('是否确认删除定时任务编号为"' + ids + '"的数据项?').then(function() {
|
||||||
confirmButtonText: "确定",
|
|
||||||
cancelButtonText: "取消",
|
|
||||||
type: "warning"
|
|
||||||
}).then(function() {
|
|
||||||
return delJob(ids);
|
return delJob(ids);
|
||||||
}).then(() => {
|
}).then(() => {
|
||||||
this.getList();
|
this.getList();
|
||||||
this.msgSuccess("删除成功");
|
this.$modal.msgSuccess("删除成功");
|
||||||
}).catch(() => {});
|
}).catch(() => {});
|
||||||
},
|
},
|
||||||
/** 更新状态操作 */
|
/** 更新状态操作 */
|
||||||
@ -345,15 +337,11 @@ export default {
|
|||||||
const id = row.id;
|
const id = row.id;
|
||||||
let status = open ? InfraJobStatusEnum.NORMAL : InfraJobStatusEnum.STOP;
|
let status = open ? InfraJobStatusEnum.NORMAL : InfraJobStatusEnum.STOP;
|
||||||
let statusStr = open ? '开启' : '关闭';
|
let statusStr = open ? '开启' : '关闭';
|
||||||
this.$confirm('是否确认' + statusStr + '定时任务编号为"' + id + '"的数据项?', "警告", {
|
this.$modal.confirm('是否确认' + statusStr + '定时任务编号为"' + id + '"的数据项?').then(function() {
|
||||||
confirmButtonText: "确定",
|
|
||||||
cancelButtonText: "取消",
|
|
||||||
type: "warning"
|
|
||||||
}).then(function() {
|
|
||||||
return updateJobStatus(id, status);
|
return updateJobStatus(id, status);
|
||||||
}).then(() => {
|
}).then(() => {
|
||||||
this.getList();
|
this.getList();
|
||||||
this.msgSuccess(statusStr + "成功");
|
this.$modal.msgSuccess(statusStr + "成功");
|
||||||
}).catch(() => {});
|
}).catch(() => {});
|
||||||
},
|
},
|
||||||
// 更多操作触发
|
// 更多操作触发
|
||||||
@ -375,11 +363,7 @@ export default {
|
|||||||
/** 导出按钮操作 */
|
/** 导出按钮操作 */
|
||||||
handleExport() {
|
handleExport() {
|
||||||
const queryParams = this.queryParams;
|
const queryParams = this.queryParams;
|
||||||
this.$confirm("是否确认导出所有定时任务数据项?", "警告", {
|
this.$modal.confirm("是否确认导出所有定时任务数据项?").then(() => {
|
||||||
confirmButtonText: "确定",
|
|
||||||
cancelButtonText: "取消",
|
|
||||||
type: "warning"
|
|
||||||
}).then(() => {
|
|
||||||
this.exportLoading = true;
|
this.exportLoading = true;
|
||||||
return exportJob(queryParams);
|
return exportJob(queryParams);
|
||||||
}).then(response => {
|
}).then(response => {
|
||||||
|
@ -165,11 +165,7 @@ export default {
|
|||||||
params.pageNo = undefined;
|
params.pageNo = undefined;
|
||||||
params.pageSize = undefined;
|
params.pageSize = undefined;
|
||||||
// 执行导出
|
// 执行导出
|
||||||
this.$confirm('是否确认导出所有定时任务日志数据项?', "警告", {
|
this.$modal.confirm('是否确认导出所有定时任务日志数据项?').then(() => {
|
||||||
confirmButtonText: "确定",
|
|
||||||
cancelButtonText: "取消",
|
|
||||||
type: "warning"
|
|
||||||
}).then(() => {
|
|
||||||
this.exportLoading = true;
|
this.exportLoading = true;
|
||||||
return exportJobLogExcel(params);
|
return exportJobLogExcel(params);
|
||||||
}).then(response => {
|
}).then(response => {
|
||||||
|
@ -92,8 +92,6 @@ export default {
|
|||||||
name: "Server",
|
name: "Server",
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
// 加载层信息
|
|
||||||
loading: [],
|
|
||||||
// 统计命令信息
|
// 统计命令信息
|
||||||
commandstats: null,
|
commandstats: null,
|
||||||
// 使用内存
|
// 使用内存
|
||||||
@ -115,7 +113,7 @@ export default {
|
|||||||
// 查询 Redis 监控信息
|
// 查询 Redis 监控信息
|
||||||
getCache().then((response) => {
|
getCache().then((response) => {
|
||||||
this.cache = response.data;
|
this.cache = response.data;
|
||||||
this.loading.close();
|
this.$modal.closeLoading();
|
||||||
|
|
||||||
this.commandstats = echarts.init(this.$refs.commandstats, "macarons");
|
this.commandstats = echarts.init(this.$refs.commandstats, "macarons");
|
||||||
const commandStats = [];
|
const commandStats = [];
|
||||||
@ -176,12 +174,7 @@ export default {
|
|||||||
},
|
},
|
||||||
// 打开加载层
|
// 打开加载层
|
||||||
openLoading() {
|
openLoading() {
|
||||||
this.loading = this.$loading({
|
this.$modal.loading("正在加载缓存监控数据,请稍后!");
|
||||||
lock: true,
|
|
||||||
text: "拼命读取中",
|
|
||||||
spinner: "el-icon-loading",
|
|
||||||
background: "rgba(0, 0, 0, 0.7)",
|
|
||||||
});
|
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
|
@ -298,7 +298,7 @@ export default {
|
|||||||
if (this.transferParam.edit) {
|
if (this.transferParam.edit) {
|
||||||
updateChannel(data).then(response => {
|
updateChannel(data).then(response => {
|
||||||
if (response.code === 0) {
|
if (response.code === 0) {
|
||||||
this.msgSuccess("修改成功");
|
this.$modal.msgSuccess("修改成功");
|
||||||
this.close();
|
this.close();
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -307,7 +307,7 @@ export default {
|
|||||||
|
|
||||||
createChannel(data).then(response => {
|
createChannel(data).then(response => {
|
||||||
if (response.code === 0) {
|
if (response.code === 0) {
|
||||||
this.msgSuccess("新增成功");
|
this.$modal.msgSuccess("新增成功");
|
||||||
this.$parent.refreshTable();
|
this.$parent.refreshTable();
|
||||||
this.close();
|
this.close();
|
||||||
}
|
}
|
||||||
|
@ -247,7 +247,7 @@ export default {
|
|||||||
if (this.transferParam.edit) {
|
if (this.transferParam.edit) {
|
||||||
updateChannel(data).then(response => {
|
updateChannel(data).then(response => {
|
||||||
if (response.code === 0) {
|
if (response.code === 0) {
|
||||||
this.msgSuccess("修改成功");
|
this.$modal.msgSuccess("修改成功");
|
||||||
this.close();
|
this.close();
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -256,7 +256,7 @@ export default {
|
|||||||
|
|
||||||
createChannel(data).then(response => {
|
createChannel(data).then(response => {
|
||||||
if (response.code === 0) {
|
if (response.code === 0) {
|
||||||
this.msgSuccess("新增成功");
|
this.$modal.msgSuccess("新增成功");
|
||||||
this.$parent.refreshTable();
|
this.$parent.refreshTable();
|
||||||
this.close();
|
this.close();
|
||||||
}
|
}
|
||||||
|
@ -359,14 +359,10 @@ export default {
|
|||||||
// 用户状态修改
|
// 用户状态修改
|
||||||
handleStatusChange(row) {
|
handleStatusChange(row) {
|
||||||
let text = row.status === CommonStatusEnum.ENABLE ? "启用" : "停用";
|
let text = row.status === CommonStatusEnum.ENABLE ? "启用" : "停用";
|
||||||
this.$confirm('确认要"' + text + '""' + row.name + '"应用吗?', "警告", {
|
this.$modal.confirm('确认要"' + text + '""' + row.name + '"应用吗?').then(function () {
|
||||||
confirmButtonText: "确定",
|
|
||||||
cancelButtonText: "取消",
|
|
||||||
type: "warning"
|
|
||||||
}).then(function () {
|
|
||||||
return changeAppStatus(row.id, row.status);
|
return changeAppStatus(row.id, row.status);
|
||||||
}).then(() => {
|
}).then(() => {
|
||||||
this.msgSuccess(text + "成功");
|
this.$modal.msgSuccess(text + "成功");
|
||||||
}).catch(function () {
|
}).catch(function () {
|
||||||
row.status = row.status === CommonStatusEnum.ENABLE ? CommonStatusEnum.DISABLE
|
row.status = row.status === CommonStatusEnum.ENABLE ? CommonStatusEnum.DISABLE
|
||||||
: CommonStatusEnum.ENABLE;
|
: CommonStatusEnum.ENABLE;
|
||||||
@ -381,7 +377,7 @@ export default {
|
|||||||
// 修改的提交
|
// 修改的提交
|
||||||
if (this.form.id != null) {
|
if (this.form.id != null) {
|
||||||
updateApp(this.form).then(response => {
|
updateApp(this.form).then(response => {
|
||||||
this.msgSuccess("修改成功");
|
this.$modal.msgSuccess("修改成功");
|
||||||
this.open = false;
|
this.open = false;
|
||||||
this.getList();
|
this.getList();
|
||||||
});
|
});
|
||||||
@ -389,7 +385,7 @@ export default {
|
|||||||
}
|
}
|
||||||
// 添加的提交
|
// 添加的提交
|
||||||
createApp(this.form).then(response => {
|
createApp(this.form).then(response => {
|
||||||
this.msgSuccess("新增成功");
|
this.$modal.msgSuccess("新增成功");
|
||||||
this.open = false;
|
this.open = false;
|
||||||
this.getList();
|
this.getList();
|
||||||
});
|
});
|
||||||
@ -398,15 +394,11 @@ export default {
|
|||||||
/** 删除按钮操作 */
|
/** 删除按钮操作 */
|
||||||
handleDelete(row) {
|
handleDelete(row) {
|
||||||
const id = row.id;
|
const id = row.id;
|
||||||
this.$confirm('是否确认删除支付应用信息编号为"' + id + '"的数据项?', "警告", {
|
this.$modal.confirm('是否确认删除支付应用信息编号为"' + id + '"的数据项?').then(function () {
|
||||||
confirmButtonText: "确定",
|
|
||||||
cancelButtonText: "取消",
|
|
||||||
type: "warning"
|
|
||||||
}).then(function () {
|
|
||||||
return deleteApp(id);
|
return deleteApp(id);
|
||||||
}).then(() => {
|
}).then(() => {
|
||||||
this.getList();
|
this.getList();
|
||||||
this.msgSuccess("删除成功");
|
this.$modal.msgSuccess("删除成功");
|
||||||
}).catch(() => {
|
}).catch(() => {
|
||||||
this.$message({
|
this.$message({
|
||||||
type: 'info',
|
type: 'info',
|
||||||
@ -422,11 +414,7 @@ export default {
|
|||||||
params.pageSize = undefined;
|
params.pageSize = undefined;
|
||||||
this.addBeginAndEndTime(params, this.dateRangeCreateTime, 'createTime');
|
this.addBeginAndEndTime(params, this.dateRangeCreateTime, 'createTime');
|
||||||
// 执行导出
|
// 执行导出
|
||||||
this.$confirm('是否确认导出所有支付应用信息数据项?', "警告", {
|
this.$modal.confirm('是否确认导出所有支付应用信息数据项?').then(function () {
|
||||||
confirmButtonText: "确定",
|
|
||||||
cancelButtonText: "取消",
|
|
||||||
type: "warning"
|
|
||||||
}).then(function () {
|
|
||||||
return exportAppExcel(params);
|
return exportAppExcel(params);
|
||||||
}).then(response => {
|
}).then(response => {
|
||||||
this.downloadExcel(response, '支付应用信息.xls');
|
this.downloadExcel(response, '支付应用信息.xls');
|
||||||
|
@ -225,14 +225,10 @@ export default {
|
|||||||
// 用户状态修改
|
// 用户状态修改
|
||||||
handleStatusChange(row) {
|
handleStatusChange(row) {
|
||||||
let text = row.status === CommonStatusEnum.ENABLE ? "启用" : "停用";
|
let text = row.status === CommonStatusEnum.ENABLE ? "启用" : "停用";
|
||||||
this.$confirm('确认要"' + text + '""' + row.name + '"商户吗?', "警告", {
|
this.$modal.confirm('确认要"' + text + '""' + row.name + '"商户吗?').then(function() {
|
||||||
confirmButtonText: "确定",
|
|
||||||
cancelButtonText: "取消",
|
|
||||||
type: "warning"
|
|
||||||
}).then(function() {
|
|
||||||
return changeMerchantStatus(row.id, row.status);
|
return changeMerchantStatus(row.id, row.status);
|
||||||
}).then(() => {
|
}).then(() => {
|
||||||
this.msgSuccess(text + "成功");
|
this.$modal.msgSuccess(text + "成功");
|
||||||
}).catch(function() {
|
}).catch(function() {
|
||||||
row.status = row.status === CommonStatusEnum.ENABLE ? CommonStatusEnum.DISABLE
|
row.status = row.status === CommonStatusEnum.ENABLE ? CommonStatusEnum.DISABLE
|
||||||
: CommonStatusEnum.ENABLE;
|
: CommonStatusEnum.ENABLE;
|
||||||
@ -247,7 +243,7 @@ export default {
|
|||||||
// 修改的提交
|
// 修改的提交
|
||||||
if (this.form.id != null) {
|
if (this.form.id != null) {
|
||||||
updateMerchant(this.form).then(response => {
|
updateMerchant(this.form).then(response => {
|
||||||
this.msgSuccess("修改成功");
|
this.$modal.msgSuccess("修改成功");
|
||||||
this.open = false;
|
this.open = false;
|
||||||
this.getList();
|
this.getList();
|
||||||
});
|
});
|
||||||
@ -255,7 +251,7 @@ export default {
|
|||||||
}
|
}
|
||||||
// 添加的提交
|
// 添加的提交
|
||||||
createMerchant(this.form).then(response => {
|
createMerchant(this.form).then(response => {
|
||||||
this.msgSuccess("新增成功");
|
this.$modal.msgSuccess("新增成功");
|
||||||
this.open = false;
|
this.open = false;
|
||||||
this.getList();
|
this.getList();
|
||||||
});
|
});
|
||||||
@ -264,15 +260,11 @@ export default {
|
|||||||
/** 删除按钮操作 */
|
/** 删除按钮操作 */
|
||||||
handleDelete(row) {
|
handleDelete(row) {
|
||||||
const id = row.id;
|
const id = row.id;
|
||||||
this.$confirm('是否确认删除支付商户信息编号为"' + id + '"的数据项?', "警告", {
|
this.$modal.confirm('是否确认删除支付商户信息编号为"' + id + '"的数据项?').then(function() {
|
||||||
confirmButtonText: "确定",
|
|
||||||
cancelButtonText: "取消",
|
|
||||||
type: "warning"
|
|
||||||
}).then(function() {
|
|
||||||
return deleteMerchant(id);
|
return deleteMerchant(id);
|
||||||
}).then(() => {
|
}).then(() => {
|
||||||
this.getList();
|
this.getList();
|
||||||
this.msgSuccess("删除成功");
|
this.$modal.msgSuccess("删除成功");
|
||||||
}).catch(() => {});
|
}).catch(() => {});
|
||||||
},
|
},
|
||||||
/** 导出按钮操作 */
|
/** 导出按钮操作 */
|
||||||
@ -283,11 +275,7 @@ export default {
|
|||||||
params.pageSize = undefined;
|
params.pageSize = undefined;
|
||||||
this.addBeginAndEndTime(params, this.dateRangeCreateTime, 'createTime');
|
this.addBeginAndEndTime(params, this.dateRangeCreateTime, 'createTime');
|
||||||
// 执行导出
|
// 执行导出
|
||||||
this.$confirm('是否确认导出所有支付商户信息数据项?', "警告", {
|
this.$modal.confirm('是否确认导出所有支付商户信息数据项?').then(() => {
|
||||||
confirmButtonText: "确定",
|
|
||||||
cancelButtonText: "取消",
|
|
||||||
type: "warning"
|
|
||||||
}).then(() => {
|
|
||||||
this.exportLoading = true;
|
this.exportLoading = true;
|
||||||
return exportMerchantExcel(params);
|
return exportMerchantExcel(params);
|
||||||
}).then(response => {
|
}).then(response => {
|
||||||
|
@ -420,11 +420,7 @@ export default {
|
|||||||
this.addBeginAndEndTime(params, this.dateRangeNotifyTime, 'notifyTime');
|
this.addBeginAndEndTime(params, this.dateRangeNotifyTime, 'notifyTime');
|
||||||
this.addDateRange(params, this.dateRangeCreateTime, 'CreateTime');
|
this.addDateRange(params, this.dateRangeCreateTime, 'CreateTime');
|
||||||
// 执行导出
|
// 执行导出
|
||||||
this.$confirm('是否确认导出所有支付订单数据项?', "警告", {
|
this.$modal.confirm('是否确认导出所有支付订单数据项?').then(function () {
|
||||||
confirmButtonText: "确定",
|
|
||||||
cancelButtonText: "取消",
|
|
||||||
type: "warning"
|
|
||||||
}).then(function () {
|
|
||||||
return exportOrderExcel(params);
|
return exportOrderExcel(params);
|
||||||
}).then(response => {
|
}).then(response => {
|
||||||
this.downloadExcel(response, '支付订单.xls');
|
this.downloadExcel(response, '支付订单.xls');
|
||||||
|
@ -424,11 +424,7 @@ export default {
|
|||||||
this.addBeginAndEndTime(params, this.dateRangeNotifyTime, 'notifyTime');
|
this.addBeginAndEndTime(params, this.dateRangeNotifyTime, 'notifyTime');
|
||||||
this.addDateRange(params, this.dateRangeCreateTime, 'CreateTime');
|
this.addDateRange(params, this.dateRangeCreateTime, 'CreateTime');
|
||||||
// 执行导出
|
// 执行导出
|
||||||
this.$confirm('是否确认导出所有退款订单数据项?', "警告", {
|
this.$modal.confirm('是否确认导出所有退款订单数据项?').then(function () {
|
||||||
confirmButtonText: "确定",
|
|
||||||
cancelButtonText: "取消",
|
|
||||||
type: "warning"
|
|
||||||
}).then(function () {
|
|
||||||
return exportRefundExcel(params);
|
return exportRefundExcel(params);
|
||||||
}).then(response => {
|
}).then(response => {
|
||||||
this.downloadExcel(response, '退款订单.xls');
|
this.downloadExcel(response, '退款订单.xls');
|
||||||
|
@ -291,13 +291,13 @@ export default {
|
|||||||
if (valid) {
|
if (valid) {
|
||||||
if (this.form.id !== undefined) {
|
if (this.form.id !== undefined) {
|
||||||
updateDept(this.form).then(response => {
|
updateDept(this.form).then(response => {
|
||||||
this.msgSuccess("修改成功");
|
this.$modal.msgSuccess("修改成功");
|
||||||
this.open = false;
|
this.open = false;
|
||||||
this.getList();
|
this.getList();
|
||||||
});
|
});
|
||||||
} else {
|
} else {
|
||||||
addDept(this.form).then(response => {
|
addDept(this.form).then(response => {
|
||||||
this.msgSuccess("新增成功");
|
this.$modal.msgSuccess("新增成功");
|
||||||
this.open = false;
|
this.open = false;
|
||||||
this.getList();
|
this.getList();
|
||||||
});
|
});
|
||||||
@ -307,15 +307,11 @@ export default {
|
|||||||
},
|
},
|
||||||
/** 删除按钮操作 */
|
/** 删除按钮操作 */
|
||||||
handleDelete(row) {
|
handleDelete(row) {
|
||||||
this.$confirm('是否确认删除名称为"' + row.name + '"的数据项?', "警告", {
|
this.$modal.confirm('是否确认删除名称为"' + row.name + '"的数据项?').then(function() {
|
||||||
confirmButtonText: "确定",
|
|
||||||
cancelButtonText: "取消",
|
|
||||||
type: "warning"
|
|
||||||
}).then(function() {
|
|
||||||
return delDept(row.id);
|
return delDept(row.id);
|
||||||
}).then(() => {
|
}).then(() => {
|
||||||
this.getList();
|
this.getList();
|
||||||
this.msgSuccess("删除成功");
|
this.$modal.msgSuccess("删除成功");
|
||||||
}).catch(() => {});
|
}).catch(() => {});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -266,13 +266,13 @@ export default {
|
|||||||
if (valid) {
|
if (valid) {
|
||||||
if (this.form.id !== undefined) {
|
if (this.form.id !== undefined) {
|
||||||
updateData(this.form).then(response => {
|
updateData(this.form).then(response => {
|
||||||
this.msgSuccess("修改成功");
|
this.$modal.msgSuccess("修改成功");
|
||||||
this.open = false;
|
this.open = false;
|
||||||
this.getList();
|
this.getList();
|
||||||
});
|
});
|
||||||
} else {
|
} else {
|
||||||
addData(this.form).then(response => {
|
addData(this.form).then(response => {
|
||||||
this.msgSuccess("新增成功");
|
this.$modal.msgSuccess("新增成功");
|
||||||
this.open = false;
|
this.open = false;
|
||||||
this.getList();
|
this.getList();
|
||||||
});
|
});
|
||||||
@ -283,25 +283,17 @@ export default {
|
|||||||
/** 删除按钮操作 */
|
/** 删除按钮操作 */
|
||||||
handleDelete(row) {
|
handleDelete(row) {
|
||||||
const ids = row.id;
|
const ids = row.id;
|
||||||
this.$confirm('是否确认删除字典编码为"' + ids + '"的数据项?', "警告", {
|
this.$modal.confirm('是否确认删除字典编码为"' + ids + '"的数据项?').then(function() {
|
||||||
confirmButtonText: "确定",
|
|
||||||
cancelButtonText: "取消",
|
|
||||||
type: "warning"
|
|
||||||
}).then(function() {
|
|
||||||
return delData(ids);
|
return delData(ids);
|
||||||
}).then(() => {
|
}).then(() => {
|
||||||
this.getList();
|
this.getList();
|
||||||
this.msgSuccess("删除成功");
|
this.$modal.msgSuccess("删除成功");
|
||||||
}).catch(() => {});
|
}).catch(() => {});
|
||||||
},
|
},
|
||||||
/** 导出按钮操作 */
|
/** 导出按钮操作 */
|
||||||
handleExport() {
|
handleExport() {
|
||||||
const queryParams = this.queryParams;
|
const queryParams = this.queryParams;
|
||||||
this.$confirm('是否确认导出所有数据项?', "警告", {
|
this.$modal.confirm('是否确认导出所有数据项?').then(() => {
|
||||||
confirmButtonText: "确定",
|
|
||||||
cancelButtonText: "取消",
|
|
||||||
type: "warning"
|
|
||||||
}).then(() => {
|
|
||||||
this.exportLoading = true;
|
this.exportLoading = true;
|
||||||
return exportData(queryParams);
|
return exportData(queryParams);
|
||||||
}).then(response => {
|
}).then(response => {
|
||||||
|
@ -214,13 +214,13 @@ export default {
|
|||||||
if (valid) {
|
if (valid) {
|
||||||
if (this.form.id !== undefined) {
|
if (this.form.id !== undefined) {
|
||||||
updateType(this.form).then(response => {
|
updateType(this.form).then(response => {
|
||||||
this.msgSuccess("修改成功");
|
this.$modal.msgSuccess("修改成功");
|
||||||
this.open = false;
|
this.open = false;
|
||||||
this.getList();
|
this.getList();
|
||||||
});
|
});
|
||||||
} else {
|
} else {
|
||||||
addType(this.form).then(response => {
|
addType(this.form).then(response => {
|
||||||
this.msgSuccess("新增成功");
|
this.$modal.msgSuccess("新增成功");
|
||||||
this.open = false;
|
this.open = false;
|
||||||
this.getList();
|
this.getList();
|
||||||
});
|
});
|
||||||
@ -231,15 +231,11 @@ export default {
|
|||||||
/** 删除按钮操作 */
|
/** 删除按钮操作 */
|
||||||
handleDelete(row) {
|
handleDelete(row) {
|
||||||
const ids = row.id || this.ids;
|
const ids = row.id || this.ids;
|
||||||
this.$confirm('是否确认删除字典编号为"' + ids + '"的数据项?', "警告", {
|
this.$modal.confirm('是否确认删除字典编号为"' + ids + '"的数据项?').then(function() {
|
||||||
confirmButtonText: "确定",
|
|
||||||
cancelButtonText: "取消",
|
|
||||||
type: "warning"
|
|
||||||
}).then(function() {
|
|
||||||
return delType(ids);
|
return delType(ids);
|
||||||
}).then(() => {
|
}).then(() => {
|
||||||
this.getList();
|
this.getList();
|
||||||
this.msgSuccess("删除成功");
|
this.$modal.msgSuccess("删除成功");
|
||||||
}).catch(() => {});
|
}).catch(() => {});
|
||||||
},
|
},
|
||||||
/** 导出按钮操作 */
|
/** 导出按钮操作 */
|
||||||
@ -250,11 +246,7 @@ export default {
|
|||||||
params.pageSize = undefined;
|
params.pageSize = undefined;
|
||||||
this.addBeginAndEndTime(params, this.dateRangeCreateTime, 'createTime');
|
this.addBeginAndEndTime(params, this.dateRangeCreateTime, 'createTime');
|
||||||
// 执行导出
|
// 执行导出
|
||||||
this.$confirm('是否确认导出所有字典类型数据项?', "警告", {
|
this.$modal.confirm('是否确认导出所有字典类型数据项?').then(() => {
|
||||||
confirmButtonText: "确定",
|
|
||||||
cancelButtonText: "取消",
|
|
||||||
type: "warning"
|
|
||||||
}).then(() => {
|
|
||||||
this.exportLoading = true;
|
this.exportLoading = true;
|
||||||
return exportType(params);
|
return exportType(params);
|
||||||
}).then(response => {
|
}).then(response => {
|
||||||
|
@ -207,7 +207,7 @@ export default {
|
|||||||
// 修改的提交
|
// 修改的提交
|
||||||
if (this.form.id != null) {
|
if (this.form.id != null) {
|
||||||
updateErrorCode(this.form).then(response => {
|
updateErrorCode(this.form).then(response => {
|
||||||
this.msgSuccess("修改成功");
|
this.$modal.msgSuccess("修改成功");
|
||||||
this.open = false;
|
this.open = false;
|
||||||
this.getList();
|
this.getList();
|
||||||
});
|
});
|
||||||
@ -215,7 +215,7 @@ export default {
|
|||||||
}
|
}
|
||||||
// 添加的提交
|
// 添加的提交
|
||||||
createErrorCode(this.form).then(response => {
|
createErrorCode(this.form).then(response => {
|
||||||
this.msgSuccess("新增成功");
|
this.$modal.msgSuccess("新增成功");
|
||||||
this.open = false;
|
this.open = false;
|
||||||
this.getList();
|
this.getList();
|
||||||
});
|
});
|
||||||
@ -224,15 +224,11 @@ export default {
|
|||||||
/** 删除按钮操作 */
|
/** 删除按钮操作 */
|
||||||
handleDelete(row) {
|
handleDelete(row) {
|
||||||
const id = row.id;
|
const id = row.id;
|
||||||
this.$confirm('是否确认删除错误码编号为"' + id + '"的数据项?', "警告", {
|
this.$modal.confirm('是否确认删除错误码编号为"' + id + '"的数据项?').then(function() {
|
||||||
confirmButtonText: "确定",
|
|
||||||
cancelButtonText: "取消",
|
|
||||||
type: "warning"
|
|
||||||
}).then(function() {
|
|
||||||
return deleteErrorCode(id);
|
return deleteErrorCode(id);
|
||||||
}).then(() => {
|
}).then(() => {
|
||||||
this.getList();
|
this.getList();
|
||||||
this.msgSuccess("删除成功");
|
this.$modal.msgSuccess("删除成功");
|
||||||
}).catch(() => {});
|
}).catch(() => {});
|
||||||
},
|
},
|
||||||
/** 导出按钮操作 */
|
/** 导出按钮操作 */
|
||||||
@ -243,11 +239,7 @@ export default {
|
|||||||
params.pageSize = undefined;
|
params.pageSize = undefined;
|
||||||
this.addBeginAndEndTime(params, this.dateRangeCreateTime, 'createTime');
|
this.addBeginAndEndTime(params, this.dateRangeCreateTime, 'createTime');
|
||||||
// 执行导出
|
// 执行导出
|
||||||
this.$confirm('是否确认导出所有错误码数据项?', "警告", {
|
this.$modal.confirm('是否确认导出所有错误码数据项?').then(() => {
|
||||||
confirmButtonText: "确定",
|
|
||||||
cancelButtonText: "取消",
|
|
||||||
type: "warning"
|
|
||||||
}).then(() => {
|
|
||||||
this.exportLoading = true;
|
this.exportLoading = true;
|
||||||
return exportErrorCodeExcel(params);
|
return exportErrorCodeExcel(params);
|
||||||
}).then(response => {
|
}).then(response => {
|
||||||
|
@ -122,11 +122,7 @@ export default {
|
|||||||
/** 导出按钮操作 */
|
/** 导出按钮操作 */
|
||||||
handleExport() {
|
handleExport() {
|
||||||
const queryParams = this.queryParams;
|
const queryParams = this.queryParams;
|
||||||
this.$confirm('是否确认导出所有操作日志数据项?', "警告", {
|
this.$modal.confirm('是否确认导出所有操作日志数据项?').then(() => {
|
||||||
confirmButtonText: "确定",
|
|
||||||
cancelButtonText: "取消",
|
|
||||||
type: "warning"
|
|
||||||
}).then(() => {
|
|
||||||
this.exportLoading = true;
|
this.exportLoading = true;
|
||||||
return exportLoginLog(queryParams);
|
return exportLoginLog(queryParams);
|
||||||
}).then(response => {
|
}).then(response => {
|
||||||
|
@ -298,10 +298,10 @@ export default {
|
|||||||
if (path.indexOf('http://') === -1 || path.indexOf('https://') === -1) {
|
if (path.indexOf('http://') === -1 || path.indexOf('https://') === -1) {
|
||||||
// 父权限为根节点,path 必须以 / 开头
|
// 父权限为根节点,path 必须以 / 开头
|
||||||
if (this.form.parentId === 0 && path.charAt(0) !== '/') {
|
if (this.form.parentId === 0 && path.charAt(0) !== '/') {
|
||||||
this.msgSuccess('前端必须以 / 开头')
|
this.$modal.msgSuccess('前端必须以 / 开头')
|
||||||
return
|
return
|
||||||
} else if (this.form.parentId !== 0 && path.charAt(0) === '/') {
|
} else if (this.form.parentId !== 0 && path.charAt(0) === '/') {
|
||||||
this.msgSuccess('前端不能以 / 开头')
|
this.$modal.msgSuccess('前端不能以 / 开头')
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -310,13 +310,13 @@ export default {
|
|||||||
// 提交
|
// 提交
|
||||||
if (this.form.id !== undefined) {
|
if (this.form.id !== undefined) {
|
||||||
updateMenu(this.form).then(response => {
|
updateMenu(this.form).then(response => {
|
||||||
this.msgSuccess("修改成功");
|
this.$modal.msgSuccess("修改成功");
|
||||||
this.open = false;
|
this.open = false;
|
||||||
this.getList();
|
this.getList();
|
||||||
});
|
});
|
||||||
} else {
|
} else {
|
||||||
addMenu(this.form).then(response => {
|
addMenu(this.form).then(response => {
|
||||||
this.msgSuccess("新增成功");
|
this.$modal.msgSuccess("新增成功");
|
||||||
this.open = false;
|
this.open = false;
|
||||||
this.getList();
|
this.getList();
|
||||||
});
|
});
|
||||||
@ -326,15 +326,11 @@ export default {
|
|||||||
},
|
},
|
||||||
/** 删除按钮操作 */
|
/** 删除按钮操作 */
|
||||||
handleDelete(row) {
|
handleDelete(row) {
|
||||||
this.$confirm('是否确认删除名称为"' + row.name + '"的数据项?', "警告", {
|
this.$modal.confirm('是否确认删除名称为"' + row.name + '"的数据项?').then(function() {
|
||||||
confirmButtonText: "确定",
|
|
||||||
cancelButtonText: "取消",
|
|
||||||
type: "warning"
|
|
||||||
}).then(function() {
|
|
||||||
return delMenu(row.id);
|
return delMenu(row.id);
|
||||||
}).then(() => {
|
}).then(() => {
|
||||||
this.getList();
|
this.getList();
|
||||||
this.msgSuccess("删除成功");
|
this.$modal.msgSuccess("删除成功");
|
||||||
}).catch(() => {});
|
}).catch(() => {});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -219,13 +219,13 @@ export default {
|
|||||||
if (valid) {
|
if (valid) {
|
||||||
if (this.form.id !== undefined) {
|
if (this.form.id !== undefined) {
|
||||||
updateNotice(this.form).then(response => {
|
updateNotice(this.form).then(response => {
|
||||||
this.msgSuccess("修改成功");
|
this.$modal.msgSuccess("修改成功");
|
||||||
this.open = false;
|
this.open = false;
|
||||||
this.getList();
|
this.getList();
|
||||||
});
|
});
|
||||||
} else {
|
} else {
|
||||||
addNotice(this.form).then(response => {
|
addNotice(this.form).then(response => {
|
||||||
this.msgSuccess("新增成功");
|
this.$modal.msgSuccess("新增成功");
|
||||||
this.open = false;
|
this.open = false;
|
||||||
this.getList();
|
this.getList();
|
||||||
});
|
});
|
||||||
@ -236,15 +236,11 @@ export default {
|
|||||||
/** 删除按钮操作 */
|
/** 删除按钮操作 */
|
||||||
handleDelete(row) {
|
handleDelete(row) {
|
||||||
const ids = row.id || this.ids
|
const ids = row.id || this.ids
|
||||||
this.$confirm('是否确认删除公告编号为"' + ids + '"的数据项?', "警告", {
|
this.$modal.confirm('是否确认删除公告编号为"' + ids + '"的数据项?').then(function() {
|
||||||
confirmButtonText: "确定",
|
|
||||||
cancelButtonText: "取消",
|
|
||||||
type: "warning"
|
|
||||||
}).then(function() {
|
|
||||||
return delNotice(ids);
|
return delNotice(ids);
|
||||||
}).then(() => {
|
}).then(() => {
|
||||||
this.getList();
|
this.getList();
|
||||||
this.msgSuccess("删除成功");
|
this.$modal.msgSuccess("删除成功");
|
||||||
}).catch(() => {});
|
}).catch(() => {});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -202,11 +202,7 @@ export default {
|
|||||||
this.dateRange[0] ? this.dateRange[0] + ' 00:00:00' : undefined,
|
this.dateRange[0] ? this.dateRange[0] + ' 00:00:00' : undefined,
|
||||||
this.dateRange[1] ? this.dateRange[1] + ' 23:59:59' : undefined,
|
this.dateRange[1] ? this.dateRange[1] + ' 23:59:59' : undefined,
|
||||||
])
|
])
|
||||||
this.$confirm('是否确认导出所有操作日志数据项?', "警告", {
|
this.$modal.confirm('是否确认导出所有操作日志数据项?').then(() => {
|
||||||
confirmButtonText: "确定",
|
|
||||||
cancelButtonText: "取消",
|
|
||||||
type: "warning"
|
|
||||||
}).then(() => {
|
|
||||||
this.exportLoading = true;
|
this.exportLoading = true;
|
||||||
return exportOperateLog(queryParams);
|
return exportOperateLog(queryParams);
|
||||||
}).then(response => {
|
}).then(response => {
|
||||||
|
@ -205,13 +205,13 @@ export default {
|
|||||||
if (valid) {
|
if (valid) {
|
||||||
if (this.form.id !== undefined) {
|
if (this.form.id !== undefined) {
|
||||||
updatePost(this.form).then(response => {
|
updatePost(this.form).then(response => {
|
||||||
this.msgSuccess("修改成功");
|
this.$modal.msgSuccess("修改成功");
|
||||||
this.open = false;
|
this.open = false;
|
||||||
this.getList();
|
this.getList();
|
||||||
});
|
});
|
||||||
} else {
|
} else {
|
||||||
addPost(this.form).then(response => {
|
addPost(this.form).then(response => {
|
||||||
this.msgSuccess("新增成功");
|
this.$modal.msgSuccess("新增成功");
|
||||||
this.open = false;
|
this.open = false;
|
||||||
this.getList();
|
this.getList();
|
||||||
});
|
});
|
||||||
@ -222,25 +222,17 @@ export default {
|
|||||||
/** 删除按钮操作 */
|
/** 删除按钮操作 */
|
||||||
handleDelete(row) {
|
handleDelete(row) {
|
||||||
const ids = row.id;
|
const ids = row.id;
|
||||||
this.$confirm('是否确认删除岗位编号为"' + ids + '"的数据项?', "警告", {
|
this.$modal.confirm('是否确认删除岗位编号为"' + ids + '"的数据项?').then(function() {
|
||||||
confirmButtonText: "确定",
|
|
||||||
cancelButtonText: "取消",
|
|
||||||
type: "warning"
|
|
||||||
}).then(function() {
|
|
||||||
return delPost(ids);
|
return delPost(ids);
|
||||||
}).then(() => {
|
}).then(() => {
|
||||||
this.getList();
|
this.getList();
|
||||||
this.msgSuccess("删除成功");
|
this.$modal.msgSuccess("删除成功");
|
||||||
}).catch(() => {});
|
}).catch(() => {});
|
||||||
},
|
},
|
||||||
/** 导出按钮操作 */
|
/** 导出按钮操作 */
|
||||||
handleExport() {
|
handleExport() {
|
||||||
const queryParams = this.queryParams;
|
const queryParams = this.queryParams;
|
||||||
this.$confirm('是否确认导出所有岗位数据项?', "警告", {
|
this.$modal.confirm('是否确认导出所有岗位数据项?').then(() => {
|
||||||
confirmButtonText: "确定",
|
|
||||||
cancelButtonText: "取消",
|
|
||||||
type: "warning"
|
|
||||||
}).then(() => {
|
|
||||||
this.exportLoading = true;
|
this.exportLoading = true;
|
||||||
return exportPost(queryParams);
|
return exportPost(queryParams);
|
||||||
}).then(response => {
|
}).then(response => {
|
||||||
|
@ -277,14 +277,10 @@ export default {
|
|||||||
handleStatusChange(row) {
|
handleStatusChange(row) {
|
||||||
// 此时,row 已经变成目标状态了,所以可以直接提交请求和提示
|
// 此时,row 已经变成目标状态了,所以可以直接提交请求和提示
|
||||||
let text = row.status === CommonStatusEnum.ENABLE ? "启用" : "停用";
|
let text = row.status === CommonStatusEnum.ENABLE ? "启用" : "停用";
|
||||||
this.$confirm('确认要"' + text + '""' + row.name + '"角色吗?', "警告", {
|
this.$modal.confirm('确认要"' + text + '""' + row.name + '"角色吗?').then(function() {
|
||||||
confirmButtonText: "确定",
|
|
||||||
cancelButtonText: "取消",
|
|
||||||
type: "warning"
|
|
||||||
}).then(function() {
|
|
||||||
return changeRoleStatus(row.id, row.status);
|
return changeRoleStatus(row.id, row.status);
|
||||||
}).then(() => {
|
}).then(() => {
|
||||||
this.msgSuccess(text + "成功");
|
this.$modal.msgSuccess(text + "成功");
|
||||||
}).catch(function() {
|
}).catch(function() {
|
||||||
// 异常时,需要将 row.status 状态重置回之前的
|
// 异常时,需要将 row.status 状态重置回之前的
|
||||||
row.status = row.status === CommonStatusEnum.ENABLE ? CommonStatusEnum.DISABLE
|
row.status = row.status === CommonStatusEnum.ENABLE ? CommonStatusEnum.DISABLE
|
||||||
@ -442,13 +438,13 @@ export default {
|
|||||||
if (valid) {
|
if (valid) {
|
||||||
if (this.form.id !== undefined) {
|
if (this.form.id !== undefined) {
|
||||||
updateRole(this.form).then(response => {
|
updateRole(this.form).then(response => {
|
||||||
this.msgSuccess("修改成功");
|
this.$modal.msgSuccess("修改成功");
|
||||||
this.open = false;
|
this.open = false;
|
||||||
this.getList();
|
this.getList();
|
||||||
});
|
});
|
||||||
} else {
|
} else {
|
||||||
addRole(this.form).then(response => {
|
addRole(this.form).then(response => {
|
||||||
this.msgSuccess("新增成功");
|
this.$modal.msgSuccess("新增成功");
|
||||||
this.open = false;
|
this.open = false;
|
||||||
this.getList();
|
this.getList();
|
||||||
});
|
});
|
||||||
@ -465,7 +461,7 @@ export default {
|
|||||||
dataScopeDeptIds: this.form.dataScope !== SystemDataScopeEnum.DEPT_CUSTOM ? [] :
|
dataScopeDeptIds: this.form.dataScope !== SystemDataScopeEnum.DEPT_CUSTOM ? [] :
|
||||||
this.$refs.dept.getCheckedKeys()
|
this.$refs.dept.getCheckedKeys()
|
||||||
}).then(response => {
|
}).then(response => {
|
||||||
this.msgSuccess("修改成功");
|
this.$modal.msgSuccess("修改成功");
|
||||||
this.openDataScope = false;
|
this.openDataScope = false;
|
||||||
this.getList();
|
this.getList();
|
||||||
});
|
});
|
||||||
@ -478,7 +474,7 @@ export default {
|
|||||||
roleId: this.form.id,
|
roleId: this.form.id,
|
||||||
menuIds: [...this.$refs.menu.getCheckedKeys(), ...this.$refs.menu.getHalfCheckedKeys()]
|
menuIds: [...this.$refs.menu.getCheckedKeys(), ...this.$refs.menu.getHalfCheckedKeys()]
|
||||||
}).then(response => {
|
}).then(response => {
|
||||||
this.msgSuccess("修改成功");
|
this.$modal.msgSuccess("修改成功");
|
||||||
this.openMenu = false;
|
this.openMenu = false;
|
||||||
this.getList();
|
this.getList();
|
||||||
});
|
});
|
||||||
@ -487,25 +483,17 @@ export default {
|
|||||||
/** 删除按钮操作 */
|
/** 删除按钮操作 */
|
||||||
handleDelete(row) {
|
handleDelete(row) {
|
||||||
const ids = row.id || this.ids;
|
const ids = row.id || this.ids;
|
||||||
this.$confirm('是否确认删除角色编号为"' + ids + '"的数据项?', "警告", {
|
this.$modal.confirm('是否确认删除角色编号为"' + ids + '"的数据项?').then(function() {
|
||||||
confirmButtonText: "确定",
|
|
||||||
cancelButtonText: "取消",
|
|
||||||
type: "warning"
|
|
||||||
}).then(function() {
|
|
||||||
return delRole(ids);
|
return delRole(ids);
|
||||||
}).then(() => {
|
}).then(() => {
|
||||||
this.getList();
|
this.getList();
|
||||||
this.msgSuccess("删除成功");
|
this.$modal.msgSuccess("删除成功");
|
||||||
}).catch(() => {});
|
}).catch(() => {});
|
||||||
},
|
},
|
||||||
/** 导出按钮操作 */
|
/** 导出按钮操作 */
|
||||||
handleExport() {
|
handleExport() {
|
||||||
const queryParams = this.queryParams;
|
const queryParams = this.queryParams;
|
||||||
this.$confirm('是否确认导出所有角色数据项?', "警告", {
|
this.$modal.confirm('是否确认导出所有角色数据项?').then(function() {
|
||||||
confirmButtonText: "确定",
|
|
||||||
cancelButtonText: "取消",
|
|
||||||
type: "warning"
|
|
||||||
}).then(function() {
|
|
||||||
this.exportLoading = true;
|
this.exportLoading = true;
|
||||||
return exportRole(queryParams);
|
return exportRole(queryParams);
|
||||||
}).then(response => {
|
}).then(response => {
|
||||||
|
@ -83,15 +83,11 @@ export default {
|
|||||||
},
|
},
|
||||||
/** 强退按钮操作 */
|
/** 强退按钮操作 */
|
||||||
handleForceLogout(row) {
|
handleForceLogout(row) {
|
||||||
this.$confirm('是否确认强退名称为"' + row.username + '"的数据项?', "警告", {
|
this.$modal.confirm('是否确认强退名称为"' + row.username + '"的数据项?').then(function() {
|
||||||
confirmButtonText: "确定",
|
|
||||||
cancelButtonText: "取消",
|
|
||||||
type: "warning"
|
|
||||||
}).then(function() {
|
|
||||||
return forceLogout(row.id);
|
return forceLogout(row.id);
|
||||||
}).then(() => {
|
}).then(() => {
|
||||||
this.getList();
|
this.getList();
|
||||||
this.msgSuccess("强退成功");
|
this.$modal.msgSuccess("强退成功");
|
||||||
}).catch(() => {});
|
}).catch(() => {});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -216,7 +216,7 @@ export default {
|
|||||||
// 修改的提交
|
// 修改的提交
|
||||||
if (this.form.id != null) {
|
if (this.form.id != null) {
|
||||||
updateSmsChannel(this.form).then(response => {
|
updateSmsChannel(this.form).then(response => {
|
||||||
this.msgSuccess("修改成功");
|
this.$modal.msgSuccess("修改成功");
|
||||||
this.open = false;
|
this.open = false;
|
||||||
this.getList();
|
this.getList();
|
||||||
});
|
});
|
||||||
@ -224,7 +224,7 @@ export default {
|
|||||||
}
|
}
|
||||||
// 添加的提交
|
// 添加的提交
|
||||||
createSmsChannel(this.form).then(response => {
|
createSmsChannel(this.form).then(response => {
|
||||||
this.msgSuccess("新增成功");
|
this.$modal.msgSuccess("新增成功");
|
||||||
this.open = false;
|
this.open = false;
|
||||||
this.getList();
|
this.getList();
|
||||||
});
|
});
|
||||||
@ -233,15 +233,11 @@ export default {
|
|||||||
/** 删除按钮操作 */
|
/** 删除按钮操作 */
|
||||||
handleDelete(row) {
|
handleDelete(row) {
|
||||||
const id = row.id;
|
const id = row.id;
|
||||||
this.$confirm('是否确认删除短信渠道编号为"' + id + '"的数据项?', "警告", {
|
this.$modal.confirm('是否确认删除短信渠道编号为"' + id + '"的数据项?').then(function() {
|
||||||
confirmButtonText: "确定",
|
|
||||||
cancelButtonText: "取消",
|
|
||||||
type: "warning"
|
|
||||||
}).then(function() {
|
|
||||||
return deleteSmsChannel(id);
|
return deleteSmsChannel(id);
|
||||||
}).then(() => {
|
}).then(() => {
|
||||||
this.getList();
|
this.getList();
|
||||||
this.msgSuccess("删除成功");
|
this.$modal.msgSuccess("删除成功");
|
||||||
}).catch(() => {});
|
}).catch(() => {});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -278,11 +278,7 @@ export default {
|
|||||||
this.addBeginAndEndTime(params, this.dateRangeSendTime, 'sendTime');
|
this.addBeginAndEndTime(params, this.dateRangeSendTime, 'sendTime');
|
||||||
this.addBeginAndEndTime(params, this.dateRangeReceiveTime, 'receiveTime');
|
this.addBeginAndEndTime(params, this.dateRangeReceiveTime, 'receiveTime');
|
||||||
// 执行导出
|
// 执行导出
|
||||||
this.$confirm('是否确认导出所有短信日志数据项?', "警告", {
|
this.$modal.confirm('是否确认导出所有短信日志数据项?').then(() => {
|
||||||
confirmButtonText: "确定",
|
|
||||||
cancelButtonText: "取消",
|
|
||||||
type: "warning"
|
|
||||||
}).then(() => {
|
|
||||||
this.exportLoading = true;
|
this.exportLoading = true;
|
||||||
return exportSmsLogExcel(params);
|
return exportSmsLogExcel(params);
|
||||||
}).then(response => {
|
}).then(response => {
|
||||||
|
@ -298,7 +298,7 @@ export default {
|
|||||||
// 修改的提交
|
// 修改的提交
|
||||||
if (this.form.id != null) {
|
if (this.form.id != null) {
|
||||||
updateSmsTemplate(this.form).then(response => {
|
updateSmsTemplate(this.form).then(response => {
|
||||||
this.msgSuccess("修改成功");
|
this.$modal.msgSuccess("修改成功");
|
||||||
this.open = false;
|
this.open = false;
|
||||||
this.getList();
|
this.getList();
|
||||||
});
|
});
|
||||||
@ -306,7 +306,7 @@ export default {
|
|||||||
}
|
}
|
||||||
// 添加的提交
|
// 添加的提交
|
||||||
createSmsTemplate(this.form).then(response => {
|
createSmsTemplate(this.form).then(response => {
|
||||||
this.msgSuccess("新增成功");
|
this.$modal.msgSuccess("新增成功");
|
||||||
this.open = false;
|
this.open = false;
|
||||||
this.getList();
|
this.getList();
|
||||||
});
|
});
|
||||||
@ -315,15 +315,11 @@ export default {
|
|||||||
/** 删除按钮操作 */
|
/** 删除按钮操作 */
|
||||||
handleDelete(row) {
|
handleDelete(row) {
|
||||||
const id = row.id;
|
const id = row.id;
|
||||||
this.$confirm('是否确认删除短信模板编号为"' + id + '"的数据项?', "警告", {
|
this.$modal.confirm('是否确认删除短信模板编号为"' + id + '"的数据项?').then(function() {
|
||||||
confirmButtonText: "确定",
|
|
||||||
cancelButtonText: "取消",
|
|
||||||
type: "warning"
|
|
||||||
}).then(function() {
|
|
||||||
return deleteSmsTemplate(id);
|
return deleteSmsTemplate(id);
|
||||||
}).then(() => {
|
}).then(() => {
|
||||||
this.getList();
|
this.getList();
|
||||||
this.msgSuccess("删除成功");
|
this.$modal.msgSuccess("删除成功");
|
||||||
}).catch(() => {});
|
}).catch(() => {});
|
||||||
},
|
},
|
||||||
/** 导出按钮操作 */
|
/** 导出按钮操作 */
|
||||||
@ -334,11 +330,7 @@ export default {
|
|||||||
params.pageSize = undefined;
|
params.pageSize = undefined;
|
||||||
this.addBeginAndEndTime(params, this.dateRangeCreateTime, 'createTime');
|
this.addBeginAndEndTime(params, this.dateRangeCreateTime, 'createTime');
|
||||||
// 执行导出
|
// 执行导出
|
||||||
this.$confirm('是否确认导出所有短信模板数据项?', "警告", {
|
this.$modal.confirm('是否确认导出所有短信模板数据项?', "警告").then(() => {
|
||||||
confirmButtonText: "确定",
|
|
||||||
cancelButtonText: "取消",
|
|
||||||
type: "warning"
|
|
||||||
}).then(() => {
|
|
||||||
this.exportLoading = true;
|
this.exportLoading = true;
|
||||||
return exportSmsTemplateExcel(params);
|
return exportSmsTemplateExcel(params);
|
||||||
}).then(response => {
|
}).then(response => {
|
||||||
@ -390,7 +382,7 @@ export default {
|
|||||||
}
|
}
|
||||||
// 添加的提交
|
// 添加的提交
|
||||||
sendSms(this.sendSmsForm).then(response => {
|
sendSms(this.sendSmsForm).then(response => {
|
||||||
this.msgSuccess("提交发送成功!发送结果,见发送日志编号:" + response.data);
|
this.$modal.msgSuccess("提交发送成功!发送结果,见发送日志编号:" + response.data);
|
||||||
this.sendSmsOpen = false;
|
this.sendSmsOpen = false;
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
@ -210,7 +210,7 @@ export default {
|
|||||||
// 修改的提交
|
// 修改的提交
|
||||||
if (this.form.id != null) {
|
if (this.form.id != null) {
|
||||||
updateTenant(this.form).then(response => {
|
updateTenant(this.form).then(response => {
|
||||||
this.msgSuccess("修改成功");
|
this.$modal.msgSuccess("修改成功");
|
||||||
this.open = false;
|
this.open = false;
|
||||||
this.getList();
|
this.getList();
|
||||||
});
|
});
|
||||||
@ -218,7 +218,7 @@ export default {
|
|||||||
}
|
}
|
||||||
// 添加的提交
|
// 添加的提交
|
||||||
createTenant(this.form).then(response => {
|
createTenant(this.form).then(response => {
|
||||||
this.msgSuccess("新增成功");
|
this.$modal.msgSuccess("新增成功");
|
||||||
this.open = false;
|
this.open = false;
|
||||||
this.getList();
|
this.getList();
|
||||||
});
|
});
|
||||||
@ -227,15 +227,11 @@ export default {
|
|||||||
/** 删除按钮操作 */
|
/** 删除按钮操作 */
|
||||||
handleDelete(row) {
|
handleDelete(row) {
|
||||||
const id = row.id;
|
const id = row.id;
|
||||||
this.$confirm('是否确认删除租户编号为"' + id + '"的数据项?', "警告", {
|
this.$modal.confirm('是否确认删除租户编号为"' + id + '"的数据项?').then(function() {
|
||||||
confirmButtonText: "确定",
|
|
||||||
cancelButtonText: "取消",
|
|
||||||
type: "warning"
|
|
||||||
}).then(function() {
|
|
||||||
return deleteTenant(id);
|
return deleteTenant(id);
|
||||||
}).then(() => {
|
}).then(() => {
|
||||||
this.getList();
|
this.getList();
|
||||||
this.msgSuccess("删除成功");
|
this.$modal.msgSuccess("删除成功");
|
||||||
}).catch(() => {});
|
}).catch(() => {});
|
||||||
},
|
},
|
||||||
/** 导出按钮操作 */
|
/** 导出按钮操作 */
|
||||||
@ -246,11 +242,7 @@ export default {
|
|||||||
params.pageSize = undefined;
|
params.pageSize = undefined;
|
||||||
this.addBeginAndEndTime(params, this.dateRangeCreateTime, 'createTime');
|
this.addBeginAndEndTime(params, this.dateRangeCreateTime, 'createTime');
|
||||||
// 执行导出
|
// 执行导出
|
||||||
this.$confirm('是否确认导出所有租户数据项?', "警告", {
|
this.$modal.confirm('是否确认导出所有租户数据项?').then(() => {
|
||||||
confirmButtonText: "确定",
|
|
||||||
cancelButtonText: "取消",
|
|
||||||
type: "warning"
|
|
||||||
}).then(() => {
|
|
||||||
this.exportLoading = true;
|
this.exportLoading = true;
|
||||||
return exportTenantExcel(params);
|
return exportTenantExcel(params);
|
||||||
}).then(response => {
|
}).then(response => {
|
||||||
|
@ -429,14 +429,10 @@ export default {
|
|||||||
// 用户状态修改
|
// 用户状态修改
|
||||||
handleStatusChange(row) {
|
handleStatusChange(row) {
|
||||||
let text = row.status === CommonStatusEnum.ENABLE ? "启用" : "停用";
|
let text = row.status === CommonStatusEnum.ENABLE ? "启用" : "停用";
|
||||||
this.$confirm('确认要"' + text + '""' + row.username + '"用户吗?', "警告", {
|
this.$modal.confirm('确认要"' + text + '""' + row.username + '"用户吗?').then(function() {
|
||||||
confirmButtonText: "确定",
|
|
||||||
cancelButtonText: "取消",
|
|
||||||
type: "warning"
|
|
||||||
}).then(function() {
|
|
||||||
return changeUserStatus(row.id, row.status);
|
return changeUserStatus(row.id, row.status);
|
||||||
}).then(() => {
|
}).then(() => {
|
||||||
this.msgSuccess(text + "成功");
|
this.$modal.msgSuccess(text + "成功");
|
||||||
}).catch(function() {
|
}).catch(function() {
|
||||||
row.status = row.status === CommonStatusEnum.ENABLE ? CommonStatusEnum.DISABLE
|
row.status = row.status === CommonStatusEnum.ENABLE ? CommonStatusEnum.DISABLE
|
||||||
: CommonStatusEnum.ENABLE;
|
: CommonStatusEnum.ENABLE;
|
||||||
@ -510,7 +506,7 @@ export default {
|
|||||||
cancelButtonText: "取消"
|
cancelButtonText: "取消"
|
||||||
}).then(({ value }) => {
|
}).then(({ value }) => {
|
||||||
resetUserPwd(row.id, value).then(response => {
|
resetUserPwd(row.id, value).then(response => {
|
||||||
this.msgSuccess("修改成功,新密码是:" + value);
|
this.$modal.msgSuccess("修改成功,新密码是:" + value);
|
||||||
});
|
});
|
||||||
}).catch(() => {});
|
}).catch(() => {});
|
||||||
},
|
},
|
||||||
@ -542,13 +538,13 @@ export default {
|
|||||||
if (valid) {
|
if (valid) {
|
||||||
if (this.form.id !== undefined) {
|
if (this.form.id !== undefined) {
|
||||||
updateUser(this.form).then(response => {
|
updateUser(this.form).then(response => {
|
||||||
this.msgSuccess("修改成功");
|
this.$modal.msgSuccess("修改成功");
|
||||||
this.open = false;
|
this.open = false;
|
||||||
this.getList();
|
this.getList();
|
||||||
});
|
});
|
||||||
} else {
|
} else {
|
||||||
addUser(this.form).then(response => {
|
addUser(this.form).then(response => {
|
||||||
this.msgSuccess("新增成功");
|
this.$modal.msgSuccess("新增成功");
|
||||||
this.open = false;
|
this.open = false;
|
||||||
this.getList();
|
this.getList();
|
||||||
});
|
});
|
||||||
@ -563,7 +559,7 @@ export default {
|
|||||||
userId: this.form.id,
|
userId: this.form.id,
|
||||||
roleIds: this.form.roleIds,
|
roleIds: this.form.roleIds,
|
||||||
}).then(response => {
|
}).then(response => {
|
||||||
this.msgSuccess("分配角色成功");
|
this.$modal.msgSuccess("分配角色成功");
|
||||||
this.openRole = false;
|
this.openRole = false;
|
||||||
this.getList();
|
this.getList();
|
||||||
});
|
});
|
||||||
@ -572,15 +568,11 @@ export default {
|
|||||||
/** 删除按钮操作 */
|
/** 删除按钮操作 */
|
||||||
handleDelete(row) {
|
handleDelete(row) {
|
||||||
const ids = row.id || this.ids;
|
const ids = row.id || this.ids;
|
||||||
this.$confirm('是否确认删除用户编号为"' + ids + '"的数据项?', "警告", {
|
this.$modal.confirm('是否确认删除用户编号为"' + ids + '"的数据项?').then(function() {
|
||||||
confirmButtonText: "确定",
|
|
||||||
cancelButtonText: "取消",
|
|
||||||
type: "warning"
|
|
||||||
}).then(function() {
|
|
||||||
return delUser(ids);
|
return delUser(ids);
|
||||||
}).then(() => {
|
}).then(() => {
|
||||||
this.getList();
|
this.getList();
|
||||||
this.msgSuccess("删除成功");
|
this.$modal.msgSuccess("删除成功");
|
||||||
}).catch(() => {});
|
}).catch(() => {});
|
||||||
},
|
},
|
||||||
/** 导出按钮操作 */
|
/** 导出按钮操作 */
|
||||||
@ -589,11 +581,7 @@ export default {
|
|||||||
this.dateRange[0] ? this.dateRange[0] + ' 00:00:00' : undefined,
|
this.dateRange[0] ? this.dateRange[0] + ' 00:00:00' : undefined,
|
||||||
this.dateRange[1] ? this.dateRange[1] + ' 23:59:59' : undefined,
|
this.dateRange[1] ? this.dateRange[1] + ' 23:59:59' : undefined,
|
||||||
]);
|
]);
|
||||||
this.$confirm('是否确认导出所有用户数据项?', "警告", {
|
this.$modal.confirm('是否确认导出所有用户数据项?').then(() => {
|
||||||
confirmButtonText: "确定",
|
|
||||||
cancelButtonText: "取消",
|
|
||||||
type: "warning"
|
|
||||||
}).then(() => {
|
|
||||||
this.exportLoading = true;
|
this.exportLoading = true;
|
||||||
return exportUser(queryParams);
|
return exportUser(queryParams);
|
||||||
}).then(response => {
|
}).then(response => {
|
||||||
@ -619,7 +607,7 @@ export default {
|
|||||||
// 文件上传成功处理
|
// 文件上传成功处理
|
||||||
handleFileSuccess(response, file, fileList) {
|
handleFileSuccess(response, file, fileList) {
|
||||||
if (response.code !== 0) {
|
if (response.code !== 0) {
|
||||||
this.msgError(response.msg)
|
this.$modal.msgError(response.msg)
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
this.upload.open = false;
|
this.upload.open = false;
|
||||||
|
@ -57,7 +57,7 @@ export default {
|
|||||||
if (valid) {
|
if (valid) {
|
||||||
updateUserPwd(this.user.oldPassword, this.user.newPassword).then(
|
updateUserPwd(this.user.oldPassword, this.user.newPassword).then(
|
||||||
response => {
|
response => {
|
||||||
this.msgSuccess("修改成功");
|
this.$modal.msgSuccess("修改成功");
|
||||||
}
|
}
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
@ -110,7 +110,7 @@ export default {
|
|||||||
// 上传预处理
|
// 上传预处理
|
||||||
beforeUpload(file) {
|
beforeUpload(file) {
|
||||||
if (file.type.indexOf("image/") == -1) {
|
if (file.type.indexOf("image/") == -1) {
|
||||||
this.msgError("文件格式错误,请上传图片类型,如:JPG,PNG后缀的文件。");
|
this.$modal.msgError("文件格式错误,请上传图片类型,如:JPG,PNG后缀的文件。");
|
||||||
} else {
|
} else {
|
||||||
const reader = new FileReader();
|
const reader = new FileReader();
|
||||||
reader.readAsDataURL(file);
|
reader.readAsDataURL(file);
|
||||||
@ -128,7 +128,7 @@ export default {
|
|||||||
this.open = false;
|
this.open = false;
|
||||||
// this.options.img = process.env.VUE_APP_BASE_API + response.imgUrl;
|
// this.options.img = process.env.VUE_APP_BASE_API + response.imgUrl;
|
||||||
store.commit('SET_AVATAR', resp.data);
|
store.commit('SET_AVATAR', resp.data);
|
||||||
this.msgSuccess("修改成功");
|
this.$modal.msgSuccess("修改成功");
|
||||||
this.visible = false;
|
this.visible = false;
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
@ -62,7 +62,7 @@ export default {
|
|||||||
this.$refs["form"].validate(valid => {
|
this.$refs["form"].validate(valid => {
|
||||||
if (valid) {
|
if (valid) {
|
||||||
updateUserProfile(this.user).then(response => {
|
updateUserProfile(this.user).then(response => {
|
||||||
this.msgSuccess("修改成功");
|
this.$modal.msgSuccess("修改成功");
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
@ -68,7 +68,7 @@ export default {
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
socialBind(type, code, state).then(resp => {
|
socialBind(type, code, state).then(resp => {
|
||||||
this.msgSuccess("绑定成功");
|
this.$modal.msgSuccess("绑定成功");
|
||||||
this.$router.replace('/user/profile');
|
this.$router.replace('/user/profile');
|
||||||
// 调用父组件, 刷新
|
// 调用父组件, 刷新
|
||||||
this.getUser();
|
this.getUser();
|
||||||
@ -87,7 +87,7 @@ export default {
|
|||||||
},
|
},
|
||||||
unbind(socialUser) {
|
unbind(socialUser) {
|
||||||
socialUnbind(socialUser.type, socialUser.unionId).then(resp => {
|
socialUnbind(socialUser.type, socialUser.unionId).then(resp => {
|
||||||
this.msgSuccess("解绑成功");
|
this.$modal.msgSuccess("解绑成功");
|
||||||
socialUser.unionId = undefined;
|
socialUser.unionId = undefined;
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
|
@ -194,11 +194,11 @@ export default {
|
|||||||
parentMenuId: genTable.parentMenuId
|
parentMenuId: genTable.parentMenuId
|
||||||
};
|
};
|
||||||
updateCodegen(genTable).then(res => {
|
updateCodegen(genTable).then(res => {
|
||||||
this.msgSuccess("修改成功!");
|
this.$modal.msgSuccess("修改成功!");
|
||||||
this.close();
|
this.close();
|
||||||
});
|
});
|
||||||
} else {
|
} else {
|
||||||
this.msgError("表单校验未通过,请重新检查提交内容");
|
this.$modal.msgError("表单校验未通过,请重新检查提交内容");
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
|
@ -304,7 +304,7 @@ export default {
|
|||||||
tplSelectChange(value) {
|
tplSelectChange(value) {
|
||||||
if (value !== 1) {
|
if (value !== 1) {
|
||||||
// TODO 芋艿:暂时不考虑支持树形结构
|
// TODO 芋艿:暂时不考虑支持树形结构
|
||||||
this.msgError('暂时不考虑支持【树形】和【主子表】的代码生成。原因是:导致 vm 模板过于复杂,不利于胖友二次开发');
|
this.$modal.msgError('暂时不考虑支持【树形】和【主子表】的代码生成。原因是:导致 vm 模板过于复杂,不利于胖友二次开发');
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
if(value !== 'sub') {
|
if(value !== 'sub') {
|
||||||
|
@ -96,7 +96,7 @@ export default {
|
|||||||
/** 导入按钮操作 */
|
/** 导入按钮操作 */
|
||||||
handleImportTable() {
|
handleImportTable() {
|
||||||
createCodegenListFromDB(this.tables.join(",")).then(res => {
|
createCodegenListFromDB(this.tables.join(",")).then(res => {
|
||||||
this.msgSuccess("导入成功");
|
this.$modal.msgSuccess("导入成功");
|
||||||
this.visible = false;
|
this.visible = false;
|
||||||
this.$emit("ok");
|
this.$emit("ok");
|
||||||
});
|
});
|
||||||
|
@ -205,14 +205,10 @@ export default {
|
|||||||
}
|
}
|
||||||
// 基于 DB 同步
|
// 基于 DB 同步
|
||||||
const tableName = row.tableName;
|
const tableName = row.tableName;
|
||||||
this.$confirm('确认要强制同步"' + tableName + '"表结构吗?', "警告", {
|
this.$modal.confirm('确认要强制同步"' + tableName + '"表结构吗?').then(function() {
|
||||||
confirmButtonText: "确定",
|
|
||||||
cancelButtonText: "取消",
|
|
||||||
type: "warning"
|
|
||||||
}).then(function() {
|
|
||||||
return syncCodegenFromDB(row.id);
|
return syncCodegenFromDB(row.id);
|
||||||
}).then(() => {
|
}).then(() => {
|
||||||
this.msgSuccess("同步成功");
|
this.$modal.msgSuccess("同步成功");
|
||||||
}).catch(() => {});
|
}).catch(() => {});
|
||||||
},
|
},
|
||||||
/** 打开导入表弹窗 */
|
/** 打开导入表弹窗 */
|
||||||
@ -326,15 +322,11 @@ export default {
|
|||||||
/** 删除按钮操作 */
|
/** 删除按钮操作 */
|
||||||
handleDelete(row) {
|
handleDelete(row) {
|
||||||
const tableIds = row.id;
|
const tableIds = row.id;
|
||||||
this.$confirm('是否确认删除表名称为"' + row.tableName + '"的数据项?', "警告", {
|
this.$modal.confirm('是否确认删除表名称为"' + row.tableName + '"的数据项?').then(function() {
|
||||||
confirmButtonText: "确定",
|
|
||||||
cancelButtonText: "取消",
|
|
||||||
type: "warning"
|
|
||||||
}).then(function() {
|
|
||||||
return deleteCodegen(tableIds);
|
return deleteCodegen(tableIds);
|
||||||
}).then(() => {
|
}).then(() => {
|
||||||
this.getList();
|
this.getList();
|
||||||
this.msgSuccess("删除成功");
|
this.$modal.msgSuccess("删除成功");
|
||||||
}).catch(() => {});
|
}).catch(() => {});
|
||||||
},
|
},
|
||||||
// 取消按钮
|
// 取消按钮
|
||||||
@ -360,7 +352,7 @@ export default {
|
|||||||
let form = this.importSQL.form;
|
let form = this.importSQL.form;
|
||||||
if (form.tableId != null) {
|
if (form.tableId != null) {
|
||||||
syncCodegenFromSQL(form.tableId, form.sql).then(response => {
|
syncCodegenFromSQL(form.tableId, form.sql).then(response => {
|
||||||
this.msgSuccess("同步成功");
|
this.$modal.msgSuccess("同步成功");
|
||||||
this.importSQL.open = false;
|
this.importSQL.open = false;
|
||||||
this.getList();
|
this.getList();
|
||||||
});
|
});
|
||||||
@ -368,7 +360,7 @@ export default {
|
|||||||
}
|
}
|
||||||
// 添加的提交
|
// 添加的提交
|
||||||
createCodegenListFromSQL(form).then(response => {
|
createCodegenListFromSQL(form).then(response => {
|
||||||
this.msgSuccess("导入成功");
|
this.$modal.msgSuccess("导入成功");
|
||||||
this.importSQL.open = false;
|
this.importSQL.open = false;
|
||||||
this.getList();
|
this.getList();
|
||||||
});
|
});
|
||||||
|
@ -217,7 +217,7 @@ export default {
|
|||||||
// 修改的提交
|
// 修改的提交
|
||||||
if (this.form.id != null) {
|
if (this.form.id != null) {
|
||||||
updateTestDemo(this.form).then(response => {
|
updateTestDemo(this.form).then(response => {
|
||||||
this.msgSuccess("修改成功");
|
this.$modal.msgSuccess("修改成功");
|
||||||
this.open = false;
|
this.open = false;
|
||||||
this.getList();
|
this.getList();
|
||||||
});
|
});
|
||||||
@ -225,7 +225,7 @@ export default {
|
|||||||
}
|
}
|
||||||
// 添加的提交
|
// 添加的提交
|
||||||
createTestDemo(this.form).then(response => {
|
createTestDemo(this.form).then(response => {
|
||||||
this.msgSuccess("新增成功");
|
this.$modal.msgSuccess("新增成功");
|
||||||
this.open = false;
|
this.open = false;
|
||||||
this.getList();
|
this.getList();
|
||||||
});
|
});
|
||||||
@ -234,15 +234,11 @@ export default {
|
|||||||
/** 删除按钮操作 */
|
/** 删除按钮操作 */
|
||||||
handleDelete(row) {
|
handleDelete(row) {
|
||||||
const id = row.id;
|
const id = row.id;
|
||||||
this.$confirm('是否确认删除字典类型编号为"' + id + '"的数据项?', "警告", {
|
this.$modal.confirm('是否确认删除字典类型编号为"' + id + '"的数据项?').then(function() {
|
||||||
confirmButtonText: "确定",
|
|
||||||
cancelButtonText: "取消",
|
|
||||||
type: "warning"
|
|
||||||
}).then(function() {
|
|
||||||
return deleteTestDemo(id);
|
return deleteTestDemo(id);
|
||||||
}).then(() => {
|
}).then(() => {
|
||||||
this.getList();
|
this.getList();
|
||||||
this.msgSuccess("删除成功");
|
this.$modal.msgSuccess("删除成功");
|
||||||
}).catch(() => {});
|
}).catch(() => {});
|
||||||
},
|
},
|
||||||
/** 导出按钮操作 */
|
/** 导出按钮操作 */
|
||||||
@ -253,11 +249,7 @@ export default {
|
|||||||
params.pageSize = undefined;
|
params.pageSize = undefined;
|
||||||
this.addBeginAndEndTime(params, this.dateRangeCreateTime, 'createTime');
|
this.addBeginAndEndTime(params, this.dateRangeCreateTime, 'createTime');
|
||||||
// 执行导出
|
// 执行导出
|
||||||
this.$confirm('是否确认导出所有字典类型数据项?', "警告", {
|
this.$modal.confirm('是否确认导出所有字典类型数据项?').then(() => {
|
||||||
confirmButtonText: "确定",
|
|
||||||
cancelButtonText: "取消",
|
|
||||||
type: "warning"
|
|
||||||
}).then(() => {
|
|
||||||
this.exportLoading = true;
|
this.exportLoading = true;
|
||||||
return exportTestDemoExcel(params);
|
return exportTestDemoExcel(params);
|
||||||
}).then(response => {
|
}).then(response => {
|
||||||
|
Loading…
Reference in New Issue
Block a user