@@ -236,6 +236,10 @@ const handleSearch = () => {
getData();
};
const handleReset = () => {
+ pageInfo.page = 1;
+ pageInfo.pageSize = 20;
+ pageInfo.total = 0;
+ selectedItems.value = [];
query.value = cloneDeep(INITIAL_QUERY);
reload();
};
diff --git a/src/views/property-marketing/media-account/account-manage/style.scss b/src/views/property-marketing/media-account/account-manage/style.scss
index 1d9c9cb..f916046 100644
--- a/src/views/property-marketing/media-account/account-manage/style.scss
+++ b/src/views/property-marketing/media-account/account-manage/style.scss
@@ -13,8 +13,6 @@
background: var(--BG-white, #fff);
}
.filter-wrap {
- border-radius: 8px;
- border: 1px solid #e6e6e8;
.top {
.title {
font-family: 'Alibaba PuHuiTi';
@@ -84,39 +82,7 @@
padding: 16px 24px;
justify-content: flex-end;
align-items: center;
- :deep(.arco-pagination) {
- .arco-pagination-list {
- .arco-pagination-item {
- border-radius: 4px;
- border: 1px solid var(--BG-300, #e6e6e8);
- &.arco-pagination-item-ellipsis {
- border: none;
- }
- &.arco-pagination-item-active {
- background-color: transparent;
- border: 1px solid var(--Brand-Brand-6, #6d4cfe);
- }
- }
- }
- .arco-pagination-jumper-input {
- border-radius: 4px;
- border: 1px solid var(--BG-300, #e6e6e8);
- }
- .arco-pagination-jumper-prepend {
- color: var(--Text-2, #3c4043);
- text-align: right;
- font-family: 'Alibaba PuHuiTi';
- font-size: 14px;
- font-style: normal;
- font-weight: 400;
- line-height: 22px; /* 157.143% */
- }
- .arco-select-view-single {
- border-radius: 4px;
- border: 1px solid var(--BG-300, #e6e6e8);
- }
- }
}
}
}
diff --git a/src/views/property-marketing/put-account/account-data/components/account-table/constants.ts b/src/views/property-marketing/put-account/account-data/components/account-table/constants.ts
new file mode 100644
index 0000000..66496dd
--- /dev/null
+++ b/src/views/property-marketing/put-account/account-data/components/account-table/constants.ts
@@ -0,0 +1,239 @@
+/*
+ * @Author: RenXiaoDong
+ * @Date: 2025-06-28 10:33:06
+ */
+export const TABLE_COLUMNS = [
+ {
+ title: '账号名称',
+ dataIndex: 'name',
+ width: 180,
+ fixed: 'left',
+ },
+ {
+ title: '项目分组',
+ dataIndex: 'group.name',
+ width: 180,
+ fixed: 'left',
+ },
+ {
+ title: '状态',
+ dataIndex: 'status',
+ width: 180,
+ fixed: 'left',
+ },
+ {
+ title: '运营人员',
+ dataIndex: 'operator.name',
+ width: 180,
+ },
+ {
+ title: '账户总消耗',
+ dataIndex: 'total_consumption',
+ width: 180,
+ tooltip: '账号总消耗',
+ prefix: '¥',
+ align: 'right',
+ sortable: {
+ sortDirections: ['ascend', 'descend'],
+ },
+ },
+ {
+ title: '账户余额',
+ dataIndex: 'balance',
+ width: 180,
+ tooltip: '账号余额',
+ prefix: '¥',
+ align: 'right',
+ sortable: {
+ sortDirections: ['ascend', 'descend'],
+ },
+ },
+ {
+ title: 'AI评价',
+ dataIndex: 'ai_evaluation',
+ width: 260,
+ },
+ {
+ title: 'ROI',
+ dataIndex: 'roi',
+ width: 180,
+ tooltip: '账号ROI',
+ align: 'right',
+ sortable: {
+ sortDirections: ['ascend', 'descend'],
+ },
+ },
+ {
+ title: 'ROI环比',
+ dataIndex: 'roi_chain',
+ width: 180,
+ tooltip: '相比上一周期的ROI变化百分比',
+ align: 'right',
+ suffix: '%',
+ sortable: {
+ sortDirections: ['ascend', 'descend'],
+ },
+ },
+ {
+ title: 'CPA',
+ dataIndex: 'cpa',
+ width: 180,
+ tooltip: '账号CPA',
+ align: 'right',
+ sortable: {
+ sortDirections: ['ascend', 'descend'],
+ },
+ },
+ {
+ title: 'CPA环比',
+ dataIndex: 'roi_chain',
+ width: 180,
+ tooltip: '相比上一周期的CPA变化百分比',
+ align: 'right',
+ suffix: '%',
+ sortable: {
+ sortDirections: ['ascend', 'descend'],
+ },
+ },
+ {
+ title: '转化数',
+ dataIndex: 'conversion_number',
+ width: 180,
+ tooltip: '账号转化数',
+ align: 'right',
+ sortable: {
+ sortDirections: ['ascend', 'descend'],
+ },
+ },
+ {
+ title: '转化数环比',
+ dataIndex: 'conversion_chain',
+ width: 180,
+ tooltip: '相比上一周期的转化数变化百分比',
+ align: 'right',
+ suffix: '%',
+ sortable: {
+ sortDirections: ['ascend', 'descend'],
+ },
+ },
+ {
+ title: 'CVR',
+ dataIndex: 'conversion_rate',
+ width: 180,
+ tooltip: '账号转化率',
+ align: 'right',
+ sortable: {
+ sortDirections: ['ascend', 'descend'],
+ },
+ },
+ {
+ title: 'CVR环比',
+ dataIndex: 'conversion_rate_chain',
+ width: 180,
+ tooltip: '相比上一周期的CVR变化百分比',
+ align: 'right',
+ suffix: '%',
+ sortable: {
+ sortDirections: ['ascend', 'descend'],
+ },
+ },
+ {
+ title: '最新投放计划标题/日期',
+ dataIndex: 'like_chain1',
+ width: 260,
+ tooltip: '最新发布内容的标题和发布日期',
+ },
+ {
+ title: '最新投放计划表现',
+ dataIndex: 'latest_plan_performance',
+ width: 180,
+ tooltip: '最新投放计划表现',
+ align: 'right',
+ sortable: {
+ sortDirections: ['ascend', 'descend'],
+ },
+ },
+
+ {
+ title: '展示量',
+ dataIndex: 'view_number',
+ width: 180,
+ tooltip: '账号所有内容的总展示次数',
+ align: 'right',
+ sortable: {
+ sortDirections: ['ascend', 'descend'],
+ },
+ },
+ {
+ title: '点击量',
+ dataIndex: 'click_number',
+ width: 180,
+ tooltip: '账号所有内容的总点击次数',
+ align: 'right',
+ sortable: {
+ sortDirections: ['ascend', 'descend'],
+ },
+ },
+ {
+ title: '点击率',
+ dataIndex: 'click_rate',
+ width: 180,
+ tooltip: '账号所有内容的总点击率',
+ align: 'right',
+ sortable: {
+ sortDirections: ['ascend', 'descend'],
+ },
+ },
+ {
+ title: '平均点击成本',
+ dataIndex: 'avg_click_cost',
+ width: 180,
+ tooltip: '账号所有内容的平均点击成本',
+ align: 'right',
+ sortable: {
+ sortDirections: ['ascend', 'descend'],
+ },
+ },
+ {
+ title: '千次展现费用',
+ dataIndex: 'cost_per_thousand_views',
+ width: 180,
+ prefix: '¥',
+ tooltip: '账号所有内容的千次展现费用',
+ align: 'right',
+ sortable: {
+ sortDirections: ['ascend', 'descend'],
+ },
+ },
+ {
+ title: '平均转化成本',
+ dataIndex: 'avg_conversion_cost',
+ width: 180,
+ prefix: '¥',
+ tooltip: '账号所有内容的平均转化成本',
+ align: 'right',
+ sortable: {
+ sortDirections: ['ascend', 'descend'],
+ },
+ },
+ {
+ title: '深度转化数',
+ dataIndex: 'deep_conversion_number',
+ width: 180,
+ tooltip: '账号所有内容的总深度转化次数',
+ align: 'right',
+ sortable: {
+ sortDirections: ['ascend', 'descend'],
+ },
+ },
+ {
+ title: '深度转化率',
+ dataIndex: 'deep_conversion_rate',
+ width: 180,
+ tooltip: '账号所有内容的总深度转化率',
+ align: 'right',
+ sortable: {
+ sortDirections: ['ascend', 'descend'],
+ },
+ },
+];
diff --git a/src/views/property-marketing/put-account/account-data/components/account-table/index.vue b/src/views/property-marketing/put-account/account-data/components/account-table/index.vue
new file mode 100644
index 0000000..914dbe2
--- /dev/null
+++ b/src/views/property-marketing/put-account/account-data/components/account-table/index.vue
@@ -0,0 +1,213 @@
+
+
+
+
全选
+
+
+
+ 导出数据
+
+
+
+
+
+ 自定义列
+
+
+
+
+
+
+
+
+
+
![]()
+
{{ column.title }}
+
+
+
+
+
+
+
+ {{ record.platform === 0 ? '抖音' : record.platform === 1 ? '小红书' : '-' }}
+
+
+
+ {{
+ STATUS_LIST.find((item) => item.value === record.status)?.label
+ }}
+
+
+
+
+
![]()
+
+
{{ record.ai_evaluation?.text }}
+
+ {{ `ROI: ${record.ai_evaluation?.look_chain}% CVR: ${record.ai_evaluation?.like_chain}%` }}
+
+
+
+
+
+ 详情
+
+
+
+
+
+
+ {{ formatTableField(column, record) }}
+
+
+
+ 打工人的环游世界旅行计划(国内版)
+ 2025-06-18
+
+
+
+ {{ formatTableField(column, record, true) }}
+
+
+
+
+
+
+
+
+
diff --git a/src/views/property-marketing/put-account/account-data/components/account-table/style.scss b/src/views/property-marketing/put-account/account-data/components/account-table/style.scss
new file mode 100644
index 0000000..cfdf11c
--- /dev/null
+++ b/src/views/property-marketing/put-account/account-data/components/account-table/style.scss
@@ -0,0 +1,63 @@
+.action-row {
+ :deep(.arco-btn) {
+ .arco-btn-icon {
+ line-height: 14px;
+ }
+ }
+}
+
+.account-table {
+ .cts {
+ color: var(--Text-1, #211f24);
+ font-family: 'Alibaba PuHuiTi';
+ font-size: 14px;
+ font-style: normal;
+ 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: var(--Functional-Red-1, #ffe9e7);
+
+ .status-tag-text {
+ color: var(--Functional-Red-6, #f64b31);
+ }
+ &-3 {
+ background: #fff7e5;
+ .status-tag-text {
+ color: var(--Functional-yellow-6, #ffae00);
+ }
+ }
+ &-1 {
+ background: var(--Functional-Green-1, #ebf7f2);
+ .status-tag-text {
+ color: var(--Functional-Green-6, #25c883);
+ }
+ }
+ &-0 {
+ background: var(--BG-200, #f2f3f5);
+ .status-tag-text {
+ color: var(--Text-2, #3c4043);
+ }
+ }
+ }
+ .ai-evaluation-row {
+ .icon {
+ position: relative;
+ top: 1px;
+ }
+ }
+ .rate-row {
+ &.up {
+ color: var(--Functional-Red-6, #f64b31);
+ }
+ &.down {
+ color: var(--Functional-Green-6, #25c883);
+ }
+ }
+}
diff --git a/src/views/property-marketing/put-account/account-data/components/filter-block/index.vue b/src/views/property-marketing/put-account/account-data/components/filter-block/index.vue
new file mode 100644
index 0000000..37e1fb9
--- /dev/null
+++ b/src/views/property-marketing/put-account/account-data/components/filter-block/index.vue
@@ -0,0 +1,123 @@
+
+
+
+
+
+
+
+
+
状态
+
+
+ {{
+ item.text
+ }}
+
+
+
+
+
运营人员
+
+
+ {{
+ item.name
+ }}
+
+
+
+
+
+
+
+
+
+
+ 搜索
+
+
+
+
+
+ 重置
+
+
+
+
+
+
+
+
diff --git a/src/views/property-marketing/put-account/account-data/components/filter-block/style.scss b/src/views/property-marketing/put-account/account-data/components/filter-block/style.scss
new file mode 100644
index 0000000..b29af44
--- /dev/null
+++ b/src/views/property-marketing/put-account/account-data/components/filter-block/style.scss
@@ -0,0 +1,37 @@
+.container {
+ :deep(.arco-input-wrapper),
+ :deep(.arco-select-view-single),
+ :deep(.arco-select-view-multiple),
+ :deep(.arco-picker) {
+ border-radius: 4px;
+ border-color: #d7d7d9;
+ background-color: #fff;
+ &:focus-within,
+ &.arco-input-focus {
+ background-color: var(--color-bg-2);
+ border-color: rgb(var(--primary-6));
+ box-shadow: 0 0 0 0 var(--color-primary-light-2);
+ }
+ }
+ .filter-row {
+ .filter-row-item {
+ &:not(:last-child) {
+ margin-right: 24px;
+ }
+ .label {
+ margin-right: 8px;
+ color: #211f24;
+ font-family: 'Alibaba PuHuiTi';
+ font-size: 14px;
+ font-style: normal;
+ font-weight: 400;
+ flex-shrink: 0;
+ line-height: 22px; /* 157.143% */
+ }
+ :deep(.arco-space-item) {
+ width: 100%;
+ }
+ }
+ }
+
+}
diff --git a/src/views/property-marketing/put-account/account-data/components/group-select/index.vue b/src/views/property-marketing/put-account/account-data/components/group-select/index.vue
new file mode 100644
index 0000000..a736c92
--- /dev/null
+++ b/src/views/property-marketing/put-account/account-data/components/group-select/index.vue
@@ -0,0 +1,64 @@
+
+
+
+
+ {{ item.name }}
+
+
+
+
+
diff --git a/src/views/property-marketing/put-account/account-data/constants.ts b/src/views/property-marketing/put-account/account-data/constants.ts
new file mode 100644
index 0000000..9d1c490
--- /dev/null
+++ b/src/views/property-marketing/put-account/account-data/constants.ts
@@ -0,0 +1,65 @@
+/*
+ * @Author: RenXiaoDong
+ * @Date: 2025-06-28 14:16:25
+ */
+
+export const INITIAL_QUERY = {
+ name: '',
+ status: '',
+ operator_id: '',
+ group_ids: [],
+ date_range: [],
+ column: '',
+ order: '',
+};
+
+export enum EnumStatus {
+ NORMAL = 1,
+ PAUSE = 3,
+ UNAUTHORIZED = 0,
+ ABNORMAL = 2,
+ ABNORMAL_LOGIN = 4,
+ ABNORMAL_REQUEST = 5,
+ ABNORMAL_FREEZE = 6,
+}
+
+export const STATUS_LIST = [
+ {
+ text: '正常',
+ label: '正常',
+ value: EnumStatus.NORMAL,
+ },
+ {
+ text: '暂停同步',
+ label: '暂停同步',
+ value: EnumStatus.PAUSE,
+ },
+ {
+ text: '未授权',
+ label: '未授权',
+ value: EnumStatus.UNAUTHORIZED,
+ },
+ {
+ text: '异常',
+ label: '异常',
+ value: EnumStatus.ABNORMAL,
+ },
+ {
+ text: '异常-登录状态失效',
+ label: '异常',
+ value: EnumStatus.ABNORMAL_LOGIN,
+ tooltip: '登录状态失效,需重新扫码授权',
+ },
+ {
+ text: '异常-请求过于频繁',
+ label: '异常',
+ value: EnumStatus.ABNORMAL_REQUEST,
+ tooltip: '请求过于频繁,需等待24小时后重试',
+ },
+ {
+ text: '异常-账号被冻结/封禁',
+ label: '异常',
+ value: EnumStatus.ABNORMAL_FREEZE,
+ tooltip: '账号被冻结/封禁',
+ },
+];
diff --git a/src/views/property-marketing/put-account/account-data/index.vue b/src/views/property-marketing/put-account/account-data/index.vue
new file mode 100644
index 0000000..08ed31a
--- /dev/null
+++ b/src/views/property-marketing/put-account/account-data/index.vue
@@ -0,0 +1,245 @@
+
+
+
+
+
+
+
+
diff --git a/src/views/property-marketing/put-account/account-data/style.scss b/src/views/property-marketing/put-account/account-data/style.scss
new file mode 100644
index 0000000..f358776
--- /dev/null
+++ b/src/views/property-marketing/put-account/account-data/style.scss
@@ -0,0 +1,58 @@
+.account-data-wrap {
+ height: 100%;
+ display: flex;
+ flex-direction: column;
+ :deep(.search-btn) {
+ border-radius: 4px;
+ border: 1px solid var(--Brand-Brand-6, #6d4cfe);
+ color: #6d4cfe;
+ }
+ :deep(.reset-btn) {
+ border-radius: 4px;
+ border: 1px solid var(--BG-500, #b1b2b5);
+ background: var(--BG-white, #fff);
+ }
+ .filter-wrap {
+ border-radius: 8px;
+ border: 1px solid #e6e6e8;
+ :deep(.arco-tabs) {
+ .arco-tabs-tab {
+ height: 56px;
+ padding: 0 8px;
+ }
+ }
+ .top {
+ .title {
+ font-family: 'Alibaba PuHuiTi';
+ font-style: normal;
+ }
+ :deep(.arco-btn) {
+ .arco-btn-icon {
+ line-height: 14px;
+ }
+ }
+ }
+ .overview-row {
+ .overview-item {
+ height: 88px;
+ border-radius: 8px;
+ background: var(--BG-100, #f7f8fa);
+ padding: 16px;
+ &:not(:last-child) {
+ margin-right: 12px;
+ }
+ }
+ }
+ }
+
+ .table-wrap {
+ width: 100%;
+ .pagination-box {
+ display: flex;
+ width: 100%;
+ padding: 16px 24px;
+ justify-content: flex-end;
+ align-items: center;
+ }
+ }
+}
\ No newline at end of file
diff --git a/src/views/property-marketing/put-account/account-manage/components/account-table/delete-account.vue b/src/views/property-marketing/put-account/account-manage/components/account-table/delete-account.vue
new file mode 100644
index 0000000..f1752be
--- /dev/null
+++ b/src/views/property-marketing/put-account/account-manage/components/account-table/delete-account.vue
@@ -0,0 +1,69 @@
+
+
+
+
+
+
![]()
+
确认删除 {{ accountName }} 这个账号吗?
+
+
+ 取消
+ 确认删除
+
+
+
+
+
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 8828433..e6e4da7 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
@@ -5,14 +5,12 @@
-
+
{{ item.name }}
状态
-
- {{ STATUS_LIST.find((v) => v.value === item.status)?.label ?? '-' }}
-
+
平台
@@ -37,31 +35,64 @@
标签
-
+
+
+ {{ `+${item.tags.length - 2}` }}
+
+
+
+
{{ tag.name }}
-
![]()
-
+
+
暂停同步
-
- 获取凭证
-
-
+
+
+ 重新授权
+
+
+
+
+ {{ isUnauthorizedStatus(item.status) ? '去授权' : '重新授权' }}
+
+
+
+
编辑
+
+
diff --git a/src/views/property-marketing/put-account/account-manage/components/add-account-modal/style.scss b/src/views/property-marketing/put-account/account-manage/components/add-account-modal/style.scss
new file mode 100644
index 0000000..22fe718
--- /dev/null
+++ b/src/views/property-marketing/put-account/account-manage/components/add-account-modal/style.scss
@@ -0,0 +1,63 @@
+@import "@/views/property-marketing/component.scss";
+.add-put-account-modal {
+ border-radius: 8px;
+ .w-240px {
+ width: 240px !important;
+ }
+ .arco-modal-body {
+ .upload-block {
+ width: 100%;
+ .dt {
+ color: var(--Brand-Brand-6, #6d4cfe);
+ font-family: 'Alibaba PuHuiTi';
+ font-size: 14px;
+ font-style: normal;
+ font-weight: 400;
+ line-height: 22px; /* 157.143% */
+ }
+ .import-row {
+ border-radius: 4px;
+ border: 1px solid var(--BG-400, #d7d7d9);
+ background: var(--BG-200, #f2f3f5);
+ .name {
+ color: var(--Text-1, #211f24);
+ font-family: 'Alibaba PuHuiTi';
+ font-size: 14px;
+ font-style: normal;
+ font-weight: 400;
+ line-height: 22px; /* 157.143% */
+ }
+ &.error {
+ background: #ffe7e4;
+ color: #f64b31;
+ border: none;
+ .name {
+ color: #f64b31;
+ }
+ }
+ }
+ .arco-upload-drag {
+ height: 120px;
+ display: flex;
+ flex-direction: column;
+ align-items: center;
+ justify-content: center;
+ .arco-icon {
+ margin-bottom: 16px;
+ }
+ }
+ }
+ .upload-dragger {
+ border: 1px dashed #d9d9d9;
+ padding: 24px 0;
+ text-align: center;
+ background: #fafafa;
+ cursor: pointer;
+ }
+ .upload-error {
+ color: #f53f3f;
+ margin-left: 8px;
+ cursor: pointer;
+ }
+ }
+}
diff --git a/src/views/property-marketing/put-account/account-manage/components/authorized-account-modal/index.vue b/src/views/property-marketing/put-account/account-manage/components/authorized-account-modal/index.vue
new file mode 100644
index 0000000..6303680
--- /dev/null
+++ b/src/views/property-marketing/put-account/account-manage/components/authorized-account-modal/index.vue
@@ -0,0 +1,177 @@
+
+
+
+
+
+
+ 数据同步和初始化中,请勿关闭窗口。
+
+
+
+
+ {{ `数据初始化${isSuccess ? '成功' : '失败'}。` }}
+ 失败原因:{{ failReason || '-' }}
+
+
+
+
+
![]()
+
+
+ 请使用抖音扫码,将公司账号绑定至灵机平台。
+
+
+
+
+ 取消
+ {{ confirmBtnText }}
+
+
+
+
+
+
+
diff --git a/src/views/property-marketing/put-account/account-manage/components/authorized-account-modal/style.scss b/src/views/property-marketing/put-account/account-manage/components/authorized-account-modal/style.scss
new file mode 100644
index 0000000..a476920
--- /dev/null
+++ b/src/views/property-marketing/put-account/account-manage/components/authorized-account-modal/style.scss
@@ -0,0 +1,49 @@
+@import '@/views/property-marketing/component.scss';
+
+.authorized-account-modal {
+ border-radius: 8px;
+ .img-box {
+ position: relative;
+ .mask {
+ position: absolute;
+ top: 0;
+ left: 0;
+ width: 100%;
+ height: 100%;
+ opacity: 0.8;
+ background: #000;
+ display: flex;
+ flex-direction: column;
+ align-items: center;
+ justify-content: center;
+ color: #fff;
+ .s1 {
+ color: var(--BG-White, #fff);
+ text-align: center;
+ font-family: 'Alibaba PuHuiTi';
+ font-size: 14px;
+ font-style: normal;
+ font-weight: 400;
+ line-height: 22px;
+ }
+ }
+ }
+ .s2 {
+ color: var(--Text-1, #211f24);
+ font-family: 'Alibaba PuHuiTi';
+ font-size: 14px;
+ font-style: normal;
+ font-weight: 400;
+ line-height: 22px;
+ }
+ .red-text {
+ overflow: hidden;
+ color: var(--Functional-Red-6, #f64b31);
+ text-overflow: ellipsis;
+ font-family: 'Alibaba PuHuiTi';
+ font-size: 14px;
+ font-style: normal;
+ font-weight: 400;
+ line-height: 22px;
+ }
+}
diff --git a/src/views/property-marketing/put-account/account-manage/components/filter-block/index.vue b/src/views/property-marketing/put-account/account-manage/components/filter-block/index.vue
index 39dc8f2..0e4ffbf 100644
--- a/src/views/property-marketing/put-account/account-manage/components/filter-block/index.vue
+++ b/src/views/property-marketing/put-account/account-manage/components/filter-block/index.vue
@@ -1,3 +1,4 @@
+
+
+
+
+
+
![]()
+
账号已成功导入,当前为未授权状态。请前往卡片列表手动授权,完成授权后账号可正常使用。
+
+
+
+ 取消
+ 去授权
+
+
+
+
+
+
+
diff --git a/src/views/property-marketing/put-account/account-manage/components/import-prompt-modal/style.scss b/src/views/property-marketing/put-account/account-manage/components/import-prompt-modal/style.scss
new file mode 100644
index 0000000..e299151
--- /dev/null
+++ b/src/views/property-marketing/put-account/account-manage/components/import-prompt-modal/style.scss
@@ -0,0 +1,14 @@
+@import "@/views/property-marketing/component.scss";
+.import-prompt-modal {
+ border-radius: 8px;
+ .arco-modal-body {
+ .tip {
+ color: var(--Text-1, #211f24);
+ font-family: 'Alibaba PuHuiTi';
+ font-size: 14px;
+ font-style: normal;
+ font-weight: 400;
+ line-height: 22px; /* 157.143% */
+ }
+ }
+}
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
new file mode 100644
index 0000000..9a94451
--- /dev/null
+++ b/src/views/property-marketing/put-account/account-manage/components/status-box/index.vue
@@ -0,0 +1,96 @@
+
+
+
+
{{ statusText }}
+
+
+
+
+
+
+
+
+
diff --git a/src/views/property-marketing/put-account/account-manage/constants.ts b/src/views/property-marketing/put-account/account-manage/constants.ts
index 18c8201..703b871 100644
--- a/src/views/property-marketing/put-account/account-manage/constants.ts
+++ b/src/views/property-marketing/put-account/account-manage/constants.ts
@@ -20,17 +20,53 @@ export const PLATFORM_LIST = [
},
];
+export enum EnumStatus {
+ NORMAL = 1,
+ PAUSE = 3,
+ UNAUTHORIZED = 0,
+ ABNORMAL = 2,
+ ABNORMAL_LOGIN = 4,
+ ABNORMAL_REQUEST = 5,
+ ABNORMAL_FREEZE = 6,
+}
+
export const STATUS_LIST = [
{
- label: '未授权',
- value: 0,
- },
- {
+ text: '正常',
label: '正常',
- value: 1,
+ value: EnumStatus.NORMAL,
},
{
+ text: '暂停同步',
+ label: '暂停同步',
+ value: EnumStatus.PAUSE,
+ },
+ {
+ text: '未授权',
+ label: '未授权',
+ value: EnumStatus.UNAUTHORIZED,
+ },
+ {
+ text: '异常',
label: '异常',
- value: 2,
+ value: EnumStatus.ABNORMAL,
+ },
+ {
+ text: '异常-登录状态失效',
+ label: '异常',
+ value: EnumStatus.ABNORMAL_LOGIN,
+ tooltip: '登录状态失效,需重新扫码授权',
+ },
+ {
+ text: '异常-请求过于频繁',
+ label: '异常',
+ value: EnumStatus.ABNORMAL_REQUEST,
+ tooltip: '请求过于频繁,需等待24小时后重试',
+ },
+ {
+ text: '异常-账号被冻结/封禁',
+ label: '异常',
+ value: EnumStatus.ABNORMAL_FREEZE,
+ tooltip: '账号被冻结/封禁',
},
];
diff --git a/src/views/property-marketing/put-account/account-manage/index.vue b/src/views/property-marketing/put-account/account-manage/index.vue
index 44f7ff1..2b69bd9 100644
--- a/src/views/property-marketing/put-account/account-manage/index.vue
+++ b/src/views/property-marketing/put-account/account-manage/index.vue
@@ -4,50 +4,74 @@
-->
-
+
账户管理
-
+
- 添加投放账号
+ 添加账户
-
+
-
-
-
- {{
- isNormalStatus
- ? '太棒啦!所有账号都在正常运行。'
- : `共有 12 个账号存在授权异常,其中:7 个已掉线,5 个已超过 5 天未登录,有掉线风险。`
- }}
-
-
+
+
+
+
+ 已选
+ {{ selectedItems.length }}
+ 个账号
+
+
+ 批量删除
+
+
+
+
+ {{
+ isNormalStatus
+ ? '太棒啦!所有账号都在正常运行。'
+ : `共有 12 个账号存在授权异常,其中:7 个已掉线,5 个已超过 5 天未登录,有掉线风险。`
+ }}
+
+
+
-
+
+
+
+
+
+
+
+
@@ -70,11 +97,21 @@ import { ref } from 'vue';
import FilterBlock from './components/filter-block';
import AccountTable from './components/account-table';
+import AddAccountModal from './components/add-account-modal';
+import DeleteAccountModal from './components/account-table/delete-account';
+
import { INITIAL_QUERY } from './constants';
+import { getMediaAccounts } from '@/api/all/propertyMarketing';
import icon1 from '@/assets/img/media-account/icon-add.png';
import icon4 from '@/assets/img/media-account/icon-success.png';
import icon5 from '@/assets/img/media-account/icon-warn.png';
+import icon6 from '@/assets/img/media-account/icon-close.png';
+
+const groupManageModalRef = ref(null);
+const tagsManageModalRef = ref(null);
+const addAccountModalRef = ref(null);
+const deleteAccountRef = ref(null);
const tipStatus = ref(2);
const pageInfo = reactive({
@@ -82,49 +119,103 @@ const pageInfo = reactive({
pageSize: 20,
total: 100,
});
-
const query = ref(cloneDeep(INITIAL_QUERY));
const dataSource = ref([]);
+const selectedItems = ref([]);
const isNormalStatus = computed(() => tipStatus.value === 1);
const isAbnormalStatus = computed(() => tipStatus.value === 2);
+const checkedAll = computed(() => selectedItems.value.length === dataSource.value.length);
+const indeterminate = computed(
+ () => selectedItems.value.length > 0 && selectedItems.value.length < dataSource.value.length,
+);
onMounted(() => {
getData();
});
-const getData = () => {
- console.log('getData', query.value, pageInfo);
- dataSource.value = new Array(8).fill({
- id: 1,
- name: '全球',
- account_id: 1,
- mobile: 1777777,
- status: 1,
- platform: 0,
- operator: {
- name: '小周',
- },
- group: {
- name: '美团组',
- },
- tags: [
- {
- name: '标签1',
+const getData = async () => {
+ console.log('getData');
+ // const { page, pageSize } = pageInfo;
+ // const { code, data, total } = await getMediaAccounts({
+ // page,
+ // page_size: pageSize,
+ // ...query.value,
+ // });
+ // if (code === 200) {
+ // dataSource.value = data.data;
+ // pageInfo.total = total;
+ // }
+ dataSource.value = [
+ {
+ id: 1,
+ name: '全球',
+ account_id: 1,
+ mobile: 1777777,
+ status: 0,
+ platform: 0,
+ operator: {
+ name: '小周',
},
- {
- name: '标签2',
+ group: {
+ name: '美团组',
},
- ],
- });
+ tags: [
+ {
+ name: '标签1',
+ },
+ {
+ name: '标签2',
+ },
+ {
+ name: '标签3',
+ },
+ {
+ name: '标签4',
+ },
+ {
+ name: '标签5',
+ },
+ ],
+ },
+ {
+ id: 2,
+ name: '全球2',
+ account_id: 1,
+ mobile: 1777777,
+ status: 4,
+ platform: 0,
+ operator: {
+ name: '小周',
+ },
+ group: {
+ name: '美团组',
+ },
+ tags: [
+ {
+ name: '标签1',
+ },
+ {
+ name: '标签2',
+ },
+ ],
+ },
+ ];
};
-const handleSearch = (newQuery) => {
- query.value = { ...newQuery };
+const reload = () => {
+ pageInfo.page = 1;
+ getData();
+};
+const handleSearch = () => {
getData();
};
const handleReset = () => {
+ pageInfo.page = 1;
+ pageInfo.pageSize = 20;
+ pageInfo.total = 0;
+ selectedItems.value = [];
query.value = cloneDeep(INITIAL_QUERY);
- getData();
+ reload();
};
const onPageChange = (current) => {
@@ -133,8 +224,45 @@ const onPageChange = (current) => {
};
const onPageSizeChange = (pageSize) => {
pageInfo.pageSize = pageSize;
- pageInfo.page = 1;
- getData();
+ reload();
+};
+
+const handleOpenGroupModal = () => {
+ groupManageModalRef.value?.open();
+};
+const handleOpenAccountModal = () => {
+ addAccountModalRef.value?.open();
+};
+
+const handleOpenEdit = (item) => {
+ addAccountModalRef.value?.open(item.id);
+};
+
+const handleSelectionChange = (val) => {
+ selectedItems.value = val;
+};
+const handleChangeAll = (val) => {
+ if (val) {
+ selectedItems.value = cloneDeep(dataSource.value);
+ } else {
+ selectedItems.value = [];
+ }
+};
+const handleBatchDelete = () => {
+ const ids = selectedItems.value.map((item) => item.id);
+ const names = selectedItems.value.map((item) => `"${item.name}"`).join(',');
+ deleteAccountRef.value?.open({ id: ids, name: names });
+};
+const handleDelete = (item) => {
+ const { id, name } = item;
+ deleteAccountRef.value?.open({ id, name: `"${name}"` });
+};
+const handleCloseTip = () => {
+ selectedItems.value = [];
+};
+const handleOpenAbnormalAccount = () => {
+ query.value.status = 2;
+ reload();
};
diff --git a/src/views/property-marketing/put-account/account-manage/style.scss b/src/views/property-marketing/put-account/account-manage/style.scss
index 97d0462..f916046 100644
--- a/src/views/property-marketing/put-account/account-manage/style.scss
+++ b/src/views/property-marketing/put-account/account-manage/style.scss
@@ -13,8 +13,6 @@
background: var(--BG-white, #fff);
}
.filter-wrap {
- border-radius: 8px;
- border: 1px solid #e6e6e8;
.top {
.title {
font-family: 'Alibaba PuHuiTi';
@@ -58,6 +56,22 @@
font-weight: 400;
line-height: 20px; /* 166.667% */
}
+ .operation-btn {
+ padding: 0;
+ cursor: pointer;
+ color: var(--Brand-Brand-6, #6d4cfe);
+ font-family: 'Alibaba PuHuiTi';
+ font-size: 14px;
+ font-style: normal;
+ font-weight: 400;
+ line-height: 22px; /* 157.143% */
+ &:not(:last-child) {
+ margin-right: 16px;
+ }
+ &.red {
+ color: #F64B31;
+ }
+ }
}
.card-wrap {
display: flex;
@@ -68,39 +82,7 @@
padding: 16px 24px;
justify-content: flex-end;
align-items: center;
- :deep(.arco-pagination) {
- .arco-pagination-list {
- .arco-pagination-item {
- border-radius: 4px;
- border: 1px solid var(--BG-300, #e6e6e8);
- &.arco-pagination-item-ellipsis {
- border: none;
- }
- &.arco-pagination-item-active {
- background-color: transparent;
- border: 1px solid var(--Brand-Brand-6, #6d4cfe);
- }
- }
- }
- .arco-pagination-jumper-input {
- border-radius: 4px;
- border: 1px solid var(--BG-300, #e6e6e8);
- }
- .arco-pagination-jumper-prepend {
- color: var(--Text-2, #3c4043);
- text-align: right;
- font-family: 'Alibaba PuHuiTi';
- font-size: 14px;
- font-style: normal;
- font-weight: 400;
- line-height: 22px; /* 157.143% */
- }
- .arco-select-view-single {
- border-radius: 4px;
- border: 1px solid var(--BG-300, #e6e6e8);
- }
- }
}
}
}