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

This commit is contained in:
YunaiV 2022-02-17 13:11:21 +08:00
parent 433056d5ea
commit 38ac5270d6
60 changed files with 366 additions and 452 deletions

View File

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

File diff suppressed because one or more lines are too long

View File

@ -8,7 +8,7 @@
/***/ (function(module, exports, __webpack_require__) {
"use strict";
eval("\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\n\nvar _leave = __webpack_require__(/*! @/api/bpm/leave */ \"./src/api/bpm/leave.js\");\n\nvar _dict = __webpack_require__(/*! @/utils/dict */ \"./src/utils/dict.js\");\n\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\nvar _default = {\n name: \"LeaveCreate\",\n components: {},\n data: function data() {\n return {\n // 表单参数\n form: {\n startTime: undefined,\n endTime: undefined,\n type: undefined,\n reason: undefined\n },\n // 表单校验\n rules: {\n startTime: [{\n required: true,\n message: \"开始时间不能为空\",\n trigger: \"blur\"\n }],\n endTime: [{\n required: true,\n message: \"结束时间不能为空\",\n trigger: \"blur\"\n }],\n type: [{\n required: true,\n message: \"请假类型不能为空\",\n trigger: \"change\"\n }],\n reason: [{\n required: true,\n message: \"请假原因不能为空\",\n trigger: \"change\"\n }]\n },\n typeDictData: (0, _dict.getDictDatas)(_dict.DICT_TYPE.BPM_OA_LEAVE_TYPE)\n };\n },\n created: function created() {},\n methods: {\n /** 提交按钮 */\n submitForm: function submitForm() {\n var _this = this;\n\n this.$refs[\"form\"].validate(function (valid) {\n if (!valid) {\n return;\n } // 添加的提交\n\n\n (0, _leave.createLeave)(_this.form).then(function (response) {\n _this.msgSuccess(\"发起成功\");\n\n _this.$store.dispatch(\"tagsView/delView\", _this.$route);\n\n _this.$router.push({\n path: \"/bpm/oa/leave\"\n });\n });\n });\n }\n }\n};\nexports.default = _default;\n\n//# sourceURL=webpack:///./src/views/bpm/oa/leave/create.vue?./node_modules/cache-loader/dist/cjs.js??ref--12-0!./node_modules/babel-loader/lib!./node_modules/cache-loader/dist/cjs.js??ref--0-0!./node_modules/vue-loader/lib??vue-loader-options");
eval("\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\n\nvar _leave = __webpack_require__(/*! @/api/bpm/leave */ \"./src/api/bpm/leave.js\");\n\nvar _dict = __webpack_require__(/*! @/utils/dict */ \"./src/utils/dict.js\");\n\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\nvar _default = {\n name: \"LeaveCreate\",\n components: {},\n data: function data() {\n return {\n // 表单参数\n form: {\n startTime: undefined,\n endTime: undefined,\n type: undefined,\n reason: undefined\n },\n // 表单校验\n rules: {\n startTime: [{\n required: true,\n message: \"开始时间不能为空\",\n trigger: \"blur\"\n }],\n endTime: [{\n required: true,\n message: \"结束时间不能为空\",\n trigger: \"blur\"\n }],\n type: [{\n required: true,\n message: \"请假类型不能为空\",\n trigger: \"change\"\n }],\n reason: [{\n required: true,\n message: \"请假原因不能为空\",\n trigger: \"change\"\n }]\n },\n typeDictData: (0, _dict.getDictDatas)(_dict.DICT_TYPE.BPM_OA_LEAVE_TYPE)\n };\n },\n created: function created() {},\n methods: {\n /** 提交按钮 */\n submitForm: function submitForm() {\n var _this = this;\n\n this.$refs[\"form\"].validate(function (valid) {\n if (!valid) {\n return;\n } // 添加的提交\n\n\n (0, _leave.createLeave)(_this.form).then(function (response) {\n _this.$modal.msgSuccess(\"发起成功\");\n\n _this.$store.dispatch(\"tagsView/delView\", _this.$route);\n\n _this.$router.push({\n path: \"/bpm/oa/leave\"\n });\n });\n });\n }\n }\n};\nexports.default = _default;\n\n//# sourceURL=webpack:///./src/views/bpm/oa/leave/create.vue?./node_modules/cache-loader/dist/cjs.js??ref--12-0!./node_modules/babel-loader/lib!./node_modules/cache-loader/dist/cjs.js??ref--0-0!./node_modules/vue-loader/lib??vue-loader-options");
/***/ }),
@ -72,4 +72,4 @@ eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _nod
/***/ })
}]);
}]);

