Prechádzať zdrojové kódy

'修正视频报表'

魏志佳 4 rokov pred
rodič
commit
d78f960de7

+ 137 - 9
src/views/modules/Statistics/videoStatics/KSvideoStatics.vue

@@ -112,6 +112,10 @@
                     @load="loadShow"
                     />
                 </div>
+                <span slot="operation" slot-scope="text, record">
+                  <a href="javascript:;" @click="opendetail(text, record)" style="margin-right:5px">查看明细</a>
+                </span>
+
 
                 <span slot="ctr" slot-scope="ctr">{{ ctr | toPercentage }}</span>
                 <span slot="cost" slot-scope="cost">{{ cost | decimalsHandle }}</span>
@@ -205,15 +209,33 @@
                   slot-scope="gameAddictionRate"
                 >{{ gameAddictionRate | toPercentage }}</span>
                 <!-- <span slot="nextDayOpenRate" slot-scope="nextDayOpenRate">{{ nextDayOpenRate | toPercentage }}</span> -->
-                <span slot="operation" slot-scope="text,record">
+                <span slot="relativePeople" slot-scope="text,record">
                     <a href="javascript:;" @click.stop="showRelevantPeople(record)">查看相关人员</a>
                 </span>
 
                 
             </a-table>
 
+
+
         </div>
       <customColumn :visible='visible'  :listNum='listNum' :fiexColumn='columnsFixd' :mediaType='2'  @closeCustomColumn='closeCustomColumn' @changeColumn='changeColumn' />
+
+      <!-- 明细表 -->
+
+      <a-modal v-model="visibleDetail" title="详细信息" width="60%" :footer="null" >
+        <a-button type="default" @click="exportExcel" id="mybtn" >导出报表</a-button>
+        <a-table
+          :columns="detailConsum"
+          :data-source="detailData"
+          bordered
+          tableLayout="auto"
+          :pagination="false"
+          style="word-break: break-all;"
+        >
+          <span slot="huanbi" slot-scope="huanbi">{{ huanbi | toPercentage }}</span>
+        </a-table>
+      </a-modal>
   </div>
 </template>
 
@@ -239,25 +261,41 @@ const columnsFixd = [
     title: '视频名称',
     dataIndex: 'materialName',
     align: 'center',
-    width: 120,
+    width: 130,
+    fixed: 'left'
+  },
+   {
+    title: '视频ID',
+    dataIndex: 'signature',
+    align: 'center',
+    width: 150,
     fixed: 'left'
   },
   {
     title: '项目名称',
     dataIndex: 'projectName',
     align: 'center',
-    width: 100,
+    width: 150,
     fixed: 'left'
   },
     {
     title:'相关人员',
-    dataIndex:'operation',
-    key:'operation',
-    scopedSlots: { customRender: 'operation' },
+    dataIndex:'relativePeople',
+    key:'relativePeople',
+    scopedSlots: { customRender: 'relativePeople' },
     align: 'center',
     width:120,
     fixed: 'left'
   },
