From f8bb302fef0d6f6f14f04508056628cb10aa98e0 Mon Sep 17 00:00:00 2001
From: zlyx <1242874891@qq.com>
Date: 星期五, 17 二月 2023 11:21:15 +0800
Subject: [PATCH] update test.sql 更新测试 SQL 增加租户id ;
---
ruoyi-ui/src/views/system/oss/config.vue | 116 ++++++++++++++++++++++++++--------------------------------
1 files changed, 52 insertions(+), 64 deletions(-)
diff --git a/ruoyi-ui/src/views/system/oss/config.vue b/ruoyi-ui/src/views/system/oss/config.vue
index 28bdbe5..d045715 100644
--- a/ruoyi-ui/src/views/system/oss/config.vue
+++ b/ruoyi-ui/src/views/system/oss/config.vue
@@ -2,14 +2,13 @@
<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-input
+ v-model="queryParams.configKey"
+ placeholder="閰嶇疆key"
+ clearable
+ size="small"
+ @keyup.enter.native="handleQuery"
+ />
</el-form-item>
<el-form-item label="妗跺悕绉�" prop="bucketName">
<el-input
@@ -20,14 +19,10 @@
@keyup.enter.native="handleQuery"
/>
</el-form-item>
- <el-form-item label="鐘舵��" prop="status">
+ <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-option key="0" label="鏄�" value="0"/>
+ <el-option key="1" label="鍚�" value="1"/>
</el-select>
</el-form-item>
<el-form-item>
@@ -77,10 +72,18 @@
<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="domain" 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">
+ <el-table-column label="妗舵潈闄愮被鍨�" align="center" prop="accessPolicy">
+ <template slot-scope="scope">
+ <el-tag type="warning" v-if="scope.row.accessPolicy === '0'">private</el-tag>
+ <el-tag type="success" v-if="scope.row.accessPolicy === '1'">public</el-tag>
+ <el-tag type="info" v-if="scope.row.accessPolicy === '2'">custom</el-tag>
+ </template>
+ </el-table-column>
+ <el-table-column label="鏄惁榛樿" align="center" prop="status">
<template slot-scope="scope">
<el-switch
v-model="scope.row.status"
@@ -118,21 +121,17 @@
@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-input v-model="form.configKey" placeholder="璇疯緭鍏ラ厤缃甼ey" />
</el-form-item>
<el-form-item label="璁块棶绔欑偣" prop="endpoint">
<el-input v-model="form.endpoint" placeholder="璇疯緭鍏ヨ闂珯鐐�" />
+ </el-form-item>
+ <el-form-item label="鑷畾涔夊煙鍚�" prop="domain">
+ <el-input v-model="form.domain" placeholder="璇疯緭鍏ヨ嚜瀹氫箟鍩熷悕" />
</el-form-item>
<el-form-item label="accessKey" prop="accessKey">
<el-input v-model="form.accessKey" placeholder="璇疯緭鍏ccessKey" />
@@ -149,10 +148,17 @@
<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>
+ v-for="dict in dict.type.sys_yes_no"
+ :key="dict.value"
+ :label="dict.value"
+ >{{dict.label}}</el-radio>
+ </el-radio-group>
+ </el-form-item>
+ <el-form-item label="妗舵潈闄愮被鍨�">
+ <el-radio-group v-model="form.accessPolicy">
+ <el-radio label="0">private</el-radio>
+ <el-radio label="1">public</el-radio>
+ <el-radio label="2">custom</el-radio>
</el-radio-group>
</el-form-item>
<el-form-item label="鍩�" prop="region">
@@ -183,6 +189,7 @@
export default {
name: "OssConfig",
+ dicts: ['sys_yes_no'],
data() {
return {
// 鎸夐挳loading
@@ -201,16 +208,8 @@
showSearch: true,
// 鎬绘潯鏁�
total: 0,
- // 浜戝瓨鍌ㄩ厤缃〃鏍兼暟鎹�
+ // 瀵硅薄瀛樺偍閰嶇疆琛ㄦ牸鏁版嵁
ossConfigList: [],
- // configKeyOptions
- configKeyOptions: [],
- configKeyDatas: [
- { configKey: "minio", label: "Minio" },
- { configKey: "qiniu", label: "涓冪墰浜�" },
- { configKey: "aliyun", label: "闃块噷浜�" },
- { configKey: "qcloud", label: "鑵捐浜�" },
- ],
// 寮瑰嚭灞傛爣棰�
title: "",
// 鏄惁鏄剧ず寮瑰嚭灞�
@@ -270,21 +269,17 @@
trigger: "blur",
},
],
+ accessPolicy:[
+ { required: true, message: "accessPolicy涓嶈兘涓虹┖", 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) => {
@@ -308,7 +303,9 @@
bucketName: undefined,
prefix: undefined,
endpoint: undefined,
+ domain: undefined,
isHttps: "N",
+ accessPolicy: "1",
region: undefined,
status: "1",
remark: undefined,
@@ -335,7 +332,7 @@
handleAdd() {
this.reset();
this.open = true;
- this.title = "娣诲姞浜戝瓨鍌ㄩ厤缃�";
+ this.title = "娣诲姞瀵硅薄瀛樺偍閰嶇疆";
},
/** 淇敼鎸夐挳鎿嶄綔 */
handleUpdate(row) {
@@ -346,7 +343,7 @@
this.loading = false;
this.form = response.data;
this.open = true;
- this.title = "淇敼浜戝瓨鍌ㄩ厤缃�";
+ this.title = "淇敼瀵硅薄瀛樺偍閰嶇疆";
});
},
/** 鎻愪氦鎸夐挳 */
@@ -356,7 +353,7 @@
this.buttonLoading = true;
if (this.form.ossConfigId != null) {
updateOssConfig(this.form).then(response => {
- this.msgSuccess("淇敼鎴愬姛");
+ this.$modal.msgSuccess("淇敼鎴愬姛");
this.open = false;
this.getList();
}).finally(() => {
@@ -364,7 +361,7 @@
});
} else {
addOssConfig(this.form).then(response => {
- this.msgSuccess("鏂板鎴愬姛");
+ this.$modal.msgSuccess("鏂板鎴愬姛");
this.open = false;
this.getList();
}).finally(() => {
@@ -377,34 +374,25 @@
/** 鍒犻櫎鎸夐挳鎿嶄綔 */
handleDelete(row) {
const ossConfigIds = row.ossConfigId || this.ids;
- this.$confirm('鏄惁纭鍒犻櫎浜戝瓨鍌ㄩ厤缃紪鍙蜂负"' + ossConfigIds + '"鐨勬暟鎹」?', "璀﹀憡", {
- confirmButtonText: "纭畾",
- cancelButtonText: "鍙栨秷",
- type: "warning"
- }).then(() => {
+ this.$modal.confirm('鏄惁纭鍒犻櫎瀵硅薄瀛樺偍閰嶇疆缂栧彿涓�"' + ossConfigIds + '"鐨勬暟鎹」?').then(() => {
this.loading = true;
return delOssConfig(ossConfigIds);
}).then(() => {
this.loading = false;
this.getList();
- this.msgSuccess("鍒犻櫎鎴愬姛");
+ this.$modal.msgSuccess("鍒犻櫎鎴愬姛");
}).finally(() => {
this.loading = false;
});
},
- // 浜戝瓨鍌ㄩ厤缃姸鎬佷慨鏀�
+ // 瀵硅薄瀛樺偍閰嶇疆鐘舵�佷慨鏀�
handleStatusChange(row) {
let text = row.status === "0" ? "鍚敤" : "鍋滅敤";
- this.$confirm(
- '纭瑕�"' + text + '""' + row.configKey + '"閰嶇疆鍚�?', "璀﹀憡", {
- confirmButtonText: "纭畾",
- cancelButtonText: "鍙栨秷",
- type: "warning",
- }).then(() => {
+ this.$modal.confirm('纭瑕�"' + text + '""' + row.configKey + '"閰嶇疆鍚�?').then(() => {
return changeOssConfigStatus(row.ossConfigId, row.status, row.configKey);
}).then(() => {
this.getList()
- this.msgSuccess(text + "鎴愬姛");
+ this.$modal.msgSuccess(text + "鎴愬姛");
}).catch(() => {
row.status = row.status === "0" ? "1" : "0";
})
--
Gitblit v1.9.3