浏览代码

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

zhuxinbo 5 年之前
父节点
当前提交
abe8b9e207

+ 1 - 1
src/permission.js

@@ -10,7 +10,7 @@ import {generateIndexRouter} from "@/utils/util"
 NProgress.configure({showSpinner: false}) // NProgress Configuration
 
 
-const whiteList = ['/user/login', '/user/register', '/user/register-result', '/user/alteration','/user/transfer-local','/errorPage'] // no redirect whitelist
+const whiteList = ['/user/login', '/user/register', '/user/register-result', '/user/alteration','/user/transfer-local','/errorPage','http://192.168.0.111:8088/jeecg-boot/sys/feishu/url'] // no redirect whitelist
 
 router.beforeEach((to, from, next) => {
   NProgress.start() // start progress bar

+ 73 - 20
src/views/errorPage.vue

@@ -1,15 +1,23 @@
 <template>
   <div class="exception">
-    <div class="img">
-      <img src="https://gw.alipayobjects.com/zos/rmsportal/RVRUAYdCGeYNBWoKiIwB.svg"/>
-    </div>
-    <div class="content">
-      <h1>异常信息</h1>
-      <div class="desc">{{desc}}</div>
+    <div class="errorpage">
+      <div class="xiaocao">
+        <img src="https://s1.pstatp.com/ee/feishu_website/static/img/toy4.635d004af4.svg" alt="">
+      </div>
+    <div class="content">         
+      <div class="desc">
+        <span class="tip">出错啦!</span>
+        {{desc}}
+      </div>
       <div class="action">
-        <a-button type="primary" @click="handleToHome">返回登录</a-button>
+        <a-button type="primary" @click="handleToHome" size='large'>返回登录</a-button>
       </div>
     </div>
+    <div class="img">
+      <img class="person" src="https://s0.pstatp.com/ee/feishu_website/static/img/toy6.0df0d49140.png"/>
+      <img class="shuxian" src="https://s3.pstatp.com/ee/feishu_website/static/img/toy9.8969d3ec2f.svg" alt="">
+    </div>
+    </div>
   </div>
 </template>
 
@@ -45,27 +53,57 @@
 
 <style lang="scss" scoped>
   .exception {
-    min-height: 500px;
-    height: 80%;
+    // min-height: 500px;
+    height: 100%;
     align-items: center;
     text-align: center;
-    margin-top: 150px;
-
+    padding-top: 150px;
+    box-sizing: border-box;
+    background-color: #fff;
+    .errorpage{
+        position: relative;
+        width: 50%;
+        margin: 0 auto;
+        .xiaocao{
+          width: 100px;
+          display: inline-block;
+          position: absolute;
+          bottom: 10px;
+          left: 10px;
+        }
+    }
+    .errorpage:after{
+      content: '';
+      display: block;
+      width: 100%;
+      height: 2px;
+      background-color:#000;
+      position: absolute;
+      bottom: 10px;
+      z-index: 0;
+    }
     .img {
       display: inline-block;
-      padding-right: 52px;
+      width: 400px; 
       zoom: 1;
-
-      img {
-        height: 360px;
-        max-width: 430px;
+      position: relative;
+      .person {
+        width: 62.5%;
+        display: inline-block;
+      }
+      .shuxian{
+        width: 37.5%;
+        display: inline-block;
+        position: absolute;
+        bottom: 10px;
       }
     }
-
+    
     .content {
       display: inline-block;
       flex: auto;
-
+      margin-right: 50px;
+      
       h1 {
         color: #434e59;
         font-size: 72px;
@@ -75,10 +113,25 @@
       }
 
       .desc {
-        color: rgba(0, 0, 0, .45);
-        font-size: 20px;
+        color: #333;
+        font-size: 16px;
         line-height: 28px;
         margin-bottom: 16px;
+        width: 210px;
+        height: 124px;
+        padding: 10px 15px;
+       background-image: url('https://s1.pstatp.com/ee/feishu_website/static/img/toy1.286bfce8d0.svg');
+        border-radius: 5px;
+        .tip{
+          display: block;
+          text-align: left;
+          margin-bottom: 5px;
+          font-size: 20px;
+          color: #999;
+        }
+      }
+      .action{
+        margin-top: 20px;
       }
     }
   }

+ 28 - 9
src/views/modules/BatchCreate/newDirectedPackage.vue

@@ -30,14 +30,7 @@
                         </a-radio-group>
                     </a-form-model-item>
                     <a-form-model-item label="年龄:" class="optItem">
-                        <a-radio-group default-value="" button-style="solid">
-                            <a-radio-button value="">不限</a-radio-button>
-                            <a-radio-button value="men">18-23</a-radio-button>
-                            <a-radio-button value="women">24-30</a-radio-button>
-                            <a-radio-button value="women">31-40</a-radio-button>
-                            <a-radio-button value="women">41-49</a-radio-button>
-                            <a-radio-button value="women">50+</a-radio-button>
-                        </a-radio-group>
+                        <radioCheck :checkArr='ageArr' @getSonValue='getNewUser' />
                     </a-form-model-item>
                     <a-form-model-item label="精选流量包:" class="optItem">
                         <a-radio-group default-value="" button-style="solid">
@@ -249,6 +242,32 @@ let platformArr=[
         title:'电信'
     },
 ]
+let ageArr=[
+    {
+        value:'',
+        title:'不限'
+    },
+    {
+        value:'AGE_BETWEEN_18_23',
+        title:'	18-23岁'
+    },
+    {
+        value:'AGE_BETWEEN_24_30',
+        title:'24-30岁'
+    },
+    {
+        value:'AGE_BETWEEN_31_40',
+        title:'31-40岁'
+    },
+    {
+        value:'AGE_BETWEEN_41_49',
+        title:'41-49岁'
+    },
+    {
+        value:'AGE_ABOVE_50',
+        title:'大于等于50岁'
+    },
+]
 
 export default {
     components:{
@@ -298,7 +317,7 @@ export default {
             newUser,//新用户的每一项值
             networkArr,//网络
             carrierArr,//运营商
-
+            ageArr,//受众年龄
         }
     },
     methods: {

+ 116 - 62
src/views/modules/Statistics/performanceRelated/performanceRelated.vue

@@ -106,6 +106,7 @@
                  <span slot="cost" slot-scope="cost">{{cost | decimalsHandle}}</span>
                  
                  <span slot="performance" slot-scope="performance">{{performance | decimalsHandle}}</span>
+                 <span slot="point" slot-scope="point">{{ point | pointHandle }}</span>
                  <span slot="mediaType" slot-scope="text">
                      <span v-if="text==1">头条</span>
                      <span v-if="text==2">快手</span>
@@ -115,32 +116,37 @@
             </a-table>
         </div>
          <!-- 明细表 -->
-        <div class="detailBox">
-            <a-modal v-model="visibleDetail" title="详细信息" width="55%" :footer="null" id="detailBox">
+        <div class="detailBoxPerform">
+            <a-modal v-model="visibleDetail" title="详细信息" width="55%" :footer="null" id="detailBoxPerform">
                 <!-- <a-button type="default" @click="exportExcel" id="mybtn">导出报表</a-button> -->
                 <div class="myTable">
                     <a-table
-                    :columns="detailColumns"
-                    :data-source="detailData"
-                    bordered
-                    tableLayout="auto"
-                    :pagination="false"
-                    :loading='loadingDetail'
-                    style="word-break: break-all;"
-                    id="myTable"
-                    :scroll="{ y: 500 }"
-                    >
+                        :columns="detailColumns"
+                        :data-source="detailData"
+                        bordered
+                        tableLayout="auto"
+                        :pagination="false"
+                        :loading='loadingDetail'
+                        style="word-break: break-all;"
+                        id="myTablePerform"
+                        :scroll="{ y: 500 }"
+                        >
                         <span slot="cost" slot-scope="cost">{{ cost | decimalsHandle }}</span>
+                        <span slot="totalCost" slot-scope="totalCost">{{ totalCost | decimalsHandle }}</span>
                         <span slot="materialCost" slot-scope="materialCost">{{ materialCost | decimalsHandle }}</span>
+                        <span slot="oldCost" slot-scope="oldCost">{{ oldCost | decimalsHandle }}</span>
+                        <span slot="newCost" slot-scope="newCost">{{ newCost | decimalsHandle }}</span>
                         <span slot="personCost" slot-scope="personCost">{{ personCost | decimalsHandle }}</span>
                         <span slot="percent" slot-scope="percent">{{ percent | toPercentage }}</span>
+                        <span slot="oldPercent" slot-scope="oldPercent">{{ oldPercent | toPercentage }}</span>
+                        <span slot="newPercent" slot-scope="newPercent">{{ newPercent | toPercentage }}</span>
+                        
                         <div slot="urls" slot-scope="test,records">
                             <img
                             :src="records.url+'?x-oss-process=video/snapshot,t_0,m_fast'"
                             alt
                             style="width:100px"
-                            @click="openVideo(records.url)"
-                            
+                            @click="openVideo(records.url)"                           
                             />
                         </div>
                         <span slot="mediaType" slot-scope="text">
@@ -150,8 +156,10 @@
                             <span v-if="text==4">快手内广</span>
                         </span>
                     </a-table>
-                </div>
-               
+                    <div class="fenye">
+                        <a-pagination v-if="totalItem>0" v-model="currentPage" :total="totalItem" id="fenye" show-less-items style="margin: 20px 5px 5px;"  size="small" @change="pageChange"/>
+                    </div>                   
+                </div>               
             </a-modal>
         </div>
         
@@ -173,6 +181,7 @@ import moment from 'moment';
 import { getAction, postAction, downFile, downFilePost } from '@/api/manage';
 import { JeecgListMixin } from '@/mixins/ipagination'
 
+
 const columnsFixd = [
   {
     title: '姓名',
@@ -335,55 +344,54 @@ const saleDetailColumns = [
         title: '季度',
         dataIndex: 'quarters',
         align: 'center',
-        scopedSlots: { customRender: 'quarters' },
-        
+        scopedSlots: { customRender: 'quarters' },       
         width:110
     },
     {
         title: '老客消耗',
-        dataIndex: 'projectName',
+        dataIndex: 'oldCost',
         align: 'center',
-        scopedSlots: { customRender: 'projectName' },
+        scopedSlots: { customRender: 'oldCost' },
         
         width:120
     },
     {
         title: '新客消耗',
-        dataIndex: 'authName',
+        dataIndex: 'newCost',
         align: 'center',
-        scopedSlots: { customRender: 'authName' },
+        scopedSlots: { customRender: 'newCost' },
        
         width:120,
     },
     {
         title: '老客提成比例',
-        dataIndex: 'projectName',
+        dataIndex: 'oldPercent',
         align: 'center',
-        scopedSlots: { customRender: 'projectName' },
+        scopedSlots: { customRender: 'oldPercent' },
        
         width:100
     },
     {
         title: '新客提成比例',
-        dataIndex: 'authName',
+        dataIndex: 'newPercent',
         align: 'center',
-        scopedSlots: { customRender: 'authName' },
+        scopedSlots: { customRender: 'newPercent' },
         
         width:100,
     },
     {
         title: '广告主名称',
-        dataIndex: 'cost',
+        dataIndex: 'name',
         align: 'center',
-        scopedSlots: { customRender: 'cost' },
+        scopedSlots: { customRender: 'name' },
         
         width:200,
   },
     {
         title: '总消耗',
-        dataIndex: 'cost',
+        dataIndex: 'totalCost',
         align: 'center',
-        scopedSlots: { customRender: 'cost' },
+        scopedSlots: { customRender: 'totalCost' },
         sorter:()=>{}
   },
 ]
@@ -391,9 +399,9 @@ const saleDetailColumns = [
 const designDetailColumns = [
     {
         title: '媒体类型',
-        dataIndex: 'medialType',
+        dataIndex: 'mediaType',
         align: 'center',
-        scopedSlots: { customRender: 'medialType' },
+        scopedSlots: { customRender: 'mediaType' },
         width:100,
     },
     {
@@ -436,9 +444,9 @@ const designDetailColumns = [
     },
     {
         title: '职位',
-        dataIndex: 'jobName',
+        dataIndex: 'roleName',
         align: 'center',
-        scopedSlots: { customRender: 'jobName' },
+        scopedSlots: { customRender: 'roleName' },
         width:80,
     },
     
@@ -487,6 +495,11 @@ export default {
             saleDetailColumns,//销售的详细表头
             designDetailColumns,//设计的详细表头
 
+            //fenye
+            currentPage:1,
+            totalItem:0,
+
+            currentRecord:null
         }
     },
     methods: {
@@ -502,6 +515,8 @@ export default {
             }else if(this.department=='销售部'){
                 this.columns=this.elseColumns;
                 this.detailColumns=this.saleDetailColumns
+            }else{
+                this.columns=this.columnsFixd;
             }
             this.tableHttp();
         },
@@ -551,8 +566,11 @@ export default {
             this.visibleDetail = true
             this.detailData = []
             this.loadingDetail=true
+            this.currentRecord=record
+            this.currentPage=1;
+            this.totalItem=0
             if(record.department=='运营部'){
-                this.columns=this.columnsFixd;
+                // this.columns=this.columnsFixd;
                 this.detailColumns=this.operateDetailColumns;
                 postAction('/ctop/performance/show/operateDetail', {
                     year:record.year,
@@ -574,7 +592,7 @@ export default {
                     }
                 })
             }else if(record.department=='设计部'){
-                this.columns=this.elseColumns;
+                // this.columns=this.elseColumns;
                 this.detailColumns=this.designDetailColumns;
                 postAction('/ctop/performance/show/designDetail/1/10', {
                     year:record.year,
@@ -590,15 +608,17 @@ export default {
                         // this.detailData.push({ ...result, key: 1 })
                         result.map((item, index) => {
                             item.key = index;
+                            item.roleName=this.currentRecord.roleName
                             item.quarters=record.quarters
                         })
-                        this.detailData = result
+                        this.detailData = result;
+                        this.totalItem=res.result.total
                     }
                 })
             }else if(record.department=='销售部'){
-                this.columns=this.elseColumns;
+                // this.columns=this.elseColumns;
                 this.detailColumns=this.saleDetailColumns;
-                postAction('/ctop/performance/show/operateDetail', {
+                postAction('/ctop/performance/show/saleDetail', {
                     year:record.year,
                     quarter:record.quarter,
                     userId:record.userId,
@@ -713,29 +733,7 @@ export default {
             })
         },
 
-        //请求详细信息
-        detailHttp(){
-            this.loadingDetail=true
-            postAction(`ctop/performance/show/${this.ipagination.current}/${this.ipagination.pageSize}/desc`,{
-                year:this.years,
-                quarter:this.quarter,
-                company:this.company,
-                userName:this.nameValue,
-                roleCode:this.position,
-                mediaType:this.mediaType
-            }).then(res=>{
-                console.log(res)
-                this.loadingDetail=false;
-                if(res.success&&res.result.list.length>0){
-                    res.result.list.forEach((item,index)=>{
-                        item.key=index;
-                        item.quarter=item.year+'_'+item.quarter;
-                    })
-                    this.tableData=[...res.result.list]
-                }
-                this.ipagination.total = res.result.total   
-            })
-        },
+        
 
         //打开视频
         openVideo(val) {
@@ -745,12 +743,55 @@ export default {
         videoOk() {
             this.Videovisible = false
         },
+
+        //f分页页码改变
+        pageChange(page, pageSize){
+            console.log(page, pageSize);
+            this.currentPage=page;
+            this.detailData=[];
+            this.loadingDetail=true;
+            postAction(`/ctop/performance/show/designDetail/${this.currentPage}/10`, {
+                    year:this.currentRecord.year,
+                    quarter:this.currentRecord.quarter,
+                    userId:this.currentRecord.userId,
+                    mediaType:this.currentRecord.mediaType
+                }).then(res => {
+                    // let resArr = []
+                    this.loadingDetail=false
+                    console.log(res)
+                    if (res.success) {
+                        let result = res.result.list
+                        // this.detailData.push({ ...result, key: 1 })
+                        result.map((item, index) => {
+                            item.key = index;
+                            item.roleName=this.currentRecord.roleName
+                            item.quarters=this.currentRecord.quarters
+                        })
+                        this.detailData = result;
+                        this.totalItem=res.result.total
+                    }
+                })
+        },
+
+        
     },
     mounted() {
         this.getInfoHttp();
         this.tableHttp();
     },
     filters: {
+        pointHandle(val){
+            if(val){
+                if(typeof val != 'string'){
+                    return (val * 100).toFixed(2) + '%'
+                }else{
+                    return val
+                }
+            }
+            else{
+                return '-'
+            }    
+        },
         toPercentage(val) {
             if(val){
                 if(typeof val != 'string'){
@@ -872,4 +913,17 @@ export default {
     }
 }
 
+</style>
+<style lang="scss">
+#detailBoxPerform{
+    padding: 20px 0 20px;
+    #myTablePerform{
+        margin-bottom: 20px;
+    }
+    .fenye{           
+            
+        text-align: right;
+    }
+    
+}
 </style>

+ 9 - 1
src/views/user/Login.vue

@@ -467,7 +467,15 @@ export default {
     },
 
     FSlogin(){
-      console.log('FSlogin')
+      console.log('FSlogin');
+      // this.$router.push('http://192.168.0.111:8088/jeecg-boot/sys/feishu/url')
+      // window.history.go('');
+      getAction('/sys/feishu/url',{}).then((res)=>{
+          console.log(res);
+          if(res.success){
+              window.location.href=res.url;
+          }
+      })
     }
   }
 }

+ 2 - 0
vue.config.js

@@ -83,6 +83,8 @@ module.exports = {
 
         // target: 'http://192.168.1.165:8848', //请求本地 需要jeecg-boot后台项目  毕洁泉        
         // target: 'http://192.168.1.251:80', //请求本地 需要jeecg-boot后台项目 
+        // target: 'https://trac.tjyourong.com.cn', //请求本地 需要jeecg-boot后台项目 
+
         ws: false,
         changeOrigin: true,
         // pathRewrite: {