dyeh*Nl55q@2gFOvG>-Q
zPbZ#Q+}D}NxP{+vPl`CS@rN_cyJcy^5Ga~BNauYqr^?Gf2i=QcjYz2y0XZCoKY1=`
jP3AFm1TB>N`)~0Zz@iYKz>;EF00000NkvXXu0mjf_p&S^
literal 0
HcmV?d00001
diff --git a/src/views/property-marketing/media-account/account-detail/components/account-info/index.vue b/src/views/property-marketing/media-account/account-detail/components/account-info/index.vue
index 06f1b32..6b7f3f2 100644
--- a/src/views/property-marketing/media-account/account-detail/components/account-info/index.vue
+++ b/src/views/property-marketing/media-account/account-detail/components/account-info/index.vue
@@ -53,11 +53,7 @@
-
- {{
- STATUS_LIST.find((item) => item.value === detailData.status)?.label
- }}
-
+
@@ -138,8 +134,8 @@ import { useRoute } from 'vue-router';
import { formatTableField, formatNumberShow, exactFormatTime } from '@/utils/tools';
import { getAccountInfoFields } from '../../constants';
-import { STATUS_LIST } from '@/views/property-marketing/media-account/components/status-select/constants';
import { getPropPrefix } from '@/views/property-marketing/media-account/account-dashboard/constants';
+import StatusBox from '@/views/property-marketing/media-account/components/status-select/status-box.tsx';
import { getAccountBoardDetail } from '@/api/all/propertyMarketing';
diff --git a/src/views/property-marketing/media-account/account-manage/components/account-table/footer-btn.tsx b/src/views/property-marketing/media-account/account-manage/components/account-table/footer-btn.tsx
new file mode 100644
index 0000000..66eeea9
--- /dev/null
+++ b/src/views/property-marketing/media-account/account-manage/components/account-table/footer-btn.tsx
@@ -0,0 +1,166 @@
+import {
+ EnumStatus,
+ EnumErrorStatus,
+ getStatusInfo,
+} from '@/views/property-marketing/media-account/components/status-select/status-box';
+import { Dropdown, Doption, Button, Tooltip } from '@arco-design/web-vue';
+export default defineComponent({
+ name: 'FooterBtn',
+ props: {
+ item: {
+ type: Object,
+ default: () => ({}),
+ },
+ },
+ emits: ['syncData', 'handleReauthorize', 'handlePause', 'openDelete', 'openEdit'],
+ setup(props, { emit }) {
+ const statusInfo = computed(() => {
+ const { status, error_status, to_be_expire_for_cookie } = props.item;
+ return getStatusInfo(status, error_status, to_be_expire_for_cookie) ?? {};
+ });
+
+ const renderEditDoption = () => {
+ return (
+
emit('openEdit', props.item)}>
+ 编辑
+
+ );
+ };
+ const renderReauthorizeDoption = (text = '重新授权') => {
+ return (
+
emit('handleReauthorize', props.item)}>
+ {text}
+
+ );
+ };
+ const renderPauseDoption = () => {
+ return (
+
emit('handlePause', props.item)}>
+ 暂停同步
+
+ );
+ };
+ const renderSyncBtn = () => {
+ return (
+
+ );
+ };
+ const renderDeleteDoption = () => {
+ return (
+
emit('openDelete', props.item)}>
+ 删除
+
+ );
+ };
+ const renderNormal = () => {
+ return (
+ <>
+
(
+
+ ),
+ content: () => (
+ <>
+ {renderEditDoption()}
+ {renderReauthorizeDoption()}
+ {renderPauseDoption()}
+ {renderDeleteDoption()}
+ >
+ ),
+ }}
+ >
+ {renderSyncBtn()}
+ >
+ );
+ };
+ const renderPause = () => {
+ return (
+ <>
+
(
+
+ ),
+ content: () => (
+ <>
+ {renderEditDoption()}
+ {renderDeleteDoption()}
+ >
+ ),
+ }}
+ >
+
+ >
+ );
+ };
+ const renderAbnormal = () => {
+ const { error_status } = props.item;
+ const isMissing = error_status === EnumErrorStatus.MISSING;
+ const isUnauthorized = error_status === EnumErrorStatus.UNAUTHORIZED;
+ const renderSyncBtn = () => {
+ if (isMissing) {
+ renderSyncBtn();
+ } else if ([EnumErrorStatus.REQUEST, EnumErrorStatus.FREEZE].includes(error_status)) {
+ return (
+
+
+
+ );
+ } else {
+ return (
+
+ );
+ }
+ };
+ return (
+ <>
+
(
+
+ ),
+ content: () => (
+ <>
+ {renderEditDoption()}
+ {isMissing && renderReauthorizeDoption()}
+ {renderPauseDoption()}
+ {renderDeleteDoption()}
+ >
+ ),
+ }}
+ >
+ {renderSyncBtn()}
+ >
+ );
+ };
+ const renderContent = () => {
+ const { status } = props.item;
+ if (status === EnumStatus.NORMAL) {
+ return renderNormal();
+ } else if (status === EnumStatus.PAUSE) {
+ return renderPause();
+ } else {
+ return renderAbnormal();
+ }
+ };
+ return () => renderContent();
+ },
+});
diff --git a/src/views/property-marketing/media-account/account-manage/components/account-table/index.vue b/src/views/property-marketing/media-account/account-manage/components/account-table/index.vue
index cb64294..0bab22e 100644
--- a/src/views/property-marketing/media-account/account-manage/components/account-table/index.vue
+++ b/src/views/property-marketing/media-account/account-manage/components/account-table/index.vue
@@ -24,7 +24,7 @@
状态
-
+
数据更新时间
@@ -75,24 +75,14 @@
-
-
- 更多
-
-
- 编辑
- 重新授权
- 暂停同步
- 删除
-
-
- {{ getBtnText(item) }}
-
-
+
@@ -115,14 +105,15 @@
-
-
diff --git a/src/views/property-marketing/media-account/account-manage/index.vue b/src/views/property-marketing/media-account/account-manage/index.vue
index 8f6dea4..06ca037 100644
--- a/src/views/property-marketing/media-account/account-manage/index.vue
+++ b/src/views/property-marketing/media-account/account-manage/index.vue
@@ -132,8 +132,8 @@ import BatchGroupModal from './components/batch-group-modal';
import { INITIAL_QUERY, INITIAL_PAGE_INFO } from './constants';
import { showImportResultNotification } from '@/utils/arcoD';
-import { EnumStatus } from '@/views/property-marketing/media-account/components/status-select/constants';
import { getTaskStatus } from '@/api/all/common';
+import { EnumStatus } from '@/views/property-marketing/media-account/components/status-select/status-box.tsx';
import {
getMediaAccounts,
getMediaAccountsHealth,
@@ -168,7 +168,7 @@ const healthData = ref({});
const syncMediaAccounts = ref([]);
const isLoadingTaskStatus = ref(false); // 正在查询状态中
-const isAbNormalStatus = computed(() => healthData.value?.total_abnormal_number > 0);
+const isAbNormalStatus = computed(() => healthData.value?.abnormal_number > 0);
const isDisabledBatchSyncData = computed(() => selectedItems.value.some((item) => item.status !== EnumStatus.NORMAL));
const checkedAll = computed(() => selectedItems.value.length === dataSource.value.length);
@@ -182,12 +182,11 @@ const tipLabel = computed(() => {
}
const {
- total_abnormal_number = 0,
+ abnormal_number = 0,
login_invalid_number = 0,
too_many_requests_number = 0,
account_frozen_number = 0,
miss_data_number = 0,
- abnormal_number = 0,
} = healthData.value;
// 定义异常类型映射
@@ -202,7 +201,7 @@ const tipLabel = computed(() => {
// 过滤出有异常的项并格式化
const abnormalLabels = abnormalTypes.filter(({ count }) => count > 0).map(({ count, label }) => `${count}个${label}`);
- return `共有 ${total_abnormal_number} 个账号存在授权异常,其中:${abnormalLabels.join(',')}。`;
+ return `共有 ${abnormal_number} 个账号存在授权异常,其中:${abnormalLabels.join(',')}。`;
});
const getData = () => {
diff --git a/src/views/property-marketing/media-account/components/status-select/constants.ts b/src/views/property-marketing/media-account/components/status-select/constants.ts
index 7049295..81901d0 100644
--- a/src/views/property-marketing/media-account/components/status-select/constants.ts
+++ b/src/views/property-marketing/media-account/components/status-select/constants.ts
@@ -3,58 +3,74 @@
* @Date: 2025-07-04 11:18:11
*/
export enum EnumStatus {
- UNAUTHORIZED = 0,
- NORMAL = 1,
- ABNORMAL = 3,
- PAUSE = 2,
- ABNORMAL_LOGIN = 4,
- ABNORMAL_REQUEST = 5,
- ABNORMAL_FREEZE = 6,
- ABNORMAL_MISSING = 7,
+ UNAUTHORIZED = 0, // 未授权
+ NORMAL = 1, // 正常
+ PAUSE = 2, // 暂停同步
+ ABNORMAL = 3, // 全部异常
+ ABNORMAL_LOGIN = 4, // 异常(登录状态失效)
+ ABNORMAL_REQUEST = 5, // 异常(请求频繁)
+ ABNORMAL_FREEZE = 6, // 异常(账号被封)
+ ABNORMAL_MISSING = 7, // 异常(数据缺失)
+ ABNORMAL_EXPIRED = 8, // 即将过期
}
+
export const STATUS_LIST = [
{
text: '正常',
label: '正常',
value: EnumStatus.NORMAL,
},
+ {
+ text: '即将过期',
+ label: '即将过期',
+ value: EnumStatus.ABNORMAL_EXPIRED,
+ },
{
text: '暂停同步',
label: '暂停同步',
value: EnumStatus.PAUSE,
},
{
- text: '未授权',
- label: '未授权',
- value: EnumStatus.UNAUTHORIZED,
- },
- {
- text: '异常',
+ text: '全部异常',
label: '异常',
value: EnumStatus.ABNORMAL,
},
{
- text: '数据缺失',
- label: '数据缺失',
- value: EnumStatus.ABNORMAL_MISSING,
+ text: '异常(未授权)',
+ label: '异常',
+ value: EnumStatus.UNAUTHORIZED,
+ tooltip: '未授权',
+ class: '!pl-24px',
},
{
- text: '异常-登录状态失效',
+ text: '异常(数据缺失)',
+ label: '异常',
+ value: EnumStatus.ABNORMAL_MISSING,
+ tooltip: '数据缺失',
+ class: '!pl-24px',
+ },
+ {
+ text: '异常(登录状态失效)',
label: '异常',
value: EnumStatus.ABNORMAL_LOGIN,
- tooltip: '登录状态失效,需重新扫码授权',
+ tooltip: '登录状态失效',
+ class: '!pl-24px',
},
{
- text: '异常-请求过于频繁',
+ text: '异常(请求频繁)',
label: '异常',
value: EnumStatus.ABNORMAL_REQUEST,
- tooltip: '请求过于频繁,需等待24小时后重试',
+ tooltip: '请求频繁,等待24小时后重试',
+ class: '!pl-24px',
},
{
- text: '异常-账号被冻结/封禁',
+ text: '异常(账号被封)',
label: '异常',
value: EnumStatus.ABNORMAL_FREEZE,
- tooltip: '账号被冻结/封禁',
+ tooltip: '账号被封',
+ class: '!pl-24px',
},
];
+
+
diff --git a/src/views/property-marketing/media-account/components/status-select/index.vue b/src/views/property-marketing/media-account/components/status-select/index.vue
index b327655..e616e60 100644
--- a/src/views/property-marketing/media-account/components/status-select/index.vue
+++ b/src/views/property-marketing/media-account/components/status-select/index.vue
@@ -11,7 +11,7 @@
allow-clear
@change="handleChange"
>
-
+
{{ item.text }}
diff --git a/src/views/property-marketing/media-account/components/status-select/status-box.tsx b/src/views/property-marketing/media-account/components/status-select/status-box.tsx
new file mode 100644
index 0000000..652cdcd
--- /dev/null
+++ b/src/views/property-marketing/media-account/components/status-select/status-box.tsx
@@ -0,0 +1,147 @@
+import { defineComponent, computed } from 'vue';
+import { Tooltip } from '@arco-design/web-vue';
+// import { STATUS_LIST } from '@/views/property-marketing/media-account/components/status-select/constants';
+import iconWarn1 from '@/assets/img/media-account/icon-warn-1.png';
+import iconWarn2 from '@/assets/img/media-account/icon-warn-2.png';
+import icon1 from '@/assets/img/media-account/icon-schedule.png';
+
+export enum EnumErrorStatus {
+ NORMAL = 0, // 正常
+ UNAUTHORIZED = 1, // 未授权
+ LOGIN = 2, // 登录状态失效
+ REQUEST = 3, // 请求过于频繁
+ FREEZE = 4, // 账号被冻结/封禁
+ MISSING = 5, // 数据缺失
+ UNKNOWN = 6, // 未知异常
+}
+
+export enum EnumStatus {
+ ABNORMAL = 0, // 异常
+ NORMAL = 1, // 正常
+ PAUSE = 2, // 暂停同步
+}
+
+export enum EnumExpireForCookie {
+ NORMAL = 0, // 正常
+ EXPIRE = 1, // 即将过期
+}
+
+const normalStyle = {
+ color: '#25c883',
+ background: '#ebf7f2',
+};
+
+const abnormalStyle = {
+ color: '#f64b31',
+ background: '#ffe7e4',
+};
+
+const pauseStyle = {
+ color: '#ffae00',
+ background: '#fff7e5',
+};
+
+const tooltipMap = new Map([
+ [1, { tooltip: '未授权' }],
+ [2, { tooltip: '登录状态失效' }],
+ [3, { tooltip: '请求频繁,等待24小时后重试', btnTooltip: '请求频繁,等待24小时后重试' }],
+ [4, { tooltip: '账号被冻结', btnTooltip: '账号被封,解封后才能操作' }],
+ [5, { tooltip: '数据缺失' }],
+ [6, { tooltip: '未知错误' }],
+]);
+
+/**
+ *
+ * @param status 状态 0-异常,1-正常,2-暂停同步
+ * @param error_status 异常状态 0-无异常,1-未授权,2-登录状态失效,3-请求过于频繁,4-账号被冻结/封禁,5-数据缺失,6-未知错误
+ * @param to_be_expire_for_cookie cookie是否即将过期 0-否,1-是
+ * @returns
+ */
+
+export const getStatusInfo = (status: EnumStatus, error_status: EnumErrorStatus, to_be_expire_for_cookie: EnumExpireForCookie) => {
+ const statusInfo = { color: '', background: '', label: '', tooltip: '', disabledBtnTooltip: '' };
+ if (status === EnumStatus.ABNORMAL) {
+ statusInfo.color = abnormalStyle.color;
+ statusInfo.background = abnormalStyle.background;
+ statusInfo.label = '异常';
+
+ const target = tooltipMap.get(error_status);
+ statusInfo.tooltip = target?.tooltip ?? '';
+ statusInfo.disabledBtnTooltip = target?.btnTooltip ?? '';
+ }
+
+ if (status === EnumStatus.NORMAL) {
+ if (to_be_expire_for_cookie === EnumExpireForCookie.NORMAL) {
+ statusInfo.color = normalStyle.color;
+ statusInfo.background = normalStyle.background;
+ statusInfo.label = '正常';
+ } else {
+ statusInfo.color = abnormalStyle.color;
+ statusInfo.background = abnormalStyle.background;
+ statusInfo.label = '即将过期';
+ }
+ }
+
+ if (status === EnumStatus.PAUSE) {
+ statusInfo.color = pauseStyle.color;
+ statusInfo.background = pauseStyle.background;
+ statusInfo.label = '暂停同步';
+ statusInfo.tooltip = '暂停同步';
+ }
+
+ return statusInfo;
+};
+
+export default defineComponent({
+ name: 'StatusBox',
+ props: {
+ item: {
+ type: Object,
+ default: () => ({}),
+ },
+ },
+ setup(props) {
+ const statusInfo = computed(() => {
+ const { status, error_status, to_be_expire_for_cookie } = props.item;
+ return getStatusInfo(status, error_status, to_be_expire_for_cookie) ?? {};
+ });
+
+ const renderContent = () => {
+ const { to_be_expire_for_cookie, status } = props.item;
+ const { background, color, label } = statusInfo.value;
+ if (status === EnumStatus.NORMAL) {
+ return (
+
+ {to_be_expire_for_cookie === EnumExpireForCookie.EXPIRE && (
+
+

+
{label}
+
+ )}
+
+ 正常
+
+
+ );
+ }
+
+ return (
+
+
{label}
+ {status === EnumStatus.PAUSE ? (
+

+ ) : (
+
+
+
+ )}
+
+ );
+ };
+
+ return () => renderContent();
+ },
+});
diff --git a/src/views/property-marketing/put-account/account-manage/components/status-box/index.vue b/src/views/property-marketing/put-account/account-manage/components/status-box/index.vue
index bc5362f..8b508a9 100644
--- a/src/views/property-marketing/put-account/account-manage/components/status-box/index.vue
+++ b/src/views/property-marketing/put-account/account-manage/components/status-box/index.vue
@@ -75,7 +75,7 @@ const isDisabledReauthorize = (status) => {
}
}
- &-2,
+ &-3,
&-4,
&-5,
&-6 {
@@ -85,7 +85,7 @@ const isDisabledReauthorize = (status) => {
}
}
- &-3 {
+ &-2{
background: #fff7e5;
color: #ffae00;
.text {
From a50234543bff4b70730e6cee8e12854ddd9621ea Mon Sep 17 00:00:00 2001
From: rd <1344903914@qq.com>
Date: Fri, 25 Jul 2025 10:26:53 +0800
Subject: [PATCH 3/7] =?UTF-8?q?refactor:=20=E6=96=B0=E5=AA=92=E4=BD=93?=
=?UTF-8?q?=E8=B4=A6=E5=8F=B7=E7=8A=B6=E6=80=81=E9=87=8D=E6=9E=84?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.../components/account-table/index.vue | 8 +-
.../components/account-table/style.scss | 41 ++--------
.../components/account-table/index.vue | 77 ++++++++++++++-----
.../media-account/account-manage/index.vue | 4 +-
.../components/status-select/constants.ts | 20 ++---
.../components/status-select/status-box.tsx | 32 ++++----
.../components/account-table/index.vue | 4 +-
.../components/status-box/index.vue | 8 +-
.../components/status-select/constants.ts | 18 ++---
.../components/status-select/index.vue | 2 +-
10 files changed, 109 insertions(+), 105 deletions(-)
diff --git a/src/views/property-marketing/media-account/account-dashboard/components/account-table/index.vue b/src/views/property-marketing/media-account/account-dashboard/components/account-table/index.vue
index 6c51cd1..1b743a5 100644
--- a/src/views/property-marketing/media-account/account-dashboard/components/account-table/index.vue
+++ b/src/views/property-marketing/media-account/account-dashboard/components/account-table/index.vue
@@ -77,11 +77,7 @@
{{ record.platform === 0 ? '抖音' : record.platform === 1 ? '小红书' : '-' }}
-
- {{
- STATUS_LIST.find((item) => item.value === record.status)?.label
- }}
-
+
@@ -167,7 +163,7 @@ import { ref, computed } from 'vue';
import { useRouter } from 'vue-router';
import { getCustomColumns } from '@/api/all/common';
-import { STATUS_LIST } from '@/views/property-marketing/media-account/components/status-select/constants';
+import StatusBox from '@/views/property-marketing/media-account/components/status-select/status-box.tsx';
import { formatTableField, formatNumberShow, exactFormatTime } from '@/utils/tools';
import { getDefaultColumns, getPropPrefix } from '@/views/property-marketing/media-account/account-dashboard/constants';
import CustomTableColumnModal from '../custom-column-modal';
diff --git a/src/views/property-marketing/media-account/account-dashboard/components/account-table/style.scss b/src/views/property-marketing/media-account/account-dashboard/components/account-table/style.scss
index a395192..1184e99 100644
--- a/src/views/property-marketing/media-account/account-dashboard/components/account-table/style.scss
+++ b/src/views/property-marketing/media-account/account-dashboard/components/account-table/style.scss
@@ -15,42 +15,11 @@
font-weight: 400;
line-height: 22px;
}
- .status-tag {
- width: fit-content;
- display: flex;
- height: 28px;
- padding: 0px 8px;
- align-items: center;
- border-radius: 2px;
- background: #f2f3f5;
-
- .status-tag-text {
- color: var(--BG-700, #737478);
- }
- &-1 {
- background: #ebf7f2;
- .status-tag-text {
- color: #25c883;
- }
- }
-
- &-2,
- &-4,
- &-5,
- &-6,
- &-7 {
- background: #ffe7e4;
- .status-tag-text {
- color: #f64b31;
- }
- }
-
- &-3 {
- background: #fff7e5;
- color: #ffae00;
- .status-tag-text {
- color: #ffae00;
- }
+ :deep(.status-box) {
+ .label {
+ font-family: $font-family-medium;
+ font-size: 14px;
+ line-height: 22px;
}
}
.ai-evaluation-row {
diff --git a/src/views/property-marketing/media-account/account-manage/components/account-table/index.vue b/src/views/property-marketing/media-account/account-manage/components/account-table/index.vue
index 0bab22e..5627e39 100644
--- a/src/views/property-marketing/media-account/account-manage/components/account-table/index.vue
+++ b/src/views/property-marketing/media-account/account-manage/components/account-table/index.vue
@@ -88,11 +88,13 @@
![]()
-
更新数据失败
+
{{ getErrorStatusText(item) }}
-
取消
-
重新更新
+
取消
+
{{
+ getConfirmBtnText(item)
+ }}
@@ -105,9 +107,13 @@
diff --git a/src/views/property-marketing/media-account/account-manage/index.vue b/src/views/property-marketing/media-account/account-manage/index.vue
index 06ca037..ce65c1e 100644
--- a/src/views/property-marketing/media-account/account-manage/index.vue
+++ b/src/views/property-marketing/media-account/account-manage/index.vue
@@ -297,11 +297,11 @@ const getAsyncStatus = async () => {
}
}
};
+
const handleUpdateSyncStatus = (item) => {
const target = syncMediaAccounts.value.find((v) => v.id === item.id);
- // 点击取消,设置状态为成功
if (target) {
- target.status = 1;
+ target.status = EnumStatus.NORMAL;
}
};
diff --git a/src/views/property-marketing/media-account/components/status-select/constants.ts b/src/views/property-marketing/media-account/components/status-select/constants.ts
index 81901d0..2e81c6b 100644
--- a/src/views/property-marketing/media-account/components/status-select/constants.ts
+++ b/src/views/property-marketing/media-account/components/status-select/constants.ts
@@ -2,7 +2,7 @@
* @Author: RenXiaoDong
* @Date: 2025-07-04 11:18:11
*/
-export enum EnumStatus {
+export enum EnumAccountStatus {
UNAUTHORIZED = 0, // 未授权
NORMAL = 1, // 正常
PAUSE = 2, // 暂停同步
@@ -19,55 +19,55 @@ export const STATUS_LIST = [
{
text: '正常',
label: '正常',
- value: EnumStatus.NORMAL,
+ value: EnumAccountStatus.NORMAL,
},
{
text: '即将过期',
label: '即将过期',
- value: EnumStatus.ABNORMAL_EXPIRED,
+ value: EnumAccountStatus.ABNORMAL_EXPIRED,
},
{
text: '暂停同步',
label: '暂停同步',
- value: EnumStatus.PAUSE,
+ value: EnumAccountStatus.PAUSE,
},
{
text: '全部异常',
label: '异常',
- value: EnumStatus.ABNORMAL,
+ value: EnumAccountStatus.ABNORMAL,
},
{
text: '异常(未授权)',
label: '异常',
- value: EnumStatus.UNAUTHORIZED,
+ value: EnumAccountStatus.UNAUTHORIZED,
tooltip: '未授权',
class: '!pl-24px',
},
{
text: '异常(数据缺失)',
label: '异常',
- value: EnumStatus.ABNORMAL_MISSING,
+ value: EnumAccountStatus.ABNORMAL_MISSING,
tooltip: '数据缺失',
class: '!pl-24px',
},
{
text: '异常(登录状态失效)',
label: '异常',
- value: EnumStatus.ABNORMAL_LOGIN,
+ value: EnumAccountStatus.ABNORMAL_LOGIN,
tooltip: '登录状态失效',
class: '!pl-24px',
},
{
text: '异常(请求频繁)',
label: '异常',
- value: EnumStatus.ABNORMAL_REQUEST,
+ value: EnumAccountStatus.ABNORMAL_REQUEST,
tooltip: '请求频繁,等待24小时后重试',
class: '!pl-24px',
},
{
text: '异常(账号被封)',
label: '异常',
- value: EnumStatus.ABNORMAL_FREEZE,
+ value: EnumAccountStatus.ABNORMAL_FREEZE,
tooltip: '账号被封',
class: '!pl-24px',
},
diff --git a/src/views/property-marketing/media-account/components/status-select/status-box.tsx b/src/views/property-marketing/media-account/components/status-select/status-box.tsx
index 652cdcd..9e1c6b6 100644
--- a/src/views/property-marketing/media-account/components/status-select/status-box.tsx
+++ b/src/views/property-marketing/media-account/components/status-select/status-box.tsx
@@ -1,6 +1,6 @@
import { defineComponent, computed } from 'vue';
import { Tooltip } from '@arco-design/web-vue';
-// import { STATUS_LIST } from '@/views/property-marketing/media-account/components/status-select/constants';
+
import iconWarn1 from '@/assets/img/media-account/icon-warn-1.png';
import iconWarn2 from '@/assets/img/media-account/icon-warn-2.png';
import icon1 from '@/assets/img/media-account/icon-schedule.png';
@@ -41,13 +41,13 @@ const pauseStyle = {
background: '#fff7e5',
};
-const tooltipMap = new Map([
- [1, { tooltip: '未授权' }],
- [2, { tooltip: '登录状态失效' }],
- [3, { tooltip: '请求频繁,等待24小时后重试', btnTooltip: '请求频繁,等待24小时后重试' }],
- [4, { tooltip: '账号被冻结', btnTooltip: '账号被封,解封后才能操作' }],
- [5, { tooltip: '数据缺失' }],
- [6, { tooltip: '未知错误' }],
+export const errorStatusMap = new Map([
+ [1, { tooltip: '未授权', text: '未授权' }],
+ [2, { tooltip: '登录状态失效', text: '登录状态失效' }],
+ [3, { tooltip: '请求频繁,等待24小时后重试', btnTooltip: '请求频繁,等待24小时后重试', text: '请求过于频繁' }],
+ [4, { tooltip: '账号被冻结', btnTooltip: '账号被封,解封后才能操作', text: '账号被冻结' }],
+ [5, { tooltip: '数据缺失', text: '数据缺失' }],
+ [6, { tooltip: '未知错误', text: '未知错误' }],
]);
/**
@@ -58,14 +58,18 @@ const tooltipMap = new Map([
* @returns
*/
-export const getStatusInfo = (status: EnumStatus, error_status: EnumErrorStatus, to_be_expire_for_cookie: EnumExpireForCookie) => {
+export const getStatusInfo = (
+ status: EnumStatus,
+ error_status: EnumErrorStatus,
+ to_be_expire_for_cookie: EnumExpireForCookie,
+) => {
const statusInfo = { color: '', background: '', label: '', tooltip: '', disabledBtnTooltip: '' };
if (status === EnumStatus.ABNORMAL) {
statusInfo.color = abnormalStyle.color;
statusInfo.background = abnormalStyle.background;
statusInfo.label = '异常';
- const target = tooltipMap.get(error_status);
+ const target = errorStatusMap.get(error_status);
statusInfo.tooltip = target?.tooltip ?? '';
statusInfo.disabledBtnTooltip = target?.btnTooltip ?? '';
}
@@ -111,11 +115,11 @@ export default defineComponent({
const { background, color, label } = statusInfo.value;
if (status === EnumStatus.NORMAL) {
return (
-
+
{to_be_expire_for_cookie === EnumExpireForCookie.EXPIRE && (

-
{label}
+
{label}
)}
-
{label}
+
+
{label}
{status === EnumStatus.PAUSE ? (

) : (
diff --git a/src/views/property-marketing/put-account/account-manage/components/account-table/index.vue b/src/views/property-marketing/put-account/account-manage/components/account-table/index.vue
index a2e75c0..318c315 100644
--- a/src/views/property-marketing/put-account/account-manage/components/account-table/index.vue
+++ b/src/views/property-marketing/put-account/account-manage/components/account-table/index.vue
@@ -77,7 +77,7 @@
diff --git a/src/views/property-marketing/put-account/account-manage/components/status-box/index.vue b/src/views/property-marketing/put-account/account-manage/components/status-box/index.vue
index 8b508a9..6599f0f 100644
--- a/src/views/property-marketing/put-account/account-manage/components/status-box/index.vue
+++ b/src/views/property-marketing/put-account/account-manage/components/status-box/index.vue
@@ -13,7 +13,7 @@
diff --git a/src/views/property-marketing/put-account/components/status-select/constants.ts b/src/views/property-marketing/put-account/components/status-select/constants.ts
index 7049295..9f757ca 100644
--- a/src/views/property-marketing/put-account/components/status-select/constants.ts
+++ b/src/views/property-marketing/put-account/components/status-select/constants.ts
@@ -2,7 +2,7 @@
* @Author: RenXiaoDong
* @Date: 2025-07-04 11:18:11
*/
-export enum EnumStatus {
+export enum EnumPutAccountStatus {
UNAUTHORIZED = 0,
NORMAL = 1,
ABNORMAL = 3,
@@ -17,44 +17,44 @@ export const STATUS_LIST = [
{
text: '正常',
label: '正常',
- value: EnumStatus.NORMAL,
+ value: EnumPutAccountStatus.NORMAL,
},
{
text: '暂停同步',
label: '暂停同步',
- value: EnumStatus.PAUSE,
+ value: EnumPutAccountStatus.PAUSE,
},
{
text: '未授权',
label: '未授权',
- value: EnumStatus.UNAUTHORIZED,
+ value: EnumPutAccountStatus.UNAUTHORIZED,
},
{
text: '异常',
label: '异常',
- value: EnumStatus.ABNORMAL,
+ value: EnumPutAccountStatus.ABNORMAL,
},
{
text: '数据缺失',
label: '数据缺失',
- value: EnumStatus.ABNORMAL_MISSING,
+ value: EnumPutAccountStatus.ABNORMAL_MISSING,
},
{
text: '异常-登录状态失效',
label: '异常',
- value: EnumStatus.ABNORMAL_LOGIN,
+ value: EnumPutAccountStatus.ABNORMAL_LOGIN,
tooltip: '登录状态失效,需重新扫码授权',
},
{
text: '异常-请求过于频繁',
label: '异常',
- value: EnumStatus.ABNORMAL_REQUEST,
+ value: EnumPutAccountStatus.ABNORMAL_REQUEST,
tooltip: '请求过于频繁,需等待24小时后重试',
},
{
text: '异常-账号被冻结/封禁',
label: '异常',
- value: EnumStatus.ABNORMAL_FREEZE,
+ value: EnumPutAccountStatus.ABNORMAL_FREEZE,
tooltip: '账号被冻结/封禁',
},
];
diff --git a/src/views/property-marketing/put-account/components/status-select/index.vue b/src/views/property-marketing/put-account/components/status-select/index.vue
index b327655..cadf39a 100644
--- a/src/views/property-marketing/put-account/components/status-select/index.vue
+++ b/src/views/property-marketing/put-account/components/status-select/index.vue
@@ -19,7 +19,7 @@