From dd9340090b9d960e486201e92d6a7a991d7cdec6 Mon Sep 17 00:00:00 2001 From: 疯狂的狮子li <15040126243@163.com> Date: 星期五, 23 七月 2021 19:14:37 +0800 Subject: [PATCH] add OSS模块 增加预览图片开关 --- ruoyi-ui/src/views/system/oss/index.vue | 10 +++++++++- 1 files changed, 9 insertions(+), 1 deletions(-) diff --git a/ruoyi-ui/src/views/system/oss/index.vue b/ruoyi-ui/src/views/system/oss/index.vue index 5ce6575..8312454 100644 --- a/ruoyi-ui/src/views/system/oss/index.vue +++ b/ruoyi-ui/src/views/system/oss/index.vue @@ -96,6 +96,7 @@ v-hasPermi="['system:oss:remove']" >鍒犻櫎</el-button> </el-col> + <right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar> </el-row> @@ -106,7 +107,7 @@ <el-table-column label="鍘熷悕" align="center" prop="originalName" /> <el-table-column label="鏂囦欢鍚庣紑" align="center" prop="fileSuffix" /> <el-table-column label="鏂囦欢灞曠ず" align="center" prop="url" > - <template slot-scope="scope"> + <template slot-scope="scope" v-if="previewListResource"> <el-image v-if="scope.row.fileSuffix.indexOf('png','jpg','jpeg') > 0" style="width: 100px; height: 100px;" @@ -168,6 +169,8 @@ <script> import { listOss, delOss } from "@/api/system/oss"; import { downLoadOss } from "@/utils/ossdownload"; +import { updateConfig } from "@/api/system/config"; + export default { name: "Oss", @@ -197,6 +200,8 @@ type: 0, // 鏄惁鏄剧ず寮瑰嚭灞� open: false, + // 棰勮鍒楄〃鍥剧墖 + previewListResource: true, // 鍒涘缓鏃堕棿鏃堕棿鑼冨洿 daterangeCreateTime: [], // 鏌ヨ鍙傛暟 @@ -233,6 +238,9 @@ this.queryParams.params["beginCreateTime"] = this.daterangeCreateTime[0]; this.queryParams.params["endCreateTime"] = this.daterangeCreateTime[1]; } + this.getConfigKey("sys.oss.previewListResource").then(response => { + this.previewListResource = response.msg; + }); listOss(this.queryParams).then(response => { this.ossList = response.rows; this.total = response.total; -- Gitblit v1.9.3