魏志佳 4 anos atrás
pai
commit
0960e623d5

+ 2 - 2
src/views/modules/columnConst/stockWatch.js

@@ -1276,10 +1276,10 @@ export const KScustomFields= [
         },
         {
           title: '表单提交点击率',
-          dataIndex: 'formCountRate',         
+          dataIndex: 'formActionRatio',         
           tip: '当日回传表单数/当日行为数',
           align: 'center',
-          scopedSlots: { customRender: 'formCountRate' },
+          scopedSlots: { customRender: 'formActionRatio' },
           sorter: () => {}
         },
         {

+ 103 - 45
src/views/modules/stockWatch/accountPage.vue

@@ -6,7 +6,7 @@
                 <div class="accountBodyLeftCost">
                     <div class="accountBodyLeftCostLeft">
                         <div class="top">
-                            <p class="title" style="margin-bottom:15px">花费</p>
+                            <p class="title" >花费</p>
                             <a-range-picker 
                                 v-model="dateValue"
                                 style="width:170px;"
@@ -39,7 +39,7 @@
                     </div>
                     <div class="accountBodyLeftCostRight">
                         <div class="gaugeEchart" id="gaugeEchart"  style='width:100%;height:200px;margin:0 auto' ref="gaugeEchart">
-                           
+                            <a-empty  />
                         </div>
                     </div>
                 </div>
@@ -57,13 +57,22 @@
                             <div class="yesterdayCost">
                                 /<a-tooltip >
                                     <template slot="title">
-                                    <span>{{dateValue}}的{{item.title}}</span>
+                                    <span>
+                                        {{dateValue[0].format('YYYY-MM-DD')==dateValue[1].format('YYYY-MM-DD')?dateValue[0].format('YYYY-MM-DD'):''}}
+                                        的{{item.title}}
+                                    </span>
                                     </template>
                                     <a-icon type="question-circle" />
                                 </a-tooltip>:{{item.yesterday | decimalsHandle}}
                             </div>
-                            <span class="IndexName" :class="{'IndexNameActive':isActive==item.dataIndex}" @click="getActiveIndexName(item)">
-                                {{item.title}}
+                            <span class="IndexName" :class="{'IndexNameActive':isActive==item.dataIndex}"  @click="getActiveIndexName(item)">
+                                <a-tooltip >
+                                    <template slot="title">
+                                    <span>{{item.title}}</span>
+                                    </template>
+                                    <span  style="display:inline-block;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;max-width:105px">{{item.title}}</span>
+                                </a-tooltip>
+                                
                             </span>
                         </div>
                     </div>
@@ -78,7 +87,7 @@
             </div>
             <div class="accountBodyRight">
                 <div class="accountBodyRighTitle" @click="changeAccount">
-                    <h1>{{currentAccount.accountName}}</h1>
+                    <h1>{{currentAccount.accountName}}<a-icon type="down" style="font-size:14px" /></h1>
                     <p class="accountBodyRighTitleID">账户ID:{{currentAccount.accountId || 9647490}}</p>
                 </div> 
                 <div class="accountBodyRightInfo">
@@ -166,7 +175,7 @@
                         <a-popover v-model="record.visible" trigger="click" placement="topLeft" @visibleChange='visibleChange'>
                             <span slot="title">修改出价</span>
                             <template  slot="content" style="width:300px;">
-                                <div style="margin:5px 0 0">
+                                <div style="margin:5px 0 0;padding: 0 0 15px;">
                                     <span ><a-input-number :min="0" v-model="newBid" :step="0.1" placeholder="请输入出价" size="small" style='margin-right:20px;width:120px' /></span>
                                     <p style="color:red;font-size:12px;height:16px;padding:5px 0">{{bidErrorMessage}}</p>
                                 </div>
@@ -508,7 +517,7 @@ const materialColumns = [
     title: '素材ID',
     dataIndex: 'signature',
     key: 'signature',
-    width:150,
+    width:170,
     align: 'center',
     scopedSlots: { customRender: 'signature' },   
   },
@@ -627,8 +636,8 @@ const columnsFixd = [
 const columns=[
     {
         title: '激活成本',
-        dataIndex: 'activeCost',     
-        key:'activeCost',
+        dataIndex: 'activationCost',     
+        key:'activationCost',
         today:0,
         yesterday:0
     },
@@ -690,7 +699,7 @@ const columns=[
                 newLink:'',
                 linkVisible:false,
                 targetVisible:false,
-                isActive:'activeCost',
+                isActive:'activationCost',
                 moment,
                 materialDate:[moment().subtract(1,'days'),moment().subtract(1,'days')],
                 currentAccount:{},
@@ -769,18 +778,20 @@ const columns=[
         watch:{
             accountId(n,o){
                 if(n){
-                    
+                    this.echartIndex='charge';
+                    this.getColumnsByAccountId();
+
                     this.getAllIndex();
                     this.getAgeData();
                     this.getNewlyCounts();
-                    this.getAccountIndexData();
+                    // this.getAccountIndexData();
                     this.getLaunchData();
                     this.getMaterialOverview();
                     this.getSceneData();
                     this.getGenderData()
                     this.getMaterialData()
-                    this.getColumnsByAccountId();
-                    this.echartIndex='charge'
+                    
+                    this.getCurrentAccountInfo()
                 }
             }
         },
@@ -827,7 +838,7 @@ const columns=[
             accounthandleOk(){
                 this.accountVisible=false;
                 this.accountId=this.selectaccountId
-                this.getCurrentAccountInfo();
+                // this.getCurrentAccountInfo();
             },
             accountCancel(){                
                 this.accountVisible=false;
@@ -851,15 +862,32 @@ const columns=[
                     }).then(res => {
                     // // console.log(res);(res)
                     })
+
+                   this.isActive=this.columns[1].dataIndex
+                   
+                    this.getAccountIndexData()
+                    
                 }else{
-                    this.$message.error('暂无数据')
+                    // this.$message.error('暂无数据,不支持修改自定义列')
+                    this.columns=[...val];
+                    let arr = JSON.stringify(this.columns)
+                    postAction('/toutiao/videoReportDaily/saveOrUpdateColumnJsonByAccountId', {
+                        json: arr,
+                        columnType: 10,
+                        accountId:this.accountId
+                    }).then(res => {
+                    // // console.log(res);(res)
+                    })
+                    this.isActive=this.columns[1].dataIndex
+                   
+                    this.getAccountIndexData()
                 }
                 
             },
             getColumnsByAccountId(){
                 postAction('/toutiao/videoReportDaily/getColumnJsonByAccountId', {
-                columnType: 10,
-                accountId:this.accountId
+                    columnType: 10,
+                    accountId:this.accountId
                 }).then(res => {
                 // // console.log(res);(res)
                 if (res.success) {
@@ -877,8 +905,11 @@ const columns=[
 
                         // // console.log(res);(this.columns)
                         }
+                        this.isActive=this.columns[1].dataIndex
                     }
-                    this.changeColumn(this.columns)
+                    this.changeColumn(this.columns);
+                    this.getAccountIndexData()
+
                 }
                 })
             },
@@ -1831,12 +1862,16 @@ const columns=[
                 this.accountPageSpinning=true
                 getAction('/etl/reportAccountHourly/getMaxChargeAccountId',{
                     accountId:val || this.accountId ||undefined,
-                    userId:this.userInfo().id,
+                   
                 }).then(res=>{
                     if(res.success){
                         this.currentAccount=res.result;
                         // this.accountId=res.result.accountId
                         this.accountPageSpinning=false
+                    }else{
+                        this.accountPageSpinning=false;
+                        this.$message.error(res.message)
+                        this.currentAccount={};
                     }
                 })
             },
@@ -1857,6 +1892,7 @@ const columns=[
                     value:this.isActive,
                 }).then(res=>{
                     // console.log(res);(res);
+                    this.accountIndexEchartSpinning=false;
                     if(res.success){
                         let data={
                             xData:null,
@@ -1874,10 +1910,12 @@ const columns=[
                        
                         
                         // 单天的数据
-                        if(res.result.yesterday.length&&res.result.yesterday[0].statHour){
+                     
+                        if(res.result.yesterday.length&&res.result.yesterday[0].statHour==0){
+                            
                             data.xData=[];
                             data.xData= Array.apply(null, Array(24)).map((item, i)=> {return i<10?`0${i}:00`:`${i}:00`});
-                            data.yData.yesterday.name=this.dateValue[0].subtract(1,'days').format('YYYY-MM-DD');
+                            data.yData.yesterday.name=moment(this.dateValue[0]).subtract(1,'days').format('YYYY-MM-DD');
                             data.yData.today.name=this.dateValue[0].format('YYYY-MM-DD')
                             data.yData.yesterday.data=res.result.yesterday.map((item,index)=>{
                                 return item.value?item.value:0
@@ -1885,11 +1923,13 @@ const columns=[
                             data.yData.today.data=res.result.today.map((item,index)=>{
                                 return item.value?item.value:0
                             })
+                            // console.log(data)
                             this.initEchart('accountIndexEchart',this.initAccountIndexEchart(indexName,data))
                             
                         }else if(res.result.yesterday.length&&!res.result.yesterday[0].statHour){
                             // 时间段的
-                            xData={};
+                           
+                            data.xData={};
                             data.xData.yesterday=res.result.yesterday.map(item=>{
                                 return item.statDate
                             })
@@ -1900,6 +1940,7 @@ const columns=[
 
                             data.yData.yesterday.data=res.result.yesterday.map(item=>item.value)
                             data.yData.today.data=res.result.today.map(item=>item.value)
+                            // console.log(data)
                             this.initEchart('accountIndexEchart',this.initAccountIndexEchart(indexName,data))
                            
                         }else{
@@ -2109,22 +2150,33 @@ const columns=[
 
         },
         mounted() {
-            this.$nextTick(()=>{
-                
-               
-                // this.echartIndexChange('charge')
-                
-            })
+            
             this.getAccountId();
             this.accountPageSpinning=true
-            getAction('/etl/reportAccountHourly/getMaxChargeAccountId',{                
+            // getAction('/etl/reportAccountHourly/getMaxChargeAccountId',{                
+            //     userId:this.userInfo().id,
+            // }).then(res=>{
+            //     if(res.success){
+            //         this.currentAccount=res.result;
+            //         this.accountId=res.result.accountId;
+            //         this.selectaccountId=res.result.accountId;
+            //         this.accountPageSpinning=false
+            //     }else{
+            //         this.$message.error(res.message)
+            //         this.accountPageSpinning=false 
+            //     }
+            // })
+            getAction('/etl/reportAccountHourly/getMaxChargeAccountIdByUser',{                
                 userId:this.userInfo().id,
             }).then(res=>{
                 if(res.success){
-                    this.currentAccount=res.result;
-                    this.accountId=res.result.accountId;
-                    this.selectaccountId=res.result.accountId;
-                    this.accountPageSpinning=false
+                    // this.currentAccount=res.result;
+                    this.accountId=res.result;
+                    this.selectaccountId=res.result;
+                    this.accountPageSpinning=false;
+                }else{
+                    // this.$message.error(res.message)
+                    this.accountPageSpinning=false; 
                 }
             })
          
@@ -2209,7 +2261,9 @@ const columns=[
 <style lang="scss" scoped>
 // #
 .accountPage{
-    
+    p{
+        margin-bottom: 0px;
+    }
     .echart{
         margin-top: 30px;
     }
@@ -2262,7 +2316,7 @@ const columns=[
             padding: 0;
         }
         .costInfo{
-            margin: 24px 0 0 0;
+            margin: 20px 0 0 0;
             width: 70%;
             display: flex;
             justify-content: space-between;
@@ -2277,7 +2331,7 @@ const columns=[
             text-align: center;
             border-radius: 10px;
             margin: 15px 0;
-            padding: 8px 0px;
+            padding: 3px 0px;
         }
     }
     .accountBodyLeftCostRight{
@@ -2298,13 +2352,13 @@ const columns=[
         .item{
             width: 25%;
             // min-width: 100px;
-            
+            // font-size: 16px;
         }
         .todyCost{
-            font-size: 1.5em;
+            font-size: 1.2rem;
             font-weight: 700;
             color:#303133;
-            margin-bottom: 10px;
+            margin-bottom: 3px;
             width: 100%;
             
         }
@@ -2342,17 +2396,21 @@ const columns=[
             }
         }
         .yesterdayCost{
-            font-size: 15px;
+            font-size: 0.89rem;
             font-weight: 500;
             color:#303133;
-            margin-bottom:8px ;
+            margin-bottom:3px ;
         }
         .IndexName{
+            // width: 100%;
             font-size: 15px;
             font-weight: 600;
             color:#303133;
             display: inline-block;
             cursor: pointer;
+            // white-space:nowrap;
+            // overflow:hidden;
+            // text-overflow:ellipsis;
         }
         .IndexNameActive{
             color:#2461F1;
@@ -2486,8 +2544,8 @@ const columns=[
     }
     .accountBodyRightInfoItem{
         background: rgb(238,241,255);
-        padding: 15px;
-        margin: 20px 0 0;
+        padding:10px 15px;
+        margin: 15px 0 0;
         border-radius: 5px;
         font-size: 16px;
         .name{

+ 2 - 1
vue.config.js

@@ -71,7 +71,7 @@ module.exports = {
           // target: 'http://192.168.1.8:8080', //请求本地 需要jeecg-boot后台项目  蒙蒙
           // target: 'http://192.168.1.8:8081', //请求本地 需要jeecg-boot后台项目  蒙蒙
         // target: 'http://192.168.0.59:8088', //请求本地 需要jeecg-boot后台项目  英豪
-        target: 'http://192.168.1.188:8088', //请求本地 需要jeecg-boot后台项目  英豪
+        // 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后台项目  毕洁泉
@@ -87,6 +87,7 @@ module.exports = {
         // target: 'http://192.168.1.251/', //请求本地 需要jeecg-boot后台项目
         // target:'http://118.24.244.213:8804',
       //  target:'http://139.186.151.174:8804', //测试
+       target:'http://139.186.165.84:8806', //测试
 
         ws: false,