add OSS模块 增加预览图片开关
This commit is contained in:
parent
7114fc2720
commit
dd9340090b
|
@ -12,4 +12,9 @@ public class CloudConstant {
|
||||||
*/
|
*/
|
||||||
public final static String CLOUD_STORAGE_CONFIG_KEY = "sys.oss.cloudStorageService";
|
public final static String CLOUD_STORAGE_CONFIG_KEY = "sys.oss.cloudStorageService";
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 预览列表资源开关Key
|
||||||
|
*/
|
||||||
|
public final static String PEREVIEW_LIST_RESOURCE_KEY = "sys.oss.previewListResource";
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -15,6 +15,8 @@ import org.springframework.stereotype.Component;
|
||||||
@ConfigurationProperties(prefix = "cloud-storage")
|
@ConfigurationProperties(prefix = "cloud-storage")
|
||||||
public class CloudStorageProperties {
|
public class CloudStorageProperties {
|
||||||
|
|
||||||
|
private Boolean previewListImage;
|
||||||
|
|
||||||
private QiniuProperties qiniu;
|
private QiniuProperties qiniu;
|
||||||
|
|
||||||
private AliyunProperties aliyun;
|
private AliyunProperties aliyun;
|
||||||
|
|
|
@ -96,6 +96,7 @@
|
||||||
v-hasPermi="['system:oss:remove']"
|
v-hasPermi="['system:oss:remove']"
|
||||||
>删除</el-button>
|
>删除</el-button>
|
||||||
</el-col>
|
</el-col>
|
||||||
|
|
||||||
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
|
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
|
||||||
</el-row>
|
</el-row>
|
||||||
|
|
||||||
|
@ -106,7 +107,7 @@
|
||||||
<el-table-column label="原名" align="center" prop="originalName" />
|
<el-table-column label="原名" align="center" prop="originalName" />
|
||||||
<el-table-column label="文件后缀" align="center" prop="fileSuffix" />
|
<el-table-column label="文件后缀" align="center" prop="fileSuffix" />
|
||||||
<el-table-column label="文件展示" align="center" prop="url" >
|
<el-table-column label="文件展示" align="center" prop="url" >
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope" v-if="previewListResource">
|
||||||
<el-image
|
<el-image
|
||||||
v-if="scope.row.fileSuffix.indexOf('png','jpg','jpeg') > 0"
|
v-if="scope.row.fileSuffix.indexOf('png','jpg','jpeg') > 0"
|
||||||
style="width: 100px; height: 100px;"
|
style="width: 100px; height: 100px;"
|
||||||
|
@ -168,6 +169,8 @@
|
||||||
<script>
|
<script>
|
||||||
import { listOss, delOss } from "@/api/system/oss";
|
import { listOss, delOss } from "@/api/system/oss";
|
||||||
import { downLoadOss } from "@/utils/ossdownload";
|
import { downLoadOss } from "@/utils/ossdownload";
|
||||||
|
import { updateConfig } from "@/api/system/config";
|
||||||
|
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: "Oss",
|
name: "Oss",
|
||||||
|
@ -197,6 +200,8 @@ export default {
|
||||||
type: 0,
|
type: 0,
|
||||||
// 是否显示弹出层
|
// 是否显示弹出层
|
||||||
open: false,
|
open: false,
|
||||||
|
// 预览列表图片
|
||||||
|
previewListResource: true,
|
||||||
// 创建时间时间范围
|
// 创建时间时间范围
|
||||||
daterangeCreateTime: [],
|
daterangeCreateTime: [],
|
||||||
// 查询参数
|
// 查询参数
|
||||||
|
@ -233,6 +238,9 @@ export default {
|
||||||
this.queryParams.params["beginCreateTime"] = this.daterangeCreateTime[0];
|
this.queryParams.params["beginCreateTime"] = this.daterangeCreateTime[0];
|
||||||
this.queryParams.params["endCreateTime"] = this.daterangeCreateTime[1];
|
this.queryParams.params["endCreateTime"] = this.daterangeCreateTime[1];
|
||||||
}
|
}
|
||||||
|
this.getConfigKey("sys.oss.previewListResource").then(response => {
|
||||||
|
this.previewListResource = response.msg;
|
||||||
|
});
|
||||||
listOss(this.queryParams).then(response => {
|
listOss(this.queryParams).then(response => {
|
||||||
this.ossList = response.rows;
|
this.ossList = response.rows;
|
||||||
this.total = response.total;
|
this.total = response.total;
|
||||||
|
|
|
@ -17,6 +17,7 @@ create table sys_oss (
|
||||||
) engine=innodb comment ='OSS云存储表';
|
) engine=innodb comment ='OSS云存储表';
|
||||||
|
|
||||||
insert into sys_config values(10, 'OSS云存储服务商', 'sys.oss.cloudStorageService', 'minio', 'Y', 'admin', sysdate(), '', null, 'OSS云存储服务商(qiniu:七牛云, aliyun:阿里云, qcloud:腾讯云, minio: Minio)');
|
insert into sys_config values(10, 'OSS云存储服务商', 'sys.oss.cloudStorageService', 'minio', 'Y', 'admin', sysdate(), '', null, 'OSS云存储服务商(qiniu:七牛云, aliyun:阿里云, qcloud:腾讯云, minio: Minio)');
|
||||||
|
insert into sys_config values(11, 'OSS预览列表资源开关', 'sys.oss.previewListResource', 'true', 'Y', 'admin', sysdate(), '', null, 'true:开启, false:关闭');
|
||||||
|
|
||||||
insert into sys_menu values('118', '文件管理', '1', '10', 'oss', 'system/oss/index', 1, 0, 'C', '0', '0', 'system:oss:list', 'upload', 'admin', sysdate(), '', null, '文件管理菜单');
|
insert into sys_menu values('118', '文件管理', '1', '10', 'oss', 'system/oss/index', 1, 0, 'C', '0', '0', 'system:oss:list', 'upload', 'admin', sysdate(), '', null, '文件管理菜单');
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue