Browse Source

Merge branch 'master' of http://git.tjyourong.com.cn/ctop/adsp-vue

魏志佳 4 years ago
parent
commit
592a98c48e

+ 46 - 45
src/components/layouts/TabLayout.vue

@@ -121,7 +121,7 @@
     },
     watch: {
       '$route': function (newRoute) {
-        console.log("新的路由",newRoute)
+        //console.log("新的路由",newRoute)
         this.activePage = newRoute.fullPath
         if (!this.multipage) {
           this.linkList = [newRoute.fullPath]
@@ -137,9 +137,9 @@
           this.linkList.push(newRoute.fullPath)
           this.pageList.push(Object.assign({}, newRoute))
           // update-begin-author:sunjianlei date:20200103 for: 如果新增的页面配置了缓存路由,那么就强制刷新一遍
-          if (newRoute.meta.keepAlive) {
-            this.routeReload()
-          }
+          //   if (newRoute.meta.keepAlive) {
+          //     this.routeReload()
+          //   }
           // update-end-author:sunjianlei date:20200103 for: 如果新增的页面配置了缓存路由,那么就强制刷新一遍
         } else if (this.linkList.indexOf(newRoute.fullPath) >= 0) {
           let oldIndex = this.linkList.indexOf(newRoute.fullPath)
@@ -148,8 +148,7 @@
             meta: oldPositionRoute.meta
           }))
         }
