update 重构 将下载excel工具提取到全局
| | |
| | | import './permission' // permission control |
| | | import { getDicts } from "@/api/system/dict/data"; |
| | | import { getConfigKey } from "@/api/system/config"; |
| | | import { parseTime, resetForm, addDateRange, selectDictLabel, selectDictLabels, handleTree } from "@/utils/ruoyi"; |
| | | import { parseTime, resetForm, addDateRange, selectDictLabel, selectDictLabels, download, handleTree } from "@/utils/ruoyi"; |
| | | import Pagination from "@/components/Pagination"; |
| | | // 自定义表格工具组件 |
| | | import RightToolbar from "@/components/RightToolbar" |
| | |
| | | Vue.prototype.selectDictLabel = selectDictLabel |
| | | Vue.prototype.selectDictLabels = selectDictLabels |
| | | Vue.prototype.handleTree = handleTree |
| | | Vue.prototype.downLoadExcel = downLoadExcel |
| | | |
| | | Vue.prototype.msgSuccess = function (msg) { |
| | | this.$message({ showClose: true, message: msg, type: "success" }); |
| | |
| | | |
| | | <script> |
| | | import { listDemo, pageDemo, getDemo, delDemo, addDemo, updateDemo } from "@/api/demo/demo"; |
| | | import { downLoadExcel } from "@/utils/download"; |
| | | |
| | | export default { |
| | | name: "Demo", |
| | |
| | | }, |
| | | /** 导出按钮操作 */ |
| | | handleExport() { |
| | | downLoadExcel('/demo/demo/export', this.queryParams); |
| | | this.downLoadExcel('/demo/demo/export', this.queryParams); |
| | | } |
| | | } |
| | | }; |
| | |
| | | |
| | | <script> |
| | | import { listJob, getJob, delJob, addJob, updateJob, runJob, changeJobStatus } from "@/api/monitor/job"; |
| | | import { downLoadExcel } from "@/utils/download"; |
| | | |
| | | export default { |
| | | name: "Job", |
| | |
| | | }, |
| | | /** 导出按钮操作 */ |
| | | handleExport() { |
| | | downLoadExcel('/monitor/job/export', this.queryParams); |
| | | this.downLoadExcel('/monitor/job/export', this.queryParams); |
| | | } |
| | | } |
| | | }; |
| | |
| | | <script> |
| | | import { getJob } from "@/api/monitor/job"; |
| | | import { listJobLog, delJobLog, cleanJobLog } from "@/api/monitor/jobLog"; |
| | | import { downLoadExcel } from "@/utils/download"; |
| | | |
| | | export default { |
| | | name: "JobLog", |
| | |
| | | }, |
| | | /** 导出按钮操作 */ |
| | | handleExport() { |
| | | downLoadExcel('/monitor/jobLog/export', this.queryParams); |
| | | this.downLoadExcel('/monitor/jobLog/export', this.queryParams); |
| | | } |
| | | } |
| | | }; |
| | |
| | | |
| | | <script> |
| | | import { list, delLogininfor, cleanLogininfor } from "@/api/monitor/logininfor"; |
| | | import { downLoadExcel } from "@/utils/download"; |
| | | |
| | | export default { |
| | | name: "Logininfor", |
| | |
| | | }, |
| | | /** 导出按钮操作 */ |
| | | handleExport() { |
| | | downLoadExcel('/monitor/logininfor/export', this.queryParams); |
| | | this.downLoadExcel('/monitor/logininfor/export', this.queryParams); |
| | | } |
| | | } |
| | | }; |
| | |
| | | |
| | | <script> |
| | | import { list, delOperlog, cleanOperlog } from "@/api/monitor/operlog"; |
| | | import { downLoadExcel } from "@/utils/download"; |
| | | |
| | | export default { |
| | | name: "Operlog", |
| | |
| | | }, |
| | | /** 导出按钮操作 */ |
| | | handleExport() { |
| | | downLoadExcel('/monitor/operlog/export', this.queryParams); |
| | | this.downLoadExcel('/monitor/operlog/export', this.queryParams); |
| | | } |
| | | } |
| | | }; |
| | |
| | | |
| | | <script> |
| | | import { listConfig, getConfig, delConfig, addConfig, updateConfig, refreshCache } from "@/api/system/config"; |
| | | import { downLoadExcel } from "@/utils/download"; |
| | | |
| | | export default { |
| | | name: "Config", |
| | |
| | | }, |
| | | /** 导出按钮操作 */ |
| | | handleExport() { |
| | | downLoadExcel('/system/config/export', this.queryParams); |
| | | this.downLoadExcel('/system/config/export', this.queryParams); |
| | | }, |
| | | /** 刷新缓存按钮操作 */ |
| | | handleRefreshCache() { |
| | |
| | | <script> |
| | | import { listData, getData, delData, addData, updateData } from "@/api/system/dict/data"; |
| | | import { listType, getType } from "@/api/system/dict/type"; |
| | | import { downLoadExcel } from "@/utils/download"; |
| | | |
| | | export default { |
| | | name: "Data", |
| | |
| | | }, |
| | | /** 导出按钮操作 */ |
| | | handleExport() { |
| | | downLoadExcel('/system/dict/data/export', this.queryParams); |
| | | this.downLoadExcel('/system/dict/data/export', this.queryParams); |
| | | } |
| | | } |
| | | }; |
| | |
| | | |
| | | <script> |
| | | import { listType, getType, delType, addType, updateType, refreshCache } from "@/api/system/dict/type"; |
| | | import { downLoadExcel } from "@/utils/download"; |
| | | |
| | | export default { |
| | | name: "Dict", |
| | |
| | | }, |
| | | /** 导出按钮操作 */ |
| | | handleExport() { |
| | | downLoadExcel('/system/dict/type/export', this.queryParams); |
| | | this.downLoadExcel('/system/dict/type/export', this.queryParams); |
| | | }, |
| | | /** 刷新缓存按钮操作 */ |
| | | handleRefreshCache() { |
| | |
| | | |
| | | <script> |
| | | import { listPost, getPost, delPost, addPost, updatePost } from "@/api/system/post"; |
| | | import { downLoadExcel } from "@/utils/download"; |
| | | |
| | | export default { |
| | | name: "Post", |
| | |
| | | }, |
| | | /** 导出按钮操作 */ |
| | | handleExport() { |
| | | downLoadExcel('/system/post/export', this.queryParams); |
| | | this.downLoadExcel('/system/post/export', this.queryParams); |
| | | } |
| | | } |
| | | }; |
| | |
| | | import { listRole, getRole, delRole, addRole, updateRole, dataScope, changeRoleStatus } from "@/api/system/role"; |
| | | import { treeselect as menuTreeselect, roleMenuTreeselect } from "@/api/system/menu"; |
| | | import { treeselect as deptTreeselect, roleDeptTreeselect } from "@/api/system/dept"; |
| | | import { downLoadExcel } from "@/utils/download"; |
| | | |
| | | export default { |
| | | name: "Role", |
| | |
| | | }, |
| | | /** 导出按钮操作 */ |
| | | handleExport() { |
| | | downLoadExcel('/system/role/export', this.queryParams); |
| | | this.downLoadExcel('/system/role/export', this.queryParams); |
| | | } |
| | | } |
| | | }; |
| | |
| | | import { treeselect } from "@/api/system/dept"; |
| | | import Treeselect from "@riophae/vue-treeselect"; |
| | | import "@riophae/vue-treeselect/dist/vue-treeselect.css"; |
| | | import { downLoadExcel } from "@/utils/download"; |
| | | |
| | | export default { |
| | | name: "User", |
| | |
| | | }, |
| | | /** 导出按钮操作 */ |
| | | handleExport() { |
| | | downLoadExcel('/system/user/export', this.queryParams); |
| | | this.downLoadExcel('/system/user/export', this.queryParams); |
| | | }, |
| | | /** 导入按钮操作 */ |
| | | handleImport() { |
| | |
| | | }, |
| | | /** 下载模板操作 */ |
| | | importTemplate() { |
| | | downLoadExcel('/system/user/importTemplate'); |
| | | this.downLoadExcel('/system/user/importTemplate'); |
| | | }, |
| | | // 文件上传中处理 |
| | | handleFileUploadProgress(event, file, fileList) { |