Преглед на файлове

数据查看 模块更新

jiayufei преди 4 години
родител
ревизия
457fdb1b95
променени са 2 файла, в които са добавени 46 реда и са изтрити 72 реда
  1. 15 7
      src/views/modules/creative-copywrit/creative-copywrit.vue
  2. 31 65
      src/views/modules/headline-view/headline-view.vue

+ 15 - 7
src/views/modules/creative-copywrit/creative-copywrit.vue

@@ -1478,7 +1478,7 @@
                         <a-button type="primary" @click="handleAddOrigin"><a-icon type="plus" />创意标题</a-button>
                         <!-- TODO 暂时功能隐藏 -->
                         <!-- <a-button class="examin-select-title" @click="handleSelectTitle">选标题</a-button> -->
-                        <span>已填:{{ titleFiledResult.length || 0 }}</span>
+                        <span style="margin-left: 20px;">已填:{{ titleFiledResult.length || 0 }}</span>
                     </div>
                 </div>
                 <div class="acount-title">
@@ -1562,7 +1562,7 @@
                         <a-button type="primary" @click="handleAddOrigin"><a-icon type="plus" />创意标题</a-button>
                         <!-- TODO 暂时功能隐藏 -->
                         <!-- <a-button class="examin-select-title" @click="handleSelectTitle">选标题</a-button> -->
-                        <span>已填:{{ titleFiledResult.length || 0 }}</span>
+                        <span style="margin-left: 20px;">已填:{{ titleFiledResult.length || 0 }}</span>
                     </div>
                 </div>
                 <div class="acount-title">
@@ -2015,7 +2015,7 @@ export default {
             });
         },
         validatePass(rule, value, callback) {
-            let finallyLenList = this.judge(value);
+            let finallyLenList = this.handleJudgeExec(value);
             const inputDefaultLen = value;
             let tagsLen = finallyLenList.length * 4;
             let tagsSureLen = 0;
@@ -2038,8 +2038,7 @@ export default {
                 callback(new Error('创意标题5-30个字'));
             }
         },
