Bläddra i källkod

数据查看 模块更新

jiayufei 4 år sedan
förälder
incheckning
a06f5f1b3a

+ 32 - 16
src/views/modules/account-config/account-config.vue

@@ -14,7 +14,13 @@
                         label="账户"
                         :colon="false"
                     >
-                        <acount-search class="acount-search-class" :appId.sync="acountId" :multiple="false" request="1,3"></acount-search>
+                        <acount-search
+                            class="acount-search-class"
+                            request="1,3"
+                            :appId.sync="acountId"
+                            :multiple="false"
+                        >
+                        </acount-search>
                     </a-form-item>
                     <a-form-item class="form-handle-btn">
                         <a-button type="default" class="reset-class" @click="handleResetList">重置</a-button>
@@ -22,7 +28,13 @@
                     </a-form-item>
                 </a-row>
             </a-form>
-            <a-button type="primary" class="upload-person" @click="handleAddAccountConfig">新建账户配置</a-button>
+            <a-button
+                type="primary"
+                class="upload-person"
+                @click="handleAddAccountConfig"
+            >
+                新建账户配置
+            </a-button>
         </div>
         <div class="control-con-table">
             <a-table
@@ -70,10 +82,10 @@
             />
         </div>
         <a-modal
-            title="修改预算"
             v-if="budgetVisible"
-            :visible="budgetVisible"
+            title="修改预算"
             dialog-class="mode-modal-class"
+            :visible="budgetVisible"
             @ok="handleBudgetSure"
             @cancel="handleBudgetCancel"
         >
@@ -104,7 +116,6 @@
                             @blur="handleAccountBudget"
                         /> 元
                     </a-form-model-item>
-                    <!-- <div v-if="adBudgetShowTitle" style="width: 500px;color: #f00;margin-left: 140px;">单次修改预算幅度, 不能低于100.0元</div> -->
                 </a-form-model>
             </div>
         </a-modal>
@@ -124,7 +135,11 @@
                     :label-col="labelCol"
                     :wrapper-col="wrapperCol"
                 >
-                    <a-form-model-item v-if="updateModTxt.adBidCreateType === 'FIX'" label="目标转化出价" prop="adCpaBid">
+                    <a-form-model-item
+                        v-if="updateModTxt.adBidCreateType === 'FIX'"
+                        label="目标转化出价"
+                        prop="adCpaBid"
+                    >
                         <a-input-number
                             class="common-input"
                             v-model="configForm.adCpaBid"
@@ -134,8 +149,11 @@
                         />
                     </a-form-model-item>
                     <div v-if="updateModTxt.adBidCreateType === 'RAND'">
-                        <a-form-model-item label="目标转化出价范围"
-                        class="dp-link-start" prop="adMinBid">
+                        <a-form-model-item
+                            label="目标转化出价范围"
+                            class="dp-link-start"
+                            prop="adMinBid"
+                        >
                             <a-input-number
                                 class="common-input"
                                 v-model="configForm.adMinBid"
@@ -158,7 +176,11 @@
                         </a-form-model-item>
                     </div>
                     <div v-if="updateModTxt.adBidCreateType === 'STEP'">
-                        <a-form-model-item label="目标转化出价范围" class="dp-link-start" prop="adMinBid">
+                        <a-form-model-item
+                            label="目标转化出价范围"
+                            class="dp-link-start"
+                            prop="adMinBid"
+                        >
                             <a-input-number
                                 class="common-input"
                                 v-model="configForm.adMinBid"
@@ -529,12 +551,6 @@ export default {
                 }
             });
         },
