魏志佳 пре 4 година
родитељ
комит
59e8f6a525

+ 43 - 7
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]
@@ -172,10 +172,7 @@
         //   localStorage.setItem("groupInfo",'')
           
         // }
-        // if(this.linkList.includes('/modules/BatchCreate/newDirectedPackage')){
-        //   localStorage.setItem("accountInfo",'')
-          
-        // }
+        
       },
       'activePage': function (key) {
         let index = this.linkList.lastIndexOf(key)
@@ -240,12 +237,15 @@
         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,11 +270,47 @@
         if (key == "/modules/material/materialList") {
           localStorage.removeItem("key")
         }
+        if(key=='/modules/BatchCreate/TouTiaoBatch'){
+          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/newPlan')){
+          
+          localStorage.setItem('accountInfo','')
+          localStorage.setItem("groupInfo",'')
+        }
+        if(key=='/modules/BatchCreate/newPlan'&&!this.linkList.includes('/modules/BatchCreate/newCreate')){
+          console.log(1)
+          localStorage.setItem('accountInfo','')
+          localStorage.setItem("groupInfo",'')
+          localStorage.setItem("planInfo",'')
+        }
+        if(key=='/modules/BatchCreate/newCreate'){
+          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]
+        // console.log('index',index)
+        if(index!=-1){
+           this.activePage = this.linkList[index]
+        }else{
+          // console.log(this.$route.fullPath)
+           this.activePage = this.$route.fullPath
+        }
+       
       },
       onContextmenu(e) {
         const pagekey = this.getPageKey(e.target)

+ 1 - 0
src/views/modules/BatchCreate/components/material.vue

@@ -720,6 +720,7 @@
       getTags() {
         let accountInfo = localStorage.getItem('accountInfo')
         // console.log(groupInfo)
+        
         this.accountInfo=JSON.parse(accountInfo)
 
         getAction('/bytedance/batch/creative/words/get', {

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

@@ -600,6 +600,9 @@
       },
       goBack() {
         this.$router.replace('/modules/BatchCreate/TouTiaoBatch')
+        localStorage.removeItem('groupInfo');
+        localStorage.removeItem('planInfo');
+        localStorage.removeItem('accountInfo');
         this.$bus.$emit('remove', '/modules/BatchCreate/newCreate')
       },
       goSave() {
@@ -685,18 +688,7 @@
         })
       },
       
-      // 回显数据专用
-      echoData(){
-        getAction('',{
-          accountInfo:this.accountInfo.value,
-          planId:this.planInfo.id
-        }).then(res=>{
-            console.log(res)
-            this.form.setFieldsValue({
-              
-            })
-        })
-      },
+     
     },
     beforeDestroy() {
       localStorage.removeItem('groupInfo');
@@ -711,7 +703,6 @@
         this.createOptions = res.data
 
       })
-
       this.$bus.$emit('remove', '/modules/BatchCreate/newPlan')
       let planInfo = localStorage.getItem('planInfo')
      

+ 29 - 25
src/views/modules/Statistics/refuseDataCreat.vue

@@ -361,7 +361,7 @@
         console.log(e.target.value);
          if(e.target.value.length>30){
           
-          this.updateDescription=e.target.value.substr(0,30);
+          // this.updateDescription=e.target.value.substr(0,30);
           // console.log(this.updateDescription)
           this.$message.error('广告语最多30字!')
         }
