发布 v3.0.0

This commit is contained in:
疯狂的狮子li
2021-08-18 11:45:51 +08:00
parent 3294390407
commit c206f938ba
225 changed files with 6115 additions and 4259 deletions

View File

@ -52,11 +52,3 @@ export function delDemo(id) {
})
}
// 导出测试单表
export function exportDemo(query) {
return request({
url: '/demo/demo/export',
method: 'get',
params: query
})
}

View File

@ -42,12 +42,3 @@ export function delTree(id) {
method: 'delete'
})
}
// 导出测试树表
export function exportTree(query) {
return request({
url: '/demo/tree/export',
method: 'get',
params: query
})
}

View File

@ -15,6 +15,18 @@ export function login(username, password, code, uuid) {
})
}
// 注册方法
export function register(data) {
return request({
url: '/register',
headers: {
isToken: false
},
method: 'post',
data: data
})
}
// 获取用户详细信息
export function getInfo() {
return request({
@ -37,4 +49,4 @@ export function getCodeImg() {
url: '/captchaImage',
method: 'get'
})
}
}

View File

@ -24,12 +24,3 @@ export function cleanJobLog() {
method: 'delete'
})
}
// 导出调度日志
export function exportJobLog(query) {
return request({
url: '/monitor/jobLog/export',
method: 'get',
params: query
})
}

View File

@ -24,12 +24,3 @@ export function cleanLogininfor() {
method: 'delete'
})
}
// 导出登录日志
export function exportLogininfor(query) {
return request({
url: '/monitor/logininfor/export',
method: 'get',
params: query
})
}

View File

@ -24,12 +24,3 @@ export function cleanOperlog() {
method: 'delete'
})
}
// 导出操作日志
export function exportOperlog(query) {
return request({
url: '/monitor/operlog/export',
method: 'get',
params: query
})
}

View File

@ -59,11 +59,3 @@ export function refreshCache() {
})
}
// 导出参数
export function exportConfig(query) {
return request({
url: '/system/config/export',
method: 'get',
params: query
})
}

View File

@ -50,12 +50,3 @@ export function delData(dictCode) {
method: 'delete'
})
}
// 导出字典数据
export function exportData(query) {
return request({
url: '/system/dict/data/export',
method: 'get',
params: query
})
}

View File

