Bläddra i källkod

修改机器人管理

DESKTOP-NE65RNK\Citrus_limon 10 månader sedan
förälder
incheckning
1602578fe5

+ 6 - 6
src/router/routes.ts

@@ -100,6 +100,12 @@ const routes: Array<RouteRecordRaw> = [
         component: () => import("@/views/indicator/blacklists/index.vue"),
         meta: { title: "币对黑名单", keepAlive: true },
       },
+      {
+        path: "/indicator/collection",
+        name: "IndicatorCollection",
+        component: () => import("@/views/indicator/collection/index.vue"),
+        meta: { title: "数据收集", keepAlive: true },
+      },
       {
         path: "/statistic/balance_user",
         name: "StatisticBalanceUser",
@@ -160,12 +166,6 @@ const routes: Array<RouteRecordRaw> = [
         component: () => import("@/views/records/user/index.vue"),
         meta: { title: "用户日志", keepAlive: true },
       },
-      {
-        path: "/debug/deeebug",
-        name: "DebugDeeebug",
-        component: () => import("@/views/debug/deeebug/index.vue"),
-        meta: { title: "数据收集", keepAlive: true },
-      },
     ],
   },
   {

+ 0 - 0
src/views/debug/deeebug/components/Update.vue → src/views/indicator/collection/components/Update.vue


+ 4 - 2
src/views/debug/deeebug/index.vue → src/views/indicator/collection/index.vue

@@ -34,7 +34,7 @@
 
           <template v-slot:operator="{ row }">
             <lay-space>
-              <TableButton text="标记" @click="handleUpdate(row)" />
+              <TableButton v-if="apiList?.includes('/acquireULog/label')" text="标记" @click="handleUpdate(row)" />
             </lay-space>
           </template>
         </lay-table>
@@ -44,7 +44,7 @@
   <Update ref="updateRef" />
 </template>
 
-<script lang="ts" setup name="DebugDeeebug">
+<script lang="ts" setup name="IndicatorCollection">
 import { ref, reactive } from "vue";
 import dayjs from "dayjs";
 import Update from "./components/Update.vue";
@@ -52,6 +52,8 @@ import TableButton from "@/components/TableButton.vue";
 import { BALANCE_TYPE } from "@/utils/enum";
 import { get_acquire_log } from "@/api";
 
+const apiList = ref(window.sessionStorage.getItem("_4L_API_LIST"));
+
 const updateRef = ref();
 
 interface PageConfig {

+ 6 - 1
src/views/server/manage/index.vue

@@ -19,6 +19,9 @@
           <lay-form-item label="IP" prop="ip">
             <lay-input v-model="pageParams.ip" />
           </lay-form-item>
+          <lay-form-item label="最大关联" prop="robotNumLimit">
+            <lay-input v-model="pageParams.robotNumLimit" />
+          </lay-form-item>
           <div class="form-button-wp">
             <lay-button @click="getPageInfo(true)">搜索</lay-button>
           </div>
@@ -93,6 +96,7 @@ interface FormItem {
   pageSize?: Number;
   title?: String;
   ip?: String;
+  robotNumLimit?: String;
 }
 const pageParams: FormItem = reactive({ pageNum: 1, pageSize: 20 });
 
@@ -111,6 +115,7 @@ const columns = ref([
   { title: "通讯", width: "80px", key: "lastReportTime", customSlot: "lastReportTime" },
   { title: "更新时间", width: "160px", key: "updateTime" },
   { title: "备注", key: "remark", ellipsisTooltip: true },
+  { title: "关联数量", width: "100px", key: "robotNum" },
   {
     title: "操作",
     customSlot: "operator",
@@ -128,7 +133,7 @@ const getPageInfo = (isSearch?: boolean) => {
     selectedKeys.value = [];
     pageConfig.requestLoading = false;
   }
-  if(pageConfig.requestLoading) return;
+  if (pageConfig.requestLoading) return;
   pageConfig.requestLoading = true;
   pageConfig.loading = true;
   get_server_list(pageParams, (data: any) => {

+ 1 - 1
src/views/statistic/balance_user/index.vue

@@ -115,7 +115,7 @@ const handleEarningsRateData = (data: any) => {
       transferEarningsRate = lastEarningsRate;
       return transferEarningsRate
     };
-    let earningsRate = new Decimal(item.afterU || 0).minus(transferBalance).div(transferBalance).mul(100).add(transferEarningsRate).toNumber();
+    let earningsRate = new Decimal(item.afterU || 0).minus(transferBalance).div(transferBalance).mul(100).add(transferEarningsRate).toNumber() || 0;
     lastEarningsRate = earningsRate
     return earningsRate;
   });