魏志佳 4 anni fa
parent
commit
b63b7ca94b

+ 1 - 6
src/views/modules/Statistics/popularVideo.vue

@@ -729,12 +729,7 @@ export default {
             this.getNewPlan()
         },
     
-        // 运营数据获取
-        operateHttp(){
-            postAction('',{}).then(res=>{
-                console.log(res)
-            })
-        },
+       
 
         // 获取所有运营
         getAllOperator(key){

+ 22 - 68
src/views/modules/autoLaunch/autoLaunchReport.vue

@@ -17,6 +17,9 @@
                     :maxTagCount='1'
                     allowClear
                     @change="accountChange"
+                    show-search
+                    option-filter-prop="children"
+                    :filter-option="filterOption"
                     >
                     <a-select-option v-for="item in accountList" :key="item.account_id" :value='item.account_id'>
                     {{ item.auth_name+'_('+(item.project_name||"无所属项目")+')' }}
@@ -24,11 +27,7 @@
                 </a-select>
             </span>
             <span class="OptinItem">
-                <!-- <a-select  style="width: 280px" v-model="directionalId" @change="directionalIdChange" placeholder="选择策略以及定向包">
-                    <a-select-option v-for="item in accountList" :key="item.account_id" :value='item.account_id'>
-                    {{ item.auth_name+'_('+(item.project_name||"无所属项目")+')' }}
-                    </a-select-option>
-                </a-select> -->
+                
                 <a-tree-select
                     v-if="tabKey==1"
                     v-model="directionalId"
@@ -842,6 +841,11 @@ const publicColumns = [
             }
         },
         methods: {
+            filterOption(input, option) {
+                return (
+                    option.componentOptions.children[0].text.toLowerCase().indexOf(input.toLowerCase()) >= 0
+                );
+            },
              // //项目改变后的事件
             treeChange(val) {
                 // console.log(this.treeData)
@@ -929,12 +933,7 @@ const publicColumns = [
 
                 
             },
-            filterOption(input, option){
-                console.log(input, option)
-                return (
-                    option.componentOptions.children[0].text.toLowerCase().indexOf(input.toLowerCase()) >= 0
-                    );
-            },
+            
             //请求项目和账户内容
             accountHttp(){
                 this.treeData=[];
@@ -1452,10 +1451,12 @@ const publicColumns = [
             },  
 
             getEchartData(){
-                this.spinning=true;
-                this.loading=true
+                
                 let params=this.handlerParams();
                 params.dataType=this.value
+                if(params.accountId&&(params.targetIds||params.codes)){
+                    this.spinning=true;
+                    this.loading=true
                 postAction('/ai/analyze/chart/targetOrMaterial',params).then(res=>{
                     console.log(res)
                     this.spinning=false;
@@ -1489,7 +1490,7 @@ const publicColumns = [
                         }
                     }
                 })
-                
+                }
 
             },
 
@@ -1731,7 +1732,7 @@ const publicColumns = [
             search(){
                 
                 this.getRelativeData()
-                // this.getDetailTableData()
+                
                 this.getEchartData()
             },
 
@@ -1811,62 +1812,15 @@ const publicColumns = [
             if(userInfo){
                 this.userId=JSON.parse(userInfo).value.id
             }
-            new Promise((resolve,reject)=>{
-                getAction('/ctop/userAllocation/getAccountIdsByUserId',{
-                    userId:this.userId,
-                }).then(res=>{
-                    console.log(res)
-                    if(res.success){
-                        this.accountList=res.result
-                        this.accountIds=res.result[0].account_id;
-                        
-                        this.treeData=[];
-                        this.directionalId=[];
-                        getAction('/ai/analyze/getStrategyAndTarget', {
-                            accountId:this.accountIds
-                        }).then(res => {
-                            if(res.success){
-                                // console.log(res);
-                                if(res.result){
-                                    res.result.forEach((element,index) => {
-                                    if(element){                  
-                                        this.treeData.push({});                    
-                                        this.treeData[index].title=element.strategy_name +'_('+ element.id +')';
-                                        this.treeData[index].value='strategy'+element.id;
-                                        this.treeData[index].key=element.id;
-                                    
-                                        this.treeData[index].children=[];
-                                                            
-                                        if(element.targets.length&&element.targets[0]){
-                                            element.targets.forEach((ele,i)=>{
-                                                this.treeData[index].children.push({});
-                                                this.treeData[index].children[i].title=ele.target_type+'_'+ele.target_content
-                                                this.treeData[index].children[i].value=element.id+'_'+ele.id;
-                                                this.treeData[index].children[i].key=element.id+'_'+ele.id;
-                                            })
-                                            
-                                        }                           
-                                    }      
-                                    });
-                                    // console.log(this.treeData)
-                                    this.directionalId=[this.treeData[0].children[0].value]
-                                    resolve()
-                                }
-                            }
-                        })
-                        
-                    }else{
-                        this.$message.error('账户信息获取错误!')
-                    }
-                   
-                })
+            getAction('/ctop/userAllocation/getAccountIdsByUserId',{
+                userId:this.userId,
             }).then(res=>{
-                this.search()
-                
+                console.log(res)
+                if(res.success){
+                    this.accountList=res.result
+                }
             })
             
-
-
         },
         filters: {
             toPercentage(val) {

+ 29 - 17
src/views/modules/autoLaunch/groupList.vue

@@ -28,7 +28,7 @@
                     <a-select-option value="3">
                         余额不足
                     </a-select-option> -->
-                    <a-select-option :value="0">
+                    <a-select-option :value="2">
                         已关停
                     </a-select-option>
                 </a-select>
@@ -153,7 +153,7 @@
                       {{text | handlerStatus}}
                     </span>
 
-                    <span slot="ctr" slot-scope="ctr">{{ ctr | toPercentage }}</span>
+                        <span slot="ctr" slot-scope="ctr">{{ ctr | toPercentage }}</span>
                         <span slot="cost" slot-scope="cost">{{ cost | decimalsHandle }}</span>
                         <span slot="clickMaterial" slot-scope="clickMaterial">{{ clickMaterial | formatCurrency }}</span>
                         <span slot="showMaterial" slot-scope="showMaterial">{{ showMaterial | formatCurrency }}</span>
@@ -244,6 +244,7 @@
                         >{{ gameAddictionRate | toPercentage }}</span>
                         <span slot="nextDayOpenRate" slot-scope="nextDayOpenRate">{{ nextDayOpenRate | toPercentage }}</span>
                         <!-- <span slot="nextDayOpenRate" slot-scope="nextDayOpenRate">{{ nextDayOpenRate | toPercentage }}</span> -->
+                        <span slot="status" slot-scope="text">{{ text | handlerStatus }}</span>
                 </a-table>
             </div>
         </div>
@@ -914,22 +915,33 @@ export default {
 
         handlerStatus(val){
             let str=''
-            switch (val) {
-                case 1:
-                    str='投放中'
-                    break;
-                case 1:
-                    str='已暂停'
-                    break;
-                case 1:
-                    str='已删除'
-                    break;
-            
-                default:
-                    break;
+            if(val){
+                switch (val) {
+                    case 1:
+                        str='投放中'
+                        break;
+                    case 2:
+                        str='已暂停'
+                        break;
+                    // case 3:
+                    //     str='已删除'
+                    //     break;
+                    // case 3:
+                    //     str='已删除'
+                    //     break;
+                    // case 3:
+                    //     str='已删除'
+                    //     break;
+                
+                    default:
+                        break;
+                }
+                return str
+            }else{
+                return '-'
             }
-            return str
-        }
+            
+        },
     }
 }
 </script>

+ 29 - 23
src/views/modules/autoLaunch/planList.vue

@@ -27,7 +27,7 @@
                     <a-select-option value="3">
                         余额不足
                     </a-select-option> -->
-                    <a-select-option :value="0">
+                    <a-select-option :value="2">
                         已关停
                     </a-select-option>
                 </a-select>
@@ -106,14 +106,7 @@
                         
                     </span>
 
-                    <span slot="createStatus" slot-scope="text,record">
-                         <a-spin :spinning="record.spin" size="small" >
-                            <div class="spin-content">
-                                <a-switch size="default" :checked=text  @change="switchChange(text,record)"/>
-                            </div>
-                        </a-spin>
-                        
-                    </span>
+                    
                     <span slot="planStatus" slot-scope="text,record">
                         <a-spin :spinning="record.spin" size="small" >
                             <div class="spin-content">
@@ -139,6 +132,9 @@
                         
                     </span>
                     
+                    <span slot="status" slot-scope="text">
+                        {{text | handlerStatus}}
+                    </span>
                     <span slot="parentGroup" slot-scope="text">
                         <a href="javascript:;" >{{text}}</a>
                     </span>
@@ -929,21 +925,31 @@ export default {
         },
         handlerStatus(val){
             let str=''
-            switch (val) {
-                case 1:
-                    str='投放中'
-                    break;
-                case 1:
-                    str='已暂停'
-                    break;
-                case 1:
-                    str='已删除'
-                    break;
-            
-                default:
-                    break;
+            if(val){
+                switch (val) {
+                    case 1:
+                        str='投放中'
+                        break;
+                    case 2:
+                        str='已暂停'
+                        break;
+                    // case 3:
+                    //     str='已删除'
+                    //     break;
+                    // case 3:
+                    //     str='已删除'
+                    //     break;
+                    // case 3:
+                    //     str='已删除'
+                    //     break;
+                
+                    default:
+                        break;
+                }
+                return str
+            }else{
+                return '-'
             }
-            return str
         }
     }
 }

+ 6 - 6
src/views/modules/autoLaunch/setDirectional.vue

@@ -1492,15 +1492,15 @@ export default {
                         this.goNextloading=false
                         if(res.success){
                             
-                            this.$parent.strategyInfo={}
-                            this.$router.replace('/autoLaunch/autoLaunchList')
-                            this.$bus.$emit('remove', '/autoLaunch/newStrategy')
+                            // this.$parent.strategyInfo={}
+                            // this.$router.replace('/autoLaunch/autoLaunchList')
+                            // this.$bus.$emit('remove', '/autoLaunch/newStrategy')
                             
                         }else{
                             this.$messgae.error(res.message)
-                            this.$parent.strategyInfo={}
-                            this.$router.replace('/autoLaunch/autoLaunchList')
-                            this.$bus.$emit('remove', '/autoLaunch/newStrategy')
+                            // this.$parent.strategyInfo={}
+                            // this.$router.replace('/autoLaunch/autoLaunchList')
+                            // this.$bus.$emit('remove', '/autoLaunch/newStrategy')
                         }
                     })
 

+ 63 - 11
src/views/modules/autoLaunch/strategyList.vue

@@ -15,30 +15,37 @@
         </div>
         
         <div class="topOptions">
-            <span class="OptinItem ">
-                <!-- reqUrl='/ctop/userAllocation/getAccountIdListByUserId' -->
-                <!-- <Treeselect :appId.sync="accountIds" :multiple="true" request="2,4" reqUrl='/ctop/userAllocation/getAccountIdsByUserId'  ref="treeSelect" style="margin-bottom:8px " /> -->
+            <div>
+                <!-- <Treeselect :appId.sync="accountId" :multiple="false" request="2" reqUrl='/ctop/projectMember/getProjectAccountByUserId'  ref="treeSelect" style="margin-bottom:8px;width:600px " /> -->
                 <a-select mode="multiple"
                     v-model="accountIds"
-                    style="width: 400px"
+                    style="width: 600px"
                     placeholder="请选择账户"
                     :maxTagCount='1'
                     allowClear
+                    show-search
+                    option-filter-prop="children"
+                    :filter-option="filterOption"
                     >
                     <a-select-option v-for="item in accountList" :key="item.account_id" :value='item.account_id'>
                     {{ item.auth_name+'_('+(item.project_name||"无所属项目")+')' }}
                     </a-select-option>
                 </a-select>
-            </span>
+            </div>
+            <!-- <span class="OptinItem ">
+                reqUrl='/ctop/userAllocation/getAccountIdListByUserId'
+                <Treeselect :appId.sync="accountIds" :multiple="true" request="2,4" reqUrl='/ctop/userAllocation/getAccountIdsByUserId'  ref="treeSelect" style="margin-bottom:8px " />
+                
+            </span> -->
             <span class="OptinItem">
-                <a-select  style="width: 180px" v-model="strategyStatus" @change="statusChange" placeholder="请选择策略状态">
+                <a-select  style="width: 180px" v-model="strategyState" @change="statusChange" placeholder="请选择策略状态">
                     <a-select-option :value='3' >
                         不限
                     </a-select-option>
                     <a-select-option :value="1" >
                         投放中
                     </a-select-option>
-                    <a-select-option :value="0">
+                    <a-select-option :value="2">
                         已关停
                     </a-select-option>
                 </a-select>
@@ -138,6 +145,9 @@
                         
                     </span>
                     
+                    <span slot="status" slot-scope="text">
+                        {{text |handlerStatus}}
+                    </span>
                     <span slot="parentGroup" slot-scope="text">
                         <a href="javascript:;" >{{text}}</a>
                     </span>
@@ -317,7 +327,15 @@ const strategyColumns = [
   },
   
   {
-    title: '所属账户',
+    title: '所属账户名称',
+    dataIndex: 'authName',
+    key: 'authName',
+    align: 'center',
+    scopedSlots: { customRender: 'authName' }, 
+    width:200  
+  },
+  {
+    title: '所属账户ID',
     dataIndex: 'accountId',
     key: 'accountId',
     align: 'center',
@@ -501,8 +519,9 @@ export default {
     // mixins: [JeecgListMixin],
     data() {
         return {
+            accountId:[],
             accountList:[],
-            strategyStatus:undefined,
+            strategyState:undefined,
             strategyName:'',
             strategyId:undefined,
             accountIds:[],
@@ -587,7 +606,11 @@ export default {
             this.$parent.currentTabComponent='planList'
         },
 
-
+        filterOption(input, option) {
+            return (
+                option.componentOptions.children[0].text.toLowerCase().indexOf(input.toLowerCase()) >= 0
+            );
+        },
         //状态改变
         statusChange(value){
             console.log(value);
@@ -732,10 +755,11 @@ export default {
 
         getStrategyList(){
             this.loading = true
+            console.log(this.accountId)
             postAction(this.url.strategyList,{
                 strategyId:this.strategyId==undefined?null:this.strategyId,
                 strategyName:this.strategyName,
-                strategyStatus:this.strategyStatus==3?null:this.strategyStatus,
+                strategyState:this.strategyState==3?null:this.strategyState,
                 accountIds:this.accountIds,
                 pageNo:this.ipagination.current,
                 pageSize:this.ipagination.pageSize
@@ -897,6 +921,34 @@ export default {
                     break;
             }
             return str
+        },
+        handlerStatus(val){
+            let str=''
+            if(val){
+                switch (val) {
+                    case 1:
+                        str='投放中'
+                        break;
+                    case 2:
+                        str='已暂停'
+                        break;
+                    // case 3:
+                    //     str='已删除'
+                    //     break;
+                    // case 3:
+                    //     str='已删除'
+                    //     break;
+                    // case 3:
+                    //     str='已删除'
+                    //     break;
+                
+                    default:
+                        break;
+                }
+                return str
+            }else{
+                return '-'
+            }
         }
     }
 }

+ 7 - 1
src/views/modules/workBench/designLeader/platForm.vue

@@ -264,7 +264,13 @@ export default {
                             let time='';
                             let startTime=moment(item.createTime)
                             console.log() 
-                            if(moment().diff(startTime,'minutes')>60){
+                            if(moment().diff(startTime,'hours')>24){
+                                time=item.createTime.split(/[ ]+/)[0]
+                                return {
+                                    ...item,
+                                    time,
+                                }
+                            }else if(moment().diff(startTime,'minutes')>60){
                                 time=item.createTime.split(/[ ]+/)[1]
                                 return {
                                     ...item,

+ 12 - 6
src/views/modules/workBench/designPeople/platForm.vue

@@ -253,12 +253,18 @@ export default {
                         let time='';
                         let startTime=moment(item.createTime)
                         console.log() 
-                        if(moment().diff(startTime,'minutes')>60){
-                            time=item.createTime.split(/[ ]+/)[1]
-                            return {
-                                ...item,
-                                time,
-                            }
+                        if(moment().diff(startTime,'hours')>24){
+                                time=item.createTime.split(/[ ]+/)[0]
+                                return {
+                                    ...item,
+                                    time,
+                                }
+                        }else if(moment().diff(startTime,'minutes')>60){
+                                time=item.createTime.split(/[ ]+/)[1]
+                                return {
+                                    ...item,
+                                    time,
+                                }
                         }else if(moment().diff(startTime,'minutes')>=1){
                             time=moment().diff(startTime,'minutes')+'分钟前'
                             return {

+ 9 - 2
src/views/modules/workBench/operator/platForm.vue

@@ -269,8 +269,15 @@ export default {
                        
                             let time='';
                             let startTime=moment(item.createTime)
-                            console.log() 
-                            if(moment().diff(startTime,'minutes')>60){
+                            console.log(startTime) 
+                            if(moment().diff(startTime,'hours')>24){
+                                time=item.createTime.split(/[ ]+/)[0]
+                                return {
+                                    ...item,
+                                    time,
+                                }
+                            }
+                            else if(moment().diff(startTime,'minutes')>60){
                                 time=item.createTime.split(/[ ]+/)[1]
                                 return {
                                     ...item,

+ 2 - 2
vue.config.js

@@ -73,11 +73,11 @@ module.exports = {
         // target: 'http://192.168.1.188:8088', //请求本地 需要jeecg-boot后台项目  英豪
         // target: 'http://192.168.2.115:8080', //请求本地 需要jeecg-boot后台项目  祚云
         // target: 'http://192.168.1.43:8098', //请求本地 需要jeecg-boot后台项目  毕洁泉
-        // target: 'http://192.168.1.43:8088', //请求本地 需要jeecg-boot后台项目  毕洁泉
+        target: 'http://192.168.1.43:8088', //请求本地 需要jeecg-boot后台项目  毕洁泉
         // target: 'http://192.168.1.43:8087', //请求本地 需要jeecg-boot后台项目  毕洁泉
         // target: 'http://192.168.0.252:8098', //请求本地 需要jeecg-boot后台项目  毕洁泉
         // target: 'http://192.168.1.219:8080', //请求本地 需要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后台项目