-        handleBudgetPopover(record) {
-            record.show = false;
-        },
-        handleModPopover(record) {
-            record.visible = false;
-        },
         handleQueryList(event) {
             event.preventDefault();
             this.handleInitTable();
@@ -589,4 +605,4 @@ export default {
 </script>
 <style lang="less" scoped>
     @import "account-config";
-</style>
+</style>

Filskillnaden har hållts tillbaka eftersom den är för stor
+ 951 - 862
src/views/modules/account-config/components/configuration-modal.vue


+ 30 - 23
src/views/modules/creative-copywrit/creative-copywrit.vue

@@ -1496,8 +1496,7 @@
                                 <a-input
                                     v-decorator="[
                                         item.name,
-                                        { rules: [
-                                            {required: true, message: '请输入创意标题'},
+                                        {rules: [
                                             {validator: validatePass, trigger: 'blur'}
                                         ]}
                                     ]"
@@ -1581,7 +1580,6 @@
                                     v-decorator="[
                                         item.name,
                                         { rules: [
-                                            {required: true, message: '请输入创意标题'},
                                             {validator: validatePass, trigger: 'blur'}
                                         ]}
                                     ]"
@@ -2016,27 +2014,35 @@ export default {
         },
         validatePass(rule, value, callback) {
             let finallyLenList = this.handleJudgeExec(value);
-            const inputDefaultLen = value;
-            let tagsLen = finallyLenList.length * 4;
-            let tagsSureLen = 0;
             let resultSelectSize = 0;
-            this.adNameTags.forEach(item => {
-                finallyLenList.forEach(val => {
-                    if (item.name === val) {
-                        tagsSureLen += item.maxWordLen;
-                    }
+            if (finallyLenList.length) {
+                const inputDefaultLen = value.length;
+                let tagsLen = finallyLenList.length * 4;
+                let tagsSureLen = 0;
+                this.adNameTags.forEach(item => {
+                    finallyLenList.forEach(val => {
+                        if (item.name === val) {
+                            tagsSureLen += item.maxWordLen;
+                        }
+                    });
                 });
-            });
-            finallyLenList.forEach(item => {
-                tagsLen += item.length;
-            });
-            resultSelectSize = inputDefaultLen - tagsLen + tagsSureLen;
-            if (resultSelectSize < 30 && resultSelectSize > 5) {
-                callback();
-            }
+                finallyLenList.forEach(item => {
+                    tagsLen += item.length;
+                });
+                resultSelectSize = inputDefaultLen - tagsLen + tagsSureLen;
+            }
             else {
+                resultSelectSize = value.length;
+            }
+            if (resultSelectSize === 0) {
+                callback(new Error('请输入'));
+            }
+            else if (resultSelectSize > 30 || resultSelectSize < 5) {
                 callback(new Error('创意标题5-30个字'));
             }
+            else {
+                callback();
+            }
         },
         handleJudgeExec(item) {
             let re = /\{\{(.+?)\}\}/g;
@@ -2053,6 +2059,11 @@ export default {
             let startPos = node.selectionStart; // input 第0个字符到选中的字符
             let endPos = node.selectionEnd; // 选中的字符到最后的字符
             let txt = node.value;
+            let finallyLenList = this.handleJudgeExec(txt);
+            if (finallyLenList.length >= 2) {
+                this.$message.error('最多选择两个词包');
+                return;
+            }
             if (startPos === 0 || endPos === 0) {
                 txt += '{{' + item + '}}';
                 this.examinForm.setFieldsValue({[field]: txt});
@@ -2066,10 +2077,6 @@ export default {
             node.blur();
             this.$nextTick(() => {
                 let finallyLenList = this.handleJudgeExec(this.examinForm.getFieldsValue()[field]);
-                if (finallyLenList.length > 2) {
-                    this.$message.error('最多选择两个词包');
-                    return;
-                }
                 const inputDefaultLen = this.examinForm.getFieldsValue()[field].length;
                 let tagsLen = finallyLenList.length * 4;
                 let tagsSureLen = 0;

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

@@ -53,7 +53,7 @@
                             <div class="todyCost">
                                 <span v-if="item.type === 'double'">{{ item.today }}</span>
                                 <span v-else-if="item.type === 'string'">{{ item.today }}</span>
-                                <span v-else-if="item.type === 'int'">{{ item.today }}</span>
+                                <span v-else-if="item.type === 'int'">{{ item.today !== 0 ? item.today + '%' : 0 }}</span>
                                 <span class="sign">
                                     <a-icon type="rise" class="rise" v-show="item.today - item.yesterday > 0"/>
                                     <a-icon type="fall" class="fall" v-show="item.today - item.yesterday < 0" />
@@ -231,7 +231,7 @@
                     <a-col :span="6">
                         <div style="text-align:right">已优先定向:</div>
                     </a-col>
-                    <a-col :span="16">DMP</a-col>
+                    <a-col :span="16">{{ packageName }}</a-col>
                 </a-row>
                 <a-row style="margin-top: 20px;">
                     <a-col :span="6">
@@ -359,7 +359,7 @@ export default {
                     key: 'activation',
                     today: 0,
                     yesterday: 0,
-                    type: 'int'
+                    type: 'string'
                 },
                 {
                     title: '转化率',
@@ -597,7 +597,8 @@ export default {
             topCostList: {},
             yearCostReportList: {}, // 环比数据
             selectiveList: [],
-            currentUnit: {}
+            currentUnit: {},
+            packageName: ''
         };
     },
     mounted() {
@@ -642,7 +643,24 @@ export default {
                 console.log(error, 'eeee');
             });
         },
+        handleGetADAudiencePackageId(actId, id) {
+            const paramsData = {
+                accountId: actId,
+                adId: id
+            };
+            getAction(urlAcount + '/bytedance-api/advertiser/bytedanceReportController/getADAudiencePackageId', paramsData).then(result => {
+                if (result.code === 0) {
+                    this.packageName = result.result.packageId ? this.selectiveList.filter(item => item.audience_package_id === Number(result.result.packageId))[0].name : '暂无';
+                }
+                else {
+                    this.$message.error(result.message);
+                }
+            }).catch(error => {
+                console.log(error, 'eeee');
+            });
+        },
         handleUpdateDirectional(record) {
+            this.handleGetADAudiencePackageId(this.topAccountMsg.accountMap.accountId, record.adId);
             this.currentUnit = record;
             this.targetVisible = true;
         },
@@ -828,6 +846,7 @@ export default {
         // 修改定向的取消按钮
         handleTargethandleCancel() {
             this.adAudiencePackageId = '';
+            this.packageName = '';
             this.targetVisible = false;
         },
         handleAccounthandleOk() {
@@ -835,8 +854,8 @@ export default {
                 account: {
                     accountId: this.selectaccountId
                 },
-                startTime: this.topCostList.startTime,
-                endTime: this.topCostList.startTime
+                startTime: this.dateValue[0],
+                endTime: this.dateValue[1]
             };
             this.topCostList = paramsData;
             this.handleGetAccountMessage(this.selectaccountId);
@@ -905,10 +924,7 @@ export default {
             this.handleGetPlanTableList(paramsData);
         },
         handleCostTimeChange(date, dateString) {
-            if (dateString.length > 0 && dateString[0] !== dateString[1]) {
-                let interval = date[1].diff(date[0], 'days');
-                this.dateStringShow = `${moment(date[0]).subtract(1 + interval, 'days').format('YYYY-MM-DD')}~${moment(date[0]).subtract(1, 'days').format('YYYY-MM-DD')}`;
-            }
+            this.dateValue = dateString;
             const paramsData = {
                 account: {
                     accountId: this.topCostList.account.accountId
@@ -988,7 +1004,7 @@ export default {
                         let option = isType + '<br/>';
                         for (let i = 0, length = params.length; i < length; i++) {
                             const showTime = specialIdentification === '时' ? params[i].seriesName : '';
-                            option += `<span style="width:8px;height:8px;border-radius:50%;background:${params[i].color};display:inline-block;position:relative;top:-2px;margin-right:5px"></span>${showTime} ${params[i].axisValue}${specialIdentification} ${params[i].data}<br />`;
+                            option += `<span style="width:8px;height:8px;border-radius:50%;background:${params[i].color};display:inline-block;position:relative;top:-2px;margin-right:5px"></span>${showTime} ${params[i].axisValue}${specialIdentification} ${params[i].data}%<br />`;
                         }
                         return option;
                     }