Merge remote-tracking branch 'origin/dev' into satoken
# Conflicts:
# ruoyi-framework/src/main/java/com/ruoyi/framework/config/SecurityConfig.java
| | |
| | | <br> |
| | | [](https://gitee.com/JavaLionLi/RuoYi-Vue-Plus) |
| | | []() |
| | | []() |
| | | []() |
| | | []() |
| | | []() |
| | | |
| | | RuoYi-Vue-Plus æ¯åºäº RuoYi-Vue é对 `åå¸å¼é群` åºæ¯å级(ä¸å
¼å®¹åæ¡æ¶) |
| | | |
| | |
| | | # çº¿ç¨æ± ç»´æ¤çº¿ç¨æå
许çç©ºé²æ¶é´ |
| | | keepAliveSeconds: 300 |
| | | # çº¿ç¨æ± 对æç»ä»»å¡(æ 线ç¨å¯ç¨)çå¤ççç¥ |
| | | # CALLER_RUNS_POLICY çå¾
|
| | | # CALLER_RUNS_POLICY è°ç¨æ¹æ§è¡ |
| | | # DISCARD_OLDEST_POLICY æ¾å¼ææ§ç |
| | | # DISCARD_POLICY ä¸¢å¼ |
| | | # ABORT_POLICY 䏿¢ |
| | |
| | | @AllArgsConstructor |
| | | public enum ThreadPoolRejectedPolicy { |
| | | |
| | | CALLER_RUNS_POLICY("çå¾
", ThreadPoolExecutor.CallerRunsPolicy.class), |
| | | CALLER_RUNS_POLICY("è°ç¨æ¹æ§è¡", ThreadPoolExecutor.CallerRunsPolicy.class), |
| | | DISCARD_OLDEST_POLICY("æ¾å¼ææ§ç", ThreadPoolExecutor.DiscardOldestPolicy.class), |
| | | DISCARD_POLICY("丢å¼", ThreadPoolExecutor.DiscardPolicy.class), |
| | | ABORT_POLICY("䏿¢", ThreadPoolExecutor.AbortPolicy.class); |
| | |
| | | .append(percentEncodedFileName); |
| | | |
| | | response.setHeader("Content-disposition", contentDispositionValue.toString()); |
| | | response.setHeader("download-filename", percentEncodedFileName); |
| | | } |
| | | |
| | | /** |
| | |
| | | #end |
| | | /** å¯¼åºæé®æä½ */ |
| | | handleExport() { |
| | | this.downLoadExcel('/${moduleName}/${businessName}/export', this.queryParams); |
| | | this.#[[$download]]#.excel('/${moduleName}/${businessName}/export', this.queryParams); |
| | | } |
| | | } |
| | | }; |
| | |
| | | "core-js": "3.8.1", |
| | | "echarts": "4.9.0", |
| | | "element-ui": "2.15.5", |
| | | "file-saver": "2.0.4", |
| | | "file-saver": "2.0.5", |
| | | "fuse.js": "6.4.3", |
| | | "highlight.js": "9.18.5", |
| | | "js-beautify": "1.13.0", |
| | |
| | | "eslint-plugin-vue": "7.2.0", |
| | | "lint-staged": "10.5.3", |
| | | "runjs": "4.4.2", |
| | | "sass": "1.32.0", |
| | | "sass": "1.42.1", |
| | | "sass-loader": "10.1.0", |
| | | "script-ext-html-webpack-plugin": "2.1.5", |
| | | "svg-sprite-loader": "5.1.1", |
| | |
| | | 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 |
| | | |
| | | // å
¨å±ç»ä»¶æè½½ |
¶Ô±ÈÐÂÎļþ |
| | |
| | | import { saveAs } from 'file-saver' |
| | | import axios from 'axios' |
| | | import { getToken } from '@/utils/auth' |
| | | |
| | | const baseURL = process.env.VUE_APP_BASE_API |
| | | |
| | | export default { |
| | | 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], { type: 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet' }) |
| | | this.saveAs(blob, decodeURI(res.headers['download-filename'])) |
| | | }) |
| | | }, |
| | | 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], { type: 'application/octet-stream' }) |
| | | this.saveAs(blob, name) |
| | | }) |
| | | }, |
| | | zip(url, name) { |
| | | var url = baseURL + url |
| | | axios({ |
| | | method: 'get', |
| | | url: url, |
| | | responseType: 'blob', |
| | | headers: { 'Authorization': 'Bearer ' + getToken() } |
| | | }).then(res => { |
| | | const blob = new Blob([res.data], { type: 'application/zip' }) |
| | | this.saveAs(blob, name) |
| | | }) |
| | | }, |
| | | saveAs(text, name, opts) { |
| | | saveAs(text, name, opts); |
| | | } |
| | | } |
| | | |
| | |
| | | import cache from './cache'
|
| | | import modal from './modal'
|
| | | import download from './download'
|
| | |
|
| | | export default {
|
| | | install(Vue) {
|
| | |
| | | Vue.prototype.$cache = cache
|
| | | // æ¨¡ææ¡å¯¹è±¡
|
| | | Vue.prototype.$modal = modal
|
| | | // ä¸è½½æä»¶
|
| | | Vue.prototype.$download = download
|
| | | }
|
| | | }
|
| | |
| | | * Copyright (c) 2019 ruoyi |
| | | */ |
| | | |
| | | const baseURL = process.env.VUE_APP_BASE_API |
| | | |
| | | // æ¥ææ ¼å¼å |
| | | export function parseTime(time, pattern) { |
| | | if (arguments.length === 0 || !time) { |
| | |
| | | }, |
| | | /** å¯¼åºæé®æä½ */ |
| | | 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 draggable from 'vuedraggable' |
| | | import { saveAs } from 'file-saver' |
| | | import beautifier from 'js-beautify' |
| | | import ClipboardJS from 'clipboard' |
| | | import render from '@/utils/generator/render' |
| | | import RightPanel from './RightPanel' |
| | | import { |
| | | inputComponents, |
| | | selectComponents, |
| | | layoutComponents, |
| | | formConf |
| | | } from '@/utils/generator/config' |
| | | import { |
| | | exportDefault, beautifierConf, isNumberStr, titleCase |
| | | } from '@/utils/index' |
| | | import { |
| | | makeUpHtml, vueTemplate, vueScript, cssStyle |
| | | } from '@/utils/generator/html' |
| | | import { inputComponents, selectComponents, layoutComponents, formConf } from '@/utils/generator/config' |
| | | import { beautifierConf, titleCase } from '@/utils/index' |
| | | import { makeUpHtml, vueTemplate, vueScript, cssStyle } from '@/utils/generator/html' |
| | | import { makeUpJs } from '@/utils/generator/js' |
| | | import { makeUpCss } from '@/utils/generator/css' |
| | | import drawingDefalut from '@/utils/generator/drawingDefalut' |
| | |
| | | import CodeTypeDialog from './CodeTypeDialog' |
| | | import DraggableItem from './DraggableItem' |
| | | |
| | | const emptyActiveData = { style: {}, autosize: {} } |
| | | let oldActiveId |
| | | let tempActiveData |
| | | |
| | |
| | | execDownload(data) { |
| | | const codeStr = this.generateCode() |
| | | const blob = new Blob([codeStr], { type: 'text/plain;charset=utf-8' }) |
| | | saveAs(blob, data.fileName) |
| | | this.$download.saveAs(blob, data.fileName) |
| | | }, |
| | | execCopy(data) { |
| | | document.getElementById('copyNode').click() |
| | |
| | | <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")); |
| | |
| | | this.$modal.msgSuccess("æåçæå°èªå®ä¹è·¯å¾ï¼" + row.genPath); |
| | | }); |
| | | } else { |
| | | downLoadZip("/tool/gen/batchGenCode?tables=" + tableNames, "ruoyi"); |
| | | this.$download.zip("/tool/gen/batchGenCode?tables=" + tableNames, "ruoyi"); |
| | | } |
| | | }, |
| | | /** åæ¥æ°æ®åºæä½ */ |