From b3d1a4789d95f569c46e37cfd3a7a5b95166dfcf Mon Sep 17 00:00:00 2001 From: lq <121091329@qq.com> Date: Fri, 12 Sep 2025 17:46:01 +0800 Subject: [PATCH 01/39] =?UTF-8?q?=E6=96=87=E4=BB=B6=E7=9A=84=E5=88=86?= =?UTF-8?q?=E5=BC=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/common-select/index.vue | 48 +++++-- src/components/filter-popup/index.vue | 90 +++++++++++++ .../components/colorTip.vue | 38 ++++++ .../components/filter-popup.vue | 119 ++++++++++++++++++ .../assignment-management/index.vue | 102 +++------------ yarn.lock | 5 + 6 files changed, 312 insertions(+), 90 deletions(-) create mode 100644 src/components/filter-popup/index.vue create mode 100644 src/views/property-marketing/assignment-management/components/colorTip.vue create mode 100644 src/views/property-marketing/assignment-management/components/filter-popup.vue diff --git a/src/components/common-select/index.vue b/src/components/common-select/index.vue index c2f7569..7b4fcfe 100644 --- a/src/components/common-select/index.vue +++ b/src/components/common-select/index.vue @@ -14,19 +14,30 @@ :maxTagCount="maxTagCount" @change="handleChange" > - + + \ No newline at end of file + + + \ No newline at end of file diff --git a/src/components/filter-popup/index.vue b/src/components/filter-popup/index.vue new file mode 100644 index 0000000..ad0f85d --- /dev/null +++ b/src/components/filter-popup/index.vue @@ -0,0 +1,90 @@ + + + + + + diff --git a/src/views/property-marketing/assignment-management/components/colorTip.vue b/src/views/property-marketing/assignment-management/components/colorTip.vue new file mode 100644 index 0000000..0449ae9 --- /dev/null +++ b/src/views/property-marketing/assignment-management/components/colorTip.vue @@ -0,0 +1,38 @@ + diff --git a/src/views/property-marketing/assignment-management/components/filter-popup.vue b/src/views/property-marketing/assignment-management/components/filter-popup.vue new file mode 100644 index 0000000..b47133e --- /dev/null +++ b/src/views/property-marketing/assignment-management/components/filter-popup.vue @@ -0,0 +1,119 @@ + + + + + + diff --git a/src/views/property-marketing/assignment-management/index.vue b/src/views/property-marketing/assignment-management/index.vue index 5746a4b..82f4a35 100644 --- a/src/views/property-marketing/assignment-management/index.vue +++ b/src/views/property-marketing/assignment-management/index.vue @@ -53,7 +53,7 @@
- - - - - - - + --> + +
@@ -345,6 +277,8 @@ import TaskDetail from './components/TaskDetail.vue'; import { useTableSelectionWithPagination } from '@/hooks/useTableSelectionWithPagination'; import emptyIcon from '@/assets/img/media-account/icon-empty.png'; import router from '@/router'; +import colorTip from './components/colorTip.vue'; +import FilterPopup from './components/filter-popup.vue'; const { dataSource, @@ -359,13 +293,13 @@ const { DEFAULT_PAGE_INFO, } = useTableSelectionWithPagination({ onPageChange: () => { - query.page = pageInfo.page; - query.page_size = pageInfo.page_size; + query.page = pageInfo.value.page; + query.page_size = pageInfo.value.page_size; handleSearch(); }, onPageSizeChange: () => { - query.page = pageInfo.page; - query.page_size = pageInfo.page_size; + query.page = pageInfo.value.page; + query.page_size = pageInfo.value.page_size; handleSearch(); }, }); @@ -867,8 +801,8 @@ const handleFilterChange = (field: string, value: any, options?: any[]) => { // 获取数据 const handleSearch = () => { console.log('handleSearch查询参数:', query); - query.page = pageInfo.page; - query.page_size = pageInfo.page_size; + query.page = pageInfo.value.page; + query.page_size = pageInfo.value.page_size; getTaskSchedules(query) .then((response) => { if (response.data) { @@ -892,6 +826,7 @@ const getOperators = async () => { value: op.id, name: op.name, })); + console.log('获取运营人员数据成功:', operatorsData, operators.value); } } catch (error) { console.error('获取运营人员数据失败:', error); @@ -919,6 +854,7 @@ const getAccountList = async () => { platform: account.platform, icon: getPlatformIcon(account.platform), })); + console.log('获取账号数据成功:', accountData, accountList.value); } } catch (error) {} }; diff --git a/yarn.lock b/yarn.lock index 1f3617c..aec5f68 100644 --- a/yarn.lock +++ b/yarn.lock @@ -8936,6 +8936,11 @@ vue-eslint-parser@^9.0.0, vue-eslint-parser@^9.0.1, vue-eslint-parser@^9.1.0, vu lodash "^4.17.21" semver "^7.3.6" +vue-lazyload@^3.0.0: + version "3.0.0" + resolved "https://registry.npmmirror.com/vue-lazyload/-/vue-lazyload-3.0.0.tgz" + integrity sha512-h2keL/Rj550dLgesgOtXJS9qOiSMmuJNeVlfNAYV1/IYwOQYaWk5mFJlwRxmZDK9YC5gECcFLYYj7z1lKSf9ug== + vue-router@^4.4.0: version "4.5.1" resolved "https://registry.npmmirror.com/vue-router/-/vue-router-4.5.1.tgz" From 2b98615d2aa76389692bda41d522600288ef66b2 Mon Sep 17 00:00:00 2001 From: lq <121091329@qq.com> Date: Fri, 12 Sep 2025 17:48:46 +0800 Subject: [PATCH 02/39] =?UTF-8?q?=E9=80=89=E9=A1=B9=E6=94=AF=E6=8C=81?= =?UTF-8?q?=E6=90=9C=E7=B4=A2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/common-select/index.vue | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/src/components/common-select/index.vue b/src/components/common-select/index.vue index 7b4fcfe..3dcbc99 100644 --- a/src/components/common-select/index.vue +++ b/src/components/common-select/index.vue @@ -13,6 +13,7 @@ showArrow :maxTagCount="maxTagCount" @change="handleChange" + :filterOption="allowSearch ? filterOption : undefined" >
-
@@ -261,7 +228,7 @@ - - diff --git a/src/views/property-marketing/assignment-management/components/colorTip.vue b/src/views/property-marketing/assignment-management/components/colorTip.vue index 2dcd28b..9bb4524 100644 --- a/src/views/property-marketing/assignment-management/components/colorTip.vue +++ b/src/views/property-marketing/assignment-management/components/colorTip.vue @@ -18,17 +18,18 @@
发布失败
- + \ No newline at end of file diff --git a/src/views/property-marketing/assignment-management/components/filter-popup.vue b/src/views/property-marketing/assignment-management/components/filter-popup.vue index fab82f6..60164f8 100644 --- a/src/views/property-marketing/assignment-management/components/filter-popup.vue +++ b/src/views/property-marketing/assignment-management/components/filter-popup.vue @@ -1,69 +1,84 @@ - \ No newline at end of file + + + diff --git a/src/views/property-marketing/assignment-management/components/filter-popup.vue b/src/views/property-marketing/assignment-management/components/filter-popup.vue index 60164f8..9398eac 100644 --- a/src/views/property-marketing/assignment-management/components/filter-popup.vue +++ b/src/views/property-marketing/assignment-management/components/filter-popup.vue @@ -11,7 +11,7 @@ \ No newline at end of file +
+ +
+ + + + + diff --git a/src/views/property-marketing/assignment-management/index.vue b/src/views/property-marketing/assignment-management/index.vue index bc48ba2..7f002e7 100644 --- a/src/views/property-marketing/assignment-management/index.vue +++ b/src/views/property-marketing/assignment-management/index.vue @@ -123,6 +123,7 @@ import DateSelector from './components/date-selector.vue'; import colorTip from './components/colorTip.vue'; import FilterPopup from './components/filter-popup.vue'; import DrowPopup from './components/draw-popup.vue'; +import TaskItem from './components/task-item.vue'; // API引入 import { getTaskSchedules, delTaskSchedules, editTaskSchedules } from '@/api/all/assignment-management'; import { fetchAccountOperators, getMediaAccountList } from '@/api/all/propertyMarketing'; From bf202e77a6f79e8c4c1cd534bfcdbd0277a1d3c1 Mon Sep 17 00:00:00 2001 From: lq <121091329@qq.com> Date: Fri, 19 Sep 2025 14:57:14 +0800 Subject: [PATCH 09/39] =?UTF-8?q?=E6=88=90=E5=93=81=E5=BA=93?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../components/draw-popup.vue | 74 +++++++++++++++++-- 1 file changed, 66 insertions(+), 8 deletions(-) diff --git a/src/views/property-marketing/assignment-management/components/draw-popup.vue b/src/views/property-marketing/assignment-management/components/draw-popup.vue index 633d8a4..fc56655 100644 --- a/src/views/property-marketing/assignment-management/components/draw-popup.vue +++ b/src/views/property-marketing/assignment-management/components/draw-popup.vue @@ -139,16 +139,55 @@ class="task-drawer" style="right: 481px" > + + + diff --git a/src/views/property-marketing/assignment-management/index.vue b/src/views/property-marketing/assignment-management/index.vue index 7f002e7..ecc733b 100644 --- a/src/views/property-marketing/assignment-management/index.vue +++ b/src/views/property-marketing/assignment-management/index.vue @@ -59,7 +59,9 @@
-
还有{{ record[column.dataIndex].length - 1 }}项
+
+ 还有{{ record[column.dataIndex].length - 1 }}项 +
+ + diff --git a/src/views/property-marketing/assignment-management/components/raw-material-drawer.vue b/src/views/property-marketing/assignment-management/components/raw-material-drawer.vue new file mode 100644 index 0000000..f903e6b --- /dev/null +++ b/src/views/property-marketing/assignment-management/components/raw-material-drawer.vue @@ -0,0 +1,379 @@ + + + + + From ff7e20f8cf82740952259203d436c53bdeeb2ce1 Mon Sep 17 00:00:00 2001 From: lq <121091329@qq.com> Date: Tue, 23 Sep 2025 11:02:24 +0800 Subject: [PATCH 28/39] =?UTF-8?q?=E5=8E=9F=E6=96=99=E5=BA=93?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../components/raw-material-drawer.vue | 472 +++++++----------- 1 file changed, 182 insertions(+), 290 deletions(-) diff --git a/src/views/property-marketing/assignment-management/components/raw-material-drawer.vue b/src/views/property-marketing/assignment-management/components/raw-material-drawer.vue index f903e6b..a059a3b 100644 --- a/src/views/property-marketing/assignment-management/components/raw-material-drawer.vue +++ b/src/views/property-marketing/assignment-management/components/raw-material-drawer.vue @@ -7,83 +7,94 @@ :visible="visible" @after-visible-change="onAfterVisibleChange" @close="handleClose" - @ok="handleOk" - @cancel="handleCancel" width="904px" class="task-drawer" style="right: 481px" > - - - -
- - - + +
+ + + + +
- - + +
+ +
- - - - - - - - -
- + + From ab319597333b820309bdc893c95272e5add1637b Mon Sep 17 00:00:00 2001 From: lq <121091329@qq.com> Date: Tue, 23 Sep 2025 14:28:20 +0800 Subject: [PATCH 29/39] =?UTF-8?q?=E5=8E=9F=E6=96=99=E5=BA=93=E5=92=8C?= =?UTF-8?q?=E6=88=90=E5=93=81=E5=BA=93?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../components/draw-popup.vue | 33 ++++++---- .../components/finished-product-drawer.vue | 35 ++++------ .../components/raw-material-drawer.vue | 66 ++++++++++++++----- 3 files changed, 82 insertions(+), 52 deletions(-) diff --git a/src/views/property-marketing/assignment-management/components/draw-popup.vue b/src/views/property-marketing/assignment-management/components/draw-popup.vue index 29d3c5e..aa49955 100644 --- a/src/views/property-marketing/assignment-management/components/draw-popup.vue +++ b/src/views/property-marketing/assignment-management/components/draw-popup.vue @@ -62,14 +62,18 @@
-
+
+ + +
+ +
-

AI会参考添加的文本、图片、视频等素材,完成符合需求的创作

@@ -134,7 +138,7 @@ { // 处理原料库选择确认 const handleMaterialConfirm = (result) => { + console.log('handleMaterialConfirm', result); selectedMaterials.value = { keys: result.selectedKeys, data: result.selectedData, text: result.choseText, - images: result.choseImgArray + images: result.choseImgArray, + texts: result.selectedTexts || [] }; hasChoseMaterial.value = result.selectedKeys.length > 0; }; @@ -285,7 +292,7 @@ const handleProductConfirm = (result) => { keys: result.selectedKeys, data: result.selectedData, text: result.choseText, - images: result.choseImgArray + images: result.choseImgArray, }; }; diff --git a/src/views/property-marketing/assignment-management/components/finished-product-drawer.vue b/src/views/property-marketing/assignment-management/components/finished-product-drawer.vue index 18bd125..ea327d8 100644 --- a/src/views/property-marketing/assignment-management/components/finished-product-drawer.vue +++ b/src/views/property-marketing/assignment-management/components/finished-product-drawer.vue @@ -74,13 +74,6 @@
已选择:
{{ choseText }}
-
- 选中的内容 -
@@ -182,22 +175,22 @@ watchEffect(() => { // 监听选中项变化 watch(selectedRowKeys, (newKeys) => { const filteredData = materialData.value.filter((item) => newKeys.includes(item.id)); + choseText.value = filteredData.length + '个稿件'; + // // 统计各类型数量 + // const typeCount = filteredData.reduce((acc, item) => { + // const typeKey = item.type === EnumManuscriptType.Image ? 'image' : 'video'; + // acc[typeKey] = (acc[typeKey] || 0) + 1; + // return acc; + // }, {}); - // 统计各类型数量 - const typeCount = filteredData.reduce((acc, item) => { - const typeKey = item.type === EnumManuscriptType.Image ? 'image' : 'video'; - acc[typeKey] = (acc[typeKey] || 0) + 1; - return acc; - }, {}); + // // 生成选中文本 + // choseText.value = []; + // if (typeCount.image) choseText.value.push(`图文: ${typeCount.image}个`); + // if (typeCount.video) choseText.value.push(`视频: ${typeCount.video}个`); + // choseText.value = choseText.value.join(' '); - // 生成选中文本 - choseText.value = []; - if (typeCount.image) choseText.value.push(`图文: ${typeCount.image}个`); - if (typeCount.video) choseText.value.push(`视频: ${typeCount.video}个`); - choseText.value = choseText.value.join(' '); - - // 筛选选中的内容用于预览 - choseImgArray.value = filteredData; + // // 筛选选中的内容用于预览 + // choseImgArray.value = filteredData; }); // 格式化审核状态显示 diff --git a/src/views/property-marketing/assignment-management/components/raw-material-drawer.vue b/src/views/property-marketing/assignment-management/components/raw-material-drawer.vue index a059a3b..18e5688 100644 --- a/src/views/property-marketing/assignment-management/components/raw-material-drawer.vue +++ b/src/views/property-marketing/assignment-management/components/raw-material-drawer.vue @@ -22,7 +22,11 @@ > 从原料库添加 -
- +
+
+ {{ item }} +
+
+ +

AI会参考添加的文本、图片、视频等素材,完成符合需求的创作

@@ -206,7 +221,8 @@ const props = defineProps({ // 本地筛选状态(保持上次选择) const localQuery = ref({ - accounts: props.query?.ids || [], + accounts: props.query?.name || [], + ids: props.query?.ids || [], }); // 原料库查询参数 @@ -234,7 +250,7 @@ const selectedMaterials = ref({ data: [], text: '', images: [], - texts: [] + texts: [], }); const selectedProducts = ref({ @@ -276,7 +292,7 @@ const handleMaterialConfirm = (result) => { data: result.selectedData, text: result.choseText, images: result.choseImgArray, - texts: result.selectedTexts || [] + texts: result.selectedTexts || [], }; hasChoseMaterial.value = result.selectedKeys.length > 0; }; @@ -341,14 +357,49 @@ watch(showDriwer, (newVal) => { } }); +// 点击创建任务按钮时触发 +const handleCreateTask = () => { + // 验证表单 + if (isActive.value === 'chose' && selectedProducts.value.keys.length === 0) { + // 可以添加错误提示:请选择发布内容 + console.log('请选择发布内容'); + return; + } + console.log(localQuery.value); + // 准备提交的数据 + const taskData = { + media_account_id: localQuery.value.ids[0], + is_ai_generate: isActive.value == 'chose' ? 0 : 1, + description: taskDescription.value, + raw_material_ids: selectedMaterials.value.keys, + products: selectedProducts.value.keys, + publish_type: publishType.value == 'immediate' ? 0 : 1, + execution_time: + publishType.value === 'timing' ? `${dayjs(currentDate.value).format('YYYY-MM-DD')} ${strValue.value}` : null, + }; + // 发射创建任务事件 + emit('create-task', taskData); + + // 关闭抽屉 + showDriwer.value = false; +}; + // 暴露方法给父组件 -const showDrawer = (accountInfo = null) => { +const showDrawer = (accountInfo = null, selectedDate = null) => { showDriwer.value = true; if (accountInfo && accountInfo.id) { nextTick(() => { localQuery.value.accounts = [accountInfo.name]; + localQuery.value.ids = [accountInfo.id]; }); } + console.log('selectedDate', selectedDate); + // 如果传入了日期,则设置为默认日期 + if (selectedDate) { + currentDate.value = selectedDate; + console.log('currentDate', currentDate.value); + publishType.value = 'timing'; + } }; // 定义事件发射器 diff --git a/src/views/property-marketing/assignment-management/components/task-item.vue b/src/views/property-marketing/assignment-management/components/task-item.vue index 74cdd5d..e5098f9 100644 --- a/src/views/property-marketing/assignment-management/components/task-item.vue +++ b/src/views/property-marketing/assignment-management/components/task-item.vue @@ -2,7 +2,7 @@
-
{{ task?.name || '-' }}
+
{{ task?.name || 'AI生成内容' }}