Переглянути джерело

头条自动投放账户配置修改

liubei@c-top.com.cn 3 роки тому
батько
коміт
75ec231248

+ 15 - 14
src/views/modules/account-config/account-config.vue

@@ -23,6 +23,7 @@
                             <a-select-option value="CREATIVE_IMAGE_MODE_LARGE">大图横图</a-select-option>
                             <a-select-option value="CREATIVE_IMAGE_MODE_LARGE_VERTICAL">大图竖图</a-select-option>
                             <a-select-option value="CREATIVE_IMAGE_MODE_UNION_SPLASH">开屏</a-select-option>
+                            <a-select-option value="UNIVERSAL">通投智选</a-select-option>
                         </a-select>
                     </a-form-item>
                     <a-form-item label="状态">
@@ -62,8 +63,8 @@
                 <span slot="acountRelax" slot-scope="text, record">
                     <a-switch :checked="text === 0" @change="handleSwitchChang($event, record)"/>
                 </span>
-                <span slot="creativeImageMode" slot-scope="text">
-                    <span>{{ handleChangeCreativeImage(text) }}</span>
+                <span slot="creativeImageMode" slot-scope="text,record">
+                    <span>{{ handleChangeCreativeImage(text,record) }}</span>
                 </span>
                 <span solt="accountBudget" slot-scope="text, record">
                     {{ record.accountBudgetMode === '1' ? '不限' : text }}
@@ -432,19 +433,18 @@ export default {
     methods: {
         
         ...mapGetters(['nickname', 'avatar', 'userInfo']),
-        handleChangeCreativeImage(val) {
+        handleChangeCreativeImage(val,record) {
             let orrr = []
-           if (val.split(',').length>1) {
-            this.creativeImageOption.forEach(item=>{
-               val.split(',').forEach(element => {
-                   if (item.id == element) {
-                       orrr.push(item.value)
+           if (record.inventoryCatalog == 'UNIVERSAL') {
+            // this.creativeImageOption.forEach(item=>{
+            //    val.split(',').forEach(element => {
+            //        if (item.id == element) {
+            //            orrr.push(item.value)
                        
-                   }
-               });
-            })
-            console.log(orrr);
-            return val = orrr.join('-')
+            //        }
+            //    });
+            // })
+            return  record.inventoryCatalog != null && record.inventoryCatalog == 'UNIVERSAL' ?'通投智选' : '-'
            }else{
                return val ? this.creativeImageOption.filter(item => item.id === val)[0].value : '-';
            }
@@ -570,7 +570,8 @@ export default {
             const paramsData = {
                 accountId: this.acountId,
                 status: this.searchStatus === 2 ? '' : this.searchStatus,
-                creativeImageMode: this.creativeStatus === 2 ? '' : this.creativeStatus,
+                creativeImageMode: this.creativeStatus === 2 || this.creativeStatus == 'UNIVERSAL'? '' : this.creativeStatus,
+                inventoryCatalog:this.creativeStatus == 'UNIVERSAL' ? 'UNIVERSAL' :'',
                 loginUserId: this.userInfo().id,
                 pageNo: this.tablePag.page,
                 pageSize: this.tablePag.size

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

@@ -3238,16 +3238,14 @@ export default {
                             })
                         }
                         this.$nextTick(()=>{
-                            console.log(detailData);
                             // this.configForm.creativeImageMode = detailData.creativeImageMode
-                            if (detailData.creativeImageMode.split(',').length > 1) {
+                            if (detailData.inventoryCatalog == 'UNIVERSAL') {
                                 this.creativeImageShow = false;
                                 this.configForm.creativeImageMode = detailData.creativeImageMode.split(',')
                             }else{
                                 this.creativeImageShow = true
-                                this.configForm.creativeImageMode = detailData.creativeImageMode.join(',');
+                                this.configForm.creativeImageMode = detailData.creativeImageMode
                             }
-                            console.log(this.configForm.creativeImageMode);
                         })
                         this.configForm.adInterestActionMode = detailData.adInterestActionMode;
                         this.configForm.creativeDisplayMode = detailData.creativeDisplayMode;