Ver código fonte

'改批量的本地存储'

魏志佳 4 anos atrás
pai
commit
95a0c4029f

+ 13 - 0
src/components/layouts/TabLayout.vue

@@ -108,6 +108,7 @@
           let oldPositionRoute = this.pageList[oldIndex]
           this.pageList.splice(oldIndex, 1, Object.assign({}, newRoute, {meta: oldPositionRoute.meta}))
         }
+        // 快手的批量处理标签
         if(!this.linkList.includes("/account/stepForm")){
           localStorage.removeItem("step")
           localStorage.removeItem("campaignId")
@@ -123,6 +124,18 @@
           localStorage.removeItem("originality")
           localStorage.removeItem("originalityKey")
         }
+
+        // 头条的批量处理tab标签
+        console.log(this.activePage,this.linkList)
+        if(!this.linkList.includes('/modules/BatchCreate/newGroup')&&!this.linkList.includes('/modules/BatchCreate/newPlan')&&!this.linkList.includes('/modules/BatchCreate/newCreate')){
+          localStorage.removeItem("planInfo")
+          localStorage.removeItem("groupInfo")
+          
+        }
+        // if(this.linkList.includes('/modules/BatchCreate/newDirectedPackage')){
+        //   localStorage.setItem("accountInfo",'')
+          
+        // }
       },
       'activePage': function (key) {
         let index = this.linkList.lastIndexOf(key)

+ 16 - 9
src/views/modules/BatchCreate/TouTiaoBatch.vue

@@ -414,7 +414,7 @@ const planColumns = [
     dataIndex: 'name',
     key: 'name',
     align: 'center',
-    width:300,
+    width:200,
     scopedSlots: { customRender: 'name' }
   },
   {
@@ -735,14 +735,7 @@ export default {
                 this.accountID=undefined;
                 this.openID=val
             }
-            this.treeData.forEach((item)=>{
-                item.children.forEach(ele=>{
-                    if(ele.value==val){
-                        let accountInfo=JSON.stringify(ele)
-                        localStorage.setItem('accountInfo',accountInfo)
-                    }
-                })
-            })
+            
             this.search();
         },
 
@@ -808,8 +801,10 @@ export default {
         },
         //跳转到批量页面
         goBatch(){
+            
             this.$router.push('/modules/BatchCreate/newGroup')
             
+            
         },
         createPlan(){
             if(this.currentGroup.name){
@@ -1503,6 +1498,18 @@ export default {
 
         this.accountHttp()
     },
+    beforeDestroy() {
+        this.treeData.forEach((item)=>{
+            item.children.forEach(ele=>{
+                if(ele.value==this.accountID){
+                    let accountInfo=JSON.stringify(ele)
+                    localStorage.setItem('accountInfo',accountInfo)
+                }
+            })
+        })
+        this.$bus.$emit('remove', '/modules/BatchCreate/TouTiaoBatch')
+
+    },
     filters: {
         toPercentage(val) {
             if(val){

+ 27 - 4
src/views/modules/BatchCreate/newCreate.vue

@@ -51,7 +51,7 @@
                   </a-radio-group>
                 </div>
               </div>
-            </div>
+            </div><div class=""></div>
           </div>
 
         </div>
@@ -94,6 +94,7 @@
               </a-form-item>
             </div>
           </div>
+
           <div class="row-item">
             <div class="hint-item"></div>
             <div class="label-item">
@@ -123,6 +124,7 @@
             </div> -->
             <material ref="material" :creativeType="getFormData('creativeWay')"></material>
           </div>
+
           <div class="row-item">
             <div class="hint-item"></div>
             <div class="label-item">
@@ -138,6 +140,7 @@
               </a-form-item>
             </div>
           </div>
+
           <div class="row-item">
             <div class="hint-item"></div>
             <div class="label-item">
@@ -150,6 +153,7 @@
               </a-form-item>
             </div>
           </div>
+
           <div class="row-item">
             <div class="hint-item"></div>
             <div class="label-item">
@@ -169,6 +173,7 @@
               </a-form-item>
             </div>
           </div>
+
           <div class="row-item">
             <div class="hint-item"></div>
             <div class="label-item">
@@ -181,6 +186,7 @@
               </a-form-item>
             </div>
           </div>
+
           <div class="row-item">
             <div class="hint-item"></div>
             <div class="label-item">
@@ -193,6 +199,7 @@
               </a-form-item>
             </div>
           </div>
+
           <div class="row-item">
             <div class="hint-item"></div>
             <div class="label-item">
@@ -208,6 +215,7 @@
               </a-form-item>
             </div>
           </div>
+
           <div class="row-item">
             <div class="hint-item"></div>
             <div class="label-item">
@@ -655,6 +663,7 @@
                     // res.data.forEach((item)=>{
                     //   this.$message.error(item.message)
                     // })
+
                   } else {
                     this.loading=false;
                   }
@@ -671,13 +680,23 @@
       
       // 回显数据专用
       echoData(){
-        postAction('',{
-
+        getAction('',{
+          accountInfo:this.accountInfo.value,
+          planId:this.planInfo.id
         }).then(res=>{
-          console.log(res)
+            console.log(res)
+            this.form.setFieldsValue({
+              
+            })
         })
       },
     },
+    beforeDestroy() {
+      localStorage.removeItem('groupInfo');
+      localStorage.removeItem('planInfo');
+      localStorage.removeItem('accountInfo');
+
+    },
     mounted() {
       this.initFormValue();
 
@@ -716,6 +735,10 @@
         }
 
       })
+
+      if(this.accountInfo.value&&this.planInfo[0].id){
+        
+      }
     },
   }
 </script>

+ 4 - 4
src/views/modules/BatchCreate/newDirectedPackage.vue

@@ -1793,9 +1793,10 @@ export default {
                 })
             }
         })
