|
@@ -59,14 +59,14 @@
|
|
|
</el-button>
|
|
|
</el-col>
|
|
|
<el-col :span="1.5">
|
|
|
- <el-button
|
|
|
- type="warning"
|
|
|
- plain
|
|
|
- icon="el-icon-download"
|
|
|
- size="mini"
|
|
|
- @click="handleExport"
|
|
|
- >导出
|
|
|
- </el-button>
|
|
|
+<!-- <el-button-->
|
|
|
+<!-- type="warning"-->
|
|
|
+<!-- plain-->
|
|
|
+<!-- icon="el-icon-download"-->
|
|
|
+<!-- size="mini"-->
|
|
|
+<!-- @click="handleExport"-->
|
|
|
+<!-- >导出-->
|
|
|
+<!-- </el-button>-->
|
|
|
</el-col>
|
|
|
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
|
|
|
</el-row>
|
|
@@ -139,7 +139,7 @@
|
|
|
</template>
|
|
|
|
|
|
<script>
|
|
|
-import {listSecret, getSecret, delSecret, addSecret, updateSecret} from "@/api/system/secret";
|
|
|
+import {listSecret, getSecret, delSecret, addSecret, updateSecret,copySecret} from "@/api/system/secret";
|
|
|
import {listAllProject} from "@/api/system/project";
|
|
|
|
|
|
export default {
|
|
@@ -247,7 +247,23 @@ export default {
|
|
|
},
|
|
|
/** 复制按钮操作 */
|
|
|
handleCopy(row) {
|
|
|
- alert(row.secretKey)
|
|
|
+ // 获取需要复制的字段信息
|
|
|
+ const secretKey = row.secretKey;
|
|
|
+
|
|
|
+ // 创建一个包含字段信息的文本框元素
|
|
|
+ const textarea = document.createElement("textarea");
|
|
|
+ textarea.value = secretKey;
|
|
|
+ document.body.appendChild(textarea);
|
|
|
+
|
|
|
+ // 选择并复制文本
|
|
|
+ textarea.select();
|
|
|
+ document.execCommand("copy");
|
|
|
+
|
|
|
+ // 移除临时创建的文本框元素
|
|
|
+ document.body.removeChild(textarea);
|
|
|
+
|
|
|
+ // 显示复制成功的消息
|
|
|
+ this.$message.success("字段信息已复制");
|
|
|
},
|
|
|
onChange(e) {
|
|
|
this.form.projectId = e
|