diff --git a/.eslintrc.cjs b/.eslintrc.cjs index a98f933..a78dbb9 100644 --- a/.eslintrc.cjs +++ b/.eslintrc.cjs @@ -28,6 +28,14 @@ module.exports = { tsx: '@typescript-eslint/parser', }, }, + babelOptions: { + presets: [ + '@babel/preset-env' + ], + plugins: [ + '@vue/babel-plugin-jsx' + ] + }, rules: { '@typescript-eslint/prefer-optional-chain': 'off', 'no-console': process.env.NODE_ENV === 'production' ? 'warn' : 'off', diff --git a/config/index.ts b/config/index.ts index 58a9509..5c96895 100644 --- a/config/index.ts +++ b/config/index.ts @@ -1,5 +1,5 @@ import { configUnocss } from './plugins'; -import { configAutoImport, configComponents, configIcons } from './unplugin'; +import { configAutoImport, configComponents,configIcons } from './unplugin'; import viteCompression from 'vite-plugin-compression'; import progress from 'vite-plugin-progress'; import defineOptions from 'unplugin-vue-define-options/vite'; diff --git a/config/plugins/unocss.ts b/config/plugins/unocss.ts index c5b1970..0910253 100644 --- a/config/plugins/unocss.ts +++ b/config/plugins/unocss.ts @@ -1,8 +1,8 @@ /* * @Author: 田鑫 * @Date: 2023-03-05 18:14:16 - * @LastEditors: Please set LastEditors - * @LastEditTime: 2025-06-25 10:54:24 + * @LastEditors: rd 1344903914@qq.com + * @LastEditTime: 2025-07-11 16:30:29 * @Description: */ import Unocss from 'unocss/vite'; @@ -41,21 +41,5 @@ export const configUnocss = () => [/^w-(\d+)$/, ([, d]) => ({ width: `${d}px !important` })], [/^h-(\d+)$/, ([, d]) => ({ height: `${d}px !important` })], [/^ft-(\d+)$/, ([, d]) => ({ 'font-size': `${d}px !important` })], - [ - 'box-container', - { - 'border-radius': '2px', - padding: '20px', - margin: '8px', - 'background-color': '#fff', - }, - ], - [ - 'justify-between', - { - 'justify-content': 'space-between', - }, - ], - ['align-center', { 'text-align': 'center' }], ], }); diff --git a/config/unplugin/auto-import.ts b/config/unplugin/auto-import.ts index 69e7b9a..7778cc9 100644 --- a/config/unplugin/auto-import.ts +++ b/config/unplugin/auto-import.ts @@ -1,14 +1,9 @@ -/* - * @Author: RenXiaoDong - * @Date: 2025-06-24 16:29:10 - */ /** * 自动引入API * */ import AutoImport from 'unplugin-auto-import/vite'; import { ArcoResolver } from 'unplugin-vue-components/resolvers'; -import IconsResolver from 'unplugin-icons/resolver'; import { layoutsResolver } from '../utils'; @@ -21,7 +16,7 @@ export function configAutoImport() { '@vueuse/core', { dayjs: [['default', 'dayjs']], - 'lodash-es': ['cloneDeep', 'omit', 'pick', 'union', 'uniq', 'isNumber', 'uniqBy', 'isEmpty'], + 'lodash-es': ['cloneDeep', 'omit', 'pick', 'union', 'uniq', 'isNumber', 'uniqBy', 'isEmpty', 'merge', 'debounce'], '@/hooks': ['useModal'], }, ], @@ -31,9 +26,6 @@ export function configAutoImport() { enable: true, }, }), - IconsResolver({ - enabledCollections: [], - }), layoutsResolver(), ], eslintrc: { diff --git a/config/unplugin/component.ts b/config/unplugin/component.ts index 9840799..57b9dc8 100644 --- a/config/unplugin/component.ts +++ b/config/unplugin/component.ts @@ -5,7 +5,6 @@ import { kebabCase } from 'unplugin-vue-components'; import Components from 'unplugin-vue-components/vite'; import { ArcoResolver } from 'unplugin-vue-components/resolvers'; -import IconsResolver from 'unplugin-icons/resolver'; import { getSep, getPath, setResolve, layoutsResolver } from '../utils'; @@ -20,11 +19,6 @@ export function configComponents() { }, sideEffect: true, }), - IconsResolver({ - prefix: false, - customCollections: ['i'], - enabledCollections: [], - }), layoutsResolver(), { type: 'component', diff --git a/config/unplugin/icons.ts b/config/unplugin/icons.ts index 2afaffa..0c94bf2 100644 --- a/config/unplugin/icons.ts +++ b/config/unplugin/icons.ts @@ -1,14 +1,14 @@ -/** - * 自动引入 svg 图标 - * */ -import Icons from 'unplugin-icons/vite'; -import { FileSystemIconLoader } from 'unplugin-icons/loaders'; +// /** +// * 自动引入 svg 图标 +// * */ +import { resolve } from '../utils'; + +import { createSvgIconsPlugin } from "vite-plugin-svg-icons"; export function configIcons() { - return Icons({ - compiler: 'vue3', - customCollections: { - i: FileSystemIconLoader('./src/assets', (svg) => svg.replace(/^ -

退出登录后,你将无法收到该账号的通知

- 返回 + 返回 退出登录 @@ -67,7 +67,7 @@ defineExpose({ open }); padding: 24px; .s1 { color: var(--Text-1, #211f24); - font-family: 'PuHuiTi-Medium'; + font-family: $font-family-medium; font-size: 14px; font-style: normal; font-weight: 400; @@ -75,7 +75,7 @@ defineExpose({ open }); } .s2 { color: var(--Text-2, #3c4043); - font-family: 'PuHuiTi-Regular'; + font-family: $font-family-regular; font-size: 12px; font-style: normal; font-weight: 400; @@ -83,15 +83,12 @@ defineExpose({ open }); } .cancel-btn { border-radius: 4px; - border: 1px solid var(--BG-500, #b1b2b5); - &:hover { - border: 1px solid var(--BG-500, #b1b2b5); - } } .danger-btn { - border-radius: 4px; background: var(--Functional-Danger-6, #f64b31) !important; - border: none !important; + &:hover { + background: var(--Functional-Danger-6, #f64b31) !important; + } } } } diff --git a/src/components/_base/menu/index.vue b/src/components/_base/menu/index.vue index 7083b5e..04c296b 100644 --- a/src/components/_base/menu/index.vue +++ b/src/components/_base/menu/index.vue @@ -170,7 +170,7 @@ export default defineComponent({ } .arco-menu-title { color: var(--Text-2, #3c4043); - font-family: 'PuHuiTi-Medium'; + font-family: $font-family-medium; font-size: 16px; font-style: normal; font-weight: 400; @@ -194,7 +194,7 @@ export default defineComponent({ border-radius: 8px; .arco-menu-item-inner { color: var(--Text-3, #737478); - font-family: 'PuHuiTi-Regular'; + font-family: $font-family-regular; font-size: 16px; font-style: normal; font-weight: 400; diff --git a/src/components/_base/navbar/components/navbar-menu/index.vue b/src/components/_base/navbar/components/navbar-menu/index.vue new file mode 100644 index 0000000..7c33508 --- /dev/null +++ b/src/components/_base/navbar/components/navbar-menu/index.vue @@ -0,0 +1,83 @@ + + + + + + diff --git a/src/components/_base/navbar/components/navbar-menu/style.scss b/src/components/_base/navbar/components/navbar-menu/style.scss new file mode 100644 index 0000000..5a15e33 --- /dev/null +++ b/src/components/_base/navbar/components/navbar-menu/style.scss @@ -0,0 +1,45 @@ +.navbar-menu { + display: flex; + align-items: center; + margin-left: 40px; + .menu-item-text { + color: var(--Text-2, #3c4043); + font-family: $font-family-medium; + font-size: 16px; + font-style: normal; + font-weight: 400; + line-height: 22px; + } + :deep(.arco-menu) { + height: 100%; + .arco-menu-inner { + padding: 0 20px; + } + .arco-menu-item { + padding: 0; + position: relative; + &.arco-menu-selected { + .menu-item-text, + .arco-menu-selected-label { + color: #6d4cfe; + } + .arco-menu-selected-label { + background: var(--Brand-Brand-6, #6d4cfe); + height: 4px; + border-radius: 4px; + width: 50%; + position: absolute; + bottom: -8px; + left: 50%; + transform: translateX(-50%); + } + } + } + } + .arco-icon-down { + transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1); + } + .arco-dropdown-open .arco-icon-down { + transform: rotate(180deg); + } +} diff --git a/src/components/_base/navbar/components/right-side/index.vue b/src/components/_base/navbar/components/right-side/index.vue new file mode 100644 index 0000000..4f187dd --- /dev/null +++ b/src/components/_base/navbar/components/right-side/index.vue @@ -0,0 +1,196 @@ + + + + + + diff --git a/src/components/_base/navbar/components/task-center-modal/components/export-task/constants.ts b/src/components/_base/navbar/components/task-center-modal/components/export-task/constants.ts new file mode 100644 index 0000000..1134c9a --- /dev/null +++ b/src/components/_base/navbar/components/task-center-modal/components/export-task/constants.ts @@ -0,0 +1,38 @@ +export const INITIAL_FORM = { + type: 1, + operator_name: '', + module: '', + sort_column: undefined, + sort_order: undefined, +}; + +export const TABLE_COLUMNS = [ + { + title: '文件名称', + dataIndex: 'name', + width: 180, + }, + { + title: '所属模块', + dataIndex: 'module', + width: 120, + }, + { + title: '状态', + dataIndex: 'status', + width: 100, + }, + { + title: '创建时间', + dataIndex: 'created_at', + width: 180, + sortable: { + sortDirections: ['ascend', 'descend'], + }, + }, + { + title: '操作人员', + dataIndex: 'operator.name', + width: 150, + }, +]; diff --git a/src/components/_base/navbar/components/task-center-modal/components/export-task/delete-task-modal.vue b/src/components/_base/navbar/components/task-center-modal/components/export-task/delete-task-modal.vue new file mode 100644 index 0000000..e28a39a --- /dev/null +++ b/src/components/_base/navbar/components/task-center-modal/components/export-task/delete-task-modal.vue @@ -0,0 +1,62 @@ + + + diff --git a/src/components/_base/navbar/components/task-center-modal/components/export-task/index.vue b/src/components/_base/navbar/components/task-center-modal/components/export-task/index.vue new file mode 100644 index 0000000..3e1a3bf --- /dev/null +++ b/src/components/_base/navbar/components/task-center-modal/components/export-task/index.vue @@ -0,0 +1,386 @@ + + + diff --git a/src/components/_base/navbar/components/task-center-modal/components/export-task/style.scss b/src/components/_base/navbar/components/task-center-modal/components/export-task/style.scss new file mode 100644 index 0000000..6fe18d5 --- /dev/null +++ b/src/components/_base/navbar/components/task-center-modal/components/export-task/style.scss @@ -0,0 +1,86 @@ +.export-task-wrap { + height: 100%; + display: flex; + flex-direction: column; + .tip-row { + border-radius: 2px; + background: #f0edff; + .label { + font-family: $font-family-medium; + font-size: 14px; + font-style: normal; + font-weight: 400; + line-height: 22px; + } + &.normal { + background: #ebf7f2; + .label { + color: #211f24; + } + } + &.abnormal { + background: #ffe7e4; + .label { + color: #211f24; + } + } + .err-btn { + background-color: #f64b31 !important; + color: var(--BG-white, #fff); + font-family: 'PingFang SC'; + font-size: 12px; + font-style: normal; + font-weight: 400; + line-height: 20px; + } + .operation-btn { + padding: 0; + cursor: pointer; + color: var(--Brand-Brand-6, #6d4cfe); + font-family: $font-family-regular; + font-size: 14px; + font-style: normal; + font-weight: 400; + line-height: 22px; + &:not(:last-child) { + margin-right: 16px; + } + &.red { + color: #f64b31; + } + } + } + .status-box { + border-radius: 2px; + display: flex; + height: 24px; + padding: 0px 8px; + align-items: center; + width: fit-content; + span { + font-family: $font-family-medium; + font-size: 14px; + font-style: normal; + font-weight: 400; + line-height: 22px; + } + &-0 { + background: var(--Functional-yellow-1, #fff7e5); + span { + color: var(--Functional-yellow-6, #ffae00); + } + } + &-1 { + background: var(--Functional-Green-1, #ebf7f2); + span { + color: var(--Functional-Green-6, #25c883); + } + } + &-2 { + background: var(--Functional-Red-1, #ffe9e7); + span { + color: var(--Functional-Red-6, #f64b31); + } + } + } +} diff --git a/src/components/_base/navbar/components/task-center-modal/components/import-task/constants.ts b/src/components/_base/navbar/components/task-center-modal/components/import-task/constants.ts new file mode 100644 index 0000000..633bb88 --- /dev/null +++ b/src/components/_base/navbar/components/task-center-modal/components/import-task/constants.ts @@ -0,0 +1,53 @@ +export const INITIAL_FORM = { + type: 0, + operator_name: '', + module: '', + sort_column: undefined, + sort_order: undefined, +}; + +export const TABLE_COLUMNS = [ + { + title: '任务名称', + dataIndex: 'name', + width: 180, + }, + { + title: '所属模块', + dataIndex: 'module', + width: 120, + }, + { + title: '状态', + dataIndex: 'status', + width: 100, + }, + { + title: '共导入', + dataIndex: 'total_number', + width: 100, + }, + { + title: '导入成功', + dataIndex: 'success_number', + width: 100, + }, + { + title: '导入失败', + dataIndex: 'fail_number', + width: 100, + }, + { + title: '导入时间', + dataIndex: 'created_at', + width: 180, + sortable: { + sortDirections: ['ascend', 'descend'], + }, + }, + { + title: '操作人员', + dataIndex: 'operator.name', + width: 150, + }, +]; diff --git a/src/components/_base/navbar/components/task-center-modal/components/import-task/delete-task-modal.vue b/src/components/_base/navbar/components/task-center-modal/components/import-task/delete-task-modal.vue new file mode 100644 index 0000000..1c7c09e --- /dev/null +++ b/src/components/_base/navbar/components/task-center-modal/components/import-task/delete-task-modal.vue @@ -0,0 +1,61 @@ + + + diff --git a/src/components/_base/navbar/components/task-center-modal/components/import-task/index.vue b/src/components/_base/navbar/components/task-center-modal/components/import-task/index.vue new file mode 100644 index 0000000..05de549 --- /dev/null +++ b/src/components/_base/navbar/components/task-center-modal/components/import-task/index.vue @@ -0,0 +1,300 @@ + + + diff --git a/src/components/_base/navbar/components/task-center-modal/components/import-task/style.scss b/src/components/_base/navbar/components/task-center-modal/components/import-task/style.scss new file mode 100644 index 0000000..216880a --- /dev/null +++ b/src/components/_base/navbar/components/task-center-modal/components/import-task/style.scss @@ -0,0 +1,86 @@ +.import-task-wrap { + height: 100%; + display: flex; + flex-direction: column; + .tip-row { + border-radius: 2px; + background: #f0edff; + .label { + font-family: $font-family-medium; + font-size: 14px; + font-style: normal; + font-weight: 400; + line-height: 22px; + } + &.normal { + background: #ebf7f2; + .label { + color: #211f24; + } + } + &.abnormal { + background: #ffe7e4; + .label { + color: #211f24; + } + } + .err-btn { + background-color: #f64b31 !important; + color: var(--BG-white, #fff); + font-family: 'PingFang SC'; + font-size: 12px; + font-style: normal; + font-weight: 400; + line-height: 20px; + } + .operation-btn { + padding: 0; + cursor: pointer; + color: var(--Brand-Brand-6, #6d4cfe); + font-family: $font-family-regular; + font-size: 14px; + font-style: normal; + font-weight: 400; + line-height: 22px; + &:not(:last-child) { + margin-right: 16px; + } + &.red { + color: #f64b31; + } + } + } + .status-box { + border-radius: 2px; + display: flex; + height: 24px; + padding: 0px 8px; + align-items: center; + width: fit-content; + span { + font-family: $font-family-medium; + font-size: 14px; + font-style: normal; + font-weight: 400; + line-height: 22px; + } + &-0 { + background: var(--Functional-yellow-1, #fff7e5); + span { + color: var(--Functional-yellow-6, #ffae00); + } + } + &-1 { + background: var(--Functional-Green-1, #ebf7f2); + span { + color: var(--Functional-Green-6, #25c883); + } + } + &-2 { + background: var(--Functional-Red-1, #ffe9e7); + span { + color: var(--Functional-Red-6, #f64b31); + } + } + } +} diff --git a/src/components/_base/navbar/components/task-center-modal/constants.ts b/src/components/_base/navbar/components/task-center-modal/constants.ts new file mode 100644 index 0000000..63ceaa0 --- /dev/null +++ b/src/components/_base/navbar/components/task-center-modal/constants.ts @@ -0,0 +1,34 @@ +export enum enumTaskStatus { + Exporting = 0, // 导出中 + Finished = 1, // 已完成 + Failed = 2, // 导出失败 +} + +export const EXPORT_TASK_STATUS = [ + { + label: '导出中', + value: enumTaskStatus.Exporting, + }, + { + label: '已完成', + value: enumTaskStatus.Finished, + }, + { + label: '导出失败', + value: enumTaskStatus.Failed, + }, +]; +export const IMPORT_TASK_STATUS = [ + { + label: '导入中', + value: enumTaskStatus.Exporting, + }, + { + label: '已完成', + value: enumTaskStatus.Finished, + }, + { + label: '导入失败', + value: enumTaskStatus.Failed, + }, +]; diff --git a/src/components/_base/navbar/components/task-center-modal/index.vue b/src/components/_base/navbar/components/task-center-modal/index.vue new file mode 100644 index 0000000..09815c7 --- /dev/null +++ b/src/components/_base/navbar/components/task-center-modal/index.vue @@ -0,0 +1,73 @@ + + + + + diff --git a/src/components/_base/navbar/components/task-center-modal/style.scss b/src/components/_base/navbar/components/task-center-modal/style.scss new file mode 100644 index 0000000..0485941 --- /dev/null +++ b/src/components/_base/navbar/components/task-center-modal/style.scss @@ -0,0 +1,77 @@ +.task-center-modal { + .arco-modal-header { + border-bottom: none !important; + .arco-modal-title { + color: var(--Text-1, #211f24); + font-size: 16px; + font-style: normal; + font-weight: 400; + line-height: 24px; + font-family: $font-family-medium; + } + } + .arco-modal-body { + padding: 0 !important; + display: flex; + flex-direction: column; + height: 650px; + .filter-row { + .filter-row-item { + &:not(:last-child) { + margin-right: 24px; + } + .label { + margin-right: 12px; + color: #211f24; + font-family: 'PuHuiTi-Regular'; + font-size: 14px; + font-style: normal; + font-weight: 400; + flex-shrink: 0; + line-height: 22px; /* 157.143% */ + } + :deep(.arco-space-item) { + width: 100%; + } + } + } + .arco-tabs { + .arco-tabs-nav-top { + .arco-tabs-tab { + margin: 0 20px; + .arco-tabs-tab-title { + color: var(--Text-2, #3c4043); + font-family: $font-family-regular; + font-size: 14px; + font-style: normal; + font-weight: 400; + line-height: 22px; + } + &.arco-tabs-tab-active { + .arco-tabs-tab-title { + color: #6D4CFE; + font-family: $font-family-medium; + } + } + } + } + .arco-tabs-content { + display: none; + } + } + .content { + flex: 1; + padding: 24px 20px; + overflow: hidden; + } + } + + .cts { + color: var(--Text-1, #211f24); + font-family: $font-family-medium; + font-size: 14px; + font-style: normal; + font-weight: 400; + line-height: 22px; + } +} diff --git a/src/components/_base/navbar/index.vue b/src/components/_base/navbar/index.vue index 87412b6..fd5aeeb 100644 --- a/src/components/_base/navbar/index.vue +++ b/src/components/_base/navbar/index.vue @@ -1,255 +1,47 @@ - - + - - + diff --git a/src/components/container.vue b/src/components/container.vue index 14d2f20..b99a435 100644 --- a/src/components/container.vue +++ b/src/components/container.vue @@ -15,7 +15,7 @@ const props = defineProps<{ title: string; }>(); - + diff --git a/src/components/delete-modal.vue b/src/components/delete-modal.vue index 0d3664d..ad26313 100644 --- a/src/components/delete-modal.vue +++ b/src/components/delete-modal.vue @@ -8,7 +8,7 @@ - + diff --git a/src/hooks/useTableSelectionWithPagination.ts b/src/hooks/useTableSelectionWithPagination.ts new file mode 100644 index 0000000..80ae4aa --- /dev/null +++ b/src/hooks/useTableSelectionWithPagination.ts @@ -0,0 +1,96 @@ +import { ref, computed } from 'vue'; + +interface UseTableSelectionWithPaginationOptions { + rowKey?: string; // 主键字段名,默认 'id' + pageInfo?: { + page?: number; + page_size?: number; + total?: number; + }; + onPageChange?: (page: number) => void; + onPageSizeChange?: (size: number) => void; + onSelectChange?: () => void; +} + +const DEFAULT_PAGE_INFO = { + page: 1, + page_size: 20, + total: 0, +}; + +export function useTableSelectionWithPagination(options: UseTableSelectionWithPaginationOptions = {}) { + const rowKey = options.rowKey || 'id'; + + const selectedRowKeys = ref>([]); + const selectedRows = ref([]); + + const pageInfo = ref(merge({}, DEFAULT_PAGE_INFO, options.pageInfo)); + + const dataSource = ref([]); + + // 单行选择 + const handleSelect = (selectedKeys: (string | number)[], rowKeyValue: string | number, record: any) => { + const select = selectedKeys.includes(rowKeyValue); + selectedRowKeys.value = selectedKeys; + + if (select) { + if (!selectedRows.value.some((v) => v[rowKey] === record[rowKey])) { + selectedRows.value.push(record); + } + } else { + selectedRows.value = selectedRows.value.filter((v) => v[rowKey] !== record[rowKey]); + } + options.onSelectChange?.(); + }; + + // 全选/取消全选 + const handleSelectAll = (checked: boolean) => { + const currentPageRows = dataSource.value; + const currentPageKeys = currentPageRows.map((v) => v[rowKey]); + + if (checked) { + selectedRowKeys.value = Array.from(new Set([...selectedRowKeys.value, ...currentPageKeys])); + const allRows = [...selectedRows.value, ...currentPageRows]; + const map = new Map(); + allRows.forEach((row) => map.set(row[rowKey], row)); + selectedRows.value = Array.from(map.values()); + } else { + selectedRowKeys.value = selectedRowKeys.value.filter((key) => !currentPageKeys.includes(key)); + selectedRows.value = selectedRows.value.filter((row) => !currentPageKeys.includes(row[rowKey])); + } + options.onSelectChange?.(); + }; + + const onPageChange = (page: number) => { + pageInfo.value.page = page; + options.onPageChange?.(page); + }; + const onPageSizeChange = (size: number) => { + pageInfo.value.page_size = size; + pageInfo.value.page = 1; + options.onPageSizeChange?.(size); + }; + const resetPageInfo = () => { + pageInfo.value = cloneDeep(DEFAULT_PAGE_INFO) + } + + const rowSelection = computed(() => ({ + type: 'checkbox', + showCheckedAll: true, + width: 48, + })); + + return { + selectedRowKeys, + selectedRows, + dataSource, + pageInfo, + onPageChange, + onPageSizeChange, + rowSelection, + handleSelect, + handleSelectAll, + resetPageInfo, + DEFAULT_PAGE_INFO, + }; +} diff --git a/src/layouts/Basic.vue b/src/layouts/Basic.vue index f3879ae..8f3f10d 100644 --- a/src/layouts/Basic.vue +++ b/src/layouts/Basic.vue @@ -1,13 +1,17 @@ - - diff --git a/src/views/components/dataEngine/keyBrandMovement.vue b/src/views/components/dataEngine/keyBrandMovement.vue index 2bbc0ea..3e67d96 100644 --- a/src/views/components/dataEngine/keyBrandMovement.vue +++ b/src/views/components/dataEngine/keyBrandMovement.vue @@ -287,7 +287,7 @@ watch(selectedIndustry, () => { align-items: center; .title { color: var(--Text-1, #211f24); - font-family: 'PuHuiTi-Medium'; + font-family: $font-family-medium; font-size: 16px; font-style: normal; font-weight: 400; diff --git a/src/views/components/dataEngine/keyWord.vue b/src/views/components/dataEngine/keyWord.vue index 65a8959..c462718 100644 --- a/src/views/components/dataEngine/keyWord.vue +++ b/src/views/components/dataEngine/keyWord.vue @@ -260,7 +260,7 @@
@@ -659,7 +659,7 @@ onMounted(() => { align-items: center; .title { color: var(--Text-1, #211f24); - font-family: 'PuHuiTi-Medium'; + font-family: $font-family-medium; font-size: 16px; font-style: normal; font-weight: 400; @@ -668,13 +668,13 @@ onMounted(() => { } .cts { color: var(--Text-2, #3c4043); - font-family: 'PuHuiTi-Medium'; + font-family: $font-family-medium; font-size: 14px; font-style: normal; font-weight: 400; line-height: 22px; /* 157.143% */ &.num { - font-family: 'HarmonyOS Sans SC'; + font-family: $font-family-manrope-regular; } } @@ -694,7 +694,7 @@ onMounted(() => { padding: 12px 20px 0; .cts { color: var(--Text-2, #3c4043); - font-family: 'PuHuiTi-Regular'; + font-family: $font-family-regular; font-size: 12px; font-style: normal; font-weight: 400; @@ -713,14 +713,6 @@ onMounted(() => { justify-content: flex-end; align-items: center; border-top: 1px solid var(--Border-1, #d7d7d9); - .cancel-btn { - border-radius: 4px; - border: 1px solid var(--BG-500, #b1b2b5); - background: var(--BG-white, #fff); - &:hover { - border: 1px solid var(--BG-500, #b1b2b5); - } - } } } diff --git a/src/views/components/dataEngine/userPainPoints.vue b/src/views/components/dataEngine/userPainPoints.vue index 74bc9e5..e8cd5ca 100644 --- a/src/views/components/dataEngine/userPainPoints.vue +++ b/src/views/components/dataEngine/userPainPoints.vue @@ -110,7 +110,7 @@ @@ -276,7 +276,7 @@ const search = () => { align-items: center; .title { color: var(--Text-1, #211f24); - font-family: 'PuHuiTi-Medium'; + font-family: $font-family-medium; font-size: 16px; font-style: normal; font-weight: 400; @@ -299,7 +299,7 @@ const search = () => { padding: 12px 20px 0; .cts { color: var(--Text-2, #3c4043); - font-family: 'PuHuiTi-Regular'; + font-family: $font-family-regular; font-size: 12px; font-style: normal; font-weight: 400; @@ -318,14 +318,6 @@ const search = () => { justify-content: flex-end; align-items: center; border-top: 1px solid var(--Border-1, #d7d7d9); - .cancel-btn { - border-radius: 4px; - border: 1px solid var(--BG-500, #b1b2b5); - background: var(--BG-white, #fff); - &:hover { - border: 1px solid var(--BG-500, #b1b2b5); - } - } } } diff --git a/src/views/components/dataEngine/userPersona.vue b/src/views/components/dataEngine/userPersona.vue index 8ae2b1d..53a053a 100644 --- a/src/views/components/dataEngine/userPersona.vue +++ b/src/views/components/dataEngine/userPersona.vue @@ -18,16 +18,16 @@ 女性 - {{ genderData[0].rate * 100 }}% + {{ (girlData.rate * 100).toFixed(2) }}% TGI - {{ genderData[0].tgi }} + {{ girlData.tgi }} 男性 - {{ genderData[1].rate * 100 }}% + {{ (boyData.rate * 100).toFixed(2) }}% TGI - {{ genderData[1].tgi }} + {{ boyData.tgi }} @@ -145,10 +145,13 @@ const topHeaderRef = ref(); const selectedIndustry = computed(() => topHeaderRef.value?.selectedIndustry); const selectedSubCategory = computed(() => topHeaderRef.value?.selectedSubCategory); const selectedTimePeriod = computed(() => topHeaderRef.value?.selectedTimePeriod); + const genderData = ref([]); const genderValueData = ref([]); const ageValueData = ref([]); const geoList = ref([]); +const boyData = computed(() => genderData.value.find( v => v.gender === 1) ?? {}) +const girlData = computed(() => genderData.value.find( v => v.gender === 2) ?? {}) // 监听筛选条件变化 watch([selectedIndustry, selectedTimePeriod, selectedSubCategory], () => { getAgeDistributionsList(); @@ -233,7 +236,7 @@ const getGenderDistributionsList = async () => { await nextTick(); genderValueData.value = data.map((item) => ({ - value: item.rate * 100, + value: (item.rate * 100).toFixed(2), tgi: item.tgi, name: item.gender === 1 ? '女性' : '男性', })); @@ -602,7 +605,7 @@ onMounted(() => { align-items: center; .title { color: var(--Text-1, #211f24); - font-family: 'PuHuiTi-Medium'; + font-family: $font-family-medium; font-size: 16px; font-style: normal; font-weight: 400; @@ -611,13 +614,13 @@ onMounted(() => { } .cts { color: var(--Text-2, #3c4043); - font-family: 'PuHuiTi-Regular'; + font-family: $font-family-regular; font-size: 14px; font-style: normal; font-weight: 400; line-height: 22px; /* 157.143% */ &.num { - font-family: 'HarmonyOS Sans SC'; + font-family: $font-family-manrope-regular; } } :deep(.arco-tabs) { diff --git a/src/views/components/drag/DraggableResizable.vue b/src/views/components/drag/DraggableResizable.vue index 911fabf..6d711ac 100644 --- a/src/views/components/drag/DraggableResizable.vue +++ b/src/views/components/drag/DraggableResizable.vue @@ -360,7 +360,7 @@ if (container.value) { } - + diff --git a/src/views/components/layout/comp3.vue b/src/views/components/layout/comp3.vue index a2f9505..2e04f2f 100644 --- a/src/views/components/layout/comp3.vue +++ b/src/views/components/layout/comp3.vue @@ -10,4 +10,4 @@ - + diff --git a/src/views/components/layout/comp4.vue b/src/views/components/layout/comp4.vue index 9c3bc35..222c6b5 100644 --- a/src/views/components/layout/comp4.vue +++ b/src/views/components/layout/comp4.vue @@ -10,4 +10,4 @@ - + diff --git a/src/views/components/layout/index.vue b/src/views/components/layout/index.vue index fab9732..bcfa90e 100644 --- a/src/views/components/layout/index.vue +++ b/src/views/components/layout/index.vue @@ -380,7 +380,7 @@ function getComponentStyle(component: ComponentState) { } - \ No newline at end of file diff --git a/src/views/components/permission/choose-enterprise.vue b/src/views/components/permission/choose-enterprise.vue index f49517f..46763b0 100644 --- a/src/views/components/permission/choose-enterprise.vue +++ b/src/views/components/permission/choose-enterprise.vue @@ -15,5 +15,5 @@ const enterprise = ref(''); - \ No newline at end of file diff --git a/src/views/components/table/index.vue b/src/views/components/table/index.vue index aff4fc3..410c236 100644 --- a/src/views/components/table/index.vue +++ b/src/views/components/table/index.vue @@ -49,4 +49,4 @@ function add() { function deleteItem(record) {} - + diff --git a/src/views/components/workplace/index.vue b/src/views/components/workplace/index.vue index 66616e1..a672635 100644 --- a/src/views/components/workplace/index.vue +++ b/src/views/components/workplace/index.vue @@ -46,7 +46,7 @@ const getSuccessCaseList = async () => { }; - diff --git a/src/views/property-marketing/media-account/account-manage/components/sync-data-modal/style.scss b/src/views/property-marketing/media-account/account-manage/components/sync-data-modal/style.scss new file mode 100644 index 0000000..20c5586 --- /dev/null +++ b/src/views/property-marketing/media-account/account-manage/components/sync-data-modal/style.scss @@ -0,0 +1,14 @@ +@import "@/views/property-marketing/component.scss"; +.sync-data-modal { + border-radius: 8px; + .arco-modal-body { + .tip { + color: var(--Text-1, #211f24); + font-family: $font-family-regular; + font-size: 14px; + font-style: normal; + font-weight: 400; + line-height: 22px; /* 157.143% */ + } + } +} diff --git a/src/views/property-marketing/media-account/account-manage/components/tags-manage-modal/add-tag.vue b/src/views/property-marketing/media-account/account-manage/components/tags-manage-modal/add-tag.vue index 25e3058..c456871 100644 --- a/src/views/property-marketing/media-account/account-manage/components/tags-manage-modal/add-tag.vue +++ b/src/views/property-marketing/media-account/account-manage/components/tags-manage-modal/add-tag.vue @@ -1,7 +1,3 @@ - diff --git a/src/views/property-marketing/project-manage/project-list/components/add-project-modal/stepOne.vue b/src/views/property-marketing/project-manage/project-list/components/add-project-modal/stepOne.vue new file mode 100644 index 0000000..caa90e0 --- /dev/null +++ b/src/views/property-marketing/project-manage/project-list/components/add-project-modal/stepOne.vue @@ -0,0 +1,54 @@ + + + diff --git a/src/views/property-marketing/project-manage/project-list/components/add-project-modal/stepThree.vue b/src/views/property-marketing/project-manage/project-list/components/add-project-modal/stepThree.vue new file mode 100644 index 0000000..37b86e5 --- /dev/null +++ b/src/views/property-marketing/project-manage/project-list/components/add-project-modal/stepThree.vue @@ -0,0 +1,259 @@ + + + + + diff --git a/src/views/property-marketing/project-manage/project-list/components/add-project-modal/stepTwo.vue b/src/views/property-marketing/project-manage/project-list/components/add-project-modal/stepTwo.vue new file mode 100644 index 0000000..cc171e1 --- /dev/null +++ b/src/views/property-marketing/project-manage/project-list/components/add-project-modal/stepTwo.vue @@ -0,0 +1,253 @@ + + + + + diff --git a/src/views/property-marketing/project-manage/project-list/components/add-project-modal/style.scss b/src/views/property-marketing/project-manage/project-list/components/add-project-modal/style.scss new file mode 100644 index 0000000..c6e2143 --- /dev/null +++ b/src/views/property-marketing/project-manage/project-list/components/add-project-modal/style.scss @@ -0,0 +1,3 @@ +.add-project-modal { + +} \ No newline at end of file diff --git a/src/views/property-marketing/project-manage/project-list/components/filter-block/index.vue b/src/views/property-marketing/project-manage/project-list/components/filter-block/index.vue new file mode 100644 index 0000000..d172b84 --- /dev/null +++ b/src/views/property-marketing/project-manage/project-list/components/filter-block/index.vue @@ -0,0 +1,70 @@ + + + + + + + diff --git a/src/views/property-marketing/project-manage/project-list/components/filter-block/style.scss b/src/views/property-marketing/project-manage/project-list/components/filter-block/style.scss new file mode 100644 index 0000000..dd08cb3 --- /dev/null +++ b/src/views/property-marketing/project-manage/project-list/components/filter-block/style.scss @@ -0,0 +1,23 @@ +.filter-wrap { + .filter-row { + .filter-row-item { + &:not(:last-child) { + margin-right: 24px; + } + .label { + margin-right: 8px; + color: #211f24; + font-family: $font-family-regular; + 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/project-manage/project-list/components/project-table/constants.ts b/src/views/property-marketing/project-manage/project-list/components/project-table/constants.ts new file mode 100644 index 0000000..a23eb25 --- /dev/null +++ b/src/views/property-marketing/project-manage/project-list/components/project-table/constants.ts @@ -0,0 +1,46 @@ +/* + * @Author: RenXiaoDong + * @Date: 2025-06-28 10:33:06 + */ +export const TABLE_COLUMNS = [ + { + title: '项目名称', + dataIndex: 'name', + width: 240, + fixed: 'left', + }, + { + title: '项目预算', + dataIndex: 'budget', + width: 180, + prefix: "¥" + }, + { + title: '关联平台账号', + dataIndex: 'media_account_count', + width: 180, + }, + { + title: '关联渠道账户', + dataIndex: 'placement_account_count', + width: 180, + }, + { + title: '关联内容稿件', + dataIndex: 'work_count', + width: 180, + }, + { + title: '创建时间', + dataIndex: 'create_at', + width: 180, + sortable: { + sortDirections: ['ascend', 'descend'], + }, + }, + { + title: '操作', + dataIndex: 'operation', + width: 100, + }, +]; diff --git a/src/views/property-marketing/project-manage/project-list/components/project-table/delete-project-modal.vue b/src/views/property-marketing/project-manage/project-list/components/project-table/delete-project-modal.vue new file mode 100644 index 0000000..a2a7a9a --- /dev/null +++ b/src/views/property-marketing/project-manage/project-list/components/project-table/delete-project-modal.vue @@ -0,0 +1,63 @@ + + + + diff --git a/src/views/property-marketing/project-manage/project-list/components/project-table/index.vue b/src/views/property-marketing/project-manage/project-list/components/project-table/index.vue new file mode 100644 index 0000000..ec1441f --- /dev/null +++ b/src/views/property-marketing/project-manage/project-list/components/project-table/index.vue @@ -0,0 +1,88 @@ + + + + + diff --git a/src/views/property-marketing/project-manage/project-list/components/project-table/style.scss b/src/views/property-marketing/project-manage/project-list/components/project-table/style.scss new file mode 100644 index 0000000..38fb392 --- /dev/null +++ b/src/views/property-marketing/project-manage/project-list/components/project-table/style.scss @@ -0,0 +1,10 @@ +.project-table { + .cts { + color: var(--Text-1, #211f24); + font-family: $font-family-medium; + font-size: 14px; + font-style: normal; + font-weight: 400; + line-height: 22px; + } +} diff --git a/src/views/property-marketing/project-manage/project-list/constants.ts b/src/views/property-marketing/project-manage/project-list/constants.ts new file mode 100644 index 0000000..2e16021 --- /dev/null +++ b/src/views/property-marketing/project-manage/project-list/constants.ts @@ -0,0 +1,5 @@ +export const INITIAL_QUERY = { + name: '', + sort_column: undefined, + sort_order: undefined, +}; diff --git a/src/views/property-marketing/project-manage/project-list/index.vue b/src/views/property-marketing/project-manage/project-list/index.vue new file mode 100644 index 0000000..404ccd3 --- /dev/null +++ b/src/views/property-marketing/project-manage/project-list/index.vue @@ -0,0 +1,125 @@ + + + + + diff --git a/src/views/property-marketing/project-manage/project-list/style.scss b/src/views/property-marketing/project-manage/project-list/style.scss new file mode 100644 index 0000000..09ee598 --- /dev/null +++ b/src/views/property-marketing/project-manage/project-list/style.scss @@ -0,0 +1,29 @@ +.project-list-wrap { + height: 100%; + display: flex; + flex-direction: column; + .filter-wrap { + .top { + .title { + font-family: $font-family-medium; + font-style: normal; + } + :deep(.arco-btn) { + .arco-btn-icon { + line-height: 16px; + } + } + } + } + .table-wrap { + display: flex; + flex-direction: column; + .pagination-box { + display: flex; + width: 100%; + padding: 16px 24px; + justify-content: flex-end; + align-items: center; + } + } +} diff --git a/src/views/property-marketing/put-account/account-dashboard/components/echarts-item/index.vue b/src/views/property-marketing/put-account/account-dashboard/components/echarts-item/index.vue index b9c9eba..25f30c8 100644 --- a/src/views/property-marketing/put-account/account-dashboard/components/echarts-item/index.vue +++ b/src/views/property-marketing/put-account/account-dashboard/components/echarts-item/index.vue @@ -9,9 +9,9 @@ + - -
+
@@ -32,7 +32,11 @@ const chartEl = ref(null); const chartContainer = ref(null); let chartInstance = null; -const isChartEmpty = computed(() => isEmpty(props.chartData?.series_data)); +// 判断 series_data 是否为空或 undefined/null +const isChartEmpty = computed(() => { + const seriesData = props.chartData?.series_data; + return Array.isArray(seriesData) ? seriesData.length === 0 : !seriesData; +}); console.log(isChartEmpty, 'isChartEmpty'); // 初始化图表 diff --git a/src/views/property-marketing/put-account/account-dashboard/index.vue b/src/views/property-marketing/put-account/account-dashboard/index.vue index b395248..7caeee8 100644 --- a/src/views/property-marketing/put-account/account-dashboard/index.vue +++ b/src/views/property-marketing/put-account/account-dashboard/index.vue @@ -32,7 +32,7 @@
运营人员 - +
@@ -43,13 +43,13 @@ - + - + @@ -74,13 +74,13 @@ 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 index 1304cb2..72132dc 100644 --- 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 @@ -9,7 +9,7 @@ width: 100%; .dt { color: var(--Brand-Brand-6, #6d4cfe); - font-family: 'PuHuiTi-Regular'; + font-family: $font-family-regular; font-size: 14px; font-style: normal; font-weight: 400; @@ -21,7 +21,7 @@ background: var(--BG-200, #f2f3f5); .name { color: var(--Text-1, #211f24); - font-family: 'PuHuiTi-Regular'; + font-family: $font-family-regular; font-size: 14px; font-style: normal; font-weight: 400; @@ -69,7 +69,7 @@ .tip { color: var(--Text-3, #737478); text-align: center; - font-family: 'PuHuiTi-Regular'; + font-family: $font-family-regular; font-size: 12px; font-style: normal; font-weight: 400; 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 index 4f5bb36..8ac7abc 100644 --- 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 @@ -12,7 +12,7 @@ :footer="!isLoading" @close="close" > -
+ +
diff --git a/src/views/property-marketing/put-account/account-manage/components/filter-block/style.scss b/src/views/property-marketing/put-account/account-manage/components/filter-block/style.scss index ff7b556..48e2115 100644 --- a/src/views/property-marketing/put-account/account-manage/components/filter-block/style.scss +++ b/src/views/property-marketing/put-account/account-manage/components/filter-block/style.scss @@ -1,17 +1,4 @@ .container { - :deep(.arco-input-wrapper), - :deep(.arco-select-view-single), - :deep(.arco-select-view-multiple) { - 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) { @@ -20,7 +7,7 @@ .label { margin-right: 8px; color: #211f24; - font-family: 'PuHuiTi-Regular'; + font-family: $font-family-regular; font-size: 14px; font-style: normal; font-weight: 400; diff --git a/src/views/property-marketing/put-account/account-manage/components/import-prompt-modal/index.vue b/src/views/property-marketing/put-account/account-manage/components/import-prompt-modal/index.vue index 5fd6c1e..ac7f68c 100644 --- a/src/views/property-marketing/put-account/account-manage/components/import-prompt-modal/index.vue +++ b/src/views/property-marketing/put-account/account-manage/components/import-prompt-modal/index.vue @@ -18,7 +18,7 @@
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 index aec2422..618362a 100644 --- 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 @@ -4,7 +4,7 @@ .arco-modal-body { .tip { color: var(--Text-1, #211f24); - font-family: 'PuHuiTi-Medium'; + font-family: $font-family-medium; font-size: 14px; font-style: normal; font-weight: 400; diff --git a/src/views/property-marketing/put-account/account-manage/components/select-sub-account-modal/constants.ts b/src/views/property-marketing/put-account/account-manage/components/select-sub-account-modal/constants.ts new file mode 100644 index 0000000..52e05fd --- /dev/null +++ b/src/views/property-marketing/put-account/account-manage/components/select-sub-account-modal/constants.ts @@ -0,0 +1,23 @@ +export const INITIAL_FORM = { + platform: '', + account: '', + password: '', + account_name: '', + account_id: '', +}; +export const INITIAL_PAGE_INFO = { + page: 1, + page_size: 20, + total: 0, +}; + +export const TABLE_COLUMNS = [ + { + title: '账户名称', + dataIndex: 'account_name', + }, + { + title: '账户ID', + dataIndex: 'account_id', + }, +]; diff --git a/src/views/property-marketing/put-account/account-manage/components/select-sub-account-modal/index.vue b/src/views/property-marketing/put-account/account-manage/components/select-sub-account-modal/index.vue new file mode 100644 index 0000000..d2af440 --- /dev/null +++ b/src/views/property-marketing/put-account/account-manage/components/select-sub-account-modal/index.vue @@ -0,0 +1,214 @@ + + + + + diff --git a/src/views/property-marketing/put-account/account-manage/components/select-sub-account-modal/style.scss b/src/views/property-marketing/put-account/account-manage/components/select-sub-account-modal/style.scss new file mode 100644 index 0000000..25d027e --- /dev/null +++ b/src/views/property-marketing/put-account/account-manage/components/select-sub-account-modal/style.scss @@ -0,0 +1,45 @@ +.select-sub-account-modal { + .cts { + color: var(--Text-1, #211f24); + font-family: $font-family-medium; + font-size: 14px; + font-style: normal; + font-weight: 400; + line-height: 22px; + } + .arco-modal-header { + } + .arco-modal-body { + height: 536px; + overflow: hidden; + display: flex; + flex-direction: column; + .filter-row { + .filter-row-item { + &:not(:last-child) { + margin-right: 24px; + } + .label { + margin-right: 12px; + color: #211f24; + font-family: 'PuHuiTi-Regular'; + font-size: 14px; + font-style: normal; + font-weight: 400; + flex-shrink: 0; + line-height: 22px; + } + } + } + + } + .arco-modal-footer { + justify-content: space-between; + .s1 { + font-family: $font-family-regular; + .num { + font-family: $font-family-medium; + } + } + } +} 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 d1b5b4c..df9d526 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/investment-guidelines/components/table-data/guideListHistory.vue b/src/views/property-marketing/put-account/investment-guidelines/components/table-data/guideListHistory.vue index 6327cad..4082779 100644 --- a/src/views/property-marketing/put-account/investment-guidelines/components/table-data/guideListHistory.vue +++ b/src/views/property-marketing/put-account/investment-guidelines/components/table-data/guideListHistory.vue @@ -31,7 +31,7 @@ - diff --git a/tsconfig.json b/tsconfig.json index 448577a..8d7756e 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -16,7 +16,7 @@ "paths": { "@/*": ["src/*"] }, - "types": ["unplugin-icons/types/vue", "unplugin-vue-define-options/macros-global"] + "types": ["unplugin-vue-define-options/macros-global"] }, "references": [ diff --git a/vite.config.ts b/vite.config.ts index 8ef4e54..ea48c0a 100644 --- a/vite.config.ts +++ b/vite.config.ts @@ -20,7 +20,7 @@ export default defineConfig(({ mode }: ConfigEnv): UserConfig => { css: { preprocessorOptions: { scss: { - // additionalData: `@import "@/styles/vars.css";`, + additionalData: `@import "@/styles/lib/variable.scss"; @import "@/styles/mixins/index.scss";`, }, }, }, @@ -40,7 +40,8 @@ export default defineConfig(({ mode }: ConfigEnv): UserConfig => { changeOrigin: true, rewrite: (path) => path.replace(/^\/api/, ''), // 目标地址 - target: 'http://www.lingji.com/api', + target: 'https://lingjiapi.lvfunai.com/api', + // target: 'http://192.168.40.22/api', }, }, },