View File

@ -44,7 +44,7 @@ eval("\n\nvar _interopRequireDefault = __webpack_require__(/*! ./node_modules/@b
/***/ (function(module, exports, __webpack_require__) {
"use strict";
eval("\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\n\nvar _user = __webpack_require__(/*! @/api/system/user */ \"./src/api/system/user.js\");\n\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\nvar _default = {\n props: {\n user: {\n type: Object\n }\n },\n data: function data() {\n return {\n // 表单校验\n rules: {\n nickname: [{\n required: true,\n message: \"用户昵称不能为空\",\n trigger: \"blur\"\n }],\n email: [{\n required: true,\n message: \"邮箱地址不能为空\",\n trigger: \"blur\"\n }, {\n type: \"email\",\n message: \"'请输入正确的邮箱地址\",\n trigger: [\"blur\", \"change\"]\n }],\n mobile: [{\n required: true,\n message: \"手机号码不能为空\",\n trigger: \"blur\"\n }, {\n pattern: /^1[3|4|5|6|7|8|9][0-9]\\d{8}$/,\n message: \"请输入正确的手机号码\",\n trigger: \"blur\"\n }]\n }\n };\n },\n methods: {\n submit: function submit() {\n var _this = this;\n\n this.$refs[\"form\"].validate(function (valid) {\n if (valid) {\n (0, _user.updateUserProfile)(_this.user).then(function (response) {\n _this.msgSuccess(\"修改成功\");\n });\n }\n });\n },\n close: function close() {\n this.$store.dispatch(\"tagsView/delView\", this.$route);\n this.$router.push({\n path: \"/index\"\n });\n }\n }\n};\nexports.default = _default;\n\n//# sourceURL=webpack:///./src/views/system/user/profile/userInfo.vue?./node_modules/cache-loader/dist/cjs.js??ref--12-0!./node_modules/babel-loader/lib!./node_modules/cache-loader/dist/cjs.js??ref--0-0!./node_modules/vue-loader/lib??vue-loader-options");
eval("\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\n\nvar _user = __webpack_require__(/*! @/api/system/user */ \"./src/api/system/user.js\");\n\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\nvar _default = {\n props: {\n user: {\n type: Object\n }\n },\n data: function data() {\n return {\n // 表单校验\n rules: {\n nickname: [{\n required: true,\n message: \"用户昵称不能为空\",\n trigger: \"blur\"\n }],\n email: [{\n required: true,\n message: \"邮箱地址不能为空\",\n trigger: \"blur\"\n }, {\n type: \"email\",\n message: \"'请输入正确的邮箱地址\",\n trigger: [\"blur\", \"change\"]\n }],\n mobile: [{\n required: true,\n message: \"手机号码不能为空\",\n trigger: \"blur\"\n }, {\n pattern: /^1[3|4|5|6|7|8|9][0-9]\\d{8}$/,\n message: \"请输入正确的手机号码\",\n trigger: \"blur\"\n }]\n }\n };\n },\n methods: {\n submit: function submit() {\n var _this = this;\n\n this.$refs[\"form\"].validate(function (valid) {\n if (valid) {\n (0, _user.updateUserProfile)(_this.user).then(function (response) {\n _this.$modal.msgSuccess(\"修改成功\");\n });\n }\n });\n },\n close: function close() {\n this.$store.dispatch(\"tagsView/delView\", this.$route);\n this.$router.push({\n path: \"/index\"\n });\n }\n }\n};\nexports.default = _default;\n\n//# sourceURL=webpack:///./src/views/system/user/profile/userInfo.vue?./node_modules/cache-loader/dist/cjs.js??ref--12-0!./node_modules/babel-loader/lib!./node_modules/cache-loader/dist/cjs.js??ref--0-0!./node_modules/vue-loader/lib??vue-loader-options");
/***/ }),
@ -56,7 +56,7 @@ eval("\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n
/***/ (function(module, exports, __webpack_require__) {
"use strict";
eval("\n\nvar _interopRequireDefault = __webpack_require__(/*! ./node_modules/@babel/runtime/helpers/interopRequireDefault.js */ \"./node_modules/@babel/runtime/helpers/interopRequireDefault.js\").default;\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\n\n__webpack_require__(/*! core-js/modules/es.regexp.exec.js */ \"./node_modules/core-js/modules/es.regexp.exec.js\");\n\n__webpack_require__(/*! core-js/modules/es.string.replace.js */ \"./node_modules/core-js/modules/es.string.replace.js\");\n\nvar _objectSpread2 = _interopRequireDefault(__webpack_require__(/*! ./node_modules/@babel/runtime/helpers/objectSpread2.js */ \"./node_modules/@babel/runtime/helpers/objectSpread2.js\"));\n\nvar _constants = __webpack_require__(/*! @/utils/constants */ \"./src/utils/constants.js\");\n\nvar _login = __webpack_require__(/*! @/api/login */ \"./src/api/login.js\");\n\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\nvar _default = {\n props: {\n user: {\n type: Object\n },\n getUser: {\n // 刷新用户\n type: Function\n },\n setActiveTab: {\n // 设置激活的\n type: Function\n }\n },\n data: function data() {\n return {};\n },\n computed: {\n socialUsers: function socialUsers() {\n var socialUsers = [];\n\n for (var i in _constants.SystemUserSocialTypeEnum) {\n var socialUser = (0, _objectSpread2.default)({}, _constants.SystemUserSocialTypeEnum[i]);\n socialUsers.push(socialUser);\n\n if (this.user.socialUsers) {\n for (var j in this.user.socialUsers) {\n if (socialUser.type === this.user.socialUsers[j].type) {\n socialUser.unionId = this.user.socialUsers[j].unionId;\n break;\n }\n }\n }\n }\n\n return socialUsers;\n }\n },\n created: function created() {\n var _this = this;\n\n // 社交绑定\n var type = this.$route.query.type;\n var code = this.$route.query.code;\n var state = this.$route.query.state;\n\n if (!code) {\n return;\n }\n\n (0, _login.socialBind)(type, code, state).then(function (resp) {\n _this.msgSuccess(\"绑定成功\");\n\n _this.$router.replace('/user/profile'); // 调用父组件, 刷新\n\n\n _this.getUser();\n\n _this.setActiveTab('userSocial');\n });\n },\n methods: {\n bind: function bind(socialUser) {\n // 计算 redirectUri\n var redirectUri = location.origin + '/user/profile?type=' + socialUser.type; // 进行跳转\n\n (0, _login.socialAuthRedirect)(socialUser.type, encodeURIComponent(redirectUri)).then(function (res) {\n // console.log(res.url);\n window.location.href = res.data;\n });\n },\n unbind: function unbind(socialUser) {\n var _this2 = this;\n\n (0, _login.socialUnbind)(socialUser.type, socialUser.unionId).then(function (resp) {\n _this2.msgSuccess(\"解绑成功\");\n\n socialUser.unionId = undefined;\n });\n },\n close: function close() {\n this.$store.dispatch(\"tagsView/delView\", this.$route);\n this.$router.push({\n path: \"/index\"\n });\n }\n }\n};\nexports.default = _default;\n\n//# sourceURL=webpack:///./src/views/system/user/profile/userSocial.vue?./node_modules/cache-loader/dist/cjs.js??ref--12-0!./node_modules/babel-loader/lib!./node_modules/cache-loader/dist/cjs.js??ref--0-0!./node_modules/vue-loader/lib??vue-loader-options");
eval("\n\nvar _interopRequireDefault = __webpack_require__(/*! ./node_modules/@babel/runtime/helpers/interopRequireDefault.js */ \"./node_modules/@babel/runtime/helpers/interopRequireDefault.js\").default;\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\n\n__webpack_require__(/*! core-js/modules/es.regexp.exec.js */ \"./node_modules/core-js/modules/es.regexp.exec.js\");\n\n__webpack_require__(/*! core-js/modules/es.string.replace.js */ \"./node_modules/core-js/modules/es.string.replace.js\");\n\nvar _objectSpread2 = _interopRequireDefault(__webpack_require__(/*! ./node_modules/@babel/runtime/helpers/objectSpread2.js */ \"./node_modules/@babel/runtime/helpers/objectSpread2.js\"));\n\nvar _constants = __webpack_require__(/*! @/utils/constants */ \"./src/utils/constants.js\");\n\nvar _login = __webpack_require__(/*! @/api/login */ \"./src/api/login.js\");\n\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\nvar _default = {\n props: {\n user: {\n type: Object\n },\n getUser: {\n // 刷新用户\n type: Function\n },\n setActiveTab: {\n // 设置激活的\n type: Function\n }\n },\n data: function data() {\n return {};\n },\n computed: {\n socialUsers: function socialUsers() {\n var socialUsers = [];\n\n for (var i in _constants.SystemUserSocialTypeEnum) {\n var socialUser = (0, _objectSpread2.default)({}, _constants.SystemUserSocialTypeEnum[i]);\n socialUsers.push(socialUser);\n\n if (this.user.socialUsers) {\n for (var j in this.user.socialUsers) {\n if (socialUser.type === this.user.socialUsers[j].type) {\n socialUser.unionId = this.user.socialUsers[j].unionId;\n break;\n }\n }\n }\n }\n\n return socialUsers;\n }\n },\n created: function created() {\n var _this = this;\n\n // 社交绑定\n var type = this.$route.query.type;\n var code = this.$route.query.code;\n var state = this.$route.query.state;\n\n if (!code) {\n return;\n }\n\n (0, _login.socialBind)(type, code, state).then(function (resp) {\n _this.$modal.msgSuccess(\"绑定成功\");\n\n _this.$router.replace('/user/profile'); // 调用父组件, 刷新\n\n\n _this.getUser();\n\n _this.setActiveTab('userSocial');\n });\n },\n methods: {\n bind: function bind(socialUser) {\n // 计算 redirectUri\n var redirectUri = location.origin + '/user/profile?type=' + socialUser.type; // 进行跳转\n\n (0, _login.socialAuthRedirect)(socialUser.type, encodeURIComponent(redirectUri)).then(function (res) {\n // console.log(res.url);\n window.location.href = res.data;\n });\n },\n unbind: function unbind(socialUser) {\n var _this2 = this;\n\n (0, _login.socialUnbind)(socialUser.type, socialUser.unionId).then(function (resp) {\n _this2.msgSuccess(\"解绑成功\");\n\n socialUser.unionId = undefined;\n });\n },\n close: function close() {\n this.$store.dispatch(\"tagsView/delView\", this.$route);\n this.$router.push({\n path: \"/index\"\n });\n }\n }\n};\nexports.default = _default;\n\n//# sourceURL=webpack:///./src/views/system/user/profile/userSocial.vue?./node_modules/cache-loader/dist/cjs.js??ref--12-0!./node_modules/babel-loader/lib!./node_modules/cache-loader/dist/cjs.js??ref--0-0!./node_modules/vue-loader/lib??vue-loader-options");
/***/ }),
@ -357,4 +357,4 @@ eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _nod
/***/ })
}]);
}]);

View File

@ -464,7 +464,7 @@ export default {
const { err, xml } = await this.bpmnModeler.saveXML();
//
if (err) {
this.msgError('保存模型失败,请重试!')
this.$modal.msgError('保存模型失败,请重试!')
return
}
// save

View File

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

View File

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

View File

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

View 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
}

View 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
}
}

View 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();
}
}

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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