@ -51,15 +51,6 @@ export function refreshCache() {
})
}
// 导出字典类型
export function exportType(query) {
return request({
url: '/system/dict/type/export',
method: 'get',
params: query
})
}
// 获取字典选择框列表
export function optionselect() {
return request({

View File

@ -16,3 +16,14 @@ export function delOss(ossId) {
method: 'delete'
})
}
export function changePreviewListResource(previewListResource) {
const data = {
previewListResource
}
return request({
url: '/system/oss/changePreviewListResource',
method: 'put',
data: data
})
}

View File

@ -0,0 +1,58 @@
import request from '@/utils/request'
// 查询云存储配置列表
export function listOssConfig(query) {
return request({
url: '/system/oss/config/list',
method: 'get',
params: query
})
}
// 查询云存储配置详细
export function getOssConfig(ossConfigId) {
return request({
url: '/system/oss/config/' + ossConfigId,
method: 'get'
})
}
// 新增云存储配置
export function addOssConfig(data) {
return request({
url: '/system/oss/config',
method: 'post',
data: data
})
}
// 修改云存储配置
export function updateOssConfig(data) {
return request({
url: '/system/oss/config',
method: 'put',
data: data
})
}
// 删除云存储配置
export function delOssConfig(ossConfigId) {
return request({
url: '/system/oss/config/' + ossConfigId,
method: 'delete'
})
}
// 用户状态修改
export function changeOssConfigStatus(ossConfigId, status, configKey) {
const data = {
ossConfigId,
status,
configKey
}
return request({
url: '/system/oss/config/changeStatus',
method: 'put',
data: data
})
}

View File

@ -65,16 +65,6 @@ export function delRole(roleId) {
})
}
// 导出角色
export function exportRole(query) {
return request({
url: '/system/role/export',
method: 'get',
params: query
})
}
// 查询角色已授权用户列表
export function allocatedUserList(query) {
return request({

View File

@ -44,15 +44,6 @@ export function delUser(userId) {
})
}
// 导出用户
export function exportUser(query) {
return request({
url: '/system/user/export',
method: 'get',
params: query
})
}
// 用户密码重置
export function resetUserPwd(userId, password) {
const data = {
@ -118,14 +109,6 @@ export function uploadAvatar(data) {
})
}
// 下载用户导入模板
export function importTemplate() {
return request({
url: '/system/user/importTemplate',
method: 'get'
})
}
// 查询授权角色
export function getAuthRole(userId) {
return request({

View File

@ -45,7 +45,7 @@ export default {
if (!name) {
return false
}
return name.trim() === '首页'
return name.trim() === 'Index'
},
handleLink(item) {
const { redirect, path } = item

View File

@ -16,7 +16,7 @@ import './assets/icons' // icon
import './permission' // permission control
import { getDicts } from "@/api/system/dict/data";
import { getConfigKey } from "@/api/system/config";
import { parseTime, resetForm, addDateRange, selectDictLabel, selectDictLabels, download, handleTree } from "@/utils/ruoyi";
import { parseTime, resetForm, addDateRange, selectDictLabel, selectDictLabels, handleTree } from "@/utils/ruoyi";
import Pagination from "@/components/Pagination";
// 自定义表格工具组件
import RightToolbar from "@/components/RightToolbar"
@ -39,7 +39,6 @@ Vue.prototype.resetForm = resetForm
Vue.prototype.addDateRange = addDateRange
Vue.prototype.selectDictLabel = selectDictLabel
Vue.prototype.selectDictLabels = selectDictLabels
Vue.prototype.download = download
Vue.prototype.handleTree = handleTree
Vue.prototype.msgSuccess = function (msg) {

View File

@ -43,6 +43,11 @@ export const constantRoutes = [
component: (resolve) => require(['@/views/login'], resolve),
hidden: true
},
{
path: '/register',
component: (resolve) => require(['@/views/register'], resolve),
hidden: true
},
{
path: '/404',
component: (resolve) => require(['@/views/error/404'], resolve),
@ -61,8 +66,8 @@ export const constantRoutes = [
{
path: 'index',
component: (resolve) => require(['@/views/index'], resolve),
name: '首页',
meta: { title: '首页', icon: 'dashboard', noCache: true, affix: true }
name: 'Index',
meta: { title: '首页', icon: 'dashboard', affix: true }
}
]
},
@ -119,6 +124,19 @@ export const constantRoutes = [
}
]
},
{
path: '/system/oss-config',
component: Layout,
hidden: true,
children: [
{
path: 'index',
component: (resolve) => require(['@/views/system/oss/config'], resolve),
name: 'OssConfig',
meta: { title: '配置管理', activeMenu: '/system/oss'}
}
]
},
{
path: '/monitor/job-log',
component: Layout,

View File

@ -51,7 +51,7 @@ const user = {
return new Promise((resolve, reject) => {
getInfo().then(res => {
const user = res.data.user
const avatar = user.avatar == "" ? require("@/assets/images/profile.jpg") : process.env.VUE_APP_BASE_API + user.avatar;
const avatar = user.avatar == "" ? require("@/assets/images/profile.jpg") : user.avatar;
if (res.data.roles && res.data.roles.length > 0) { // 验证返回的roles是否是一个非空数组
commit('SET_ROLES', res.data.roles)
commit('SET_PERMISSIONS', res.data.permissions)

View File

@ -0,0 +1,91 @@
import axios from 'axios'
import { getToken } from '@/utils/auth'
const mimeMap = {
xlsx: 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet',
zip: 'application/zip',
oss: 'application/octet-stream'
}
const baseUrl = process.env.VUE_APP_BASE_API
export function downLoadZip(str, filename) {
var url = baseUrl + str
axios({
method: 'get',
url: url,
responseType: 'blob',
headers: { 'Authorization': 'Bearer ' + getToken() }
}).then(res => {
resolveBlob(res, mimeMap.zip)
})
}
export function downLoadOss(ossId) {
var url = baseUrl + '/system/oss/download/' + ossId
axios({
method: 'get',
url: url,
responseType: 'blob',
headers: { 'Authorization': 'Bearer ' + getToken() }
}).then(res => {
resolveBlob(res, mimeMap.oss)
})
}
export function downLoadExcel(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 => {
resolveBlob(res, mimeMap.xlsx)
})
}
/**
* 解析blob响应内容并下载
* @param {*} res blob响应内容
* @param {String} mimeType MIME类型
*/
export function resolveBlob(res, mimeType) {
const aLink = document.createElement('a')
var blob = new Blob([res.data], { type: mimeType })
// //从response的headers中获取filename, 后端response.setHeader("Content-disposition", "attachment; filename=xxxx.docx") 设置的文件名;
var patt = new RegExp('filename=([^;]+\\.[^\\.;]+);*')
var contentDisposition = decodeURI(res.headers['content-disposition'])
var result = patt.exec(contentDisposition)
var fileName = result[1]
fileName = fileName.replace(/\"/g, '')
aLink.style.display = 'none'
aLink.href = URL.createObjectURL(blob)
aLink.setAttribute('download', decodeURI(fileName)) // 设置下载文件名称
document.body.appendChild(aLink)
aLink.click()
URL.revokeObjectURL(aLink.href);//清除引用
document.body.removeChild(aLink);
}

View File

@ -28,9 +28,11 @@ service.interceptors.request.use(config => {
if (value !== null && typeof(value) !== "undefined") {
if (typeof value === 'object') {
for (const key of Object.keys(value)) {
let params = propName + '[' + key + ']';
var subPart = encodeURIComponent(params) + "=";
url += subPart + encodeURIComponent(value[key]) + "&";
if (value[key] !== null && typeof (value[key]) !== 'undefined') {
let params = propName + '[' + key + ']';
let subPart = encodeURIComponent(params) + '=';
url += subPart + encodeURIComponent(value[key]) + '&';
}
}
} else {
url += part + encodeURIComponent(value) + "&";
@ -64,7 +66,7 @@ service.interceptors.response.use(res => {
location.href = '/index';
})
}).catch(() => {});
return Promise.reject('error')
return Promise.reject('令牌验证失败')
} else if (code === 500) {
Message({
message: msg,

View File

@ -55,16 +55,15 @@ export function resetForm(refName) {
// 添加日期范围
export function addDateRange(params, dateRange, propName) {
var search = params;
search.params = {};
if (null != dateRange && '' != dateRange) {
if (typeof (propName) === "undefined") {
search.params["beginTime"] = dateRange[0];
search.params["endTime"] = dateRange[1];
} else {
search.params["begin" + propName] = dateRange[0];
search.params["end" + propName] = dateRange[1];
}
let search = params;
search.params = typeof (search.params) === 'object' && search.params !== null && !Array.isArray(search.params) ? search.params : {};
dateRange = Array.isArray(dateRange) ? dateRange : [];
if (typeof (propName) === 'undefined') {
search.params['beginTime'] = dateRange[0];
search.params['endTime'] = dateRange[1];
} else {
search.params['begin' + propName] = dateRange[0];
search.params['end' + propName] = dateRange[1];
}
return search;
}
@ -96,11 +95,6 @@ export function selectDictLabels(datas, value, separator) {
return actions.join('').substring(0, actions.join('').length - 1);
}
// 通用下载方法
export function download(fileName) {
window.location.href = baseURL + "/common/download?fileName=" + encodeURI(fileName) + "&delete=" + true;
}
// 字符串格式化(%s )
export function sprintf(str) {
var args = arguments, flag = true, i = 1;

View File

@ -169,7 +169,8 @@
</template>
<script>
import { listDemo, pageDemo, getDemo, delDemo, addDemo, updateDemo, exportDemo } from "@/api/demo/demo";
import { listDemo, pageDemo, getDemo, delDemo, addDemo, updateDemo } from "@/api/demo/demo";
import { downLoadExcel } from "@/utils/download";
export default {
name: "Demo",
@ -360,18 +361,7 @@ export default {
},
/** 导出按钮操作 */
handleExport() {
const queryParams = this.queryParams;
this.$confirm('是否确认导出所有测试单表数据项?', "警告", {
confirmButtonText: "确定",
cancelButtonText: "取消",
type: "warning"
}).then(() => {
this.exportLoading = true;
return exportDemo(queryParams);
}).then(response => {
this.download(response.msg);
this.exportLoading = false;
})
downLoadExcel('/demo/demo/export', this.queryParams);
}
}
};

View File

@ -110,7 +110,7 @@
</template>
<script>
import { listTree, getTree, delTree, addTree, updateTree, exportTree } from "@/api/demo/tree";
import { listTree, getTree, delTree, addTree, updateTree } from "@/api/demo/tree";
import Treeselect from "@riophae/vue-treeselect";
import "@riophae/vue-treeselect/dist/vue-treeselect.css";

View File

@ -93,6 +93,54 @@
<span>更新日志</span>
</div>
<el-collapse accordion>
<el-collapse-item title="v3.0.0 - 2021-8-18">
<ol>
<li>add [重大更新]重写 OSS 模块相关实现 支持动态配置(页面配置)<li>
<li>add [重大更新]增加 jackson 超出 JS 最大数值自动转字符串(雪花id序列化)处理<li>
<li>add [重大更新]重写 防重提交拦截器 支持全局与注解自定义 拦截时间配置配置 优化逻辑<li>
<li>add [重大更新]新增是否开启用户注册功能<li>
<li>add [重大更新]增加 easyexcel 工具类<li>
<li>add [重大更新]集成 性能分析插件 p6spy 更强劲的 SQL 分析<li>
<li>add [重大更新]增加 完整国际化解决方案<li>
<li>add [重大更新]支持自定义注解实现接口限流<li>
<li>update feign-okhttp 11.0 => 11.2<li>
<li>update okhttp 3.19.4 => 4.9.1<li>
<li>update minio 8.2.0 => 8.3.0<li>
<li>update hutool 5.7.6 => 5.7.7<li>
<li>update element-ui 2.15.2 => 2.15.5<li>
<li>update springboot admin 2.4.3 => 2.5.0 (新增 Quartz 专属监控页)<li>
<li>add 增加 admin 监控客户端开关<li>
<li>add 增加 国际化演示demo<li>
<li>update 更新软件架构图<li>
<li>update 优化XSS跨站脚本过滤<li>
<li>update 优化BLOB下载时清除URL对象引用<li>
<li>update 更新 防重提交拦截器 demo演示案例<li>
<li>update 日常字符串校验 统一重构到 StringUtils 便于维护扩展<li>
<li>update 修改 自动注入器 用户未登录异常拦截抛出警告 返回Null<li>
<li>update 重构 统一使用 流工具下载<li>
<li>update 重写 所有业务导出 适配easyexcel工具<li>
<li>update 移动文件存储业务到 system 模块<li>
<li>update 代码生成模板 适配新excel导出<li>
<li>update Actuator 配置 移动到全局配置<li>
<li>update 统一镜像时区配置 移除主机时间映射<li>
<li>update 更改多数据源框架更清晰的依赖名<li>
<li>update 更新 阿里云 maven源 新地址<li>
<li>update 补全基础实体 文档注解<li>
<li>update 代码生成文档注解 增加必填判断配置<li>
<li>update 注入器 insert 增加 update 字段处理<li>
<li>update 默认首页使用keep-alive缓存<li>
<li>fix 生产minio回显问题<li>
<li>fix 修复角色分配用户页面接收参数与传递参数类型不一致导致的错误<li>
<li>fix 修复代码生成 删除按钮报错 loading 不取消问题<li>
<li>fix 解决登录后浏览器后台Breadcrumb组件报错<li>
<li>fix 修复DictUtils方法报错<li>
<li>fix 头像上传 未走OSS存储问题<li>
<li>fix oss列表 jpeg 不回显问题<li>
<li>fix 修复操作日志根据状态查询异常问题<li>
<li>remove 移除原生excel工具<li>
<li>remove 移除通用上传下载接口与配置<li>
</ol>
</el-collapse-item>
<el-collapse-item title="v2.6.0 - 2021-7-28">
<ol>
<li>add [重大新增] 增加 OSS 对象存储模块</li>
@ -336,7 +384,7 @@
import config from '../../package.json'
export default {
name: "index",
name: "Index",
data() {
return {
// 版本号

View File

@ -44,6 +44,9 @@
<span v-if="!loading"> </span>
<span v-else> 中...</span>
</el-button>
<div style="float: right;" v-if="register">
<router-link class="link-type" :to="'/register'">立即注册</router-link>
</div>
</el-form-item>
</el-form>
<!-- 底部 -->
@ -73,15 +76,18 @@ export default {
},
loginRules: {
username: [
{ required: true, trigger: "blur", message: "用户名不能为空" }
{ required: true, trigger: "blur", message: "请输入您的账号" }
],
password: [
{ required: true, trigger: "blur", message: "密码不能为空" }
{ required: true, trigger: "blur", message: "请输入您的密码" }
],
code: [{ required: true, trigger: "change", message: "验证码不能为空" }]
code: [{ required: true, trigger: "change", message: "请输入验证码" }]
},
loading: false,
// 验证码开关
captchaOnOff: true,
// 注册开关
register: false,
redirect: undefined
};
},

View File

@ -280,7 +280,8 @@
</template>
<script>
import { listJob, getJob, delJob, addJob, updateJob, exportJob, runJob, changeJobStatus } from "@/api/monitor/job";
import { listJob, getJob, delJob, addJob, updateJob, runJob, changeJobStatus } from "@/api/monitor/job";
import { downLoadExcel } from "@/utils/download";
export default {
name: "Job",
@ -505,18 +506,7 @@ export default {
},
/** 导出按钮操作 */
handleExport() {
const queryParams = this.queryParams;
this.$confirm("是否确认导出所有定时任务数据项?", "警告", {
confirmButtonText: "确定",
cancelButtonText: "取消",
type: "warning"
}).then(() => {
this.exportLoading = true;
return exportJob(queryParams);
}).then(response => {
this.download(response.msg);
this.exportLoading = false;
}).catch(() => {});
downLoadExcel('/monitor/job/export', this.queryParams);
}
}
};

View File

@ -177,8 +177,9 @@
</template>
<script>
import { getJob} from "@/api/monitor/job";
import { listJobLog, delJobLog, exportJobLog, cleanJobLog } from "@/api/monitor/jobLog";
import { getJob } from "@/api/monitor/job";
import { listJobLog, delJobLog, cleanJobLog } from "@/api/monitor/jobLog";
import { downLoadExcel } from "@/utils/download";
export default {
name: "JobLog",
@ -310,19 +311,8 @@ export default {
},
/** 导出按钮操作 */
handleExport() {
const queryParams = this.queryParams;
this.$confirm("是否确认导出所有调度日志数据项?", "警告", {
confirmButtonText: "确定",
cancelButtonText: "取消",
type: "warning"
}).then(() => {
this.exportLoading = true;
return exportJobLog(queryParams);
}).then(response => {
this.download(response.msg);
this.exportLoading = false;
}).catch(() => {});
downLoadExcel('/monitor/jobLog/export', this.queryParams);
}
}
};
</script>
</script>

View File

@ -119,7 +119,8 @@
</template>
<script>
import { list, delLogininfor, cleanLogininfor, exportLogininfor } from "@/api/monitor/logininfor";
import { list, delLogininfor, cleanLogininfor } from "@/api/monitor/logininfor";
import { downLoadExcel } from "@/utils/download";
export default {
name: "Logininfor",
@ -228,18 +229,7 @@ export default {
},
/** 导出按钮操作 */
handleExport() {
const queryParams = this.queryParams;
this.$confirm('是否确认导出所有操作日志数据项?', "警告", {
confirmButtonText: "确定",
cancelButtonText: "取消",
type: "warning"
}).then(() => {
this.exportLoading = true;
return exportLogininfor(queryParams);
}).then(response => {
this.download(response.msg);
this.exportLoading = false;
}).catch(() => {});
downLoadExcel('/monitor/logininfor/export', this.queryParams);
}
}
};

View File

@ -188,7 +188,8 @@
</template>
<script>
import { list, delOperlog, cleanOperlog, exportOperlog } from "@/api/monitor/operlog";
import { list, delOperlog, cleanOperlog } from "@/api/monitor/operlog";
import { downLoadExcel } from "@/utils/download";
export default {
name: "Operlog",
@ -316,18 +317,7 @@ export default {
},
/** 导出按钮操作 */
handleExport() {
const queryParams = this.queryParams;
this.$confirm('是否确认导出所有操作日志数据项?', "警告", {
confirmButtonText: "确定",
cancelButtonText: "取消",
type: "warning"
}).then(() => {
this.exportLoading = true;
return exportOperlog(queryParams);
}).then(response => {
this.download(response.msg);
this.exportLoading = false;
}).catch(() => {});
downLoadExcel('/monitor/operlog/export', this.queryParams);
}
}
};

View File

@ -0,0 +1,208 @@
<template>
<div class="register">
<el-form ref="registerForm" :model="registerForm" :rules="registerRules" class="register-form">
<h3 class="title">若依后台管理系统</h3>
<el-form-item prop="username">
<el-input v-model="registerForm.username" type="text" auto-complete="off" placeholder="账号">
<svg-icon slot="prefix" icon-class="user" class="el-input__icon input-icon" />
</el-input>
</el-form-item>
<el-form-item prop="password">
<el-input
v-model="registerForm.password"
type="password"
auto-complete="off"
placeholder="密码"
@keyup.enter.native="handleRegister"
>
<svg-icon slot="prefix" icon-class="password" class="el-input__icon input-icon" />
</el-input>
</el-form-item>
<el-form-item prop="confirmPassword">
<el-input
v-model="registerForm.confirmPassword"
type="password"
auto-complete="off"
placeholder="确认密码"
@keyup.enter.native="handleRegister"
>
<svg-icon slot="prefix" icon-class="password" class="el-input__icon input-icon" />
</el-input>
</el-form-item>
<el-form-item prop="code" v-if="captchaOnOff">
<el-input
v-model="registerForm.code"
auto-complete="off"
placeholder="验证码"
style="width: 63%"
@keyup.enter.native="handleRegister"
>
<svg-icon slot="prefix" icon-class="validCode" class="el-input__icon input-icon" />
</el-input>
<div class="register-code">
<img :src="codeUrl" @click="getCode" class="register-code-img"/>
</div>
</el-form-item>
<el-form-item style="width:100%;">
<el-button
:loading="loading"
size="medium"
type="primary"
style="width:100%;"
@click.native.prevent="handleRegister"
>
<span v-if="!loading"> </span>
<span v-else> 中...</span>
</el-button>
<div style="float: right;">
<router-link class="link-type" :to="'/login'">使用已有账户登录</router-link>
</div>
</el-form-item>
</el-form>
<!-- 底部 -->
<div class="el-register-footer">
<span>Copyright © 2018-2021 ruoyi.vip All Rights Reserved.</span>
</div>
</div>
</template>
<script>
import { getCodeImg, register } from "@/api/login";
export default {
name: "Register",
data() {
const equalToPassword = (rule, value, callback) => {
if (this.registerForm.password !== value) {
callback(new Error("两次输入的密码不一致"));
} else {
callback();
}
};
return {
codeUrl: "",
registerForm: {
username: "",
password: "",
confirmPassword: "",
code: "",
uuid: ""
},
registerRules: {
username: [
{ required: true, trigger: "blur", message: "请输入您的账号" },
{ min: 2, max: 20, message: '用户账号长度必须介于 2 和 20 之间', trigger: 'blur' }
],
password: [
{ required: true, trigger: "blur", message: "请输入您的密码" },
{ min: 5, max: 20, message: '用户密码长度必须介于 5 和 20 之间', trigger: 'blur' }
],
confirmPassword: [
{ required: true, trigger: "blur", message: "请再次输入您的密码" },
{ required: true, validator: equalToPassword, trigger: "blur" }
],
code: [{ required: true, trigger: "change", message: "请输入验证码" }]
},
loading: false,
captchaOnOff: true
};
},
created() {
this.getCode();
},
methods: {
getCode() {
getCodeImg().then(res => {
this.captchaOnOff = res.data.captchaOnOff === undefined ? true : res.data.captchaOnOff;
if (this.captchaOnOff) {
this.codeUrl = "data:image/gif;base64," + res.data.img;
this.registerForm.uuid = res.data.uuid;
}
});
},
handleRegister() {
this.$refs.registerForm.validate(valid => {
if (valid) {
this.loading = true;
register(this.registerForm).then(res => {
const username = this.registerForm.username;
this.$alert("<font color='red'>恭喜你,您的账号 " + username + " 注册成功!</font>", '系统提示', {
dangerouslyUseHTMLString: true
}).then(() => {
this.$router.push("/login");
}).catch(() => {});
}).catch(() => {
this.loading = false;
if (this.captchaOnOff) {
this.getCode();
}
})
}
});
}
}
};
</script>
<style rel="stylesheet/scss" lang="scss">
.register {
display: flex;
justify-content: center;
align-items: center;
height: 100%;
background-image: url("../assets/images/login-background.jpg");
background-size: cover;
}
.title {
margin: 0px auto 30px auto;
text-align: center;
color: #707070;
}
.register-form {
border-radius: 6px;
background: #ffffff;
width: 400px;
padding: 25px 25px 5px 25px;
.el-input {
height: 38px;
input {
height: 38px;
}
}
.input-icon {
height: 39px;
width: 14px;
margin-left: 2px;
}
}
.register-tip {
font-size: 13px;
text-align: center;
color: #bfbfbf;
}
.register-code {
width: 33%;
height: 38px;
float: right;
img {
cursor: pointer;
vertical-align: middle;
}
}
.el-register-footer {
height: 40px;
line-height: 40px;
position: fixed;
bottom: 0;
width: 100%;
text-align: center;
color: #fff;
font-family: Arial;
font-size: 12px;
letter-spacing: 1px;
}
.register-code-img {
height: 38px;
}
</style>

View File

@ -181,7 +181,8 @@
</template>
<script>
import { listConfig, getConfig, delConfig, addConfig, updateConfig, exportConfig, refreshCache } from "@/api/system/config";
import { listConfig, getConfig, delConfig, addConfig, updateConfig, refreshCache } from "@/api/system/config";
import { downLoadExcel } from "@/utils/download";
export default {
name: "Config",
@ -342,18 +343,7 @@ export default {
},
/** 导出按钮操作 */
handleExport() {
const queryParams = this.queryParams;
this.$confirm('是否确认导出所有参数数据项?', "警告", {
confirmButtonText: "确定",
cancelButtonText: "取消",
type: "warning"
}).then(() => {
this.exportLoading = true;
return exportConfig(queryParams);
}).then(response => {
this.download(response.msg);
this.exportLoading = false;
}).catch(() => {});
downLoadExcel('/system/config/export', this.queryParams);
},
/** 刷新缓存按钮操作 */
handleRefreshCache() {

View File

@ -183,8 +183,9 @@
</template>
<script>
import { listData, getData, delData, addData, updateData, exportData } from "@/api/system/dict/data";
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",
@ -388,18 +389,7 @@ export default {
},
/** 导出按钮操作 */
handleExport() {
const queryParams = this.queryParams;
this.$confirm('是否确认导出所有数据项?', "警告", {
confirmButtonText: "确定",
cancelButtonText: "取消",
type: "warning"
}).then(() => {
this.exportLoading = true;
return exportData(queryParams);
}).then(response => {
this.download(response.msg);
this.exportLoading = false;
}).catch(() => {});
downLoadExcel('/system/dict/data/export', this.queryParams);
}
}
};

View File

@ -193,7 +193,8 @@
</template>
<script>
import { listType, getType, delType, addType, updateType, exportType, refreshCache } from "@/api/system/dict/type";
import { listType, getType, delType, addType, updateType, refreshCache } from "@/api/system/dict/type";
import { downLoadExcel } from "@/utils/download";
export default {
name: "Dict",
@ -346,18 +347,7 @@ export default {
},
/** 导出按钮操作 */
handleExport() {
const queryParams = this.queryParams;
this.$confirm('是否确认导出所有类型数据项?', "警告", {
confirmButtonText: "确定",
cancelButtonText: "取消",
type: "warning"
}).then(() => {
this.exportLoading = true;
return exportType(queryParams);
}).then(response => {
this.download(response.msg);
this.exportLoading = false;
}).catch(() => {});
downLoadExcel('/system/dict/type/export', this.queryParams);
},
/** 刷新缓存按钮操作 */
handleRefreshCache() {

View File

@ -88,7 +88,7 @@
</el-table>
<!-- 添加或修改菜单对话框 -->
<el-dialog :title="title" :visible.sync="open" width="600px" append-to-body>
<el-dialog :title="title" :visible.sync="open" width="680px" append-to-body>
<el-form ref="form" :model="form" :rules="rules" label-width="100px">
<el-row>
<el-col :span="24">

View File

@ -0,0 +1,414 @@
<template>
<div class="app-container">
<el-form :model="queryParams" ref="queryForm" :inline="true" v-show="showSearch" label-width="68px">
<el-form-item label="配置key" prop="configKey">
<el-select v-model="queryParams.configKey" placeholder="请选择配置key" clearable size="small">
<el-option
v-for="configKey in configKeyOptions"
:key="configKey.configKey"
:label="configKey.label"
:value="configKey.configKey"
/>
</el-select>
</el-form-item>
<el-form-item label="桶名称" prop="bucketName">
<el-input
v-model="queryParams.bucketName"
placeholder="请输入桶名称"
clearable
size="small"
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<el-form-item label="状态" prop="status">
<el-select v-model="queryParams.status" placeholder="请选择状态" clearable size="small">
<el-option
v-for="dict in statusOptions"
:key="dict.dictValue"
:label="dict.dictLabel"
:value="dict.dictValue"
/>
</el-select>
</el-form-item>
<el-form-item>
<el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button>
<el-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button>
</el-form-item>
</el-form>
<el-row :gutter="10" class="mb8">
<el-col :span="1.5">
<el-button
type="primary"
plain
icon="el-icon-plus"
size="mini"
@click="handleAdd"
v-hasPermi="['system:oss:add']"
>新增</el-button>
</el-col>
<el-col :span="1.5">
<el-button
type="success"
plain
icon="el-icon-edit"
size="mini"
:disabled="single"
@click="handleUpdate"
v-hasPermi="['system:oss:edit']"
>修改</el-button>
</el-col>
<el-col :span="1.5">
<el-button
type="danger"
plain
icon="el-icon-delete"
size="mini"
:disabled="multiple"
@click="handleDelete"
v-hasPermi="['system:oss:remove']"
>删除</el-button>
</el-col>
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
</el-row>
<el-table v-loading="loading" :data="ossConfigList" @selection-change="handleSelectionChange">
<el-table-column type="selection" width="55" align="center" />
<el-table-column label="主建" align="center" prop="ossConfigId" v-if="false"/>
<el-table-column label="配置key" align="center" prop="configKey" />
<el-table-column label="访问站点" align="center" prop="endpoint" width="200" />
<el-table-column label="桶名称" align="center" prop="bucketName" />
<el-table-column label="前缀" align="center" prop="prefix" />
<el-table-column label="域" align="center" prop="region" />
<el-table-column label="状态" align="center" prop="status">
<template slot-scope="scope">
<el-switch
v-model="scope.row.status"
active-value="0"
inactive-value="1"
@change="handleStatusChange(scope.row)"
></el-switch>
</template>
</el-table-column>
<el-table-column label="操作" align="center" class-name="small-padding fixed-width">
<template slot-scope="scope">
<el-button
size="mini"
type="text"
icon="el-icon-edit"
@click="handleUpdate(scope.row)"
v-hasPermi="['system:oss:edit']"
>修改</el-button>
<el-button
size="mini"
type="text"
icon="el-icon-delete"
@click="handleDelete(scope.row)"
v-hasPermi="['system:oss:remove']"
>删除</el-button>
</template>
</el-table-column>
</el-table>
<pagination
v-show="total > 0"
:total="total"
:page.sync="queryParams.pageNum"
:limit.sync="queryParams.pageSize"
@pagination="getList"
/>
<!-- 添加或修改云存储配置对话框 -->
<el-dialog :title="title" :visible.sync="open" width="800px" append-to-body>
<el-form ref="form" :model="form" :rules="rules" label-width="120px">
<el-form-item label="配置key" prop="configKey">
<el-select v-model="form.configKey" placeholder="请选择配置key">
<el-option
v-for="configKey in configKeyOptions"
:key="configKey.configKey"
:label="configKey.label"
:value="configKey.configKey"
/>
</el-select>
</el-form-item>
<el-form-item label="访问站点" prop="endpoint">
<el-input v-model="form.endpoint" placeholder="请输入访问站点" />
</el-form-item>
<el-form-item label="accessKey" prop="accessKey">
<el-input v-model="form.accessKey" placeholder="请输入accessKey" />
</el-form-item>
<el-form-item label="secretKey" prop="secretKey">
<el-input v-model="form.secretKey" placeholder="请输入秘钥" />
</el-form-item>
<el-form-item label="桶名称" prop="bucketName">
<el-input v-model="form.bucketName" placeholder="请输入桶名称" />
</el-form-item>
<el-form-item label="前缀" prop="prefix">
<el-input v-model="form.prefix" placeholder="请输入前缀" />
</el-form-item>
<el-form-item label="是否HTTPS">
<el-radio-group v-model="form.isHttps">
<el-radio
v-for="dict in isHttpsOptions"
:key="dict.dictValue"
:label="dict.dictValue"
>{{dict.dictLabel}}</el-radio>
</el-radio-group>
</el-form-item>
<el-form-item label="域" prop="region">
<el-input v-model="form.region" placeholder="请输入域" />
</el-form-item>
<el-form-item label="备注" prop="remark">
<el-input v-model="form.remark" type="textarea" placeholder="请输入内容" />
</el-form-item>
</el-form>
<div slot="footer" class="dialog-footer">
<el-button :loading="buttonLoading" type="primary" @click="submitForm"> </el-button>
<el-button @click="cancel"> </el-button>
</div>
</el-dialog>
</div>
</template>
<script>
import {
listOssConfig,
getOssConfig,
delOssConfig,
addOssConfig,
updateOssConfig,
changeOssConfigStatus
} from "@/api/system/ossConfig";
export default {
name: "OssConfig",
data() {
return {
// 按钮loading
buttonLoading: false,
// 遮罩层
loading: true,
// 导出遮罩层
exportLoading: false,
// 选中数组
ids: [],
// 非单个禁用
single: true,
// 非多个禁用
multiple: true,
// 显示搜索条件
showSearch: true,
// 总条数
total: 0,
// 云存储配置表格数据
ossConfigList: [],
// configKeyOptions
configKeyOptions: [],
configKeyDatas: [
{ configKey: "minio", label: "Minio" },
{ configKey: "qiniu", label: "七牛云" },
{ configKey: "aliyun", label: "阿里云" },
{ configKey: "qcloud", label: "腾讯云" },
],
// 弹出层标题
title: "",
// 是否显示弹出层
open: false,
// 是否https字典
isHttpsOptions: [],
// 状态(0正常 1停用)字典
statusOptions: [],
// 查询参数
queryParams: {
pageNum: 1,
pageSize: 10,
configKey: undefined,
bucketName: undefined,
status: undefined,
},
// 表单参数
form: {},
// 表单校验
rules: {
configKey: [
{ required: true, message: "configKey不能为空", trigger: "blur" },
],
accessKey: [
{ required: true, message: "accessKey不能为空", trigger: "blur" },
{
min: 2,
max: 200,
message: "accessKey长度必须介于 2 和 100 之间",
trigger: "blur",
},
],
secretKey: [
{ required: true, message: "secretKey不能为空", trigger: "blur" },
{
min: 2,
max: 100,
message: "secretKey长度必须介于 2 和 100 之间",
trigger: "blur",
},
],
bucketName: [
{ required: true, message: "bucketName不能为空", trigger: "blur" },
{
min: 2,
max: 100,
message: "bucketName长度必须介于 2 和 100 之间",
trigger: "blur",
},
],
endpoint: [
{ required: true, message: "endpoint不能为空", trigger: "blur" },
{
min: 2,
max: 100,
message: "endpoint名称长度必须介于 2 和 100 之间",
trigger: "blur",
},
],
},
};
},
created() {
this.getList();
this.getDicts("sys_yes_no").then(response => {
this.isHttpsOptions = response.data;
});
this.getDicts("sys_normal_disable").then(response => {
this.statusOptions = response.data;
});
this.configKeyOptions = this.configKeyDatas;
},
methods: {
/** 查询云存储配置列表 */
getList() {
this.loading = true;
listOssConfig(this.queryParams).then((response) => {
this.ossConfigList = response.rows;
this.total = response.total;
this.loading = false;
});
},
// 取消按钮
cancel() {
this.open = false;
this.reset();
},
// 表单重置
reset() {
this.form = {
ossConfigId: undefined,
configKey: undefined,
accessKey: undefined,
secretKey: undefined,
bucketName: undefined,
prefix: undefined,
endpoint: undefined,
isHttps: "N",
region: undefined,
status: "1",
remark: undefined,
};
this.resetForm("form");
},
/** 搜索按钮操作 */
handleQuery() {
this.queryParams.pageNum = 1;
this.getList();
},
/** 重置按钮操作 */
resetQuery() {
this.resetForm("queryForm");
this.handleQuery();
},
// 多选框选中数据
handleSelectionChange(selection) {
this.ids = selection.map(item => item.ossConfigId)
this.single = selection.length!==1
this.multiple = !selection.length
},
/** 新增按钮操作 */
handleAdd() {
this.reset();
this.open = true;
this.title = "添加云存储配置";
},
/** 修改按钮操作 */
handleUpdate(row) {
this.loading = true;
this.reset();
const ossConfigId = row.ossConfigId || this.ids;
getOssConfig(ossConfigId).then((response) => {
this.loading = false;
this.form = response.data;
this.open = true;
this.title = "修改云存储配置";
});
},
/** 提交按钮 */
submitForm() {
this.$refs["form"].validate(valid => {
if (valid) {
this.buttonLoading = true;
if (this.form.ossConfigId != null) {
updateOssConfig(this.form).then(response => {
this.msgSuccess("修改成功");
this.open = false;
this.getList();
}).finally(() => {
this.buttonLoading = false;
});
} else {
addOssConfig(this.form).then(response => {
this.msgSuccess("新增成功");
this.open = false;
this.getList();
}).finally(() => {
this.buttonLoading = false;
});
}
}
});
},
/** 删除按钮操作 */
handleDelete(row) {
const ossConfigIds = row.ossConfigId || this.ids;
this.$confirm('是否确认删除云存储配置编号为"' + ossConfigIds + '"的数据项?', "警告", {
confirmButtonText: "确定",
cancelButtonText: "取消",
type: "warning"
}).then(() => {
this.loading = true;
return delOssConfig(ossConfigIds);
}).then(() => {
this.loading = false;
this.getList();
this.msgSuccess("删除成功");
}).finally(() => {
this.loading = false;
});
},
// 云存储配置状态修改
handleStatusChange(row) {
let text = row.status === "0" ? "启用" : "停用";
this.$confirm(
'确认要"' + text + '""' + row.configKey + '"配置吗?', "警告", {
confirmButtonText: "确定",
cancelButtonText: "取消",
type: "warning",
}).then(() => {
return changeOssConfigStatus(row.ossConfigId, row.status, row.configKey);
}).then(() => {
this.getList()
this.msgSuccess(text + "成功");
}).catch(() => {
row.status = row.status === "0" ? "1" : "0";
})
}
}
};
</script>

View File

@ -96,7 +96,25 @@
v-hasPermi="['system:oss:remove']"
>删除</el-button>
</el-col>
<el-col :span="1.5">
<el-button
:type="previewListResource ? 'danger' : 'warning'"
plain
size="mini"
@click="handlePreviewListResource(!previewListResource)"
v-hasPermi="['system:oss:edit']"
>预览开关 : {{previewListResource ? "禁用" : "启用"}}</el-button>
</el-col>
<el-col :span="1.5">
<el-button
type="info"
plain
icon="el-icon-s-operation"
size="mini"
@click="handleOssConfig"
v-hasPermi="['system:oss:list']"
>配置管理</el-button>
</el-col>
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
</el-row>
@ -109,12 +127,12 @@
<el-table-column label="文件展示" align="center" prop="url">
<template slot-scope="scope">
<el-image
v-if="previewListResource && scope.row.fileSuffix.indexOf('png','jpg','jpeg') > 0"
v-if="previewListResource && checkFileSuffix(scope.row.fileSuffix)"
style="width: 100px; height: 100px;"
:src="scope.row.url"
:preview-src-list="[scope.row.url]"/>
<span v-text="scope.row.url"
v-if="scope.row.fileSuffix.indexOf('png','jpg','jpeg') < 0 || !previewListResource"/>
v-if="!checkFileSuffix(scope.row.fileSuffix) || !previewListResource"/>
</template>
</el-table-column>
<el-table-column label="创建时间" align="center" prop="createTime" width="180">
@ -169,10 +187,8 @@
</template>
<script>
import { listOss, delOss } from "@/api/system/oss";
import { downLoadOss } from "@/utils/ossdownload";
import { updateConfig } from "@/api/system/config";
import { listOss, delOss, changePreviewListResource } from "@/api/system/oss";
import { downLoadOss } from "@/utils/download";
export default {
name: "Oss",
@ -249,6 +265,12 @@ export default {
this.loading = false;
});
},
checkFileSuffix(fileSuffix) {
let arr = ["png", "jpg", "jpeg"];
return arr.some(type => {
return fileSuffix.indexOf(type) > -1;
});
},
// 取消按钮
cancel() {
this.open = false;
@ -278,6 +300,10 @@ export default {
this.single = selection.length!==1
this.multiple = !selection.length
},
/** 任务日志列表查询 */
handleOssConfig() {
this.$router.push({ path: '/system/oss-config/index'})
},
/** 文件按钮操作 */
handleFile() {
this.reset();
@ -308,14 +334,33 @@ export default {
confirmButtonText: "确定",
cancelButtonText: "取消",
type: "warning"
}).then(() => {
this.loading = true;
return delOss(ossIds);
}).then(() => {
this.loading = false;
this.getList();
this.msgSuccess("删除成功");
}).catch(() => {});
}).then(() => {
this.loading = true;
return delOss(ossIds);
}).then(() => {
this.loading = false;
this.getList();
this.msgSuccess("删除成功");
}).finally(() => {
this.loading = false;
});
},
// 预览列表图片状态修改
handlePreviewListResource(previewListResource) {
let text = previewListResource ? "启用" : "停用";
this.$confirm(
'确认要"' + text + '""预览列表图片"配置吗?', "警告", {
confirmButtonText: "确定",
cancelButtonText: "取消",
type: "warning",
}).then(() => {
return changePreviewListResource(previewListResource);
}).then(() => {
this.getList()
this.msgSuccess(text + "成功");
}).catch(() => {
this.previewListResource = previewListResource !== true;
})
}
}
};

View File

@ -156,7 +156,8 @@
</template>
<script>
import { listPost, getPost, delPost, addPost, updatePost, exportPost } from "@/api/system/post";
import { listPost, getPost, delPost, addPost, updatePost } from "@/api/system/post";
import { downLoadExcel } from "@/utils/download";
export default {
name: "Post",
@ -313,18 +314,7 @@ export default {
},
/** 导出按钮操作 */
handleExport() {
const queryParams = this.queryParams;
this.$confirm('是否确认导出所有岗位数据项?', "警告", {
confirmButtonText: "确定",
cancelButtonText: "取消",
type: "warning"
}).then(() => {
this.exportLoading = true;
return exportPost(queryParams);
}).then(response => {
this.download(response.msg);
this.exportLoading = false;
}).catch(() => {});
downLoadExcel('/system/post/export', this.queryParams);
}
}
};

View File

@ -259,9 +259,10 @@
</template>
<script>
import { listRole, getRole, delRole, addRole, updateRole, exportRole, dataScope, changeRoleStatus } from "@/api/system/role";
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",
@ -625,18 +626,7 @@ export default {
},
/** 导出按钮操作 */
handleExport() {
const queryParams = this.queryParams;
this.$confirm('是否确认导出所有角色数据项?', "警告", {
confirmButtonText: "确定",
cancelButtonText: "取消",
type: "warning"
}).then(() => {
this.exportLoading = true;
return exportRole(queryParams);
}).then(response => {
this.download(response.msg);
this.exportLoading = false;
}).catch(() => {});
downLoadExcel('/system/role/export', this.queryParams);
}
}
};

View File

@ -64,7 +64,7 @@ export default {
props: {
// 角色编号
roleId: {
type: Number
type: [Number, String]
}
},
data() {

View File

@ -346,11 +346,12 @@
</template>
<script>
import { listUser, getUser, delUser, addUser, updateUser, exportUser, resetUserPwd, changeUserStatus, importTemplate } from "@/api/system/user";
import { listUser, getUser, delUser, addUser, updateUser, resetUserPwd, changeUserStatus } from "@/api/system/user";
import { getToken } from "@/utils/auth";
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",
@ -436,7 +437,8 @@ export default {
// 表单校验
rules: {
userName: [
{ required: true, message: "用户名称不能为空", trigger: "blur" }
{ required: true, message: "用户名称不能为空", trigger: "blur" },
{ min: 2, max: 20, message: '用户名称长度必须介于 2 和 20 之间', trigger: 'blur' }
],
nickName: [
{ required: true, message: "用户昵称不能为空", trigger: "blur" }
@ -659,18 +661,7 @@ export default {
},
/** 导出按钮操作 */
handleExport() {
const queryParams = this.queryParams;
this.$confirm('是否确认导出所有用户数据项?', "警告", {
confirmButtonText: "确定",
cancelButtonText: "取消",
type: "warning"
}).then(() => {
this.exportLoading = true;
return exportUser(queryParams);
}).then(response => {
this.download(response.msg);
this.exportLoading = false;
}).catch(() => {});
downLoadExcel('/system/user/export', this.queryParams);
},
/** 导入按钮操作 */
handleImport() {
@ -679,9 +670,7 @@ export default {
},
/** 下载模板操作 */
importTemplate() {
importTemplate().then(response => {
this.download(response.msg);
});
downLoadExcel('/system/user/importTemplate');
},
// 文件上传中处理
handleFileUploadProgress(event, file, fileList) {

View File

@ -77,7 +77,8 @@ export default {
autoCrop: true, // 是否默认生成截图框
autoCropWidth: 200, // 默认生成截图框宽度
autoCropHeight: 200, // 默认生成截图框高度
fixedBox: true // 固定截图框大小 不允许改变
fixedBox: true, // 固定截图框大小 不允许改变
filename: ''
},
previews: {}
};
@ -116,6 +117,7 @@ export default {
reader.readAsDataURL(file);
reader.onload = () => {
this.options.img = reader.result;
this.options.filename = file.name;
};
}
},
@ -123,10 +125,11 @@ export default {
uploadImg() {
this.$refs.cropper.getCropBlob(data => {
let formData = new FormData();
formData.append("avatarfile", data);
console.log(this.options.filename)
formData.append("avatarfile", data, this.options.filename);
uploadAvatar(formData).then(response => {
this.open = false;
this.options.img = process.env.VUE_APP_BASE_API + response.data.imgUrl;
this.options.img = response.data.imgUrl;
store.commit('SET_AVATAR', this.options.img);
this.msgSuccess("修改成功");
this.visible = false;

View File

@ -180,7 +180,7 @@
<script>
import { listTable, previewTable, delTable, genCode, synchDb } from "@/api/tool/gen";
import importTable from "./importTable";
import { downLoadZip } from "@/utils/zipdownload";
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"));