Browse Source

'改bug0'

魏志佳 4 years ago
parent
commit
2d9e89f55f

+ 1 - 1
src/components/tools/setting.js

@@ -80,7 +80,7 @@ const updateTheme = primaryColor => {
       buildIt();
       lessScriptNode.onload = null;
     };
-    document.body.appendChild(lessStyleNode);
+    // document.body.appendChild(lessStyleNode);
     document.body.appendChild(lessConfigNode);
     document.body.appendChild(lessScriptNode);
     lessNodesAppended = true;

+ 2 - 2
src/utils/request.js

@@ -13,8 +13,8 @@ if (process.env.NODE_ENV == 'development') {
 else if (process.env.NODE_ENV == 'debug') { 
 } 
 else if (process.env.NODE_ENV == 'production') { 
-    // axios.defaults.baseURL = 'http://192.168.1.251/jeecg-boot';
-axios.defaults.baseURL = 'http://api.tjyourong.com.cn/jeecg-boot';
+    axios.defaults.baseURL = 'http://192.168.1.251/jeecg-boot';
+// axios.defaults.baseURL = 'http://api.tjyourong.com.cn/jeecg-boot';
 }
 const service = axios.create({
 //   baseURL: '/jeecg-boot', // api base_url

+ 49 - 42
src/views/modules/BatchCreate/TouTiaoBatch.vue

@@ -62,7 +62,7 @@
             </span>
             <span class="optionBtn">
                 <a-button type='primary' @click="search" class="searchBtn">查询</a-button>
-                <a-button type='default' @click="reset">重置</a-button>
+                <!-- <a-button type='default' @click="reset">重置</a-button> -->
             </span>
         </div>
         <div class="tableArea">
@@ -146,13 +146,13 @@
                        <editableCell :text="text" slotName='bid' @change="onCellChange(record.key, 'bid', $event)" />
                     </span>
                     <span slot="campaignStatus" slot-scope="text,record">
-                        <a-switch size="default" :checked=text  @change.stop="switchChange(text,record)"/>
+                        <a-switch size="default" :checked=text  @change="switchChange(text,record)"/>
                     </span>
                     <span slot="createStatus" slot-scope="text,record">
-                        <a-switch size="default" :checked=text  @change.stop="switchChange(text,record)"/>
+                        <a-switch size="default" :checked=text  @change="switchChange(text,record)"/>
                     </span>
-                    <span slot="status" slot-scope="text,record">
-                        <a-switch size="default" :checked=text  @change.stop="switchChange(text,record)"/>
+                    <span slot="planStatus" slot-scope="text,record">
+                        <a-switch size="default" :checked=text  @change="switchChange(text,record)"/>
                     </span>
                     <!-- <span slot="options" slot-scope="record">
                         <a href="javascript:;" style="margin-right:10px">编辑</a>
@@ -342,10 +342,10 @@ const columns = [
 const planColumns = [
   {
     title: '状态',
-    dataIndex: 'status',
-    key: 'status',
+    dataIndex: 'planStatus',
+    key: 'planStatus',
     align: 'center',
-    scopedSlots: { customRender: 'status' }
+    scopedSlots: { customRender: 'planStatus' }
   },
     //   {
     //     title: '操作',
@@ -734,7 +734,6 @@ export default {
         //重置按钮事件
         reset(){
 
-
         },
         //状态改变
         switchChange(text,record){
@@ -821,7 +820,7 @@ export default {
             })
             let status=''
             if(this.optValue=='pause'){
-                status='disabled'
+                status='disable'
             }else if(this.optValue=='open'){
                 status='enable'
             }else if(this.optValue=='delete'){
@@ -835,25 +834,27 @@ export default {
                 console.log(res);
                 if(res.success){
                     this.$message.success(res.message)
-                    this.data=[];
-                    this.refreshCampaignList({
-                            accountId:this.accountID,
-                            name:this.optionId,
-                            status:this.statusValue,
-                            startDate:this.dateString[0],
-                            endDate:this.dateString[1],
-                            pageNo:this.ipagination.current
-                    })
-                    this.selectedRows=[];
-                    this.selectedRowKeys=[];
+                }else{
+                    this.$message.error(res.message)
                 }
+                this.data=[];
+                this.refreshCampaignList({
+                    accountId:this.accountID,
+                    name:this.optionId,
+                    status:this.statusValue,
+                    startDate:this.dateString[0],
+                    endDate:this.dateString[1],
+                    pageNo:this.ipagination.current
+                })
+                
+                
             })
         },
         //批量操作的确定按钮
         isOkHandle(){
             this.selectDisable=true;
           
-            if(this.optValue){
+            if(this.optValue&&this.selectedRowKeys.length>0){
                 
                 if(this.optValue=='pause'){   
                     if(this.tabkey=='group'){
@@ -889,9 +890,11 @@ export default {
                   
                 }
               
-                
+                this.selectedRows=[];
+                this.selectedRowKeys=[];
+                this.optValue=undefined;
             }
-            this.selectedRows=[];
+            
         },
         //确定删除
         confirm(e) {
@@ -1078,23 +1081,17 @@ export default {
                             console.log(res);
                             if(res.success){
                                 this.data=dataSource
-                                this.$message.success({
-                                   content:res.message,
-                                    duration:2
-                                })
+                                this.$message.success(res.message)
                             }else{
-                                this.$message.error({
-                                    content:res.message,
-                                    duration:2
-                                })
+                                this.$message.error(res.message)
                                 this.data=[];
                                 this.refreshCampaignList({
-                                        accountId:this.accountID,
-                                        name:this.optionId,
-                                        status:this.statusValue,
-                                        startDate:this.dateString[0],
-                                        endDate:this.dateString[1],
-                                        pageNo:this.ipagination.current
+                                    accountId:this.accountID,
+                                    name:this.optionId,
+                                    status:this.statusValue,
+                                    startDate:this.dateString[0],
+                                    endDate:this.dateString[1],
+                                    pageNo:this.ipagination.current
                                 })
                             }
                         })
@@ -1126,9 +1123,16 @@ export default {
                         console.log(res);
                         if(res.success){
                             this.data = dataSource;                      
-                            this.$message.success({
-                                content:'修改成功!',
-                                duration:2
+                            this.$message.success('修改成功!')
+                        }else{
+                            this.$message.error(res.message);
+                            this.getplanList({
+                                accountId:this.accountID,
+                                name:this.optionId,
+                                status:this.statusValue,
+                                startDate:this.dateString[0],
+                                endDate:this.dateString[1],
+                                pageNo:this.ipagination.current
                             })
                         }
                     })
@@ -1163,9 +1167,12 @@ export default {
                         item.key=item.id
                 })
                 this.data = res.result.records;
-
+                this.selectedRows=[];
+                this.selectedRowKeys=[];
             } else {
               console.log(res.message);
+              this.selectedRows=[];
+                this.selectedRowKeys=[];
             }
           })
         },

+ 6 - 5
src/views/modules/Statistics/effectReport.vue

@@ -489,6 +489,7 @@ export default {
         //table的改变(页码改变请求数据,也可以写排序)
       tableChange(pagination, filters, sorter, { currentDataSource }){
           // this.searchHandle();
+          this.search();
       },
       projectChange(val){
         console.log(val)
@@ -512,7 +513,7 @@ export default {
       getTableProjectList(paramse){   
         this.loading=true;     
         this.spinning=true;
-        this.ipagination.current=0;
+        // this.ipagination.current=0;
         this.columns= [...projectColumns,...publicColumns]  
         postAction('/kuaishou/getKuaishouProjectInfo',paramse).then(res=>{
           console.log(res);
@@ -554,7 +555,7 @@ export default {
       getTableAccountList(){         
           this.loading=true; 
           this.spinning=true;
-          this.ipagination.current=0;           
+          // this.ipagination.current=0;           
           postAction('/kuaishou/getKuaishouAccountInfoByProjectId',{
             startDate:this.dateRange[0].format('YYYY-MM-DD'),
             endDate:this.dateRange[1].format('YYYY-MM-DD'),
@@ -576,7 +577,7 @@ export default {
       },
       getTableCampaignList(){        
         this.loading=true; 
-        this.ipagination.current=0; 
+        // this.ipagination.current=0; 
         this.spinning=true;       
         postAction('/kuaishou/getKuaishouCampaignInfoByAccountId',{
           startDate:this.dateRange[0].format('YYYY-MM-DD'),
@@ -598,7 +599,7 @@ export default {
       },
       getTableUnitList(){        
         this.loading=true; 
-        this.ipagination.current=0;   
+        // this.ipagination.current=0;   
         this.spinning=true;      
         postAction('/kuaishou/getKuaishouUnitInfoByCampaignId',{
           startDate:this.dateRange[0].format('YYYY-MM-DD'),
@@ -621,7 +622,7 @@ export default {
       },
       getTableCreativeList(){        
         this.loading=true; 
-        this.ipagination.current=0;      
+        // this.ipagination.current=0;      
         this.spinning=true; 
         postAction('/kuaishou/getKuaishouCreativeInfoByUnitId',{
           startDate:this.dateRange[0].format('YYYY-MM-DD'),

+ 1 - 1
vue.config.js

@@ -63,7 +63,7 @@ module.exports = {
         // target: 'http://192.168.0.230:8088', //请求本地 需要jeecg-boot后台项目  孙震
         // target: 'http://192.168.1.51:8088', //请求本地 需要jeecg-boot后台项目  毕洁泉
         // target: 'http://192.168.1.165:8848', //请求本地 需要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后台项目