fix: 通用脚本用户添加额外展示项
This commit is contained in:
@@ -3,15 +3,9 @@
|
|||||||
<!-- 工具栏 -->
|
<!-- 工具栏 -->
|
||||||
<a-card size="small" class="toolbar-card">
|
<a-card size="small" class="toolbar-card">
|
||||||
<a-row :gutter="[12, 12]" align="middle" justify="space-between" class="toolbar-grid">
|
<a-row :gutter="[12, 12]" align="middle" justify="space-between" class="toolbar-grid">
|
||||||
<!-- 左侧:刷新 + 选择器 -->
|
<!-- 左侧:选择器 -->
|
||||||
<a-col :xs="24" :md="14">
|
<a-col :xs="24" :md="14">
|
||||||
<a-space :size="8" wrap>
|
<a-space :size="8" wrap>
|
||||||
<a-button @click="refreshLogs" :loading="loading" type="primary">
|
|
||||||
<template #icon>
|
|
||||||
<ReloadOutlined />
|
|
||||||
</template>
|
|
||||||
刷新日志
|
|
||||||
</a-button>
|
|
||||||
|
|
||||||
<a-select v-model:value="selectedLogFile" @change="onLogFileChange" style="width: 220px"
|
<a-select v-model:value="selectedLogFile" @change="onLogFileChange" style="width: 220px"
|
||||||
placeholder="选择日志文件">
|
placeholder="选择日志文件">
|
||||||
@@ -105,7 +99,6 @@
|
|||||||
import { ref, computed, onMounted, onUnmounted, nextTick } from 'vue'
|
import { ref, computed, onMounted, onUnmounted, nextTick } from 'vue'
|
||||||
import { message, Empty } from 'ant-design-vue'
|
import { message, Empty } from 'ant-design-vue'
|
||||||
import {
|
import {
|
||||||
ReloadOutlined,
|
|
||||||
DeleteOutlined,
|
DeleteOutlined,
|
||||||
ClearOutlined,
|
ClearOutlined,
|
||||||
FolderOpenOutlined,
|
FolderOpenOutlined,
|
||||||
|
|||||||
@@ -108,7 +108,7 @@
|
|||||||
</a-tag>
|
</a-tag>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<!-- 用户详细信息 - 只有MAA脚本才显示 -->
|
<!-- 用户详细信息 - MAA脚本用户 -->
|
||||||
<div v-if="script.type === 'MAA'" class="user-info-tags">
|
<div v-if="script.type === 'MAA'" class="user-info-tags">
|
||||||
<!-- 剿灭模式 -->
|
<!-- 剿灭模式 -->
|
||||||
<a-tag
|
<a-tag
|
||||||
@@ -138,16 +138,9 @@
|
|||||||
<a-tag
|
<a-tag
|
||||||
v-if="user.Info.RemainedDay !== undefined && user.Info.RemainedDay !== null"
|
v-if="user.Info.RemainedDay !== undefined && user.Info.RemainedDay !== null"
|
||||||
class="info-tag"
|
class="info-tag"
|
||||||
:color="
|
:color="getRemainingDayColor(user.Info.RemainedDay)"
|
||||||
user.Info.RemainedDay < 1
|
|
||||||
? 'gold'
|
|
||||||
: user.Info.RemainedDay > 30
|
|
||||||
? 'green'
|
|
||||||
: 'orange'
|
|
||||||
"
|
|
||||||
>
|
>
|
||||||
剩余天数:
|
{{ getRemainingDayText(user.Info.RemainedDay) }}
|
||||||
{{ user.Info.RemainedDay < 1 ? '长期有效' : user.Info.RemainedDay + '天' }}
|
|
||||||
</a-tag>
|
</a-tag>
|
||||||
|
|
||||||
<!-- 基建模式 -->
|
<!-- 基建模式 -->
|
||||||
@@ -211,6 +204,22 @@
|
|||||||
剩余关卡: {{ user.Info.Stage_Remain }}
|
剩余关卡: {{ user.Info.Stage_Remain }}
|
||||||
</a-tag>
|
</a-tag>
|
||||||
|
|
||||||
|
<a-tag class="info-tag" color="magenta">
|
||||||
|
备注: {{ truncateText(user.Info.Notes) }}
|
||||||
|
</a-tag>
|
||||||
|
</div>
|
||||||
|
<!-- 用户详细信息 - 通用脚本用户 -->
|
||||||
|
<div v-if="script.type === 'General'" class="user-info-tags">
|
||||||
|
|
||||||
|
<!-- 剩余天数 -->
|
||||||
|
<a-tag
|
||||||
|
v-if="user.Info.RemainedDay !== undefined && user.Info.RemainedDay !== null"
|
||||||
|
class="info-tag"
|
||||||
|
:color="getRemainingDayColor(user.Info.RemainedDay)"
|
||||||
|
>
|
||||||
|
{{ getRemainingDayText(user.Info.RemainedDay) }}
|
||||||
|
</a-tag>
|
||||||
|
|
||||||
<a-tag class="info-tag" color="magenta">
|
<a-tag class="info-tag" color="magenta">
|
||||||
备注: {{ truncateText(user.Info.Notes) }}
|
备注: {{ truncateText(user.Info.Notes) }}
|
||||||
</a-tag>
|
</a-tag>
|
||||||
@@ -282,11 +291,9 @@ import type { Script, User } from '../types/script'
|
|||||||
import {
|
import {
|
||||||
DeleteOutlined,
|
DeleteOutlined,
|
||||||
EditOutlined,
|
EditOutlined,
|
||||||
PlusOutlined,
|
|
||||||
SettingOutlined,
|
SettingOutlined,
|
||||||
StopOutlined,
|
StopOutlined,
|
||||||
UserAddOutlined,
|
UserAddOutlined,
|
||||||
UserOutlined,
|
|
||||||
} from '@ant-design/icons-vue'
|
} from '@ant-design/icons-vue'
|
||||||
|
|
||||||
interface Props {
|
interface Props {
|
||||||
@@ -358,6 +365,23 @@ const truncateText = (text: string, maxLength: number = 10): string => {
|
|||||||
if (!text) return ''
|
if (!text) return ''
|
||||||
return text.length > maxLength ? text.substring(0, maxLength) + '...' : text
|
return text.length > maxLength ? text.substring(0, maxLength) + '...' : text
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// 获取剩余天数的颜色
|
||||||
|
const getRemainingDayColor = (remainedDay: number): string => {
|
||||||
|
if (remainedDay === -1) return 'gold'
|
||||||
|
if (remainedDay === 0) return 'red'
|
||||||
|
if (remainedDay <= 3) return 'orange'
|
||||||
|
if (remainedDay <= 7) return 'yellow'
|
||||||
|
if (remainedDay <= 30) return 'blue'
|
||||||
|
return 'green'
|
||||||
|
}
|
||||||
|
|
||||||
|
// 获取剩余天数的显示文本
|
||||||
|
const getRemainingDayText = (remainedDay: number): string => {
|
||||||
|
if (remainedDay === -1) return '剩余天数: 长期有效'
|
||||||
|
if (remainedDay === 0) return '剩余天数: 已到期'
|
||||||
|
return `剩余天数: ${remainedDay}天`
|
||||||
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style scoped>
|
<style scoped>
|
||||||
|
|||||||
@@ -106,62 +106,57 @@ export function useScriptApi() {
|
|||||||
id: userIndex.uid,
|
id: userIndex.uid,
|
||||||
name: maaUserData.Info?.Name || `用户${userIndex.uid}`,
|
name: maaUserData.Info?.Name || `用户${userIndex.uid}`,
|
||||||
Info: {
|
Info: {
|
||||||
Name: maaUserData.Info?.Name || `用户${userIndex.uid}`,
|
Name: maaUserData.Info?.Name !== undefined ? maaUserData.Info.Name : `用户${userIndex.uid}`,
|
||||||
Id: maaUserData.Info?.Id || '',
|
Id: maaUserData.Info?.Id !== undefined ? maaUserData.Info.Id : '',
|
||||||
Password: maaUserData.Info?.Password || '',
|
Mode: maaUserData.Info?.Mode !== undefined ? maaUserData.Info.Mode : '简洁',
|
||||||
Server: maaUserData.Info?.Server || '官服',
|
StageMode: maaUserData.Info?.StageMode !== undefined ? maaUserData.Info.StageMode : 'Fixed',
|
||||||
MedicineNumb: maaUserData.Info?.MedicineNumb || 0,
|
Server: maaUserData.Info?.Server !== undefined ? maaUserData.Info.Server : 'Official',
|
||||||
RemainedDay: maaUserData.Info?.RemainedDay || -1,
|
|
||||||
SeriesNumb: maaUserData.Info?.SeriesNumb || '',
|
|
||||||
Notes: maaUserData.Info?.Notes || '',
|
|
||||||
Status: maaUserData.Info?.Status !== undefined ? maaUserData.Info.Status : true,
|
Status: maaUserData.Info?.Status !== undefined ? maaUserData.Info.Status : true,
|
||||||
Mode: maaUserData.Info?.Mode || 'MAA',
|
RemainedDay: maaUserData.Info?.RemainedDay !== undefined ? maaUserData.Info.RemainedDay : -1,
|
||||||
InfrastMode: maaUserData.Info?.InfrastMode || '默认',
|
Annihilation: maaUserData.Info?.Annihilation !== undefined ? maaUserData.Info.Annihilation : 'Annihilation',
|
||||||
Routine: maaUserData.Info?.Routine !== undefined ? maaUserData.Info.Routine : true,
|
Routine: maaUserData.Info?.Routine !== undefined ? maaUserData.Info.Routine : true,
|
||||||
Annihilation: maaUserData.Info?.Annihilation || '当期',
|
InfrastMode: maaUserData.Info?.InfrastMode !== undefined ? maaUserData.Info.InfrastMode : 'Normal',
|
||||||
Stage: maaUserData.Info?.Stage || '1-7',
|
InfrastPath: maaUserData.Info?.InfrastPath !== undefined ? maaUserData.Info.InfrastPath : '',
|
||||||
StageMode: maaUserData.Info?.StageMode || '刷完即停',
|
Password: maaUserData.Info?.Password !== undefined ? maaUserData.Info.Password : '',
|
||||||
Stage_1: maaUserData.Info?.Stage_1 || '',
|
Notes: maaUserData.Info?.Notes !== undefined ? maaUserData.Info.Notes : '',
|
||||||
Stage_2: maaUserData.Info?.Stage_2 || '',
|
MedicineNumb: maaUserData.Info?.MedicineNumb !== undefined ? maaUserData.Info.MedicineNumb : 0,
|
||||||
Stage_3: maaUserData.Info?.Stage_3 || '',
|
SeriesNumb: maaUserData.Info?.SeriesNumb !== undefined ? maaUserData.Info.SeriesNumb : '0',
|
||||||
Stage_Remain: maaUserData.Info?.Stage_Remain || '',
|
Stage: maaUserData.Info?.Stage !== undefined ? maaUserData.Info.Stage : '-',
|
||||||
IfSkland: maaUserData.Info?.IfSkland || false,
|
Stage_1: maaUserData.Info?.Stage_1 !== undefined ? maaUserData.Info.Stage_1 : '-',
|
||||||
SklandToken: maaUserData.Info?.SklandToken || '',
|
Stage_2: maaUserData.Info?.Stage_2 !== undefined ? maaUserData.Info.Stage_2 : '-',
|
||||||
|
Stage_3: maaUserData.Info?.Stage_3 !== undefined ? maaUserData.Info.Stage_3 : '-',
|
||||||
|
Stage_Remain: maaUserData.Info?.Stage_Remain !== undefined ? maaUserData.Info.Stage_Remain : '-',
|
||||||
|
IfSkland: maaUserData.Info?.IfSkland !== undefined ? maaUserData.Info.IfSkland : false,
|
||||||
|
SklandToken: maaUserData.Info?.SklandToken !== undefined ? maaUserData.Info.SklandToken : '',
|
||||||
},
|
},
|
||||||
Task: {
|
Task: {
|
||||||
|
IfWakeUp: maaUserData.Task?.IfWakeUp !== undefined ? maaUserData.Task.IfWakeUp : true,
|
||||||
|
IfRecruiting: maaUserData.Task?.IfRecruiting !== undefined ? maaUserData.Task.IfRecruiting : true,
|
||||||
IfBase: maaUserData.Task?.IfBase !== undefined ? maaUserData.Task.IfBase : true,
|
IfBase: maaUserData.Task?.IfBase !== undefined ? maaUserData.Task.IfBase : true,
|
||||||
IfCombat: maaUserData.Task?.IfCombat !== undefined ? maaUserData.Task.IfCombat : true,
|
IfCombat: maaUserData.Task?.IfCombat !== undefined ? maaUserData.Task.IfCombat : true,
|
||||||
IfMall: maaUserData.Task?.IfMall !== undefined ? maaUserData.Task.IfMall : true,
|
IfMall: maaUserData.Task?.IfMall !== undefined ? maaUserData.Task.IfMall : true,
|
||||||
IfMission: maaUserData.Task?.IfMission !== undefined ? maaUserData.Task.IfMission : true,
|
IfMission: maaUserData.Task?.IfMission !== undefined ? maaUserData.Task.IfMission : true,
|
||||||
IfRecruiting: maaUserData.Task?.IfRecruiting !== undefined ? maaUserData.Task.IfRecruiting : true,
|
IfAutoRoguelike: maaUserData.Task?.IfAutoRoguelike !== undefined ? maaUserData.Task.IfAutoRoguelike : false,
|
||||||
IfReclamation: maaUserData.Task?.IfReclamation || false,
|
IfReclamation: maaUserData.Task?.IfReclamation !== undefined ? maaUserData.Task.IfReclamation : false,
|
||||||
IfAutoRoguelike: maaUserData.Task?.IfAutoRoguelike || false,
|
|
||||||
IfWakeUp: maaUserData.Task?.IfWakeUp || false,
|
|
||||||
},
|
},
|
||||||
Notify: {
|
Notify: {
|
||||||
Enabled: maaUserData.Notify?.Enabled || false,
|
Enabled: maaUserData.Notify?.Enabled !== undefined ? maaUserData.Notify.Enabled : false,
|
||||||
ToAddress: maaUserData.Notify?.ToAddress || '',
|
IfSendStatistic: maaUserData.Notify?.IfSendStatistic !== undefined ? maaUserData.Notify.IfSendStatistic : false,
|
||||||
IfSendMail: maaUserData.Notify?.IfSendMail || false,
|
IfSendSixStar: maaUserData.Notify?.IfSendSixStar !== undefined ? maaUserData.Notify.IfSendSixStar : false,
|
||||||
IfSendSixStar: maaUserData.Notify?.IfSendSixStar || false,
|
IfSendMail: maaUserData.Notify?.IfSendMail !== undefined ? maaUserData.Notify.IfSendMail : false,
|
||||||
IfSendStatistic: maaUserData.Notify?.IfSendStatistic || false,
|
ToAddress: maaUserData.Notify?.ToAddress !== undefined ? maaUserData.Notify.ToAddress : '',
|
||||||
IfServerChan: maaUserData.Notify?.IfServerChan || false,
|
IfServerChan: maaUserData.Notify?.IfServerChan !== undefined ? maaUserData.Notify.IfServerChan : false,
|
||||||
IfCompanyWebHookBot: maaUserData.Notify?.IfCompanyWebHookBot || false,
|
ServerChanKey: maaUserData.Notify?.ServerChanKey !== undefined ? maaUserData.Notify.ServerChanKey : '',
|
||||||
ServerChanKey: maaUserData.Notify?.ServerChanKey || '',
|
IfCompanyWebHookBot: maaUserData.Notify?.IfCompanyWebHookBot !== undefined ? maaUserData.Notify.IfCompanyWebHookBot : false,
|
||||||
ServerChanChannel: maaUserData.Notify?.ServerChanChannel || '',
|
CompanyWebHookBotUrl: maaUserData.Notify?.CompanyWebHookBotUrl !== undefined ? maaUserData.Notify.CompanyWebHookBotUrl : '',
|
||||||
ServerChanTag: maaUserData.Notify?.ServerChanTag || '',
|
|
||||||
CompanyWebHookBotUrl: maaUserData.Notify?.CompanyWebHookBotUrl || '',
|
|
||||||
},
|
},
|
||||||
Data: {
|
Data: {
|
||||||
CustomInfrastPlanIndex: maaUserData.Data?.CustomInfrastPlanIndex || '',
|
LastAnnihilationDate: maaUserData.Data?.LastAnnihilationDate !== undefined ? maaUserData.Data.LastAnnihilationDate : '',
|
||||||
IfPassCheck: maaUserData.Data?.IfPassCheck || false,
|
LastProxyDate: maaUserData.Data?.LastProxyDate !== undefined ? maaUserData.Data.LastProxyDate : '',
|
||||||
LastAnnihilationDate: maaUserData.Data?.LastAnnihilationDate || '',
|
LastSklandDate: maaUserData.Data?.LastSklandDate !== undefined ? maaUserData.Data.LastSklandDate : '',
|
||||||
LastProxyDate: maaUserData.Data?.LastProxyDate || '',
|
CustomInfrastPlanIndex: maaUserData.Data?.CustomInfrastPlanIndex !== undefined ? maaUserData.Data.CustomInfrastPlanIndex : '',
|
||||||
LastSklandDate: maaUserData.Data?.LastSklandDate || '',
|
IfPassCheck: maaUserData.Data?.IfPassCheck !== undefined ? maaUserData.Data.IfPassCheck : false,
|
||||||
ProxyTimes: maaUserData.Data?.ProxyTimes || 0,
|
ProxyTimes: maaUserData.Data?.ProxyTimes !== undefined ? maaUserData.Data.ProxyTimes : 0,
|
||||||
},
|
|
||||||
QFluentWidgets: {
|
|
||||||
ThemeColor: maaUserData.QFluentWidgets?.ThemeColor || 'blue',
|
|
||||||
ThemeMode: maaUserData.QFluentWidgets?.ThemeMode || 'system',
|
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
} else if (userIndex.type === 'GeneralUserConfig' && userData) {
|
} else if (userIndex.type === 'GeneralUserConfig' && userData) {
|
||||||
@@ -170,62 +165,28 @@ export function useScriptApi() {
|
|||||||
id: userIndex.uid,
|
id: userIndex.uid,
|
||||||
name: generalUserData.Info?.Name || `用户${userIndex.uid}`,
|
name: generalUserData.Info?.Name || `用户${userIndex.uid}`,
|
||||||
Info: {
|
Info: {
|
||||||
Name: generalUserData.Info?.Name || `用户${userIndex.uid}`,
|
Name: generalUserData.Info?.Name !== undefined ? generalUserData.Info.Name : `用户${userIndex.uid}`,
|
||||||
Id: generalUserData.Info?.Id || '',
|
|
||||||
Password: generalUserData.Info?.Password || '',
|
|
||||||
Server: generalUserData.Info?.Server || '官服',
|
|
||||||
MedicineNumb: 0,
|
|
||||||
RemainedDay: -1,
|
|
||||||
SeriesNumb: '',
|
|
||||||
Notes: generalUserData.Info?.Notes || '',
|
|
||||||
Status: generalUserData.Info?.Status !== undefined ? generalUserData.Info.Status : true,
|
Status: generalUserData.Info?.Status !== undefined ? generalUserData.Info.Status : true,
|
||||||
Mode: 'General',
|
RemainedDay: generalUserData.Info?.RemainedDay !== undefined ? generalUserData.Info.RemainedDay : -1,
|
||||||
InfrastMode: '默认',
|
IfScriptBeforeTask: generalUserData.Info?.IfScriptBeforeTask !== undefined ? generalUserData.Info.IfScriptBeforeTask : false,
|
||||||
Routine: true,
|
ScriptBeforeTask: generalUserData.Info?.ScriptBeforeTask !== undefined ? generalUserData.Info.ScriptBeforeTask : '',
|
||||||
Annihilation: '当期',
|
IfScriptAfterTask: generalUserData.Info?.IfScriptAfterTask !== undefined ? generalUserData.Info.IfScriptAfterTask : false,
|
||||||
Stage: '1-7',
|
ScriptAfterTask: generalUserData.Info?.ScriptAfterTask !== undefined ? generalUserData.Info.ScriptAfterTask : '',
|
||||||
StageMode: '刷完即停',
|
Notes: generalUserData.Info?.Notes !== undefined ? generalUserData.Info.Notes : '',
|
||||||
Stage_1: '',
|
|
||||||
Stage_2: '',
|
|
||||||
Stage_3: '',
|
|
||||||
Stage_Remain: '',
|
|
||||||
IfSkland: false,
|
|
||||||
SklandToken: '',
|
|
||||||
},
|
|
||||||
Task: {
|
|
||||||
IfBase: true,
|
|
||||||
IfCombat: true,
|
|
||||||
IfMall: true,
|
|
||||||
IfMission: true,
|
|
||||||
IfRecruiting: true,
|
|
||||||
IfReclamation: false,
|
|
||||||
IfAutoRoguelike: false,
|
|
||||||
IfWakeUp: false,
|
|
||||||
},
|
},
|
||||||
Notify: {
|
Notify: {
|
||||||
Enabled: false,
|
Enabled: generalUserData.Notify?.Enabled !== undefined ? generalUserData.Notify.Enabled : false,
|
||||||
ToAddress: '',
|
IfSendStatistic: generalUserData.Notify?.IfSendStatistic !== undefined ? generalUserData.Notify.IfSendStatistic : false,
|
||||||
IfSendMail: false,
|
IfSendMail: generalUserData.Notify?.IfSendMail !== undefined ? generalUserData.Notify.IfSendMail : false,
|
||||||
IfSendSixStar: false,
|
ToAddress: generalUserData.Notify?.ToAddress !== undefined ? generalUserData.Notify.ToAddress : '',
|
||||||
IfSendStatistic: false,
|
IfServerChan: generalUserData.Notify?.IfServerChan !== undefined ? generalUserData.Notify.IfServerChan : false,
|
||||||
IfServerChan: false,
|
ServerChanKey: generalUserData.Notify?.ServerChanKey !== undefined ? generalUserData.Notify.ServerChanKey : '',
|
||||||
IfCompanyWebHookBot: false,
|
IfCompanyWebHookBot: generalUserData.Notify?.IfCompanyWebHookBot !== undefined ? generalUserData.Notify.IfCompanyWebHookBot : false,
|
||||||
ServerChanKey: '',
|
CompanyWebHookBotUrl: generalUserData.Notify?.CompanyWebHookBotUrl !== undefined ? generalUserData.Notify.CompanyWebHookBotUrl : '',
|
||||||
ServerChanChannel: '',
|
|
||||||
ServerChanTag: '',
|
|
||||||
CompanyWebHookBotUrl: '',
|
|
||||||
},
|
},
|
||||||
Data: {
|
Data: {
|
||||||
CustomInfrastPlanIndex: '',
|
LastProxyDate: generalUserData.Data?.LastProxyDate !== undefined ? generalUserData.Data.LastProxyDate : '',
|
||||||
IfPassCheck: false,
|
ProxyTimes: generalUserData.Data?.ProxyTimes !== undefined ? generalUserData.Data.ProxyTimes : 0,
|
||||||
LastAnnihilationDate: '',
|
|
||||||
LastProxyDate: '',
|
|
||||||
LastSklandDate: '',
|
|
||||||
ProxyTimes: 0,
|
|
||||||
},
|
|
||||||
QFluentWidgets: {
|
|
||||||
ThemeColor: 'blue',
|
|
||||||
ThemeMode: 'system',
|
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -72,7 +72,7 @@
|
|||||||
/>
|
/>
|
||||||
</a-form-item>
|
</a-form-item>
|
||||||
</a-col>
|
</a-col>
|
||||||
<a-col :span="12">
|
<a-col :span="6">
|
||||||
<a-form-item name="status">
|
<a-form-item name="status">
|
||||||
<template #label>
|
<template #label>
|
||||||
<a-tooltip title="是否启用该用户">
|
<a-tooltip title="是否启用该用户">
|
||||||
@@ -88,10 +88,7 @@
|
|||||||
</a-select>
|
</a-select>
|
||||||
</a-form-item>
|
</a-form-item>
|
||||||
</a-col>
|
</a-col>
|
||||||
</a-row>
|
<a-col :span="6">
|
||||||
|
|
||||||
<a-row :gutter="24">
|
|
||||||
<a-col :span="12">
|
|
||||||
<a-form-item name="remainedDay">
|
<a-form-item name="remainedDay">
|
||||||
<template #label>
|
<template #label>
|
||||||
<a-tooltip title="账号剩余的有效天数,「-1」表示无限">
|
<a-tooltip title="账号剩余的有效天数,「-1」表示无限">
|
||||||
|
|||||||
@@ -3,14 +3,6 @@
|
|||||||
<div class="header-title">
|
<div class="header-title">
|
||||||
<h1>历史记录</h1>
|
<h1>历史记录</h1>
|
||||||
</div>
|
</div>
|
||||||
<a-space size="middle">
|
|
||||||
<a-button size="large" @click="handleRefresh" class="default">
|
|
||||||
<template #icon>
|
|
||||||
<ReloadOutlined />
|
|
||||||
</template>
|
|
||||||
刷新
|
|
||||||
</a-button>
|
|
||||||
</a-space>
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<!-- 搜索筛选区域 -->
|
<!-- 搜索筛选区域 -->
|
||||||
@@ -296,14 +288,6 @@
|
|||||||
<template #extra>
|
<template #extra>
|
||||||
<a-space>
|
<a-space>
|
||||||
<FileTextOutlined />
|
<FileTextOutlined />
|
||||||
<a-button
|
|
||||||
type="link"
|
|
||||||
size="small"
|
|
||||||
@click="handleRefreshLog"
|
|
||||||
:loading="detailLoading"
|
|
||||||
>
|
|
||||||
刷新日志
|
|
||||||
</a-button>
|
|
||||||
</a-space>
|
</a-space>
|
||||||
</template>
|
</template>
|
||||||
<a-spin :spinning="detailLoading">
|
<a-spin :spinning="detailLoading">
|
||||||
@@ -327,7 +311,6 @@
|
|||||||
import { ref, reactive, onMounted, computed } from 'vue'
|
import { ref, reactive, onMounted, computed } from 'vue'
|
||||||
import { message } from 'ant-design-vue'
|
import { message } from 'ant-design-vue'
|
||||||
import {
|
import {
|
||||||
ReloadOutlined,
|
|
||||||
SearchOutlined,
|
SearchOutlined,
|
||||||
ClearOutlined,
|
ClearOutlined,
|
||||||
HistoryOutlined,
|
HistoryOutlined,
|
||||||
@@ -527,11 +510,6 @@ const handleReset = () => {
|
|||||||
activeKeys.value = []
|
activeKeys.value = []
|
||||||
}
|
}
|
||||||
|
|
||||||
// 刷新数据
|
|
||||||
const handleRefresh = () => {
|
|
||||||
handleSearch()
|
|
||||||
}
|
|
||||||
|
|
||||||
// 快捷时间选择处理
|
// 快捷时间选择处理
|
||||||
const handleQuickTimeSelect = (preset: (typeof timePresets)[0]) => {
|
const handleQuickTimeSelect = (preset: (typeof timePresets)[0]) => {
|
||||||
currentPreset.value = preset.key
|
currentPreset.value = preset.key
|
||||||
@@ -587,13 +565,6 @@ const loadUserLog = async (jsonFile: string) => {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// 刷新日志
|
|
||||||
const handleRefreshLog = async () => {
|
|
||||||
if (currentJsonFile.value) {
|
|
||||||
await loadUserLog(currentJsonFile.value)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
// 获取日期状态颜色
|
// 获取日期状态颜色
|
||||||
const getDateStatusColor = (users: Record<string, HistoryData>) => {
|
const getDateStatusColor = (users: Record<string, HistoryData>) => {
|
||||||
const hasError = Object.values(users).some(
|
const hasError = Object.values(users).some(
|
||||||
|
|||||||
@@ -33,14 +33,6 @@
|
|||||||
class="activity-card"
|
class="activity-card"
|
||||||
:loading="loading"
|
:loading="loading"
|
||||||
>
|
>
|
||||||
<template #extra>
|
|
||||||
<a-button type="text" @click="refreshActivity" :loading="loading">
|
|
||||||
<template #icon>
|
|
||||||
<ReloadOutlined />
|
|
||||||
</template>
|
|
||||||
刷新
|
|
||||||
</a-button>
|
|
||||||
</template>
|
|
||||||
|
|
||||||
<div v-if="error" class="error-message">
|
<div v-if="error" class="error-message">
|
||||||
<a-alert :message="error" type="error" show-icon closable @close="error = ''" />
|
<a-alert :message="error" type="error" show-icon closable @close="error = ''" />
|
||||||
@@ -251,7 +243,6 @@
|
|||||||
import { ref, onMounted, computed } from 'vue'
|
import { ref, onMounted, computed } from 'vue'
|
||||||
import { message } from 'ant-design-vue'
|
import { message } from 'ant-design-vue'
|
||||||
import {
|
import {
|
||||||
ReloadOutlined,
|
|
||||||
ClockCircleOutlined,
|
ClockCircleOutlined,
|
||||||
UserOutlined,
|
UserOutlined,
|
||||||
BellOutlined,
|
BellOutlined,
|
||||||
@@ -451,13 +442,6 @@ const fetchActivityData = async () => {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
const refreshActivity = async () => {
|
|
||||||
await fetchActivityData()
|
|
||||||
if (error.value) {
|
|
||||||
message.error(error.value)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
// 获取代理状态颜色
|
// 获取代理状态颜色
|
||||||
const getProxyStatusColor = () => {
|
const getProxyStatusColor = () => {
|
||||||
const hasError = Object.values(proxyData.value).some(proxy => proxy.ErrorTimes > 0)
|
const hasError = Object.values(proxyData.value).some(proxy => proxy.ErrorTimes > 0)
|
||||||
|
|||||||
@@ -331,7 +331,7 @@
|
|||||||
</a-row>
|
</a-row>
|
||||||
<a-row :gutter="24">
|
<a-row :gutter="24">
|
||||||
<a-col :span="6">
|
<a-col :span="6">
|
||||||
<a-form-item name="remainedDay">
|
<a-form-item name="medicineNumb">
|
||||||
<template #label>
|
<template #label>
|
||||||
<a-tooltip title="吃理智药数量">
|
<a-tooltip title="吃理智药数量">
|
||||||
<span class="form-label">
|
<span class="form-label">
|
||||||
|
|||||||
@@ -38,13 +38,6 @@
|
|||||||
删除当前计划
|
删除当前计划
|
||||||
</a-button>
|
</a-button>
|
||||||
</a-popconfirm>
|
</a-popconfirm>
|
||||||
|
|
||||||
<a-button size="large" @click="handleRefresh">
|
|
||||||
<template #icon>
|
|
||||||
<ReloadOutlined />
|
|
||||||
</template>
|
|
||||||
刷新
|
|
||||||
</a-button>
|
|
||||||
</a-space>
|
</a-space>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@@ -187,7 +180,7 @@
|
|||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
import { computed, onMounted, ref, watch, nextTick } from 'vue'
|
import { computed, onMounted, ref, watch, nextTick } from 'vue'
|
||||||
import { message } from 'ant-design-vue'
|
import { message } from 'ant-design-vue'
|
||||||
import { PlusOutlined, ReloadOutlined, DeleteOutlined, EditOutlined } from '@ant-design/icons-vue'
|
import { PlusOutlined, DeleteOutlined, EditOutlined } from '@ant-design/icons-vue'
|
||||||
import { usePlanApi } from '../composables/usePlanApi'
|
import { usePlanApi } from '../composables/usePlanApi'
|
||||||
|
|
||||||
// API 相关
|
// API 相关
|
||||||
@@ -691,14 +684,6 @@ const savePlanData = async () => {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// 刷新计划列表
|
|
||||||
const handleRefresh = async () => {
|
|
||||||
loading.value = true
|
|
||||||
await initPlans()
|
|
||||||
loading.value = false
|
|
||||||
// message.success('刷新成功')
|
|
||||||
}
|
|
||||||
|
|
||||||
// 自动保存功能
|
// 自动保存功能
|
||||||
watch(
|
watch(
|
||||||
() => [currentPlanName.value, currentMode.value, tableData.value],
|
() => [currentPlanName.value, currentMode.value, tableData.value],
|
||||||
|
|||||||
@@ -38,13 +38,6 @@
|
|||||||
删除当前队列
|
删除当前队列
|
||||||
</a-button>
|
</a-button>
|
||||||
</a-popconfirm>
|
</a-popconfirm>
|
||||||
|
|
||||||
<a-button size="large" @click="handleRefresh">
|
|
||||||
<template #icon>
|
|
||||||
<ReloadOutlined />
|
|
||||||
</template>
|
|
||||||
刷新
|
|
||||||
</a-button>
|
|
||||||
</a-space>
|
</a-space>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@@ -211,7 +204,7 @@
|
|||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
import { nextTick, onMounted, ref, watch } from 'vue'
|
import { nextTick, onMounted, ref, watch } from 'vue'
|
||||||
import { message } from 'ant-design-vue'
|
import { message } from 'ant-design-vue'
|
||||||
import { DeleteOutlined, EditOutlined, PlusOutlined, ReloadOutlined, QuestionCircleOutlined } from '@ant-design/icons-vue'
|
import { DeleteOutlined, EditOutlined, PlusOutlined, QuestionCircleOutlined } from '@ant-design/icons-vue'
|
||||||
import { Service } from '@/api'
|
import { Service } from '@/api'
|
||||||
import TimeSetManager from '@/components/queue/TimeSetManager.vue'
|
import TimeSetManager from '@/components/queue/TimeSetManager.vue'
|
||||||
import QueueItemManager from '@/components/queue/QueueItemManager.vue'
|
import QueueItemManager from '@/components/queue/QueueItemManager.vue'
|
||||||
@@ -634,13 +627,6 @@ const saveQueueData = async () => {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// 刷新队列列表
|
|
||||||
const handleRefresh = async () => {
|
|
||||||
loading.value = true
|
|
||||||
await fetchQueues()
|
|
||||||
loading.value = false
|
|
||||||
}
|
|
||||||
|
|
||||||
// 自动保存功能
|
// 自动保存功能
|
||||||
watch(
|
watch(
|
||||||
() => [
|
() => [
|
||||||
|
|||||||
@@ -16,12 +16,6 @@
|
|||||||
</template>
|
</template>
|
||||||
新建脚本
|
新建脚本
|
||||||
</a-button>
|
</a-button>
|
||||||
<a-button size="large" @click="handleRefresh" class="default">
|
|
||||||
<template #icon>
|
|
||||||
<ReloadOutlined />
|
|
||||||
</template>
|
|
||||||
刷新
|
|
||||||
</a-button>
|
|
||||||
</a-space>
|
</a-space>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
@@ -229,7 +223,6 @@ import {
|
|||||||
FileSearchOutlined,
|
FileSearchOutlined,
|
||||||
FileTextOutlined,
|
FileTextOutlined,
|
||||||
PlusOutlined,
|
PlusOutlined,
|
||||||
ReloadOutlined,
|
|
||||||
SettingOutlined,
|
SettingOutlined,
|
||||||
UserOutlined,
|
UserOutlined,
|
||||||
} from '@ant-design/icons-vue'
|
} from '@ant-design/icons-vue'
|
||||||
@@ -494,11 +487,6 @@ const handleDeleteUser = async (user: User) => {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
const handleRefresh = () => {
|
|
||||||
loadScripts()
|
|
||||||
message.success('刷新成功')
|
|
||||||
}
|
|
||||||
|
|
||||||
const handleMAAConfig = async (script: Script) => {
|
const handleMAAConfig = async (script: Script) => {
|
||||||
try {
|
try {
|
||||||
// 检查是否已有连接
|
// 检查是否已有连接
|
||||||
|
|||||||
@@ -386,7 +386,7 @@
|
|||||||
<a-row :gutter="24"></a-row>
|
<a-row :gutter="24"></a-row>
|
||||||
<a-row :gutter="24">
|
<a-row :gutter="24">
|
||||||
<a-col :span="6">
|
<a-col :span="6">
|
||||||
<a-form-item name="remainedDay">
|
<a-form-item name="medicineNumb">
|
||||||
<template #label>
|
<template #label>
|
||||||
<a-tooltip title="吃理智药数量">
|
<a-tooltip title="吃理智药数量">
|
||||||
<span class="form-label">
|
<span class="form-label">
|
||||||
|
|||||||
Reference in New Issue
Block a user