| | |
| | | #end |
| | | /** å¯¼åºæé®æä½ */ |
| | | handleExport() { |
| | | this.downLoadExcel('/${moduleName}/${businessName}/export', this.queryParams); |
| | | this.#[[$download]]#.excel('/${moduleName}/${businessName}/export', this.queryParams); |
| | | } |
| | | } |
| | | }; |
| | |
| | | import './permission' // permission control |
| | | import { getDicts } from "@/api/system/dict/data"; |
| | | import { getConfigKey } from "@/api/system/config"; |
| | | import { downLoadExcel } from "@/utils/download"; |
| | | import { parseTime, resetForm, addDateRange, selectDictLabel, selectDictLabels, handleTree } from "@/utils/ruoyi"; |
| | | // å页ç»ä»¶ |
| | | import Pagination from "@/components/Pagination"; |
| | |
| | | Vue.prototype.addDateRange = addDateRange |
| | | Vue.prototype.selectDictLabel = selectDictLabel |
| | | Vue.prototype.selectDictLabels = selectDictLabels |
| | | Vue.prototype.downLoadExcel = downLoadExcel |
| | | Vue.prototype.handleTree = handleTree |
| | | |
| | | // å
¨å±ç»ä»¶æè½½ |
| | |
| | | const baseURL = process.env.VUE_APP_BASE_API |
| | | |
| | | export default { |
| | | name(name, isDelete = true) { |
| | | var url = baseURL + "/common/download?fileName=" + encodeURI(name) + "&delete=" + isDelete |
| | | excel(url, params) { |
| | | // getè¯·æ±æ å°paramsåæ° |
| | | if (params) { |
| | | let urlparams = url + '?'; |
| | | for (const propName of Object.keys(params)) { |
| | | const value = params[propName]; |
| | | var part = encodeURIComponent(propName) + "="; |
| | | if (value !== null && typeof(value) !== "undefined") { |
| | | if (typeof value === 'object') { |
| | | for (const key of Object.keys(value)) { |
| | | if (value[key] !== null && typeof (value[key]) !== 'undefined') { |
| | | let params = propName + '[' + key + ']'; |
| | | let subPart = encodeURIComponent(params) + '='; |
| | | urlparams += subPart + encodeURIComponent(value[key]) + '&'; |
| | | } |
| | | } |
| | | } else { |
| | | urlparams += part + encodeURIComponent(value) + "&"; |
| | | } |
| | | } |
| | | } |
| | | urlparams = urlparams.slice(0, -1); |
| | | url = urlparams; |
| | | } |
| | | url = baseURL + url |
| | | axios({ |
| | | method: 'get', |
| | | url: url, |
| | | responseType: 'blob', |
| | | headers: { 'Authorization': 'Bearer ' + getToken() } |
| | | }).then(res => { |
| | | const blob = new Blob([res.data]) |
| | | const blob = new Blob([res.data], { type: 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet' }) |
| | | this.saveAs(blob, decodeURI(res.headers['download-filename'])) |
| | | }) |
| | | }, |
| | | resource(resource) { |
| | | var url = baseURL + "/common/download/resource?resource=" + encodeURI(resource); |
| | | oss(ossId, name) { |
| | | var url = baseURL + '/system/oss/download/' + ossId |
| | | axios({ |
| | | method: 'get', |
| | | url: url, |
| | | responseType: 'blob', |
| | | headers: { 'Authorization': 'Bearer ' + getToken() } |
| | | }).then(res => { |
| | | const blob = new Blob([res.data]) |
| | | this.saveAs(blob, decodeURI(res.headers['download-filename'])) |
| | | const blob = new Blob([res.data], { type: 'application/octet-stream' }) |
| | | this.saveAs(blob, name) |
| | | }) |
| | | }, |
| | | zip(url, name) { |
| | |
| | | }, |
| | | /** å¯¼åºæé®æä½ */ |
| | | handleExport() { |
| | | this.downLoadExcel('/demo/demo/export', this.queryParams); |
| | | this.$download.excel('/demo/demo/export', this.queryParams); |
| | | } |
| | | } |
| | | }; |
| | |
| | | }, |
| | | /** å¯¼åºæé®æä½ */ |
| | | handleExport() { |
| | | this.downLoadExcel('/monitor/job/export', this.queryParams); |
| | | this.$download.excel('/monitor/job/export', this.queryParams); |
| | | } |
| | | } |
| | | }; |
| | |
| | | }, |
| | | /** å¯¼åºæé®æä½ */ |
| | | handleExport() { |
| | | this.downLoadExcel('/monitor/jobLog/export', this.queryParams); |
| | | this.$download.excel('/monitor/jobLog/export', this.queryParams); |
| | | } |
| | | } |
| | | }; |
| | |
| | | }, |
| | | /** å¯¼åºæé®æä½ */ |
| | | handleExport() { |
| | | this.downLoadExcel('/monitor/logininfor/export', this.queryParams); |
| | | this.$download.excel('/monitor/logininfor/export', this.queryParams); |
| | | } |
| | | } |
| | | }; |
| | |
| | | }, |
| | | /** å¯¼åºæé®æä½ */ |
| | | handleExport() { |
| | | this.downLoadExcel('/monitor/operlog/export', this.queryParams); |
| | | this.$download.excel('/monitor/operlog/export', this.queryParams); |
| | | } |
| | | } |
| | | }; |
| | |
| | | }, |
| | | /** å¯¼åºæé®æä½ */ |
| | | handleExport() { |
| | | this.downLoadExcel('/system/config/export', this.queryParams); |
| | | this.$download.excel('/system/config/export', this.queryParams); |
| | | }, |
| | | /** å·æ°ç¼åæé®æä½ */ |
| | | handleRefreshCache() { |
| | |
| | | }, |
| | | /** å¯¼åºæé®æä½ */ |
| | | handleExport() { |
| | | this.downLoadExcel('/system/dict/data/export', this.queryParams); |
| | | this.$download.excel('/system/dict/data/export', this.queryParams); |
| | | } |
| | | } |
| | | }; |
| | |
| | | }, |
| | | /** å¯¼åºæé®æä½ */ |
| | | handleExport() { |
| | | this.downLoadExcel('/system/dict/type/export', this.queryParams); |
| | | this.$download.excel('/system/dict/type/export', this.queryParams); |
| | | }, |
| | | /** å·æ°ç¼åæé®æä½ */ |
| | | handleRefreshCache() { |
| | |
| | | |
| | | <script> |
| | | import { listOss, delOss, changePreviewListResource } from "@/api/system/oss"; |
| | | import { downLoadOss } from "@/utils/download"; |
| | | |
| | | export default { |
| | | name: "Oss", |
| | |
| | | }, |
| | | /** ä¸è½½æé®æä½ */ |
| | | handleDownload(row) { |
| | | downLoadOss(row.ossId) |
| | | this.$download.oss(row.ossId) |
| | | }, |
| | | /** å é¤æé®æä½ */ |
| | | handleDelete(row) { |
| | |
| | | }, |
| | | /** å¯¼åºæé®æä½ */ |
| | | handleExport() { |
| | | this.downLoadExcel('/system/post/export', this.queryParams); |
| | | this.$download.excel('/system/post/export', this.queryParams); |
| | | } |
| | | } |
| | | }; |
| | |
| | | }, |
| | | /** å¯¼åºæé®æä½ */ |
| | | handleExport() { |
| | | this.downLoadExcel('/system/role/export', this.queryParams); |
| | | this.$download.excel('/system/role/export', this.queryParams); |
| | | } |
| | | } |
| | | }; |
| | |
| | | }, |
| | | /** å¯¼åºæé®æä½ */ |
| | | handleExport() { |
| | | this.downLoadExcel('/system/user/export', this.queryParams); |
| | | this.$download.excel('/system/user/export', this.queryParams); |
| | | }, |
| | | /** 导å
¥æé®æä½ */ |
| | | handleImport() { |
| | |
| | | }, |
| | | /** ä¸è½½æ¨¡æ¿æä½ */ |
| | | importTemplate() { |
| | | this.downLoadExcel('/system/user/importTemplate'); |
| | | this.$download.excel('/system/user/importTemplate'); |
| | | }, |
| | | // æä»¶ä¸ä¼ ä¸å¤ç |
| | | handleFileUploadProgress(event, file, fileList) { |
| | |
| | | <script> |
| | | import { listTable, previewTable, delTable, genCode, synchDb } from "@/api/tool/gen"; |
| | | import importTable from "./importTable"; |
| | | import { downLoadZip } from "@/utils/download"; |
| | | import hljs from "highlight.js/lib/highlight"; |
| | | import "highlight.js/styles/github-gist.css"; |
| | | hljs.registerLanguage("java", require("highlight.js/lib/languages/java")); |