-        // 快手的批量处理标签
-        if(!this.linkList.includes("/account/stepForm")){
+        if (!this.linkList.includes("/account/stepForm")) {
           localStorage.removeItem("step")
           localStorage.removeItem("campaignId")
           localStorage.removeItem("pans")
@@ -164,21 +163,12 @@
           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.setItem("planInfo",'')
-        //   localStorage.setItem("groupInfo",'')
-          
-        // }
-        
       },
       'activePage': function (key) {
         let index = this.linkList.lastIndexOf(key)
         let waitRouter = this.pageList[index]
         this.$router.push(Object.assign({}, waitRouter));
-        this.changeTitle(waitRouter.meta.title)
+        // this.changeTitle(waitRouter.meta.title)
       },
       'multipage': function (newVal) {
         if (this.reloadFlag) {
@@ -237,15 +227,12 @@
         this[action](key)
       },
       remove(key) {
-        // console.log(this.pageList)
-        
         if (key == indexKey) {
           this.$message.warning('首页不能关闭!')
           return
         }
-        console.log(this.pageList,this.linkList)
         if (this.pageList.length === 1) {
-          // this.$message.warning('这是最后一页,不能再关闭了啦')
+          this.$message.warning('这是最后一页,不能再关闭了啦')
           return
         }
         console.log("this.pageList ", this.pageList);
@@ -270,48 +257,62 @@
         if (key == "/modules/material/materialList") {
           localStorage.removeItem("key")
         }
-        if(key=='/modules/BatchCreate/TouTiaoBatch'&&!(this.linkList.includes('/modules/BatchCreate/newCreate') || this.linkList.includes('/modules/BatchCreate/newPlan') ||this.linkList.includes('/modules/BatchCreate/newGroup') )){
-          localStorage.setItem('accountInfo','')
-          localStorage.setItem("groupInfo",'')
-          localStorage.setItem("planInfo",'')
+        if (key == "/account/accountIndex") {
+          this.routeReload()
         }
-         // if(!this.linkList.includes('/modules/BatchCreate/newGroup')&&!this.linkList.includes('/modules/BatchCreate/newPlan')&&!this.linkList.includes('/modules/BatchCreate/newCreate')){
+
+        if (key == '/modules/BatchCreate/TouTiaoBatch' && !(this.linkList.includes('/modules/BatchCreate/newCreate') ||
+            this.linkList.includes('/modules/BatchCreate/newPlan') || this.linkList.includes(
+              '/modules/BatchCreate/newGroup'))) {
+          localStorage.setItem('accountInfo', '')
+          localStorage.setItem("groupInfo", '')
+          localStorage.setItem("planInfo", '')
+        }
+        // if(!this.linkList.includes('/modules/BatchCreate/newGroup')&&!this.linkList.includes('/modules/BatchCreate/newPlan')&&!this.linkList.includes('/modules/BatchCreate/newCreate')){
         //   localStorage.setItem("planInfo",'')
         //   localStorage.setItem("groupInfo",'')
-          
+
         // }
-        if(key=='/modules/BatchCreate/newGroup'&&!(this.linkList.includes('/modules/BatchCreate/newCreate') || this.linkList.includes('/modules/BatchCreate/newPlan') ||this.linkList.includes('/modules/BatchCreate/TouTiaoBatch') )){
+        if (key == '/modules/BatchCreate/newGroup' && !(this.linkList.includes('/modules/BatchCreate/newCreate') || this
+            .linkList.includes('/modules/BatchCreate/newPlan') || this.linkList.includes(
+              '/modules/BatchCreate/TouTiaoBatch'))) {
           console.log('newGroup')
-          localStorage.setItem('accountInfo','')
-          localStorage.setItem("groupInfo",'')
+          localStorage.setItem('accountInfo', '')
+          localStorage.setItem("groupInfo", '')
         }
-        if(key=='/modules/BatchCreate/newPlan'&&!(this.linkList.includes('/modules/BatchCreate/newCreate') || this.linkList.includes('/modules/BatchCreate/newGroup') ||this.linkList.includes('/modules/BatchCreate/TouTiaoBatch') )){
+        if (key == '/modules/BatchCreate/newPlan' && !(this.linkList.includes('/modules/BatchCreate/newCreate') || this
+            .linkList.includes('/modules/BatchCreate/newGroup') || this.linkList.includes(
+              '/modules/BatchCreate/TouTiaoBatch'))) {
           console.log('newPlan')
-          localStorage.setItem('accountInfo','')
-          localStorage.setItem("groupInfo",'')
-          localStorage.setItem("planInfo",'')
+          localStorage.setItem('accountInfo', '')
+          localStorage.setItem("groupInfo", '')
+          localStorage.setItem("planInfo", '')
         }
-        if(key=='/modules/BatchCreate/newCreate'&&!(this.linkList.includes('/modules/BatchCreate/TouTiaoBatch') || this.linkList.includes('/modules/BatchCreate/newPlan') ||this.linkList.includes('/modules/BatchCreate/newGroup') )){
+        if (key == '/modules/BatchCreate/newCreate' && !(this.linkList.includes('/modules/BatchCreate/TouTiaoBatch') ||
+            this.linkList.includes('/modules/BatchCreate/newPlan') || this.linkList.includes(
+              '/modules/BatchCreate/newGroup'))) {
           console.log('newCreate')
-          localStorage.setItem('accountInfo','')
-          localStorage.setItem("groupInfo",'')
-          localStorage.setItem("planInfo",'')
+          localStorage.setItem('accountInfo', '')
+          localStorage.setItem("groupInfo", '')
+          localStorage.setItem("planInfo", '')
         }
-
+        // this.pageList = this.pageList.filter(item => item.fullPath !== key)
+        // let index = this.linkList.indexOf(key)
+        // this.linkList = this.linkList.filter(item => item !== key)
+        // index = index >= this.linkList.length ? this.linkList.length - 1 : index
+        // this.activePage = this.linkList[index]
 
 
         this.pageList = this.pageList.filter(item => item.fullPath !== key)
         let index = this.linkList.indexOf(key)
         this.linkList = this.linkList.filter(item => item !== key)
         index = index >= this.linkList.length ? this.linkList.length - 1 : index
-        // console.log('index',index)
-        if(index!=-1){
-           this.activePage = this.linkList[index]
-        }else{
-          // console.log(this.$route.fullPath)
-           this.activePage = this.$route.fullPath
+        if (index != -1) {
+          this.activePage = this.linkList[index]
+        } else {
+          this.activePage = this.$route.fullPath
         }
-       
+
       },
       onContextmenu(e) {
         const pagekey = this.getPageKey(e.target)

+ 2 - 2
src/views/modules/BatchCreate/components/material.vue

@@ -428,9 +428,9 @@
         if (this.materialType == 'CREATIVE_IMAGE_MODE_VIDEO' || this.materialType ==
           'CREATIVE_IMAGE_MODE_VIDEO_VERTICAL') {
           if (this.materialType == 'CREATIVE_IMAGE_MODE_VIDEO') {
-            params.type = 2
-          } else {
             params.type = 1
+          } else {
+            params.type = 2
           }
 
           this.showVideoList('/bytedance/batch/getVideoList', params)

+ 2 - 1
src/views/modules/kuaishouapp/account/accountIndex.vue

@@ -552,7 +552,7 @@
       },
       ...mapGetters(['nickname', 'avatar', 'userInfo']),
       searchLabel() {
-        // this.ipagination.current = 1
+        this.ipagination.current = 1
         if (this.appId) {
           var params = {}
           params.accountId = this.appId + ''
@@ -568,6 +568,7 @@
       searchRe() {
         this.campaignIdSearch = ''
         this.campaignName = ''
+        this.ipagination.current = 1
         this.searchLabel()
       },
       addUser() {

+ 2 - 3
src/views/modules/kuaishouapp/account/advertisingGroup.vue

@@ -96,8 +96,7 @@
               <!-- getCheckboxProps: getCheckboxProps -->
               <span slot="unitName" slot-scope="text, record" :title="text">
                 <div style="display:flex;justify-content: center;">
-                  <a :title="text" @click="toDetail(record)"
-                    style="display:block;overflow: hidden;text-overflow:ellipsis;white-space: nowrap;">
+                  <a :title="text" @click="toDetail(record)">
                     {{ text }}</a>
                   <a-icon type="edit" @click.stop="editShowName(record)" style="margin-left:10px" class="count" />
                 </div>
@@ -1389,7 +1388,7 @@
       },
     },
     computed: {},
-    mounted() {
+    activated() {
       var data = JSON.parse(localStorage.getItem('advertisingGroup'))
       this.titleKey = localStorage.getItem('advertisingGroupKey')
       this.title = data.map(item => {

+ 2 - 1
src/views/modules/kuaishouapp/account/copyGroup.vue

@@ -577,9 +577,10 @@
                 ...res.result.target
               }
             //   dataJson.sceneId = JSON.parse(dataJson.sceneId)[0] == '1' ? '1' : '2'
+              this.allForm.sceneIdAll = JSON.parse(dataJson.sceneId).filter(item => item == 1).length > 0 ? 1 : 2
               this.allForm.sceneId = this.allForm.sceneIdAll == 1 ? [7] : JSON.parse(res.result.baseInfo
               .sceneId)
-              this.allForm.sceneIdAll = JSON.parse(dataJson.sceneId).filter(item => item == 1).length > 0 ? 1 : 2
+              
               dataJson.dayBudget = dataJson.dayBudget / 1000
               this.allForm.dayBudget = dataJson.dayBudget == 0 ? '0' : '1'
               this.allForm.useAppMarket = dataJson.useAppMarket ? (dataJson.useAppMarket == 0 ? false : true) :