@@ -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 @@