-        let accountInfo = localStorage.getItem('accountInfo')
+        let accountInfo = localStorage.getItem('accountInfo');
+        let groupInfo = localStorage.getItem('planInfo')
         // console.log(accountInfo)
-        if (accountInfo!=null) {
+        if (accountInfo!='' && groupInfo!='') {
             this.accountInfo = JSON.parse(accountInfo)
             if(this.accountInfo.value){
                 getAction('/ctop/audience/list',{
@@ -1830,8 +1831,7 @@ export default {
                     name:res.result.name,
                     landingType:res.result.landingType,
                     deliveryRange:res.result.deliveryRange,
-                    gender:res.result.gender,
-                    
+                    gender:res.result.gender,                   
                     filterConvertedUsers:res.result.filterConvertedUsers,
                 })
                 if(res.result.landingType=='APP_ANDROID'){

+ 8 - 0
src/views/modules/BatchCreate/newGroup.vue

@@ -291,6 +291,9 @@ export default {
         goback(){
             this.$router.push('/modules/BatchCreate/TouTiaoBatch')
             this.$bus.$emit('remove', '/modules/BatchCreate/newGroup')
+            localStorage.setItem('groupInfo','');
+            localStorage.setItem('planInfo','');
+            localStorage.setItem('accountInfo','');
         },
 
         selectedCampaign(e){
@@ -329,6 +332,11 @@ export default {
                             })).then(res=>{
                                 console.log(res)
                                 if(res.success){
+
+                                    localStorage.setItem('groupInfo','');
+                                    localStorage.setItem('planInfo','');
+                                    localStorage.setItem('accountInfo','');
+
                                     this.nextLoading=false;
                                     this.$message.success('广告组创建成功,即将返回批量页面');
                                     values.id=res.campaign_id;

+ 10 - 0
src/views/modules/BatchCreate/newPlan.vue

@@ -1122,6 +1122,10 @@ export default {
     goBack() {
       this.$router.replace('/modules/BatchCreate/TouTiaoBatch')
       this.$bus.$emit('remove', '/modules/BatchCreate/newPlan')
+      localStorage.setItem('groupInfo','');
+      localStorage.setItem('planInfo','');
+      localStorage.setItem('accountInfo','');
+
     },
     // 保存并关闭
     goPlanShow() {
@@ -1157,7 +1161,13 @@ export default {
                 ...this.directPackageValue
               }).then((res) => {
                 console.log(res)
+
                 if (res.success) {
+
+                  localStorage.setItem('groupInfo','');
+                  localStorage.setItem('planInfo','');
+                  localStorage.setItem('accountInfo','');
+
                   this.goPlanShowloading=false;
                   if(res.code==0){
                      this.$message.success('广告计划创建成功,2s后将跳转到头条批量页面')

+ 1 - 1
src/views/modules/BatchCreate/toutiaoTime.vue

@@ -301,7 +301,7 @@
   }
 </script>
 
-<style lang="scss">
+<style lang="scss" scoped>
   .time_table {
     border: 1px solid #ccc;
     border-collapse: collapse;

+ 0 - 0
src/views/modules/dataChecked/taskLog.vue


+ 16 - 0
src/views/modules/dataChecked/taskLsit.vue

@@ -0,0 +1,16 @@
+<template>
+  <div>
+    执行列表
+    
+  </div>
+</template>
+
+<script>
+  export default {
+    
+  }
+</script>
+
+<style lang="scss" scoped>
+
+</style>

+ 2 - 1
vue.config.js

@@ -57,11 +57,12 @@ module.exports = {
     proxy: {
       '/jeecg-boot': {
         // target: 'http://192.168.1.90:8080', //请求本地 需要jeecg-boot后台项目  蒙蒙
-        target: 'http://192.168.1.72:8088', //请求本地 需要jeecg-boot后台项目  英豪
+        // target: 'http://192.168.1.72:8088', //请求本地 需要jeecg-boot后台项目  英豪
         // target: 'http://192.168.2.115:8080', //请求本地 需要jeecg-boot后台项目  祚云
         // target: 'http://192.168.1.94:8088', //请求本地 需要jeecg-boot后台项目  孙震
         // target: 'http://192.168.0.230:8088', //请求本地 需要jeecg-boot后台项目  孙震
         // target: 'http://192.168.1.51:8088', //请求本地 需要jeecg-boot后台项目  毕洁泉
+        target: 'http://192.168.0.252:8098', //请求本地 需要jeecg-boot后台项目  毕洁泉
         // target: 'http://192.168.0.170:8088', //请求本地 需要jeecg-boot后台项目  毕洁泉
         // target: 'http://api.tjyourong.com.cn', //请求本地 需要jeecg-boot后台项目 
         // target: 'https://trac.tjyourong.com.cn', //请求本地 需要jeecg-boot后台项目