From 19828ea396d2dcb7218117ef2f3ae5f3fc2a4222 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=89=AB=E5=9C=B0=E5=83=A7?= <357099073@qq.com> Date: Wed, 15 Apr 2026 23:19:40 +0800 Subject: [PATCH] =?UTF-8?q?=E6=9B=B4=E6=96=B0=E5=8F=B7=E6=B1=A0=E7=BC=96?= =?UTF-8?q?=E8=BE=91=E7=8E=AF=E5=A2=83?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/api/accountPool.js | 8 ++ .../accountpool/cursor/components/detail.vue | 109 +++++++++++++++++ .../accountpool/cursor/components/extract.vue | 80 +++++++++++++ src/views/accountpool/cursor/index.vue | 113 +++++++----------- .../accountpool/kiro/components/detail.vue | 96 +++++++++++++++ .../accountpool/kiro/components/extract.vue | 55 +++++++++ src/views/accountpool/kiro/index.vue | 77 ++++++------ .../windsurf/components/detail.vue | 96 +++++++++++++++ .../windsurf/components/extract.vue | 55 +++++++++ src/views/accountpool/windsurf/index.vue | 77 ++++++------ 10 files changed, 618 insertions(+), 148 deletions(-) create mode 100644 src/views/accountpool/cursor/components/detail.vue create mode 100644 src/views/accountpool/cursor/components/extract.vue create mode 100644 src/views/accountpool/kiro/components/detail.vue create mode 100644 src/views/accountpool/kiro/components/extract.vue create mode 100644 src/views/accountpool/windsurf/components/detail.vue create mode 100644 src/views/accountpool/windsurf/components/extract.vue diff --git a/src/api/accountPool.js b/src/api/accountPool.js index f5ccdf5..bd7b82b 100644 --- a/src/api/accountPool.js +++ b/src/api/accountPool.js @@ -42,3 +42,11 @@ export function extractAccountPool(module, data) { data, }); } + +export function updateAccountPoolRemark(module, data) { + return request({ + url: `${base(module)}/updateRemark`, + method: 'post', + data, + }); +} diff --git a/src/views/accountpool/cursor/components/detail.vue b/src/views/accountpool/cursor/components/detail.vue new file mode 100644 index 0000000..c6cca07 --- /dev/null +++ b/src/views/accountpool/cursor/components/detail.vue @@ -0,0 +1,109 @@ + + + + + diff --git a/src/views/accountpool/cursor/components/extract.vue b/src/views/accountpool/cursor/components/extract.vue new file mode 100644 index 0000000..bafff9d --- /dev/null +++ b/src/views/accountpool/cursor/components/extract.vue @@ -0,0 +1,80 @@ + + + diff --git a/src/views/accountpool/cursor/index.vue b/src/views/accountpool/cursor/index.vue index 92a5c08..c806c47 100644 --- a/src/views/accountpool/cursor/index.vue +++ b/src/views/accountpool/cursor/index.vue @@ -2,12 +2,15 @@ import { computed, onMounted, reactive, ref, watch } from 'vue'; import { ElMessage } from 'element-plus'; import Edit from './components/edit.vue'; +import DetailDialog from './components/detail.vue'; +import ExtractDialog from './components/extract.vue'; import { addAccountPool, batchAddAccountPool, extractAccountPool, getAccountPoolDetail, getAccountPoolList, + updateAccountPoolRemark, } from '@/api/accountPool'; const moduleKey = 'cursor'; @@ -29,6 +32,7 @@ const activeTypeTab = ref('all'); const extractForm = reactive({ platform: 'local', type: 'account', + remark: '', }); const tableData = ref([]); @@ -36,6 +40,7 @@ const total = ref(0); const selectedRows = ref([]); const detailRow = ref(null); +const detailRemarkSaving = ref(false); const pagination = reactive({ page: 1, pageSize: 20, @@ -77,14 +82,6 @@ function openAddDialog(mode = 'single') { editVisible.value = true; } -function nowText() { - const d = new Date(); - const p = (v) => String(v).padStart(2, '0'); - return `${d.getFullYear()}-${p(d.getMonth() + 1)}-${p(d.getDate())} ${p( - d.getHours() - )}:${p(d.getMinutes())}:${p(d.getSeconds())}`; -} - async function saveRows(rows) { if (!rows.length) return; if (rows.length === 1) { @@ -127,17 +124,11 @@ function openDetail(row) { }); } -function openExtractDialog() { - extractTargetRow.value = null; - extractForm.platform = 'local'; - extractForm.type = 'account'; - extractVisible.value = true; -} - function openExtractByRow(row) { extractTargetRow.value = row; extractForm.platform = 'local'; extractForm.type = row.type; + extractForm.remark = row.remark || ''; extractVisible.value = true; } @@ -153,6 +144,7 @@ async function handleExtract() { id: target.id, type: target.type, platform: extractForm.platform, + remark: extractForm.remark || '', }); if (res?.code !== 200) { ElMessage.error(res?.msg || '提取失败'); @@ -166,6 +158,25 @@ async function handleExtract() { } } +async function handleSaveRemark(payload) { + if (!payload?.id) return; + detailRemarkSaving.value = true; + try { + const res = await updateAccountPoolRemark(moduleKey, payload); + if (res?.code !== 200) { + ElMessage.error(res?.msg || '备注更新失败'); + return; + } + ElMessage.success('备注已更新'); + if (detailRow.value?.id === payload.id) { + detailRow.value = { ...detailRow.value, remark: payload.remark || '' }; + } + await fetchList(); + } finally { + detailRemarkSaving.value = false; + } +} + function markExtractForSelected() { if (!selectedRows.value.length) { ElMessage.warning('请先选择数据'); @@ -443,57 +454,24 @@ function copyCardInfo(row) { - - - {{ detailRow.id }} - - {{ typeText(detailRow.type) }} - - - {{ detailRow.account || '-' }} - - - {{ detailRow.password || '-' }} - - - {{ detailRow.token || '-' }} - - - {{ detailRow.extracted ? '已提取' : '未提取' }} - - - {{ detailRow.extractedAt || '-' }} - - - - {{ platformText(detailRow.extractedPlatform) }} - - - - - - {{ detailRow.remark || '-' }} - - - + - - - - - - - - - - - - - + @@ -689,11 +667,6 @@ function copyCardInfo(row) { margin: 0; } -.token-text { - word-break: break-all; - white-space: pre-wrap; - line-height: 1.6; -} diff --git a/src/views/accountpool/kiro/components/extract.vue b/src/views/accountpool/kiro/components/extract.vue new file mode 100644 index 0000000..8e4078b --- /dev/null +++ b/src/views/accountpool/kiro/components/extract.vue @@ -0,0 +1,55 @@ + + + diff --git a/src/views/accountpool/kiro/index.vue b/src/views/accountpool/kiro/index.vue index 4f04348..89967dd 100644 --- a/src/views/accountpool/kiro/index.vue +++ b/src/views/accountpool/kiro/index.vue @@ -2,12 +2,15 @@ import { computed, onMounted, reactive, ref, watch } from 'vue'; import { ElMessage } from 'element-plus'; import Edit from './components/edit.vue'; +import DetailDialog from './components/detail.vue'; +import ExtractDialog from './components/extract.vue'; import { addAccountPool, batchAddAccountPool, extractAccountPool, getAccountPoolDetail, getAccountPoolList, + updateAccountPoolRemark, } from '@/api/accountPool'; const moduleKey = 'krio'; @@ -23,12 +26,13 @@ const apiDocVisible = ref(false); const query = reactive({ keyword: '', status: '' }); const activeTypeTab = ref('all'); -const extractForm = reactive({ platform: 'local', type: 'account' }); +const extractForm = reactive({ platform: 'local', type: 'account', remark: '' }); const tableData = ref([]); const total = ref(0); const selectedRows = ref([]); const detailRow = ref(null); +const detailRemarkSaving = ref(false); const pagination = reactive({ page: 1, pageSize: 30 }); const pagedList = computed(() => tableData.value); @@ -88,6 +92,7 @@ function openExtractByRow(row) { extractTargetRow.value = row; extractForm.platform = 'local'; extractForm.type = row.type; + extractForm.remark = row.remark || ''; extractVisible.value = true; } @@ -97,7 +102,7 @@ async function handleExtract() { const target = extractTargetRow.value; if (!target) { ElMessage.warning('未找到提取目标'); return; } const res = await extractAccountPool(moduleKey, { - id: target.id, type: target.type, platform: extractForm.platform, + id: target.id, type: target.type, platform: extractForm.platform, remark: extractForm.remark || '', }); if (res?.code !== 200) { ElMessage.error(res?.msg || '提取失败'); return; } ElMessage.success('提取成功'); @@ -106,6 +111,20 @@ async function handleExtract() { } finally { loading.value = false; } } +async function handleSaveRemark(payload) { + if (!payload?.id) return; + detailRemarkSaving.value = true; + try { + const res = await updateAccountPoolRemark(moduleKey, payload); + if (res?.code !== 200) { ElMessage.error(res?.msg || '备注更新失败'); return; } + ElMessage.success('备注已更新'); + if (detailRow.value?.id === payload.id) { + detailRow.value = { ...detailRow.value, remark: payload.remark || '' }; + } + await fetchList(); + } finally { detailRemarkSaving.value = false; } +} + function markExtractForSelected() { if (!selectedRows.value.length) { ElMessage.warning('请先选择数据'); return; } loading.value = true; @@ -329,43 +348,24 @@ function copyCardInfo(row) { - - - {{ detailRow.id }} - {{ typeText(detailRow.type) }} - {{ detailRow.account || '-' }} - {{ detailRow.password || '-' }} - - {{ detailRow.token || '-' }} - - {{ detailRow.extracted ? '已提取' : '未提取' }} - {{ detailRow.extractedAt || '-' }} - - - {{ platformText(detailRow.extractedPlatform) }} - - - - - {{ detailRow.remark || '-' }} - - + - - - - - - - - - - - - - + @@ -449,7 +449,6 @@ function copyCardInfo(row) { .example-url-wrap { display: flex; align-items: center; gap: 8px; background: #f5f7fa; padding: 6px 10px; border-radius: 4px; } .example-url { flex: 1; font-size: 12px; color: #409eff; word-break: break-all; } .code-block { background: #1e1e1e; color: #d4d4d4; padding: 12px 16px; border-radius: 6px; font-size: 12px; line-height: 1.6; overflow-x: auto; white-space: pre-wrap; word-break: break-all; margin: 0; } -.token-text { word-break: break-all; white-space: pre-wrap; line-height: 1.6; } diff --git a/src/views/accountpool/windsurf/components/extract.vue b/src/views/accountpool/windsurf/components/extract.vue new file mode 100644 index 0000000..8e4078b --- /dev/null +++ b/src/views/accountpool/windsurf/components/extract.vue @@ -0,0 +1,55 @@ + + + diff --git a/src/views/accountpool/windsurf/index.vue b/src/views/accountpool/windsurf/index.vue index cd9d450..ebc6f7a 100644 --- a/src/views/accountpool/windsurf/index.vue +++ b/src/views/accountpool/windsurf/index.vue @@ -2,12 +2,15 @@ import { computed, onMounted, reactive, ref, watch } from 'vue'; import { ElMessage } from 'element-plus'; import Edit from './components/edit.vue'; +import DetailDialog from './components/detail.vue'; +import ExtractDialog from './components/extract.vue'; import { addAccountPool, batchAddAccountPool, extractAccountPool, getAccountPoolDetail, getAccountPoolList, + updateAccountPoolRemark, } from '@/api/accountPool'; const moduleKey = 'windsurf'; @@ -23,12 +26,13 @@ const apiDocVisible = ref(false); const query = reactive({ keyword: '', status: '' }); const activeTypeTab = ref('all'); -const extractForm = reactive({ platform: 'local', type: 'account' }); +const extractForm = reactive({ platform: 'local', type: 'account', remark: '' }); const tableData = ref([]); const total = ref(0); const selectedRows = ref([]); const detailRow = ref(null); +const detailRemarkSaving = ref(false); const pagination = reactive({ page: 1, pageSize: 30 }); const pagedList = computed(() => tableData.value); @@ -88,6 +92,7 @@ function openExtractByRow(row) { extractTargetRow.value = row; extractForm.platform = 'local'; extractForm.type = row.type; + extractForm.remark = row.remark || ''; extractVisible.value = true; } @@ -97,7 +102,7 @@ async function handleExtract() { const target = extractTargetRow.value; if (!target) { ElMessage.warning('未找到提取目标'); return; } const res = await extractAccountPool(moduleKey, { - id: target.id, type: target.type, platform: extractForm.platform, + id: target.id, type: target.type, platform: extractForm.platform, remark: extractForm.remark || '', }); if (res?.code !== 200) { ElMessage.error(res?.msg || '提取失败'); return; } ElMessage.success('提取成功'); @@ -106,6 +111,20 @@ async function handleExtract() { } finally { loading.value = false; } } +async function handleSaveRemark(payload) { + if (!payload?.id) return; + detailRemarkSaving.value = true; + try { + const res = await updateAccountPoolRemark(moduleKey, payload); + if (res?.code !== 200) { ElMessage.error(res?.msg || '备注更新失败'); return; } + ElMessage.success('备注已更新'); + if (detailRow.value?.id === payload.id) { + detailRow.value = { ...detailRow.value, remark: payload.remark || '' }; + } + await fetchList(); + } finally { detailRemarkSaving.value = false; } +} + function markExtractForSelected() { if (!selectedRows.value.length) { ElMessage.warning('请先选择数据'); return; } loading.value = true; @@ -329,43 +348,24 @@ function copyCardInfo(row) { - - - {{ detailRow.id }} - {{ typeText(detailRow.type) }} - {{ detailRow.account || '-' }} - {{ detailRow.password || '-' }} - - {{ detailRow.token || '-' }} - - {{ detailRow.extracted ? '已提取' : '未提取' }} - {{ detailRow.extractedAt || '-' }} - - - {{ platformText(detailRow.extractedPlatform) }} - - - - - {{ detailRow.remark || '-' }} - - + - - - - - - - - - - - - - + @@ -449,7 +449,6 @@ function copyCardInfo(row) { .example-url-wrap { display: flex; align-items: center; gap: 8px; background: #f5f7fa; padding: 6px 10px; border-radius: 4px; } .example-url { flex: 1; font-size: 12px; color: #409eff; word-break: break-all; } .code-block { background: #1e1e1e; color: #d4d4d4; padding: 12px 16px; border-radius: 6px; font-size: 12px; line-height: 1.6; overflow-x: auto; white-space: pre-wrap; word-break: break-all; margin: 0; } -.token-text { word-break: break-all; white-space: pre-wrap; line-height: 1.6; }