From 2503cce21fbe5520305c3fa7ee1ae9b19dace403 Mon Sep 17 00:00:00 2001
From: PC-20250623MANY\Administrator <344137771@qq.com>
Date: Mon, 29 Sep 2025 17:37:38 +0800
Subject: [PATCH] 1
---
src/views/modules/cryptos-spots/cryptos-variety.vue | 113 ++++++++++++++++++++++++++++++++------------------------
1 files changed, 64 insertions(+), 49 deletions(-)
diff --git a/src/views/modules/cryptos-spots/cryptos-variety.vue b/src/views/modules/cryptos-spots/cryptos-variety.vue
index 7ca84cc..afc332b 100644
--- a/src/views/modules/cryptos-spots/cryptos-variety.vue
+++ b/src/views/modules/cryptos-spots/cryptos-variety.vue
@@ -1,15 +1,7 @@
<template>
<div class="mod-cryptos-variety">
- <avue-crud
- ref="crud"
- :page.sync="page"
- :data="dataList"
- :option="tableOption"
- :cell-class-name="addCellClass"
- @search-change="searchChange"
- @selection-change="selectionChange"
- @on-load="getDataList"
- >
+ <avue-crud ref="crud" :page.sync="page" :data="dataList" :option="tableOption" :cell-class-name="addCellClass"
+ @search-change="searchChange" @selection-change="selectionChange" @on-load="getDataList">
<template slot="menuLeft">
<!-- <el-button
type="primary"
@@ -23,46 +15,23 @@
> -->
</template>
<template slot="ndhSearch">
- <avue-select
- v-model="options.id"
- placeholder="请选择语言"
- :dic="options"
- ></avue-select>
+ <avue-select v-model="options.id" placeholder="请选择语言" :dic="options"></avue-select>
</template>
<template slot-scope="scope" slot="shezhi">
- <span
- class="seachButton"
- v-if="isAuth('sys:user:delete')"
- @click.stop="mixmarkHand(scope.row)"
- >设置</span
- >
+ <span class="seachButton" v-if="isAuth('sys:user:delete')" @click.stop="mixmarkHand(scope.row)">设置</span>
</template>
<template slot-scope="scope" slot="menu">
- <el-button
- type="primary"
- icon="el-icon-edit"
- size="small"
- v-if="isAuth('sys:user:update')"
- @click.stop="addOrUpdateHandle(arr, scope.row)"
- >编辑</el-button
- >
- <el-button
- type="primary"
- icon="el-icon-edit"
- size="small"
- :loading="dataListLoading"
- v-if="isAuth('sys:user:update')"
- @click.stop="addkinHandle(scope.row.symbol)"
- >初始化K线图</el-button
- >
+ <el-button type="primary" icon="el-icon-edit" size="small" v-if="isAuth('sys:user:update')"
+ @click.stop="addOrUpdateHandle(arr, scope.row)">编辑</el-button>
+ <el-button type="primary" icon="el-icon-edit" size="small" :loading="dataListLoading"
+ v-if="isAuth('sys:user:update')" @click.stop="addkinHandle(scope.row.symbol)">初始化K线图</el-button>
+
+ <el-button type="primary" icon="el-icon-edit" size="small" :loading="dataListLoading"
+ v-if="isAuth('sys:user:update')" @click.stop="setkinHandle(scope.row.symbol)">初始K线图历史</el-button>
</template>
</avue-crud>
<!-- 弹窗, 新增 / 修改 -->
- <add-or-update
- v-if="addOrUpdateVisible"
- ref="addOrUpdate"
- @refreshDataList="getDataList"
- ></add-or-update>
+ <add-or-update v-if="addOrUpdateVisible" ref="addOrUpdate" @refreshDataList="getDataList"></add-or-update>
</div>
</template>
@@ -192,8 +161,8 @@
}
});
},
+ //初始化k线
addkinHandle(symbol) {
- //初始化k线
this.dataListLoading = true;
this.$confirm(`确定初始化K线?`, "提示", {
confirmButtonText: "确定",
@@ -233,7 +202,52 @@
}
});
})
- .catch(() => {});
+ .catch(() => {
+ this.dataListLoading = false;
+ });
+ },
+ //初始k线历史
+ setkinHandle(symbol) {
+ this.dataListLoading = true;
+ this.$confirm(`确定初始K线历史?`, "提示", {
+ confirmButtonText: "确定",
+ cancelButtonText: "取消",
+ type: "warning",
+ })
+ .then(() => {
+ //
+ this.$http({
+ url: this.$http.adornUrl(
+ "/normal/adminItemAction!/klineInitBySql"
+ ),
+ method: "get",
+ params: this.$http.adornParams(
+ Object.assign({
+ symbol: symbol,
+ }),
+ false
+ ),
+ }).then(({ data }) => {
+ if (data.code == 0) {
+ this.dataListLoading = false;
+ this.$message({
+ message: "操作成功",
+ type: "success",
+ duration: 1500,
+ onClose: () => {
+ // this.getDataList(this.page);
+ },
+ });
+ }
+
+ if (done) {
+ done();
+ }
+ });
+ })
+ .catch(() => {
+ this.dataListLoading = false;
+ });
},
// 条件查询
searchChange(params, done) {
@@ -271,8 +285,8 @@
var ids = id
? [id]
: this.dataListSelections.map((item) => {
- return item.roleId;
- });
+ return item.roleId;
+ });
this.$confirm(`确定进行[${id ? "删除" : "批量删除"}]操作?`, "提示", {
confirmButtonText: "确定",
cancelButtonText: "取消",
@@ -298,12 +312,12 @@
message: data.msg,
type: "error",
duration: 1500,
- onClose: () => {},
+ onClose: () => { },
});
}
});
})
- .catch(() => {});
+ .catch(() => { });
},
addCellClass({ row, column }) {
// console.log("row = " + JSON.stringify(row))
@@ -322,6 +336,7 @@
cursor: pointer;
color: rgb(69, 147, 235);
}
+
.seachButton:hover {
color: rgb(8, 63, 134);
}
--
Gitblit v1.9.3