Ver código fonte

middle 文案库修改

jiayufei 4 anos atrás
pai
commit
57ae6a2437

+ 1 - 1
src/views/modules/account-config/components/configuration-modal.vue

@@ -1921,7 +1921,7 @@ export default {
                         const defaultList = result.result;
                         this.promotionTypeList.forEach(item => {
                             defaultList.forEach(val => {
-                                if (item.landing_type === val.value) {
+                                if (val.landing_type === item.value) {
                                     val.changeName = item.label;
                                 }
                             });

+ 5 - 2
src/views/modules/copy-library/copy-library.less

@@ -6,11 +6,14 @@
     .control-con-header {
         margin-bottom: 20px;
         position: relative;
+        .grid-form-options {
+            margin-top: 15px;
+        }
         .common-input-long {
-            width: 320px;
+            width: 420px;
         }
         .acount-search-class {
-            width: 450px;
+            width: 650px;
         }
         .reset-class {
             margin-right: 10px !important;

+ 22 - 10
src/views/modules/copy-library/copy-library.vue

@@ -7,7 +7,7 @@
                 :form="form"
                 hide-required-mark
             >
-                <a-row class="grid-form-options">
+                <a-row>
                     <a-form-item
                         v-if="controlTypeModel === '1'"
                         class="grid-form-item"
@@ -27,9 +27,9 @@
                             class="common-input-long"
                             show-search
                             v-model="configForm.adConvertId"
-                            placeholder="请选择"
                             :filter-option="filterOption"
                             allowClear
+                            placeholder="请选择项目"
                         >
                             <a-select-option
                                 v-for="(item, index) in optimizationOption"
@@ -40,6 +40,8 @@
                             </a-select-option>
                         </a-select>
                     </a-form-model-item>
+                </a-row>
+                <a-row class="grid-form-options">
                     <a-form-item
                         class="grid-form-item"
                         label="关键词:"
@@ -65,9 +67,9 @@
                     </a-form-item>
                 </a-row>
             </a-form>
-            <a-button type="primary" class="upload-person" @click="handleAddAccountConfig">新增文案</a-button>
         </div>
         <div class="control-con-table">
+            <a-button type="primary" class="upload-person" @click="handleAddAccountConfig">新增文案</a-button>
             <a-tabs v-model="controlTypeModel" @change="handleTabsChange">
                 <a-tab-pane key="1" tab="通用">
                     <a-table
@@ -409,7 +411,7 @@ export default {
             configForm: {
                 acountId: '',
                 num: '',
-                adConvertId: '',
+                adConvertId: undefined,
                 launchDateRange: []
             },
             currencyPag: {
@@ -676,7 +678,7 @@ export default {
             this.configForm = {
                 acountId: '',
                 num: '',
-                adConvertId: '',
+                adConvertId: undefined,
                 launchDateRange: []
             };
             if (e === '1') {
@@ -782,8 +784,10 @@ export default {
                     return item;
                 }
             });
-            this.changeShowmasterData = this.changeShowmasterData.concat(changeSelectMaterData);
-            this.$nextTick(() => {
+            if (this.modalSelectMaterial.length) {
+                this.changeShowmasterData = [...this.modalSelectMaterial];
+                this.changeShowmasterData = this.changeShowmasterData.concat(changeSelectMaterData);
+                console.log(this.changeShowmasterData, 'this.changeShowmasterData-this.changeShowmasterData');
                 let temp = {}; // 用于id判断
                 let result = []; // 最后的新数组
                 this.changeShowmasterData.map(item => {
@@ -797,8 +801,15 @@ export default {
                     return;
                 }
                 this.modalSelectMaterial = [...result];
-                this.handleCancelAll();
-            });
+            }
+            else {
+                if (changeSelectMaterData.length > 8) {
+                    this.$message.error('最多上传8个素材');
+                    return;
+                }
+                this.modalSelectMaterial = [...changeSelectMaterData];
+            }
+            this.handleCancelAll();
         },
         handleFormLayoutChange(e) {
             const defaultValue = e.target.value;
@@ -1052,6 +1063,7 @@ export default {
                         if (result.code === 0) {
                             this.$message.success(result.message);
                             this.controlTypeModel = '1';
+                            this.modalSelectMaterial = [];
                             this.handleCauseCancel();
                             this.handleGetCurrencyList();
                         }
@@ -1132,7 +1144,7 @@ export default {
             this.configForm = {
                 acountId: '',
                 num: '',
-                adConvertId: '',
+                adConvertId: undefined,
                 launchDateRange: []
             };
             const page = {

+ 43 - 1
src/views/modules/creative-copywrit/creative-copywrit.vue

@@ -316,6 +316,9 @@
                         <selectTable :projectId.sync="queryParam.productId" ref="selectTable"></selectTable>
                     </a-col>
                     <a-col :md="8" :sm="8">
+                        <selectTableProject :projectId.sync="queryParam.projectId" :productId="queryParam.productId" ref="selectTableProject"></selectTableProject>
+                    </a-col>
+                    <a-col :md="8" :sm="8">
                         <a-form-item label="素材名称">
                             <a-input placeholder="请输入素材名称" v-model="queryParam.materialName"></a-input>
                         </a-form-item>
@@ -345,6 +348,33 @@
                         </a-form-item>
                     </a-col>
                     <a-col :md="8" :sm="8">
+                        <a-form-item label="剪辑">
+                        <a-select v-model="queryParam.clipId" allowClear show-search :filter-option="filterOption">
+                            <a-select-option v-for="item in designList" :key="item.userId" :value="item.userId">
+                            {{ item.companyName + '_' + item.userName }}
+                            </a-select-option>
+                        </a-select>
+                        </a-form-item>
+                    </a-col>
+                    <a-col :md="8" :sm="8">
+                        <a-form-item label="拍摄">
+                        <a-select v-model="queryParam.shotId" allowClear show-search :filter-option="filterOption">
+                            <a-select-option v-for="item in designList" :key="item.userId" :value="item.userId">
+                            {{ item.companyName + '_' + item.userName }}
+                            </a-select-option>
+                        </a-select>
+                        </a-form-item>
+                    </a-col>
+                    <a-col :md="8" :sm="8">
+                        <a-form-item label="编导">
+                        <a-select v-model="queryParam.planId" allowClear show-search :filter-option="filterOption">
+                            <a-select-option v-for="item in designList" :key="item.userId" :value="item.userId">
+                            {{ item.companyName + '_' + item.userName }}
+                            </a-select-option>
+                        </a-select>
+                        </a-form-item>
+                    </a-col>
+                    <a-col :md="8" :sm="8">
                         <span style="float: left; overflow: hidden" class="table-page-search-submitButtons">
                             <a-button type="primary" @click="handleSubmit" icon="search">查询</a-button>
                             <a-button type="primary" @click="searchRe" icon="reload" style="margin-left: 8px">重置</a-button>
@@ -1668,6 +1698,7 @@ import uploadFile from '@/components/uploadFile.vue';
 import {closeAllVideoFun, stopOtherVideo} from '@/utils/videoControl';
 import accountCheck from '@/views/modules/material/accountCheck';
 import accountCheckBytedance from '@/views/modules/material/accountCheckBytedance';
+import selectTableProject from '@/views/modules/Statistics/components/selectPagination.vue';
 import {urlAcount} from '../account-config/account-config-server.js';
 
 import qs from 'qs';
@@ -1684,10 +1715,12 @@ export default {
         selectTable,
         uploadFile,
         PermissionModal,
-        accountCheckBytedance
+        accountCheckBytedance,
+        selectTableProject
     },
     data() {
         return {
+            designList: [],
             adNameTags: [],
             materTitltStatus: false,
             accountMaster: {
@@ -1955,6 +1988,7 @@ export default {
                 };
             });
         }, 1000);
+        this.getDesignList();
         getAction('/ctop/tagInfo/treeList', {
             pageSize: 10000
         }).then(res => {
@@ -2019,6 +2053,14 @@ export default {
     },
     methods: {
         ...mapGetters(['nickname', 'avatar', 'userInfo']),
+        // 获取设计人员
+        getDesignList() {
+            postAction('/ctop/kuaishou/videoReport/getDesignList').then((res) => {
+                if (res.success) {
+                    this.designList = res.result;
+                }
+            });
+        },
         handleSubmit() {
             this.searchQuery();
             this.checkArr = [];

+ 92 - 27
src/views/modules/headline-view/headline-view.vue

@@ -107,7 +107,7 @@
                             <div
                                 class="accountIndexEchart"
                                 id="accountIndexEchart"
-                                style='width:100%;height:150px;margin:0 auto;'
+                                style="width:100%;height:150px;margin:0 auto;"
                                 ref="accountIndexEchart"
                             >
                                 <a-empty/>
@@ -165,7 +165,7 @@
                         :scroll="{x: 1500}"
                     >
                     <span slot="conver" slot-scope="text, record">
-                        <span v-if="record.cpaBid < text" style="color: #f00;">{{ text }}</span>
+                        <span v-if="Number(record.cpaBid) < Number(text)" style="color: #f00;">{{ text }}</span>
                         <span v-else>{{ text }}</span>
                     </span>
                     <span slot="optStatus" slot-scope="text, record">
@@ -265,7 +265,7 @@
                     </a-col>
                     <a-col :span="16">
                         <a-select
-                            style="width: 240px;"
+                            style="width: 320px;"
                             v-model="adAudiencePackageId"
                             allow-clear
                             placeholder="请选择已有定向包名称"
@@ -275,7 +275,10 @@
                                 :key="index"
                                 :value="item.audience_package_id"
                             >
-                                {{ item.name }}
+                                <div class="orient-list">
+                                    <span class="orient-option-left" style="display: inline-block;width: 150px;white-space: nowrap;overflow: hidden;text-overflow: ellipsis;">{{ item.name }}</span>
+                                    <span class="orient-option-right" style="display: inline-block;width: 150px;text-align:right;white-space: nowrap;overflow: hidden;text-overflow: ellipsis;">{{ item.changeName }}</span>
+                                </div>
                             </a-select-option>
                         </a-select>
                     </a-col>
@@ -353,7 +356,7 @@ export default {
     },
     data() {
         return {
-            adAudiencePackageId: '',
+            adAudiencePackageId: undefined,
             planRangePicker: [],
             labelCol: {span: 4},
             wrapperCol: {span: 14},
@@ -430,6 +433,7 @@ export default {
                     dataIndex: 'adName',
                     key: 'adName',
                     align: 'center',
+                    fixed: 'left',
                     width: 240
                 },
                 {
@@ -438,7 +442,7 @@ export default {
                     key: 'costStr',
                     align: 'center',
                     width: 180,
-                    sorter: (a, b) => a.cost - b.cost
+                    sorter: (a, b) => a.costStr - b.costStr
                 },
                 {
                     title: '出价',
@@ -653,6 +657,44 @@ export default {
             materialSortCode: 'charge',
             materialSortType: 'DESC',
             directionalList: [],
+            promotionTypeList: [
+                {
+                    value: 'EXTERNAL',
+                    label: '落地页'
+                },
+                {
+                    value: 'ARTICLE',
+                    label: '文章推广'
+                },
+                {
+                    value: 'GOODS',
+                    label: '商品推广'
+                },
+                {
+                    value: 'DPA',
+                    label: '商品目录'
+                },
+                {
+                    value: 'STORE',
+                    label: '门店推广'
+                },
+                {
+                    value: 'AWEME',
+                    label: '抖音号推广'
+                },
+                {
+                    value: 'SHOP',
+                    label: '店铺直投'
+                },
+                {
+                    value: 'APP_ANDROID',
+                    label: '应用下载-安卓'
+                },
+                {
+                    value: 'APP_IOS',
+                    label: '应用下载-IOS'
+                }
+            ],
             selectDirectionalId: undefined,
             topAccountMsg: {},
             topCostList: {},
@@ -676,7 +718,15 @@ export default {
             getAction(urlAcount + '/bytedance-api/advertiser/aiBytedanceAdvertiserStrategy/getAdAudiencePackage', {accountId: account})
                 .then(result => {
                     if (result.code === 0) {
-                        this.selectiveList = result.result || [];
+                        const defaultList = result.result;
+                        this.promotionTypeList.forEach(item => {
+                            defaultList.forEach(val => {
+                                if (val.landing_type === item.value) {
+                                    val.changeName = item.label;
+                                }
+                            });
+                        });
+                        this.selectiveList = defaultList;
                     }
                     else {
                         this.$message.error(result.message);
@@ -734,13 +784,13 @@ export default {
                 if (valid) {
                     const paramsData = {
                         adId: this.currentUnit.adId,
-                        bid: this.budgetForm.budget,
+                        cpaBid: this.budgetForm.budget,
                         accountId: this.topCostList.account.accountId
                     };
-                    getAction(urlAcount + '/bytedance-api/advertiser/bytedanceReportController/updateADBid', paramsData).then(result => {
+                    getAction(urlAcount + '/bytedance-api/advertiser/bytedanceReportController/updateADCpaBid', paramsData).then(result => {
                         if (result.code === 0) {
                             this.$message.success(result.message);
-                            this.budgetForm.budget = '';
+                            this.budgetForm.budget = 0;
                             this.budgetVisible = false;
                             this.handleGetPlanTableList(this.topCostList);
                         }
@@ -759,7 +809,7 @@ export default {
         },
         // 调价修改取消按钮
         handleBudgetCancel() {
-            this.budgetForm.budget = '';
+            this.budgetForm.budget = 0;
             this.budgetVisible = false;
         },
         // 调价修改确定按钮
@@ -891,6 +941,10 @@ export default {
         },
         // 修改定向的确定按钮
         handleTargethandleOk() {
+            if (!this.adAudiencePackageId) {
+                this.$message.error('请选择定向包');
+                return;
+            }
             const paramsData = {
                 accountId: this.topCostList.account.accountId,
                 adId: this.currentUnit.adId,
@@ -898,7 +952,7 @@ export default {
             };
             getAction(urlAcount + '/bytedance-api/advertiser/bytedanceReportController/updateADAudiencePackage', paramsData).then(result => {
                 if (result.code === 0) {
-                    this.adAudiencePackageId = '';
+                    this.adAudiencePackageId = undefined;
                     this.targetVisible = false;
                     this.$message.success(result.message);
                     this.handleGetPlanTableList(this.topCostList);
@@ -912,7 +966,7 @@ export default {
         },
         // 修改定向的取消按钮
         handleTargethandleCancel() {
-            this.adAudiencePackageId = '';
+            this.adAudiencePackageId = undefined;
             this.packageName = '';
             this.targetVisible = false;
         },
@@ -1031,8 +1085,8 @@ export default {
         },
         // 默认echarts
         initAccountIndexEchart(data, type) {
-            const LastX = data.lastMap.costList.map(item => item.time);
-            const todayX = data.nowMap.costList.map(item => item.time);
+            const LastX = data.lastMap.costList.length ? data.lastMap.costList.map(item => item.time) : [];
+            const todayX = data.nowMap.costList.length ? data.nowMap.costList.map(item => item.time) : [];
             let specialIdentification = '';
             if (todayX.length && todayX[0].indexOf('-') !== -1) {
                 specialIdentification = '';
@@ -1043,24 +1097,24 @@ export default {
             let tadayShowY = [];
             let yestodayShowY = [];
             if (type === 'spendCost') {
-                tadayShowY = data.nowMap.costList.map(item => item.cost);
-                yestodayShowY = data.lastMap.costList.map(item => item.cost);
+                tadayShowY = data.nowMap.costList.length ? data.nowMap.costList.map(item => item.cost) : [];
+                yestodayShowY = data.lastMap.costList.length ? data.lastMap.costList.map(item => item.cost) : [];
             }
             else if (type === 'activationCost') {
-                tadayShowY = data.nowMap.costList.map(item => item.conver);
-                yestodayShowY = data.lastMap.costList.map(item => item.conver);
+                tadayShowY = data.nowMap.costList.length ? data.nowMap.costList.map(item => item.conver) : [];
+                yestodayShowY = data.lastMap.costList.length ? data.lastMap.costList.map(item => item.conver) : [];
             }
             else if (type === 'activation') {
-                tadayShowY = data.nowMap.costList.map(item => item.convertNum);
-                yestodayShowY = data.lastMap.costList.map(item => item.convertNum);
+                tadayShowY = data.nowMap.costList.length ? data.nowMap.costList.map(item => item.convertNum) : [];
+                yestodayShowY = data.lastMap.costList.length ? data.lastMap.costList.map(item => item.convertNum) : [];
             }
             else if (type === 'bclick') {
-                tadayShowY = data.nowMap.costList.map(item => item.converRate);
-                yestodayShowY = data.lastMap.costList.map(item => item.converRate);
+                tadayShowY = data.nowMap.costList.length ? data.nowMap.costList.map(item => item.converRate) : [];
+                yestodayShowY = data.lastMap.costList.length ? data.lastMap.costList.map(item => item.converRate) : [];
             }
             else if (type === 'formCount') {
-                tadayShowY = data.nowMap.costList.map(item => item.averageShow);
-                yestodayShowY = data.lastMap.costList.map(item => item.averageShow);
+                tadayShowY = data.nowMap.costList.length ? data.nowMap.costList.map(item => item.averageShow) : [];
+                yestodayShowY = data.lastMap.costList.length ? data.lastMap.costList.map(item => item.averageShow) : [];
             }
             let option = {
                 tooltip: {
@@ -1185,8 +1239,8 @@ export default {
             };
             option.xAxis[0].data = todayX;
             option.xAxis[1].data = LastX;
-            option.series[0].name = data.nowMap.costList[0].statDatetime;
-            option.series[1].name = data.lastMap.costList[0].statDatetime;
+            option.series[0].name = data.nowMap.costList.length ? data.nowMap.costList[0].statDatetime : '';
+            option.series[1].name = data.lastMap.costList.length ? data.lastMap.costList[0].statDatetime : '';
             option.series[0].data = tadayShowY;
             option.series[1].data = yestodayShowY;
             return option;
@@ -1349,6 +1403,17 @@ export default {
 };
 </script>
 <style lang="scss">
+    .orient-list {
+        display: flex;
+        justify-content: space-between;
+        width: 260px;
+        .orient-option-left {
+            float: left;
+        }
+        .orient-option-right {
+            float: right;
+        }
+    }
     .accountPage .accountBody {
         line-height: 1;
         .ant-input {