|
@@ -1,13 +1,17 @@
|
|
<template>
|
|
<template>
|
|
<div class="vsummary">
|
|
<div class="vsummary">
|
|
- <!-- <div class="xiangmuxuanze">
|
|
|
|
|
|
+ <div class="xiangmuxuanze">
|
|
<span>项目选择:</span>
|
|
<span>项目选择:</span>
|
|
- <a-select default-value="" style="width: 500px" @change="selectChange" placeholder="请选择项目账户">
|
|
|
|
- <a-select-option v-for="(item,index) in projectArr" :key="index" :value='item.id'>
|
|
|
|
- {{ item }}
|
|
|
|
- </a-select-option>
|
|
|
|
- </a-select>
|
|
|
|
- </div> -->
|
|
|
|
|
|
+ <Treeselect :appId.sync="appId" style="display: inline-block;position: relative;top: 10px;"/>
|
|
|
|
+ <!-- <a-tree-select style="width: 60%"
|
|
|
|
+ v-model="value"
|
|
|
|
+ :tree-data="treeData"
|
|
|
|
+ tree-checkable
|
|
|
|
+ :show-checked-strategy="SHOW_PARENT"
|
|
|
|
+ search-placeholder="Please select">
|
|
|
|
+
|
|
|
|
+ </a-tree-select> -->
|
|
|
|
+ </div>
|
|
<div class="timeDiv">
|
|
<div class="timeDiv">
|
|
<div>
|
|
<div>
|
|
<span>时间范围:</span>
|
|
<span>时间范围:</span>
|
|
@@ -60,11 +64,11 @@
|
|
<a-button id="btn" type="link" @click="clearAllList">清空全部</a-button>
|
|
<a-button id="btn" type="link" @click="clearAllList">清空全部</a-button>
|
|
<ul class="selectlist">
|
|
<ul class="selectlist">
|
|
<li v-for="(item,index) in listNum" :key="index">
|
|
<li v-for="(item,index) in listNum" :key="index">
|
|
- <span v-if=" index <4">
|
|
|
|
|
|
+ <span v-if=" index <3">
|
|
<a-icon type="lock" />
|
|
<a-icon type="lock" />
|
|
<span class="listText">{{item.title}}</span>
|
|
<span class="listText">{{item.title}}</span>
|
|
</span>
|
|
</span>
|
|
- <span v-else-if=" index >3">
|
|
|
|
|
|
+ <span v-else-if=" index >=3">
|
|
<a-icon type="menu" style="color:#ccc" />
|
|
<a-icon type="menu" style="color:#ccc" />
|
|
<span class="listText">{{item.title}}</span>
|
|
<span class="listText">{{item.title}}</span>
|
|
<a-icon
|
|
<a-icon
|
|
@@ -100,6 +104,7 @@
|
|
alt
|
|
alt
|
|
style="width:140px"
|
|
style="width:140px"
|
|
@click="openVideo(records.url)"
|
|
@click="openVideo(records.url)"
|
|
|
|
+ @load="loadShow"
|
|
/>
|
|
/>
|
|
</div>
|
|
</div>
|
|
<span slot="ctr" slot-scope="ctr">{{ ctr | toPercentage }}</span>
|
|
<span slot="ctr" slot-scope="ctr">{{ ctr | toPercentage }}</span>
|
|
@@ -182,7 +187,7 @@ import moment from 'moment'
|
|
import { JeecgListMixin } from '@/mixins/ipagination'
|
|
import { JeecgListMixin } from '@/mixins/ipagination'
|
|
import { getAction, postAction, downFile, downFilePost } from '@/api/manage'
|
|
import { getAction, postAction, downFile, downFilePost } from '@/api/manage'
|
|
import selectComponent from './selectComponent'
|
|
import selectComponent from './selectComponent'
|
|
-
|
|
|
|
|
|
+import Treeselect from './Treeselect.vue'
|
|
const columnsFixd = [
|
|
const columnsFixd = [
|
|
{
|
|
{
|
|
title: '视频',
|
|
title: '视频',
|
|
@@ -200,7 +205,6 @@ const columnsFixd = [
|
|
width: 100,
|
|
width: 100,
|
|
fixed: 'left'
|
|
fixed: 'left'
|
|
},
|
|
},
|
|
-
|
|
|
|
{
|
|
{
|
|
title: '视频描述',
|
|
title: '视频描述',
|
|
dataIndex: 'materialDesc',
|
|
dataIndex: 'materialDesc',
|
|
@@ -277,13 +281,16 @@ let variableCol = [
|
|
sorter: (a, b) => a.convertRate - b.convertRate
|
|
sorter: (a, b) => a.convertRate - b.convertRate
|
|
}
|
|
}
|
|
]
|
|
]
|
|
|
|
+let show = 0
|
|
|
|
|
|
export default {
|
|
export default {
|
|
data() {
|
|
data() {
|
|
return {
|
|
return {
|
|
|
|
+ roleCode: localStorage.getItem('roleCode'),
|
|
//下拉选择框的数据
|
|
//下拉选择框的数据
|
|
projectArr:[],
|
|
projectArr:[],
|
|
selectValue:'',
|
|
selectValue:'',
|
|
|
|
+ appId:[],
|
|
//设置表格的列宽
|
|
//设置表格的列宽
|
|
tableWidth: '',
|
|
tableWidth: '',
|
|
|
|
|
|
@@ -320,7 +327,8 @@ export default {
|
|
},
|
|
},
|
|
mixins: [JeecgListMixin],
|
|
mixins: [JeecgListMixin],
|
|
components: {
|
|
components: {
|
|
- selectComponent
|
|
|
|
|
|
+ selectComponent,
|
|
|
|
+ Treeselect
|
|
},
|
|
},
|
|
methods: {
|
|
methods: {
|
|
moment,
|
|
moment,
|
|
@@ -347,28 +355,45 @@ export default {
|
|
//查询按钮
|
|
//查询按钮
|
|
searchRes() {
|
|
searchRes() {
|
|
this.date = []
|
|
this.date = []
|
|
- this.loading = true
|
|
|
|
- this.HttpPost();
|
|
|
|
|
|
+ if(this.appId.length>0||this.roleCode=='admin'||this.roleCode=='plane'||this.roleCode=='plan'||this.roleCode=='shot'||this.roleCode=='clip'||this.roleCode=='designTeamLeader'||this.roleCode=='planeLeader'){
|
|
|
|
+ this.HttpPost();
|
|
|
|
+ }else{
|
|
|
|
+ this.$message.error('请选择项目')
|
|
|
|
+ }
|
|
|
|
+
|
|
},
|
|
},
|
|
//网络请求table数据函数
|
|
//网络请求table数据函数
|
|
HttpPost(){
|
|
HttpPost(){
|
|
-
|
|
|
|
|
|
+ this.loading=true;
|
|
|
|
+ show = 0
|
|
postAction('/toutiao/videoReportDaily/videoInfoListTotal', {
|
|
postAction('/toutiao/videoReportDaily/videoInfoListTotal', {
|
|
startDate: this.timedata[0],
|
|
startDate: this.timedata[0],
|
|
endDate: this.timedata[1],
|
|
endDate: this.timedata[1],
|
|
cost: this.consumeValue,
|
|
cost: this.consumeValue,
|
|
- signature: this.videoID
|
|
|
|
|
|
+ signature: this.videoID,
|
|
|
|
+ pageNo:this.ipagination.current,
|
|
|
|
+ pageSize:this.ipagination.pageSize,
|
|
|
|
+ projectIds:this.appId
|
|
}).then(res => {
|
|
}).then(res => {
|
|
let resArr = []
|
|
let resArr = []
|
|
- this.loading = false
|
|
|
|
- console.log(res)
|
|
|
|
|
|
+
|
|
if (res.success) {
|
|
if (res.success) {
|
|
- let result = res.result
|
|
|
|
- this.data.push({ ...result, key: 1 })
|
|
|
|
- result.map((item, index) => {
|
|
|
|
- item.key = index
|
|
|
|
|
|
+ // let result = res.result
|
|
|
|
+ // this.data.push({ ...result, key: 1 })
|
|
|
|
+ // result.map((item, index) => {
|
|
|
|
+ // item.key = index
|
|
|
|
+ // })
|
|
|
|
+ this.data = res.result.list.map((item,index)=>{
|
|
|
|
+ return {
|
|
|
|
+ ...item,
|
|
|
|
+ key:index
|
|
|
|
+ }
|
|
})
|
|
})
|
|
- this.data = result
|
|
|
|
|
|
+ this.ipagination.total = res.result.total
|
|
|
|
+ this.loading = false
|
|
|
|
+
|
|
|
|
+ }else{
|
|
|
|
+ this.loading = false
|
|
}
|
|
}
|
|
})
|
|
})
|
|
},
|
|
},
|
|
@@ -466,7 +491,7 @@ export default {
|
|
this.columns = [...this.listNum]
|
|
this.columns = [...this.listNum]
|
|
}
|
|
}
|
|
|
|
|
|
- if (this.listNum.length == 4) {
|
|
|
|
|
|
+ if (this.listNum.length == 3) {
|
|
// console.log(this.listNum.length)
|
|
// console.log(this.listNum.length)
|
|
this.scrollX = 0
|
|
this.scrollX = 0
|
|
this.columns.map((item, index) => {
|
|
this.columns.map((item, index) => {
|
|
@@ -477,7 +502,7 @@ export default {
|
|
this.columns.map((item, index) => {
|
|
this.columns.map((item, index) => {
|
|
if (index == 2 || index == 0) {
|
|
if (index == 2 || index == 0) {
|
|
item.width = 150
|
|
item.width = 150
|
|
- } else if (index == 1 || index == 3) {
|
|
|
|
|
|
+ } else if (index == 1 || index == 2) {
|
|
item.width = 100
|
|
item.width = 100
|
|
}
|
|
}
|
|
})
|
|
})
|
|
@@ -490,6 +515,14 @@ export default {
|
|
handleCancel(e) {
|
|
handleCancel(e) {
|
|
this.visible = false
|
|
this.visible = false
|
|
},
|
|
},
|
|
|
|
+ loadShow(){
|
|
|
|
+ show++
|
|
|
|
+ if(this.data.length>0){
|
|
|
|
+ if(show == (this.data.length*2)){
|
|
|
|
+ this.data = [...this.data]
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ },
|
|
//弹出框里的搜索框
|
|
//弹出框里的搜索框
|
|
onSearch(value) {
|
|
onSearch(value) {
|
|
console.log(value)
|
|
console.log(value)
|
|
@@ -566,6 +599,15 @@ export default {
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
},
|
|
|
|
+ watch:{
|
|
|
|
+ 'ipagination.current':function(n,o){
|
|
|
|
+ console.log(n,o)
|
|
|
|
+ if(this.appId.length>0||this.roleCode=='admin'||this.roleCode=='plane'||this.roleCode=='plan'||this.roleCode=='shot'||this.roleCode=='clip'||this.roleCode=='designTeamLeader'||this.roleCode=='planeLeader'){
|
|
|
|
+ this.HttpPost()
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ }
|
|
|
|
+ },
|
|
activated() {
|
|
activated() {
|
|
console.log('activated')
|
|
console.log('activated')
|
|
// this.getParticipateList()
|
|
// this.getParticipateList()
|
|
@@ -643,8 +685,12 @@ export default {
|
|
//进入页面默认展示昨天到今天的数据
|
|
//进入页面默认展示昨天到今天的数据
|
|
this.dateRange=[moment().subtract(1,'days'),moment()]
|
|
this.dateRange=[moment().subtract(1,'days'),moment()]
|
|
this.timedata=[moment().subtract(1,'days').format('YYYY-MM-DD'),moment().format('YYYY-MM-DD')]
|
|
this.timedata=[moment().subtract(1,'days').format('YYYY-MM-DD'),moment().format('YYYY-MM-DD')]
|
|
- this.loading=true;
|
|
|
|
- this.HttpPost();
|
|
|
|
|
|
+ // this.loading=true;
|
|
|
|
+ if(this.appId.length>0||this.roleCode=='admin'||this.roleCode=='plane'||this.roleCode=='plan'||this.roleCode=='shot'||this.roleCode=='clip'||this.roleCode=='designTeamLeader'||this.roleCode=='planeLeader'){
|
|
|
|
+ this.HttpPost();
|
|
|
|
+ }else{
|
|
|
|
+ this.$message.error('请选择项目')
|
|
|
|
+ }
|
|
|
|
|
|
}
|
|
}
|
|
}
|
|
}
|