@@ -524,32 +524,36 @@
         //    this.selectedRowKeysValue.length > 0 ? this.selectedRowKeysValue :
       },
       handleOkAgain(e) {
-        this.againLoading = true
-        this.form.validateFields((err, values) => {
-          if (!err) {
-            values.updateDescription=this.updateDescription;
-            var params = {
+        if(this.updateDescription.length>30){
+          this.$message.error('广告语最多30个字,请修正后再次提交!')
+        }else{
+          this.againLoading = true
+          this.form.validateFields((err, values) => {
+            if (!err) {
+              values.updateDescription=this.updateDescription;
+              var params = {
 
-              ...values,
-              accountId: localStorage.getItem('accountIdCreatNow'),
-              creativeArr: this.selectedRowKeysValue
-            }
-            postAction('/MaterialRefuse/batchUpdateCreative', params).then(res => {
-              if (res.success) {
-                // this.visibleFail = true
-                this.visibleAgain = false
-                this.selectedRowKeys = []
-                this.selectedRowKeysValue = []
-                this.addUser()
-                this.againLoading = false
-                this.$message.success(res.message)
-              } else {
-                this.againLoading = false
-                this.$message.error(res.message)
+                ...values,
+                accountId: localStorage.getItem('accountIdCreatNow'),
+                creativeArr: this.selectedRowKeysValue
               }
-            })
-          }
-        })
+              postAction('/MaterialRefuse/batchUpdateCreative', params).then(res => {
+                if (res.success) {
+                  // this.visibleFail = true
+                  this.visibleAgain = false
+                  this.selectedRowKeys = []
+                  this.selectedRowKeysValue = []
+                  this.addUser()
+                  this.againLoading = false
+                  this.$message.success(res.message)
+                } else {
+                  this.againLoading = false
+                  this.$message.error(res.message)
+                }
+              })
+            }
+          })
+        }
       },
       handleOk(e) {
         this.confirmLoading = true

+ 29 - 25
src/views/modules/Statistics/refuseDataCreatNew.vue

@@ -362,7 +362,7 @@
         console.log(e.target.value);
         if(e.target.value.length>30){
           
-          this.updateDescription=e.target.value.substr(0,30);
+          // this.updateDescription=e.target.value.substr(0,30);
           // console.log(this.updateDescription)
           this.$message.error('广告语最多30字!')
         }
@@ -522,32 +522,36 @@
         //    this.selectedRowKeysValue.length > 0 ? this.selectedRowKeysValue :
       },
       handleOkAgain(e) {
-        this.againLoading = true
-        this.form.validateFields((err, values) => {
-          if (!err) {
-            values.updateDescription=this.updateDescription;
-            var params = {
+        if(this.updateDescription.length>30){
+          this.$message.error('广告语最多30个字,请修正后再次提交!')
+        }else{
+          this.againLoading = true
+          this.form.validateFields((err, values) => {
+            if (!err) {
+              values.updateDescription=this.updateDescription;
+              var params = {
 
-              ...values,
-              accountId: this.appId,
-              creativeArr: this.selectedRowKeysValue
-            }
-            postAction('/MaterialRefuse/batchUpdateCreative', params).then(res => {
-              if (res.success) {
-                // this.visibleFail = true
-                this.visibleAgain = false
-                this.selectedRowKeys = []
-                this.selectedRowKeysValue = []
-                this.addUser()
-                this.againLoading = false
-                this.$message.success(res.message)
-              } else {
-                this.againLoading = false
-                this.$message.error(res.message)
+                ...values,
+                accountId: this.appId,
+                creativeArr: this.selectedRowKeysValue
               }
-            })
-          }
-        })
+              postAction('/MaterialRefuse/batchUpdateCreative', params).then(res => {
+                if (res.success) {
+                  // this.visibleFail = true
+                  this.visibleAgain = false
+                  this.selectedRowKeys = []
+                  this.selectedRowKeysValue = []
+                  this.addUser()
+                  this.againLoading = false
+                  this.$message.success(res.message)
+                } else {
+                  this.againLoading = false
+                  this.$message.error(res.message)
+                }
+              })
+            }
+          })
+        }
       },
       handleOk(e) {
         this.confirmLoading = true

+ 4 - 4
vue.config.js

@@ -58,7 +58,7 @@ module.exports = {
     open : true,
     proxy: {
       '/jeecg-boot': {
-        // target: 'http://192.168.1.90:8080', //请求本地 需要jeecg-boot后台项目  蒙蒙
+        //  target: 'http://192.168.1.90:8080', //请求本地 需要jeecg-boot后台项目  蒙蒙
         // target: 'http://192.168.0.59:8088', //请求本地 需要jeecg-boot后台项目  英豪
         // target: 'http://192.168.1.72:8088', //请求本地 需要jeecg-boot后台项目  英豪
         // target: 'http://192.168.2.115:8080', //请求本地 需要jeecg-boot后台项目  祚云
@@ -69,11 +69,11 @@ module.exports = {
         // target: 'http://192.168.1.51:8098', //请求本地 需要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: 'http://api.tjyourong.com.cn', //请求本地 需要jeecg-boot后台项目 
         // target: 'https://trac.tjyourong.com.cn', //请求本地 需要jeecg-boot后台项目 
         // target: 'http://39.106.184.70:8088/', //请求本地 需要jeecg-boot后台项目 
-        // target: 'http://adsp.tjyourong.com.cn/', //请求本地 需要jeecg-boot后台项目 
-        // target: 'http://192.168.1.251/', //请求本地 需要jeecg-boot后台项目 
+         // target: 'http://adsp.tjyourong.com.cn/', //请求本地 需要jeecg-boot后台项目 
+        target: 'http://192.168.1.251/', //请求本地 需要jeecg-boot后台项目 
         // target:'http://118.24.244.213:8804',