Ver Fonte

账号状态到期前预先提醒

dodo hold há 2 anos atrás
pai
commit
be5cfe43aa
1 ficheiros alterados com 15 adições e 0 exclusões
  1. 15 0
      src/views/taobao/list.vue

+ 15 - 0
src/views/taobao/list.vue

@@ -190,6 +190,20 @@
                 <template #time="{ record }">
                     <div>{{ record.create_time }}</div>
                     <div>{{ record.last_time }}</div>
+
+                    <a-tooltip v-if="dayjs().diff(dayjs(record.login_time), 'hours') > 48">
+                        <template #content>
+                            <div>登录:{{ record.login_time }}</div>
+                            <div>登录状态即将掉线,请尽快处理</div>
+                        </template>
+
+                        <div style="color:red;">
+                            预计 {{ 72 - dayjs().diff(dayjs(record.login_time), 'hours') }} 小时后掉线
+                        </div>
+
+
+                    </a-tooltip>
+
                 </template>
                 <template #operations="{ record }">
                     <a-button type="text" size="small" @click="changeItem(record)">
@@ -215,6 +229,7 @@
 import { useRouter } from 'vue-router';
 import { computed, ref, reactive, watch, nextTick } from 'vue';
 import { useI18n } from 'vue-i18n';
+import dayjs from 'dayjs';
 import useLoading from '@/hooks/loading';
 import { queryTkPool, TkPoolRecord, TkPoolParams, TkUpdateAccountModel, TkUpdateAccount } from '@/api/taobao';
 import { Pagination } from '@/types/global';