-        judge(item) {
-            // let re = /{{(.*?)}}/g;
+        handleJudgeExec(item) {
             let re = /\{\{(.+?)\}\}/g;
             let array = [];
             let temp;
@@ -2066,7 +2065,11 @@ export default {
             node.focus();
             node.blur();
             this.$nextTick(() => {
-                let finallyLenList = this.judge(this.examinForm.getFieldsValue()[field]);
+                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;
@@ -2114,6 +2117,11 @@ export default {
             });
             this.modalShowBatchList = batchList;
             this.batchVisible = true;
+            this.materTitltStatus = false;
+            this.accountMaster = {
+                height: '35px',
+                overflow: 'hidden'
+            };
             for (let i = 0; i < 3; i++) {
                 const randomNum = new Date().getTime() + Math.ceil(Math.random() * 1000);
                 this.defaultFormList.push({
@@ -2278,7 +2286,7 @@ export default {
                 }
             });
             this.$nextTick(() => {
-                let finallyLenList = this.judge(this.examinForm.getFieldsValue()[field]);
+                let finallyLenList = this.handleJudgeExec(this.examinForm.getFieldsValue()[field]);
                 const inputDefaultLen = this.defaultFormList.filter(item => item.id === formId)[0].value.length;
                 let tagsLen = finallyLenList.length * 4;
                 let tagsSureLen = 0;

+ 31 - 65
src/views/modules/headline-view/headline-view.vue

@@ -12,7 +12,7 @@
                                 :allowClear="false"
                                 format="YYYY-MM-DD"
                                 :disabled-date="disabledDate"
-                                @change="onChange"
+                                @change="handleCostTimeChange"
                             />
                         </div>
                         <div class="costInfo">
@@ -144,7 +144,6 @@
                         :columns="planColumns"
                         :data-source="planData"
                         :pagination="false"
-                        @change="handlePlaneSort"
                     >
                     <span slot="optStatus" slot-scope="text, record">
                         <a-switch :checked="text === 'AD_STATUS_ENABLE'" @change="handleSwitchChang($event, record)"/>
@@ -194,7 +193,6 @@
                         :columns="materialColumns"
                         :data-source="materialData"
                         :pagination="false"
-                        @change="materialChange"
                     >
                         <span slot="posterUrl" slot-scope="text,record">
                             <div style="background:#e8e8e8;text-align:center;border-radius:3px">
@@ -209,9 +207,9 @@
                         </span>
                     </a-table>
                     <a-pagination
-                        class="pagin-table-class"
                         :total="materTotalAll"
                         :show-total="total => `共 ${materTotalAll} 条`"
+                        class="pagin-table-class"
                         size="small"
                         show-size-changer
                         show-quick-jumper
@@ -279,8 +277,8 @@
             </div>
         </a-modal>
         <a-modal
-            title="修改调价"
             v-if="budgetVisible"
+            title="修改调价"
             :visible="budgetVisible"
             dialog-class="mode-modal-class"
             @ok="handleBudgetSure"
@@ -295,9 +293,7 @@
                     :wrapper-col="wrapperCol"
                 >
                     <a-form-model-item label="调价" prop="budget">
-                        <a-input-number
-                            v-model="budgetForm.budget"
-                        /> 元
+                        <a-input-number v-model="budgetForm.budget"/> 元
                     </a-form-model-item>
                 </a-form-model>
             </div>
@@ -611,10 +607,7 @@ export default {
         ...mapGetters(['userInfo']),
         // 获取所有的定向包的列表
         handleGetAdAudiencePackage(account) {
-            const params = {
-                accountId: account
-            };
-            getAction(urlAcount + '/bytedance-api/advertiser/aiBytedanceAdvertiserStrategy/getAdAudiencePackage', params)
+            getAction(urlAcount + '/bytedance-api/advertiser/aiBytedanceAdvertiserStrategy/getAdAudiencePackage', {accountId: account})
                 .then(result => {
                     if (result.code === 0) {
                         this.selectiveList = result.result || [];
@@ -771,10 +764,7 @@ export default {
         },
         // 获取头部最右侧数据
         handleGetAccountMessage(value) {
-            const paramsData = {
-                accountId: value
-            };
-            getAction(urlAcount + '/bytedance-api/advertiser/bytedanceReportController/getAccountCost', paramsData).then(result => {
+            getAction(urlAcount + '/bytedance-api/advertiser/bytedanceReportController/getAccountCost', {accountId: value}).then(result => {
                 if (result.code === 0) {
                     this.topAccountMsg = result.result;
                 }
@@ -891,7 +881,7 @@ export default {
             };
             this.handleGetmaterialData(paramsData);
         },
-        // have 跳转到拒审重提-创意页面
+        // TODO 暂时功能隐藏 跳转到拒审重提-创意页面
         gorejectCreativePage() {
             this.$router.push('/Statistics/refuseDataCreatNew');
         },
@@ -914,7 +904,7 @@ export default {
             };
             this.handleGetPlanTableList(paramsData);
         },
-        onChange(date, dateString) {
+        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')}`;
@@ -998,7 +988,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;
                     }
@@ -1059,11 +1049,14 @@ export default {
                                 y: 0,
                                 x2: 0,
                                 y2: 1,
-                                colorStops: [{
-                                    offset: 0, color: '#2461F1' // 0% 处的颜色
-                                }, {
-                                    offset: 1, color: 'white' // 100% 处的颜色
-                                }]
+                                colorStops: [
+                                    {
+                                        offset: 0, color: '#2461F1' // 0% 处的颜色
+                                    },
+                                    {
+                                        offset: 1, color: 'white' // 100% 处的颜色
+                                    }
+                                ]
                             }
                         }
                     },
@@ -1091,11 +1084,13 @@ export default {
                                 y: 0,
                                 x2: 0,
                                 y2: 1,
-                                colorStops: [{
-                                    offset: 0, color: '#3CC6A5' // 0% 处的颜色
-                                }, {
-                                    offset: 1, color: 'white' // 100% 处的颜色
-                                }]
+                                colorStops: [
+                                    {
+                                        offset: 0, color: '#3CC6A5' // 0% 处的颜色
+                                    }, {
+                                        offset: 1, color: 'white' // 100% 处的颜色
+                                    }
+                                ]
                             }
                         }
                     }
@@ -1173,10 +1168,12 @@ export default {
                                 fontFamily: 'PingFangSC'
                             }
                         },
-                        data: [{
-                            name: '花费占比',
-                            value: dataArr
-                        }],
+                        data: [
+                            {
+                                name: '花费占比',
+                                value: dataArr
+                            }
+                        ],
                         pointer: {
                             show: true,
                             length: '75%',
@@ -1260,43 +1257,12 @@ export default {
                 ]
             };
             return option;
-        },
-        // 投放点击排序功能
-        handlePlaneSort(pagination, filters, sorter, {currentDataSource}) {
-            if (sorter.order === 'descend') {
-                this.newDataSortType = 'DESC';
-                this.newDataSortCode = sorter.columnKey;
-            }
-            else if (sorter.order === 'ascend') {
-                this.newDataSortType = 'ASC';
-                this.newDataSortCode = sorter.columnKey;
-            }
-            else {
-                this.newDataSortType = 'DESC';
-                this.newDataSortCode = 'charge';
-            }
-        },
-        // 素材点击排序功能
-        materialChange(pagination, filters, sorter) {
-            console.log(sorter, 'v--sorter--sorter');
-            if (sorter.order === 'descend') {
-                this.materialSortType = 'DESC';
-                this.materialSortCode = sorter.columnKey;
-            }
-            else if (sorter.order === 'ascend') {
-                this.materialSortType = 'ASC';
-                this.materialSortCode = sorter.columnKey;
-            }
-            else {
-                this.materialSortType = 'DESC';
-                this.materialSortCode = 'charge';
-            }
         }
     }
 };
 </script>
 <style lang="scss">
-    .accountPage .accountBody{
+    .accountPage .accountBody {
         line-height: 1;
         .ant-input {
             -webkit-box-sizing: border-box;