+  //   {
+  //   title:'操作',
+  //   dataIndex:'operation',
+  //   key:'operation',
+  //   scopedSlots: { customRender: 'operation' },
+  //   align: 'center',
+  //   width:90,
+  //   fixed: 'left'
+  // },
 
   {
     title: '创建时间',
@@ -363,9 +401,71 @@ const columnsFixd = [
 ]
 let show = 0
 
+let detailColumn = [
+  {
+    title: '客户',
+    dataIndex: 'advertiserName',
+    align: 'center',
+
+    customRender: (value, row, index) => {
+      const obj = {
+        children: value,
+        attrs: {}
+      }
+      if (index === 0) {
+        obj.attrs.rowSpan = 7
+      } else {
+        obj.attrs.rowSpan = 0
+      }
+      return obj
+    }
+  },
+  {
+    title: '项目名称',
+    dataIndex: 'projectName',
+    align: 'center',
+    width:150,
+    customRender: (value, row, index) => {
+      const obj = {
+        children: value,
+        attrs: {}
+      }
+      if (index == 0) {
+        obj.attrs.rowSpan = 7
+      }else {
+        obj.attrs.rowSpan = 0
+      }
+      return obj
+    }
+  },
+  {
+    title: '时间',
+    dataIndex: 'statDatetime',
+    align: 'center',
+    width: 120
+  },
+  {
+    title: '消耗',
+    dataIndex: 'cost',
+    scopedSlots: { customRender: 'cost' },
+    align: 'center'
+  },
+  {
+    title: '环比',
+    dataIndex: 'huanbi',
+    scopedSlots: { customRender: 'huanbi' },
+    align: 'center'
+  }
+]
+
 export default {
   data() {
     return {
+      //明细数据
+      visibleDetail:false,
+      detailColumn,
+      detailData: [],
+
       exportLoading:false,
        target:'cost',
         order:'desc',
@@ -405,7 +505,7 @@ export default {
       //自定义列的搜索框
       searchInput: '',
       //弹出框中现实的选中列数
-      scrollX: 2000,
+      scrollX: 2200,
       listNum: [],
       //
       form: [],
@@ -439,9 +539,33 @@ export default {
     customColumn,
   },
   watch:{
-
+      
   },
   methods: {
+    //点击查看明细按钮的事件
+    opendetail(text, record) {
+      console.log(text, record)
+      this.visibleDetail = true
+      this.detailData = []
+      // this.signature=record.signature
+      // console.log(this.signature)
+      postAction('/toutiao/videoReportDaily/bytedanceVideoInfoListDetail', {
+        startDate: this.dateValue[0].format('YYYY-MM-DD'),
+        endDate: this.dateValue[1].format('YYYY-MM-DD'),
+        signature: record.signature,
+        accountIds:this.appId
+      }).then(res => {
+        console.log(res)
+        if (res.success) {
+          let result = res.result
+          // this.detailData.push({ ...result, key: 1 })
+          result.map((item, index) => {
+            item.key = index
+          })
+          this.detailData = result
+        }
+      })
+    },
     closeCustomColumn(){
       this.visible=false;
     },
@@ -519,7 +643,8 @@ export default {
     //查询按钮
     searchRes() {
       this.date = []
-     
+      this.ipagination.current=1
+
       this.HttpPost()
       
     },
@@ -1071,4 +1196,7 @@ span {
   }
   
 }
+#mybtn {
+  margin: 0 10px 15px 0;
+}
 </style>

+ 77 - 13
src/views/modules/Statistics/videoStatics/TTvideoStatics.vue

@@ -67,7 +67,9 @@
         <!-- <video :src="records.converUrl"  style="width:80px" controls  @click="openVideo(records.url)"
           @load="loadShow" ></video> -->
       </div>
-   
+        <span slot="operation" slot-scope="text, record">
+          <a href="javascript:;" @click="opendetail(text, record)" style="margin-right:5px">查看明细</a>
+        </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>
@@ -147,7 +149,7 @@
                 <span slot="nextDayOpenRate" slot-scope="nextDayOpenRate">{{ nextDayOpenRate | toPercentage }}</span> -->
                 
       
-        <span slot="operation" slot-scope="text,record">
+        <span slot="relativePeople" slot-scope="text,record">
            <a href="javascript:;" @click.stop="showRelevantPeople(record)">查看相关人员</a>
        </span>
 
@@ -167,6 +169,23 @@
       >您的浏览器不支持 video 标签。</video>
     </a-modal>
     <customColumn :visible='visible'  :listNum='listNum' :fiexColumn='columnsFixd' :mediaType='1'  @closeCustomColumn='closeCustomColumn' @changeColumn='changeColumn' />
+
+
+    <!-- 明细表 -->
+
+      <a-modal v-model="visibleDetail" title="详细信息" width="60%" :footer="null" >
+        <a-button type="default" @click="exportExcel" id="mybtn">导出报表</a-button>
+        <a-table
+          :columns="detailColumn"
+          :data-source="detailData"
+          bordered
+          tableLayout="auto"
+          :pagination="false"
+          style="word-break: break-all;"
+        >
+          <span slot="huanbi" slot-scope="huanbi">{{ huanbi | toPercentage }}</span>
+        </a-table>
+      </a-modal>
   </div>
 </template>
 
@@ -195,13 +214,13 @@ const columnsFixd = [
     width: 120,
     fixed: 'left'
   },
-  // {
-  //   title: '视频ID',
-  //   dataIndex: 'signature',
-  //   align: 'center',
-  //   width: 120,
-  //   fixed: 'left'
-  // },
+  {
+    title: '视频ID',
+    dataIndex: 'signature',
+    align: 'center',
+    width: 120,
+    fixed: 'left'
+  },
   {
     title: '项目名称',
     dataIndex: 'projectName',
@@ -211,13 +230,23 @@ const columnsFixd = [
   },
     {
     title:'相关人员',
-    dataIndex:'operation',
-    key:'operation',
-    scopedSlots: { customRender: 'operation' },
+    dataIndex:'relativePeople',
+    key:'relativePeople',
+    scopedSlots: { customRender: 'relativePeople' },
     align: 'center',
     width:120,
     fixed: 'left'
   },
+  //   {
+  //   title:'操作',
+  //   dataIndex:'operation',
+  //   key:'operation',
+  //   scopedSlots: { customRender: 'operation' },
+  //   align: 'center',
+  //   width:120,
+  //   fixed: 'left'
+  // },
+
   {
     title: '创建时间',
     dataIndex: 'createTime',
@@ -278,9 +307,16 @@ const columnsFixd = [
 ]
 let show = 0
 
+let detailColumn=[]
+
 export default {
   data() {
     return {
+       //明细数据
+      visibleDetail:false,
+      detailColumn,
+      detailData: [],
+
        listNum:[],
        exportLoading:false,
       target:'cost',
@@ -355,6 +391,31 @@ export default {
     customColumn
   },
   methods: {
+    //点击查看明细按钮的事件
+    opendetail(text, record) {
+      console.log(text, record)
+      this.visibleDetail = true
+      this.detailData = []
+      // this.signature=record.signature
+      // console.log(this.signature)
+      postAction('/toutiao/videoReportDaily/bytedanceVideoInfoListDetail', {
+        startDate: this.dateValue[0].format('YYYY-MM-DD'),
+        endDate: this.dateValue[1].format('YYYY-MM-DD'),
+        signature: record.signature,
+        accountIds:this.appId
+      }).then(res => {
+        console.log(res)
+        if (res.success) {
+          let result = res.result
+          // this.detailData.push({ ...result, key: 1 })
+          result.map((item, index) => {
+            item.key = index
+          })
+          this.detailData = result
+        }
+      })
+    },
+
     closeCustomColumn(){
       this.visible=false;
     },
@@ -432,7 +493,7 @@ export default {
     //查询按钮
     searchRes() {
       this.date = []
-     
+      this.ipagination.current=1
       this.HttpPost()
       
     },
@@ -955,4 +1016,7 @@ span {
     }
   }
 }
+#mybtn {
+  margin: 0 10px 15px 0;
+}
 </style>

+ 182 - 7
src/views/modules/autoRules/newBlankRule.vue

@@ -58,7 +58,7 @@
                             </a-form-model-item>
                         </div>
                     </div>
-                    <div class="row-item" v-if="form.applyRange=='APPOINT'&&form.applyObject!='ACCOUNT'">
+                    <div class="row-item" v-if="form.applyRange=='ACCORDINGTO_STATUS'&&form.applyObject!='ACCOUNT'">
                         <div class="hint-item"></div>
                         <div class="label-item">
                             <div class="text-item">选择状态</div>
@@ -75,7 +75,7 @@
 
                         </div>
                     </div>
-                    <div class="row-item" v-if="form.applyRange=='ACCORDINGTO_STATUS'&&form.applyObject!='ACCOUNT'">
+                    <div class="row-item" v-if="form.applyRange=='APPOINT'&&form.applyObject!='ACCOUNT'">
                         <div class="hint-item"></div>
                         <div class="label-item">
                             <div class="text-item">具体{{form.applyObject | handlerApplyObj}}</div>
@@ -83,11 +83,26 @@
                         </div>
                         <div class="input-item" > 
                             <a-form-model-item ref="status"  prop="status">
-                                <a-select  style="width: 300px" v-model="form.status">
-                                    <a-select-option v-for="item in statusList" :key="item.id" :value='item.value'>
-                                        {{item.title}}
-                                    </a-select-option>
-                                </a-select>
+                                <div class="selectedExist">
+                                    <a-input v-model="selectedCampaignValue" class="input" placeholder='请输入名称' @change="selectedCampaign">
+                                        <a-icon slot="addonAfter" type="search" />
+                                    </a-input>
+                                    <div style="width: 500px; margin-top: 4px;" >
+                                        <div class="inventory-tags-lists-header">
+                                            <a-checkbox :indeterminate="indeterminate" :checked="checkAll" @change="onCheckAllChange">
+                                            </a-checkbox>
+                                            <div class="inventory-tags-lists-name"><strong>列表</strong></div>
+                                        </div>
+                                        <div class="inventory-tags-lists-container">
+                                            <a-checkbox-group v-model="checkedList" :options="plainOptions" @change="onChange" >
+                                                <span></span>
+                                            </a-checkbox-group>
+                                        </div>
+                                    </div>
+                                    <div class="fenye" v-if="totalPage">
+                                        <a-pagination :current='currentPage' size='small' :total='totalPage' :pageSize='10' @change="pageNoChange" />
+                                    </div>
+                                </div>
                             </a-form-model-item>
 
                         </div>
@@ -228,6 +243,7 @@
                         </div>
                     </div>
                      <div class="row-item" >
+                         
                         <div class="hint-item"></div>
                         <div class="label-item">
                             <div class="text-item">检查时间</div>
@@ -428,6 +444,16 @@ let budgetMultipleArr=[
 export default {
     data() {
         return {
+            selectedCampaignValue:undefined,
+            spinning:false,
+            campaignHaveList:[],
+            currentPage:1,
+            totalPage:0,
+            checkedList: [],
+            indeterminate: false,
+            checkAll: false,
+            plainOptions:[],
+
             saveLoading:false,
             // 用到的参数数组
             condition,
@@ -555,6 +581,39 @@ export default {
            
         },
 
+        //分页页码改变
+        pageNoChange(val){
+            console.log(val);
+            this.currentPage=val;
+            this.selectedCampaign()
+        },
+
+        onChange(checkedList) {
+            this.indeterminate = !!checkedList.length && checkedList.length < plainOptions.length;
+            this.checkAll = checkedList.length === plainOptions.length;
+        },
+        onCheckAllChange(e) {
+            let valueOption = [];
+            this.plainOptions.forEach((item) => {
+                valueOption.push(item.value)
+            })
+            Object.assign(this, {
+                checkedList: e.target.checked ? valueOption : [],
+                indeterminate: false,
+                checkAll: e.target.checked,
+            });
+        },
+        
+        selectedCampaign(e){
+            // console.log(e.target.value,this.selectedCampaignValue);
+            if(this.accountID){
+                this.getExsitGroupList();
+            }else{
+                this.$message.warning('请选择账户后重试!')
+                this.selectedCampaignValue=undefined;
+            }
+        },
+
     },
 
     filters:{
@@ -779,6 +838,113 @@ export default {
             }
         }
     }
+
+    .selectedExist{
+         width: 500px;
+         padding-top: 5px;
+         .inventory-tags-lists-header {
+          background-color: #F8F9FA;
+          border: 1px solid #E4E9ED;
+          height: 36px;
+          line-height: 33px;
+          border-radius: 4px 4px 0 0;
+          font-weight: bold;
+          display: flex;
+        }
+
+        .inventory-tags-lists-container {
+          border: 1px solid #E4E9ED;
+          margin-top: -1px;
+          height: 100%;
+          padding: 4px 0px;
+          border-radius: 0 0 4px 4px;
+        }
+
+        .inventory-tags-lists-item {
+          width: 100%;
+          height: 37px;
+          line-height: 37px;
+          padding-left: 12px;
+          padding-right: 12px;
+          display: flex;
+          font-size: 14px;
+          color: #333;
+        }
+               
+                .input{
+                    margin-bottom:16px ;
+                }
+                .campaign-have-list{
+                    font-family: PingFangSC-Regular;
+                    font-size: 14px;
+                    color: #333;
+                    border: 1px solid #DADFE3;
+                    border-radius: 4px;
+                    margin-bottom: 16px;
+                    height: 388px;
+                    .campaign-have-header {
+                        height: 38px;
+                        width: 100%;
+                        padding-left: 13px;
+                        line-height: 38px;
+                        background: #f8f9fa;
+                        border-radius: 4px 4px 0px 0px;
+                        border-bottom: 1px solid #DADFE3;
+                    }
+                    .campaign-have-list ul {
+                        width: 100%;
+                        height: 350px;
+                        padding-top: 6px;
+                        
+                    }
+                    li{
+                        padding: 6px 10px;
+                        cursor: pointer;
+                    }
+                    li:hover{
+                        background: #EDF1F5;
+                    }
+                    .ad-d-flex-between {
+                        justify-content: space-between !important;
+                    }
+
+                    .ad-d-flex, .ad-btn {
+                        display: flex;
+                        align-items: center;
+                    }
+                    .byted-loading-v {
+                        position: absolute;
+                        top: 0;
+                        right: 0;
+                        bottom: 0;
+                        left: 0;
+                        z-index: 996;
+                        background-color: hsla(0,0%,96%,.9);
+                    }
+                    .info{
+                        width: 60%;
+                        overflow: hidden;
+                        text-overflow: ellipsis;
+                        white-space: nowrap;
+                    }
+                    .landing-type {
+                        color: #999;
+                        font-size: 12px;
+                        white-space: nowrap;
+                    }
+                }
+                .noAccountID{
+                    font-size: 14px;
+                    text-align: center;
+                    color: #999;
+                    line-height: 388px;
+                }
+                .fenye{
+                    height: 60px;
+                    padding-top: 12px;
+                    text-align: right;
+                }
+            }
 }
 </style>
 <style lang="scss">
@@ -791,5 +957,14 @@ export default {
         min-width: 70px;
         text-align: center;
     }
+    .ant-checkbox-wrapper,
+    .ant-checkbox-group-item {
+      display: block;
+      padding: 5px 15px;
+    }
+
+    .ant-checkbox-wrapper:first-child {
+      padding: 0 15px 5px;
+    }
 }
 </style>

+ 14 - 6
src/views/modules/material/videoMaterial.vue

@@ -1806,10 +1806,10 @@ export default {
           value: '2',
           tab: '已驳回',
         },
-        {
-          value: '3',
-          tab: '有效视频',
-        },
+        // {
+        //   value: '3',
+        //   tab: '有效视频',
+        // },
       ],
       // 表头
       columns: [],
@@ -2294,7 +2294,8 @@ export default {
         userId: this.userInfo().id,
         status: this.active,
       }
-      this.labelValue=undefined;
+      this.labelValue=[];
+
       this.loadData(1)
     },
     getList(value) {
@@ -2799,12 +2800,19 @@ export default {
         this.url.list = '/ctop/materialInfo/effiMaterialInfo'
         this.queryParam = {}
       } else {
-        this.url.list = '/ctop/materialInfo/list'
+        this.url.list = '/ctop/materialInfo/listV2'
+        
         this.queryParam = {
           type: 'VIDEO',
           userId: this.userInfo().id,
           status: key,
           projectId: this.queryParam.projectId,
+          
+        }
+        if(this.labelValue.length>=1){
+           this.queryParam.tagCode=this.labelValue[this.labelValue.length-1]
+        }else{
+          this.queryParam.tagCode='';
         }
         if (this.form.getFieldValue('projectId')) {
           this.form.setFieldsValue({

+ 2 - 2
vue.config.js

@@ -68,7 +68,7 @@ module.exports = {
     open : true,
     proxy: {
       '/jeecg-boot': {
-         target: 'http://192.168.1.8:8080', //请求本地 需要jeecg-boot后台项目  蒙蒙
+        //  target: 'http://192.168.1.8:8080', //请求本地 需要jeecg-boot后台项目  蒙蒙
         // target: 'http://192.168.0.59:8088', //请求本地 需要jeecg-boot后台项目  英豪
         // target: 'http://192.168.1.72:8080', //请求本地 需要jeecg-boot后台项目  英豪
         // target: 'http://192.168.2.115:8080', //请求本地 需要jeecg-boot后台项目  祚云
@@ -80,7 +80,7 @@ module.exports = {
         // target: 'http://192.168.1.94: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后台项目